[solved]Android color form, vectorial graphics (windows building) lazarus / 43-Android ---------------------------------------------------------------------- huberte · 2012-04-24 13:34 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. ---------------------------------------------------------------------- felipemdc · 2012-04-24 13:44 Quote from: huberte on April 24, 2012, 03:34:43 pmI 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 QuoteWhat 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? QuoteI 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 ---------------------------------------------------------------------- huberte · 2012-04-25 00:08 QuoteI 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. QuoteWhat 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 QuoteI know that some people managed to render SVG using LCL- CustomDrawn-Android and Graphics32, How can I contact Meanderix ? ---------------------------------------------------------------------- felipemdc · 2012-04-25 06:22 Quote from: huberte on April 25, 2012, 02:08:30 amSorry 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? QuoteTo 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. QuoteHow 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 ---------------------------------------------------------------------- huberte · 2012-04-25 06:36 QuoteWhere 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) ---------------------------------------------------------------------- felipemdc · 2012-04-25 06:43 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 ---------------------------------------------------------------------- huberte · 2012-04-25 07:10 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 QuoteError: 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 : Quote(...)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 ---------------------------------------------------------------------- felipemdc · 2012-04-25 08:11 Quote from: huberte on April 25, 2012, 09:10:18 amWhich 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? QuoteI 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\ ---------------------------------------------------------------------- huberte · 2012-04-25 13:56 QuoteWhich 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 QuoteDid you copy the executables too? To which folder? Copy to \fpc\2.5.1\bin like the wiki said Quotelibc.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" ---------------------------------------------------------------------- felipemdc · 2012-04-25 14:06 Quote from: huberte on April 25, 2012, 03:56:45 pmCopy 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 QuoteThing 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/C ustom_Drawn_Interface/Android#Using_the_pre- compiled_compiler_in_Windows ---------------------------------------------------------------------- huberte · 2012-04-25 18:51 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 : Quoteandroidlcltest.lpr(1,1) Fatal: Can't find unit system used by androidlcltest EDIT :I have no customdrawnproc.pas to upgrade in my lazarus folder. ---------------------------------------------------------------------- felipemdc · 2012-04-26 06:51 Quote from: huberte on April 25, 2012, 08:51:55 pmC:\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. QuoteI 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. Quotenothing with the sdk ? You will need the SDK to build the APK afterwards. Quotebuilding 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?) QuoteEDIT :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/ ---------------------------------------------------------------------- huberte · 2012-04-26 18:41 QuoteQuote 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 ? QuoteFatal: 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,1608 3.msg87046.html#msg87046 , uninstall all, reinstall all