Recent

Author Topic: laz4android update!  (Read 27254 times)

truetom

  • Jr. Member
  • **
  • Posts: 72
    • http://sourceforge.net/projects/laz4android/
laz4android update!
« on: August 01, 2015, 08:44:55 am »
Hello all,

I have updated laz4android to new version.

You can download from here:
http://sourceforge.net/projects/laz4android/

Laz4Android is a Lazarus for Android Package.
Thanks the FreePascal team and the Lazarus team.
Now Laz4Android is only run on Windows.Sorry for this!

---------------------------------------------------------
Last update:2015-07-25
FPC: 3.1.1 trunk svn 31226 win32/arm-android/i386-android/jvm-android
Lazarus:1.5 trunk svn 49563
Android NDK: r10c (arm-linux-androideabi-4.6 + x86-4.6)

=========================================================
Update history:
2014-04-05:
1.Fixed Android application crash problem,thanks DelphiFreak and Leslie.
---------------------------------------------------------
2014-10-18:
FPC: 2.7.1 trunk svn 28863 win32/arm-android/i386-android/jvm-android
Lazarus:1.3 trunk svn 46592
Android NDK: r10c (arm-linux-androideabi-4.6 + x86-4.6)

1.Fixed examples\androidlcl,now it can compatible with this version.
2.Compatible with Jmpessoa's LazAndroidModuleWizard,thanks Jmpessoa and Simonsays,links:
  https://github.com/jmpessoa/lazandroidmodulewizard
  http://forum.lazarus.freepascal.org/index.php/topic,21919.0.html
---------------------------------------------------------
2015-02-25:
FPC: 3.1.1 trunk svn 29987 win32/arm-android/i386-android/jvm-android
Lazarus:1.5 trunk svn 47987
Android NDK: r10c (arm-linux-androideabi-4.6 + x86-4.6)

1.Fixed examples\androidlcl\build_debug_apk.bat,now it can use JDK1.7 or JDK1.8 to Signing the APK.
---------------------------------------------------------
2015-07-25:
FPC: 3.1.1 trunk svn 31226 win32/arm-android/i386-android/jvm-android
Lazarus:1.5 trunk svn 49563
Android NDK: r10c (arm-linux-androideabi-4.6 + x86-4.6)

1.Update!

=========================================================
How to install Laz4Android?

1.You can download a installer file from here:
http://sourceforge.net/projects/laz4android/files/?source=navbar
- Double click the installer file
- Next , Next to finished.

---------------------------------------------------------
2.You can download a 7z compressed file from here:
http://sourceforge.net/projects/laz4android/files/?source=navbar
- Unzip 7z file to e.g.  c:\laz4android
- Edit the file c:\laz4android\build.bat like this:

  SET FPC_BIN_PATH=c:\laz4android

Please run build.bat (double click it), it will compile and build lazarus.
=========================================================

Thanks and best regards!
laz4android : a Lazarus for Android Package.
http://sourceforge.net/projects/laz4android/

jmpessoa

  • Hero Member
  • *****
  • Posts: 1469
Re: laz4android update!
« Reply #1 on: August 05, 2015, 12:02:59 am »

Hello TrueTom!

Thank you very much!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

truetom

  • Jr. Member
  • **
  • Posts: 72
    • http://sourceforge.net/projects/laz4android/
Re: laz4android update!
« Reply #2 on: August 05, 2015, 03:13:13 pm »

Hello TrueTom!

Thank you very much!

Hello jmpessoa!

Thank you for your Lazarus Android Module Wizard (LAMW), your jobs is great!

I will introduce  your LAMW to  Chinese Lazarus  forum!

Best regards!
laz4android : a Lazarus for Android Package.
http://sourceforge.net/projects/laz4android/

jmpessoa

  • Hero Member
  • *****
  • Posts: 1469
Re: laz4android update!
« Reply #3 on: August 05, 2015, 03:45:31 pm »
Hello TrueTom!

I updated the tutorials:

"readme_get_start.txt"
"install_tutorial.txt"
"install_tutorial_eclipse_users.txt"

and for Linux there is:

"new_how_to_install_by_renabor.txt"   [folder "..\linux"]

Thank you!
« Last Edit: August 05, 2015, 03:47:08 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 159
Re: laz4android update!
« Reply #4 on: August 06, 2015, 01:39:39 pm »
Hi truetom
I am needing using unit fphttpclient for my android app, but when add it's name to uses clause and compile
laz4android show error message

Code: [Select]
Fatal: Cannot find unit fphttpclient used by unit1 of the Project Inspector.
I don't know how to add it
Please help
Thanks much  :)

truetom

  • Jr. Member
  • **
  • Posts: 72
    • http://sourceforge.net/projects/laz4android/
Re: laz4android update!
« Reply #5 on: August 06, 2015, 02:51:16 pm »
Hello m4u_hoahoctro!

