Lazarus
Programming => Operating Systems => Android => Topic started by: huberte on April 24, 2012, 03:34:43 pm
-
Hi,
I did set a color for a form (black) but it's still gray in android.
What is the fastset way to deal with buttons and their designs (image ?)
I red some posts about vectorial graphics (which are far more better if I zoom with my phone) on this forum, but not in the Android section. Would it be possible to hve an app who open such files and show them ?
thks.
-
I did set a color for a form (black) but it's still gray in android.
I fixed it in this commit: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=37010
What is the fastset way to deal with buttons and their designs (image ?)
What do you mean? You want to change the look of the button? To which look? Or improve the existing default look?
I red some posts about vectorial graphics (which are far more better if I zoom with my phone) on this forum, but not in the Android section. Would it be possible to hve an app who open such files and show them ?
fpvectorial should work fine in Android: Read http://wiki.lazarus.freepascal.org/fpvectorial
I know that some people managed to render SVG using LCL-CustomDrawn-Android and Graphics32, but I have no idea how exactly it all works: http://wiki.lazarus.freepascal.org/File:vpr-android.png
-
I fixed it in this commit: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=37010
Sorry but I dont see where I should put this file or how to implement it.
What do you mean? You want to change the look of the button? To which look? Or improve the existing default look?
To look like ICS button : http://developer.android.com/design/downloads/index.html I did try with image, but it's not so good
I know that some people managed to render SVG using LCL-CustomDrawn-Android and Graphics32,
How can I contact Meanderix ?
-
Sorry but I dont see where I should put this file or how to implement it.
You need to use Lazarus from subversion and use the command "svn up" to upgrade your sources to the latest ones. Where did you obtain the Lazarus sources that you are using?
To look like ICS button : http://developer.android.com/design/downloads/index.html I did try with image, but it's not so good
The best would be to create a new drawer for Android 4, my drawer is based in Android 2. Look at the file lazarus/lcl/customdrawn_android.pas and you need to write a similar file which implements Android 4 style instead of the current Android 2.
How can I contact Meanderix ?
Via private message in the forum, he posted in this thread:
http://www.lazarus.freepascal.org/index.php/topic,16375.msg91337.html#new
-
Where did you obtain the Lazarus sources that you are using?
I'm working with w7 lazarus, then to vbox for compiling and building apk (but I'm trying to only work on 7 : too much bugs with the vbox)
-
There are step-by-step instructions of how to setup the Windows environment now. The VBox image is very old now. But it does come with subversion, so you could use "svn up" inside the lazarus directory to update it.
For Windows only setup read:
http://wiki.lazarus.freepascal.org/Custom%20Drawn%20Interface/Android#Using_the_pre-compiled_compiler_in_Windows
and
http://wiki.lazarus.freepascal.org/Custom%20Drawn%20Interface/Android#Step_4_-_Creating_the_APK_package_in_Windows
-
In windows 64, I did follow the instrucitons.
Which path for the libraries ?
lazarus\fpc\2.5.1\units\ which contains 92 folders from arm-linux (from a52 to zorba)
ends with
Error: ppcarm.exe can't be executed, error message: Failed to execute ""ppcarm.exe" -B -MObjFPC -Scghi -O1 -Tlinux -Xs -XX -vewnhi -l -FiD:\Lazarus\Android\androidlcl\lib\arm-linux -FlC:\lazarus\fpc\2.5.1\bin -FlC:\lazarus\fpc\2.5.1\units -FuC:\lazarus\lcl\units\arm-linux -FuC:\lazarus\lcl\units\arm-linux\customdrawn -FuC:\lazarus\packager\units\arm-linux -FuD:\Lazarus\Android\androidlcl\ -Fu. -FUD:\Lazarus\Android\androidlcl\lib\arm-linux\ -FED:\Lazarus\Android\androidlcl\android\libs\armeabi\ -oliblclapp.so -dANDROID -Xd -CpARMV6 -dLCL -dLCLcustomdrawn androidlcltest.lpr
EDIT :
(...)change the libraries path to reflect the correct paths of where your Android NDK was installed and where your jnigraphics.so, libc.so, etc, libraries are located for your target Android API level. For LCL-CustomDrawn-Android API level 8 is the best choice, because it supports Android 2.2+ like the LCL.
I did have download both ndk and sdk, but with the precompiled version, it's useless right ? So now I'm searching lic.so to find the folder :(
-
Which path for the libraries ?
lazarus\fpc\2.5.1\units\ which contains 92 folders from arm-linux (from a52 to zorba)
ends with
Error: ppcarm.exe can't be executed, error message: Failed to execute ""ppcarm.exe" -B -MObjFPC -Scghi -O1 -Tlinux -Xs -XX -vewnhi -l -FiD:\Lazarus\Android\androidlcl\lib\arm-linux -FlC:\lazarus\fpc\2.5.1\bin -FlC:\lazarus\fpc\2.5.1\units -FuC:\lazarus\lcl\units\arm-linux -FuC:\lazarus\lcl\units\arm-linux\customdrawn -FuC:\lazarus\packager\units\arm-linux -FuD:\Lazarus\Android\androidlcl\ -Fu. -FUD:\Lazarus\Android\androidlcl\lib\arm-linux\ -FED:\Lazarus\Android\androidlcl\android\libs\armeabi\ -oliblclapp.so -dANDROID -Xd -CpARMV6 -dLCL -dLCLcustomdrawn androidlcltest.lpr
Which Lazarus are you using as you base one? It came with FPC 2.5.1 or 2.6.0 ?
Did you copy the executables too? To which folder?
I did have download both ndk and sdk, but with the precompiled version, it's useless right ? So now I'm searching lic.so to find the folder :(
libc.so is located in the NDK in this directory: C:\Programas\android-ndk-r7b\platforms\android-8\arch-arm\usr\lib\
-
Which Lazarus are you using as you base one? It came with FPC 2.5.1 or 2.6.0 ?
9.30.4 with 2.6.0
Did you copy the executables too? To which folder?
Copy to \fpc\2.5.1\bin like the wiki said
libc.so is located in the NDK in this directory:
Thing is, the wiki never says to download the NDK nor the sdk in the part : "Using the pre-compiled compiler in Windows"
-
Copy to \fpc\2.5.1\bin like the wiki said
It should be copied to the folder of the installed compiler, in your case 2.6.0 not 2.5.1
Thing is, the wiki never says to download the NDK nor the sdk in the part : "Using the pre-compiled compiler in Windows"
Ok, I fixed both that and the other thing about the /bin directory in the wiki. Please read again here: http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Using_the_pre-compiled_compiler_in_Windows
-
Still not working. I did download the ndk and sdk (there is a r7c which correct the bug from r7b) :
http://developer.android.com/sdk/ndk/index.html
I do have
C:\lazarus\fpc\2.5.1\units with 92 folders from "a52" to "zorba"
C:\lazarus\fpc\2.6.0\bin\x86_64-win64 with exe files (arm-linux-xxxx.exe)
I did add/change to project, options, libraries (-Fl), :
C:\lazarus\fpc\2.5.1\units\
D:\Lazarus\Programmes\android-ndk-r7c\platforms\android-8\arch-arm\usr\lib\
C:\lazarus\fpc\2.6.0\bin\x86_64-win64\
I did change this :
android-ndk-r5\toolchains\arm-eabi-4.4.0\prebuilt\linux-x86\lib\gcc\arm-eabi\4.4.0
to
D:\Lazarus\Programmes\android-ndk-r7c\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.4.3
nothing with the sdk ?
building androidlcltest ends with :
androidlcltest.lpr(1,1) Fatal: Can't find unit system used by androidlcltest
EDIT :I have no customdrawnproc.pas to upgrade in my lazarus folder.
-
C:\lazarus\fpc\2.5.1\units with 92 folders from "a52" to "zorba"
C:\lazarus\fpc\2.6.0\bin\x86_64-win64 with exe files (arm-linux-xxxx.exe)
Ok, so far good.
I did add/change to project, options, libraries (-Fl), :
C:\lazarus\fpc\2.5.1\units\
D:\Lazarus\Programmes\android-ndk-r7c\platforms\android-8\arch-arm\usr\lib\
C:\lazarus\fpc\2.6.0\bin\x86_64-win64\
-Fl should contain only the path to the binary libraries, that is D:\Lazarus\Programmes\android-ndk-r7c\platforms\android-8\arch-arm\usr\lib\
The others are unnecessary, although they won't hurt either and your error is unrelated to that.
nothing with the sdk ?
You will need the SDK to build the APK afterwards.
building androidlcltest ends with : androidlcltest.lpr(1,1) Fatal: Can't find unit system used by androidlcltest
Note that the error changed. So we advanced. Before it could not find the compiler, now it can. Now it can't find the system unit, the one in C:\lazarus\fpc\2.5.1\units\
Could you attach here your file lazarus/fpc/$version$/bin/cfg.fpc ? (or was it fpc.cfg?)
EDIT :I have no customdrawnproc.pas to upgrade in my lazarus folder.
You need to a newer Lazarus. You cannot use 0.9.30. The idea would be to get Lazarus from SVN: http://wiki.lazarus.freepascal.org/Getting%20Lazarus
The file is in the folder lazarus/lcl/interfaces/customdrawn/
But if using SVN is too hard you should just try a snapshot from Lazarus 1.1 from here: http://www.hu.freepascal.org/lazarus/
-
Quote from: huberte on April 25, 2012, 08:51:55 pm
C:\lazarus\fpc\2.5.1\units with 92 folders from "a52" to "zorba"
C:\lazarus\fpc\2.6.0\bin\x86_64-win64 with exe files (arm-linux-xxxx.exe)
Ok, so far good.
Nope It should be C:\lazarus\fpc\2.5.1\units\arm-linux where all those folders go.
Thanks a lot for the lazarus Maj, you really should add something to the download link on the left, where you could explain stable, snapshot and svn. I did succeed with turtle-noise (turnoise, tortnoise)
Now I did have the latest files, I have to build the lilbraries, right ? Here the error, how can I do this ?
Fatal: Rebuild needed of unit LazLogger used by LCLProc, ppu=..\components\lazutils\lib\arm-linux\lazlogger.ppu, package LazUtils
Solved, thks to http://www.lazarus.freepascal.org/index.php/topic,16083.msg87046.html#msg87046 , uninstall all, reinstall all