Recent

Author Topic: [LAMW] Getting Demos to Build  (Read 4622 times)

WayneSherman

  • Full Member
  • ***
  • Posts: 243
[LAMW] Getting Demos to Build
« on: April 03, 2018, 05:54:04 am »
Moved from:

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
« Last Edit: April 03, 2018, 05:58:03 am by WayneSherman »

WayneSherman

  • Full Member
  • ***
  • Posts: 243
Re: [LAMW] Getting Demos to Build
« Reply #1 on: April 03, 2018, 06:14:55 am »
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

  • Hero Member
  • *****
  • Posts: 2297
Re: [LAMW] Getting Demos to Build
« Reply #2 on: April 03, 2018, 06:20:58 am »

Quote
Libraries = /4.9.x/

Only?  Then we lost the all real content!!!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

WayneSherman

  • Full Member
  • ***
  • Posts: 243
Re: [LAMW] Getting Demos to Build
« Reply #3 on: April 03, 2018, 06:27:06 am »
Quote from: jmpessoa
The 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

  • Hero Member
  • *****
  • Posts: 2297
Re: [LAMW] Getting Demos to Build
« Reply #4 on: April 03, 2018, 06:30:34 am »

Yes! That is good idea!

Can you try "AppDBGridViewDemo1"?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

WayneSherman

  • Full Member
  • ***
  • Posts: 243
Re: [LAMW] Getting Demos to Build
« Reply #5 on: April 03, 2018, 06:32:21 am »
Quote
Libraries = /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

  • Full Member
  • ***
  • Posts: 243
Re: [LAMW] Getting Demos to Build
« Reply #6 on: April 03, 2018, 06:36:57 am »
Can 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

  • Hero Member
  • *****
  • Posts: 2297
Re: [LAMW] Getting Demos to Build
« Reply #7 on: April 03, 2018, 06:39:26 am »

What about ".lpi"

Libraries?

Custom?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

WayneSherman

  • Full Member
  • ***
  • Posts: 243
Re: [LAMW] Getting Demos to Build
« Reply #8 on: April 03, 2018, 06:57:35 am »
Quote from: jmpessoa
What 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         <Version Value="11"/>
      4     <Version Value="9"/>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     21     <VersionInfo>
     22       <StringTable ProductVersion=""/>
     23     </VersionInfo>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 25           <Item3 Name="NdkApi" Value="android-27"/>
 26           <Item4 Name="NdkPath" Value="/home/user/android/sdk/ndk-bundle/"/>
     28       <Item3 Name="NdkApi" Value="android-15"/>
     29       <Item4 Name="NdkPath" Value="C:\adt32\ndk10e\"/>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 28           <Item6 Name="SdkPath" Value="/home/user/android/sdk/"/>
     31       <Item6 Name="SdkPath" Value="C:\adt32\sdk\"/>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 39           <FormatVersion Value="2"/>
 40           <Modes Count="1">
 41             <Mode0 Name="default"/>
 42           </Modes>
     42       <local>
     43         <FormatVersion Value="1"/>
     44       </local>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 83           <Libraries Value="\4.9.x\"/>
     85       <Libraries Value="C:\adt32\ndk10e\platforms\android-15\arch-arm\usr\lib\;C:\adt32\ndk10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.9\"/>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
112           <CustomOptions Value="-Xd -CfSoft -CpARMV6 -XParm-linux-androideabi- -FD/home/user/android/sdk/ndk-bundle/toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin"/>
    114       <CustomOptions Value="-Xd -CfSoft -CpARMV6 -XParm-linux-androideabi- -FDC:\adt32\ndk10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin"/>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(btw, diff report was made using Beyond Compare which runs great on Linux as well as other OS.  thanks to the Scooter Software folks)
« Last Edit: April 04, 2018, 02:59:38 am by WayneSherman »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: [LAMW] Getting Demos to Build
« Reply #9 on: April 03, 2018, 07:01:13 am »

Thank You!!

Now I have the stuff to fix the bugs!!!!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018