I think you can try do like this, please see the attachememts.

Thanks and best regards!
laz4android : a Lazarus for Android Package.
http://sourceforge.net/projects/laz4android/

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 159
Re: laz4android update!
« Reply #6 on: August 06, 2015, 03:05:08 pm »
Hello m4u_hoahoctro!

I think you can try do like this, please see the attachememts.

Thanks and best regards!

hi truetom, thanks very much :)

my friend said I also use jhttpclient in lamw :)
with fphttpclient i can use this code to get infomations about site's header

Code: [Select]
try
http1.HTTPMethod('GET','http://v3.mp3.zing.vn/download/vip/song/ZW6F97CU',stream1,code);
for i:=0 to http1.ResponseHeaders.Count-1 do
begin
s:=http1.ResponseHeaders.Strings[i];   

infomations about site's header can get by command ReponseHeaders ( as above ),
but I couldn't find anything same as it in list of commands of jhttpclient :(


Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 917
    • Burdjia
Re: laz4android update!
« Reply #7 on: August 17, 2015, 07:27:50 pm »
Didn't know it exists. I should take a look as we will need it in a future. Unfortunatelly I haven't a Windows computer right now.  :(
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

jmpessoa

  • Hero Member
  • *****
  • Posts: 1469
Re: laz4android update!
« Reply #8 on: August 17, 2015, 08:09:26 pm »

@m4u_hoahoctro

Quote
...infomations about site's header can get by command ReponseHeaders ( as above ),
but I couldn't find anything same as it in list of commands of jhttpclient

Ok, I will improve header support in [Lamw] "jhttpclient "!

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

truetom

  • Jr. Member
  • **
  • Posts: 72
    • http://sourceforge.net/projects/laz4android/
Re: laz4android update!
« Reply #9 on: September 24, 2015, 03:43:15 pm »
Hello all,

I have updated laz4android to new version.

You can download from here:
http://sourceforge.net/projects/laz4android/

=========================================================
Laz4Android is a Lazarus for Android Package.
Thanks the FreePascal team and the Lazarus team.
Now Laz4Android is only run on Windows.Sorry for this!

---------------------------------------------------------
Last update:2015-09-24
FPC: 3.1.1 trunk svn 31778 win32/arm-android/i386-android/jvm-android
Lazarus:1.5 trunk svn 49869
Android NDK: r10e (arm-linux-androideabi-4.9 + x86-4.9)

=========================================================
Update history:
2014-04-05:
1.Fixed Android application crash problem,thanks DelphiFreak and Leslie.
---------------------------------------------------------
2014-10-18:
FPC: 2.7.1 trunk svn 28863 win32/arm-android/i386-android/jvm-android
Lazarus:1.3 trunk svn 46592
Android NDK: r10c (arm-linux-androideabi-4.6 + x86-4.6)

1.Fixed examples\androidlcl,now it can compatible with this version.
2.Compatible with Jmpessoa's LazAndroidModuleWizard,thanks Jmpessoa and Simonsays,links:
  https://github.com/jmpessoa/lazandroidmodulewizard
  http://forum.lazarus.freepascal.org/index.php/topic,21919.0.html
---------------------------------------------------------
2015-02-25:
FPC: 3.1.1 trunk svn 29987 win32/arm-android/i386-android/jvm-android
Lazarus:1.5 trunk svn 47987
Android NDK: r10c (arm-linux-androideabi-4.6 + x86-4.6)

1.Fixed examples\androidlcl\build_debug_apk.bat,now it can use JDK1.7 or JDK1.8 to Signing the APK.
---------------------------------------------------------
2015-07-25:
FPC: 3.1.1 trunk svn 31226 win32/arm-android/i386-android/jvm-android
Lazarus:1.5 trunk svn 49563
Android NDK: r10c (arm-linux-androideabi-4.6 + x86-4.6)

1.Update!
---------------------------------------------------------
2015-09-24:
FPC: 3.1.1 trunk svn 31778 win32/arm-android/i386-android/jvm-android
Lazarus:1.5 trunk svn 49869
Android NDK: r10e (arm-linux-androideabi-4.9 + x86-4.9)

1.Now FPC supports Android 6.0(SDK API=23).Thanks Yury Sidorov and Simonsays.
2.Update the batch file laz4android\build.bat,now it don't need adjust the path,
  just double click it.Thanks Chenyuchih.

=========================================================
How to install Laz4Android?

1.You can download a installer file from here:
http://sourceforge.net/projects/laz4android/files/?source=navbar
- Double click the installer file
- Next , Next to finished.

---------------------------------------------------------
2.You can download a 7z compressed file from here:
http://sourceforge.net/projects/laz4android/files/?source=navbar
- Unzip 7z file to e.g.  c:\laz4android
- Please run build.bat (double click it), it will compile and build laz4android.

=========================================================

Thanks and best regards!
laz4android : a Lazarus for Android Package.
http://sourceforge.net/projects/laz4android/

jmpessoa

  • Hero Member
  • *****
  • Posts: 1469
Re: laz4android update!
« Reply #10 on: September 24, 2015, 07:33:43 pm »

Hello TrueTom!

Thank you very much!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

truetom

  • Jr. Member
  • **
  • Posts: 72
    • http://sourceforge.net/projects/laz4android/
Re: laz4android update!
« Reply #11 on: October 02, 2015, 04:28:09 pm »
Hello all,

New version laz4android released.

You can download from here:
http://sourceforge.net/projects/laz4android/

Laz4Android is a Lazarus for Android Package.
Thanks the FreePascal team and the Lazarus team.
Now Laz4Android is only run on Windows.Sorry for this!

---------------------------------------------------------
Last update:2015-10-02
FPC: 3.1.1 trunk svn 31903 win32/arm-android/i386-android/jvm-android
Lazarus:1.5 trunk svn 49903
Android NDK: r10e (arm-linux-androideabi-4.9 + x86-4.9)

1.Fixed can't compiled customdrawn.lpk problem.
2.Fixed examples\androidlcl\sqlitejniandroid.pas,compiled ok.

=========================================================
How to install Laz4Android?

1.You can download a installer file from here:
http://sourceforge.net/projects/laz4android/files/?source=navbar
- Double click the installer file
- Next , Next to finished.

---------------------------------------------------------
2.You can download a 7z compressed file from here:
http://sourceforge.net/projects/laz4android/files/?source=navbar
- Unzip 7z file to e.g.  c:\laz4android
- Please run build.bat (double click it), it will compile and build laz4android.

=========================================================

Thanks and best regards!
laz4android : a Lazarus for Android Package.
http://sourceforge.net/projects/laz4android/

Handoko

  • Hero Member
  • *****
  • Posts: 3181
  • My goal: build my own game engine using Lazarus
Re: laz4android update!
« Reply #12 on: October 02, 2015, 07:55:23 pm »
Thanks for the new release.

I tested this svn 49903 + LazToAPK 0.9.0.32 but unfortunately the generated i386-android code can't run on my Asus Zenfone 2 Intel Atom Quad Core smart phone. The generated APK file can be installed without problem. But if I run it, this error message will show up:
"Unfortunately, Project1 has stopped."

For your information, I'm using:
- NDK 4.1.2 (API 16)
- SDK 22.0.1
- WinXP sp 3


Things changed for generate the code:
- Target CPU Family: i386
- Library Path: ..\..\downloads\android-ndk-r10d\platforms\android-16\arch-x86\usr\lib
- Custom Options: -dANDROID -Xd

Are those settings above not correct for generate x86 code? Or is there anything I missed? Has anybody here ever succeed to create program for Intel-based Android?

Please help.

DelphiFreak

  • Full Member
  • ***
  • Posts: 246
    • Fresh sound.
Re: laz4android update!
« Reply #13 on: October 02, 2015, 08:39:58 pm »
Hello Handoko, I have never tried to build an i386 android app. And I think that laz4android is for arm only. So you are experimenting alone on this task. Let me know if you get it working.
Linux Mint 19.1, Lazarus 2.0, Windows 7&10, Delphi 7, Delphi 10.3 Rio

Handoko

  • Hero Member
  • *****
  • Posts: 3181
  • My goal: build my own game engine using Lazarus
Re: laz4android update!
« Reply #14 on: October 03, 2015, 10:03:30 am »
I'm alone.  :'(

Can you please help me or at least share more information where should I put the APP_ABI := x86 parameter?

I googled the web and found that to build i386 android app, we have to use APP_ABI := x86 parameter. Here are the sources:

https://software.intel.com/en-us/android/articles/android-ndk-for-intel-architecture
http://stackoverflow.com/questions/10098049/android-ndk-build-ignoring-app-abi-x86
http://www.codeproject.com/Articles/867762/Creating-an-x-and-ARM-APK-using-the-Intel-Compil

Here I quote the information so you don't have to read the whole articles:

Quote
In the NDK for Intel Architecture, use "APP_ABI := x86 " command line parameter. This generates the shared library under $PROJECT/libs/x86/ $NDK/ndk-build "APP_ABI := x86 "

Quote
Add target compile platform to it:
    APP_ABI := x86

Quote
Use the command below to build the application binary with Intel compiler for x86 architecture:
$ ndk-build APP_ABI=x86 V=1 NDK_TOOLCHAIN=x86-icc NDK_APP.local.cleaned_binaries=true

What I guess is laz4andoid actually generated the proper code for i386, but unfortunately it didn't pass the "APP_ABI := x86" parameter when calling NDK (or SDK), so the final code isn't generated correctly.

Can you please let me know in which file I should add the parameter?