[LAMW] Getting Demos to Build lazarus / 43-Android ---------------------------------------------------------------------- WayneSherman · 2018-04-03 03:54 Moved from: Quote from: jmpessoa on April 03, 2018, 02:09:41 am About  "How to build demos" We need some test,  Can you help?  [Please,  update your LAMW...  there is some bug fixed!] 1)  Open a demo and save it ...  what config changes you got [Libraries and Custom...]? 2)  Open a demo and and try "Run--> build" what config changes you got [Libraries and Custom...]? The code is here: LAMW  "android_wizard\smartsesigner.pas" Quote  if IsDemoProject() then   begin     TryChangeDemoProjecPaths();   end ---------------------------------------------------------------------- WayneSherman · 2018-04-03 04:14 I updated LAMW and tried again with the demos. After loading a demo project, I see some messages when I save: Verbose: Selected chip architecture: armeabi-v7a Verbose: Taking libraries from folder: /home/user/fpcupdeluxe/ccr/lamw/demos/GUI/ColorPicker/libs/armeabi-v7a Run | Build fails: Compile Project, OS: android, CPU: arm, Target: /home/user/fpcupdeluxe /ccr/lamw/demos/GUI/ColorPicker/libs/armeabi-v7a/libcontrols.so: Exit code 256, Errors: 1 Fatal: Cannot find system used by controls. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/home/user/fpcupdeluxe/fpc/units/arm- android/rtl/system.ppu.. After saving and attempting to build, the Project Options are set as follows: Paths Libraries = /4.9.x/ Unit Output = ../obj/controls Target file name = ../libs/armeabi/libcontrols Custom Options: Xd -CfSoft -CpARMV6 -XParm-linux-androideabi- -FD/home/user/android/sdk/ndk-bundle/toolchains\arm-linux- androideabi-4.9\prebuilt\windows\bin ---------------------------------------------------------------------- jmpessoa · 2018-04-03 04:20 QuoteLibraries = /4.9.x/ Only?  Then we lost the all real content!!! ---------------------------------------------------------------------- WayneSherman · 2018-04-03 04:27 Quote from: jmpessoaThe code is here: LAMW  "android_wizard\smartsesigner.pas"   if IsDemoProject() then   begin     TryChangeDemoProjecPaths();   end I think that you should not try to detect a "demo" project, but treat all projects the same.  That is, all LAMW projects should get the build settings from the JNIAndroidProject.ini config when the project is loaded. You could put up a message box asking "Is it ok to modify project build settings to match local LAMW config? (y/n)"   Then you can get rid of all the code that checks for demo projects. ---------------------------------------------------------------------- jmpessoa · 2018-04-03 04:30 Yes! That is good idea! Can you try "AppDBGridViewDemo1"? ---------------------------------------------------------------------- WayneSherman · 2018-04-03 04:32 QuoteLibraries = /4.9.x/ Only?  Then we lost the all real content!!! Yes.  The demo project shows that same Library path immediately after loading. (although it is different in the controls.lpi file) ---------------------------------------------------------------------- WayneSherman · 2018-04-03 04:36 Quote from: jmpessoa on April 03, 2018, 06:30:34 amCan you try "AppDBGridViewDemo1"?Same or similar result: Messages Verbose: Selected chip architecture: armeabi Verbose: Taking libraries from folder: /home/user/fpcupdeluxe/ccr/lamw /demos/GUI/AppDBGridViewDemo1/libs/armeabi Compile Project, OS: android, CPU: arm, Target: /home/user/fpcupdeluxe /ccr/lamw/demos/GUI/AppDBGridViewDemo1/libs/armeabi/libcontrols.so: Exit code 256, Errors: 1 Fatal: Cannot find system used by controls. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/home/user/fpcupdeluxe/fpc/units/arm- android/rtl/system.ppu.. ---------------------------------------------------------------------- jmpessoa · 2018-04-03 04:39 What about ".lpi" Libraries? Custom? ---------------------------------------------------------------------- WayneSherman · 2018-04-03 04:57 Quote from: jmpessoaWhat about ".lpi" Libraries?Custom? Text Compare, Produced: 04/02/2018 09:55:38 PM Mode:  Differences, Ignoring Unimportant Left file: ./controls.lpi (after loading and saving project) Right file: ./controls.lpi (original from git)   4                4      ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------ ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------      21           22             23      ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------ ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------  25             26                 28             29        ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------ ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------  28                 31        ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------ ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------  39             40             41               42                 42             43               44        ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------ ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------  83                 85        ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------ ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------ 112                114        ---------------------------------------------------------------------- ---------------------------------------------------------------------- ------------------------------------------------------ (btw, diff report was made using Beyond Compare which runs great on Linux as well as other OS.  thanks to the Scooter Software folks) ---------------------------------------------------------------------- jmpessoa · 2018-04-03 05:01 Thank You!! Now I have the stuff to fix the bugs!!!!