LAMW: Lazarus Android Module Wizard: Form Designer and Components development model!
254
stars
83
forks
source link
LAMW: Lazarus Android Module Wizard
RAD Android! Form Designer and Components Development Model!
LAMW is a wizard to create JNI Android loadable module (.so) and Android Apk using Lazarus/Free Pascal.
Features
Native Android GUI
AppCompat and Material Design supported!
RAD! Form designer and drag&drop component development model!
More than 150 components!
1. Get Lazarus for Android
Option a) Laz4Android 2.2.2 (Windows)
All cross-android compilers already installed!
arm-android/aarch64-android/i386-android/x86_64-android/jvm-android
hint: Install here: "C:\laz4android2.2.2" (not "Program Files" !!!)
How to:
Install Laz4Android2.2.2
Install LAMW
Download LAMW and unzip it in some folder
recommended folder: "C:\laz4android2.2.2\components"
Packages installations order/sequence:
tfpandroidbridge_pack.lpk (in "..../android_bridges" folder)
lazandroidwizardpack.lpk (in ""..../android_wizard" folder)
amw_ide_tools.lpk (in "..../ide_tools" folder)
Go to "2. Infrastructure Setup".
Option b) LAMW Manager
All in One! LAMW Manage produces a complete Lazarus for Android environment by automating the step "2. Infrastructure Setup"!
Option c) Fpcupdeluxe (Linux and Windows)
Option d) How to: Do It Yourself!
2. Infrastructure Setup :: only for non-users of "LAMW Manager" !!
2.1 Get Java JDK and Gradle system Apk builder
recommended: Java JDK 21 + Gradle version >= 8.5
recommended: Java JDK 17 + Gradle version >= 8.1.1
deprecated: Java JDK 11 + Gradle version >= 6.7.1
minimalist alternative: Java JDK 1.8 + Gradle version <= 6.7
JDK 1.8 support the limited but light Ant system Apk build
2.2 Get Android SDK
recommended: supporting JDK 21 + Gradle version >= 8.5
download commandlinetools-win-11076708_latest
download commandlinetools-linux-11076708_latest
download commandlinetools-mac-11076708_latest
how To:
unpacked command line tools ".zip" to a "temporary" folder
create a directory tree like: C:\android\sdkJ21\cmdline-tools\latest
Copy all content from "temporary" folder to exactly "...\sdkJ21\cmdline-tools\latest"
Open a terminal or cmd and go to "...\sdkJ21\cmdline-tools\latest\bin"
run the command >> sdkmanager "build-tools;34.0.0" "platforms;android-34" "platform-tools"
hint: you can get others android components by sdkmanager...
recommended: supporting JDK 17 + Gradle version >= 8.1.1
download commandlinetools-win-11076708_latest
download commandlinetools-linux-11076708_latest
download commandlinetools-mac-11076708_latest
how To:
unpacked command line tools ".zip" to a "temporary" folder
create a directory tree like: C:\android\sdkJ17\cmdline-tools\latest
Copy all content from "temporary" folder to exactly "...\sdkJ17\cmdline-tools\latest"
Open a terminal or cmd and go to "...\sdkJ17\cmdline-tools\latest\bin"
run the command >> sdkmanager "build-tools;33.0.2" "platforms;android-34" "platform-tools"
hint: you can get others android components by sdkmanager...
deprecated: supporting JDK 11 + Gradle version >= 6.7.1
download commandlinetools-win-9123335_latest
download commandlinetools-linux-9123335_latest
download commandlinetools-mac-9123335_latest
how To:
unpacked command line tools ".zip" to a "temporary" folder
create a directory tree like: C:\android\sdkJ11\cmdline-tools\latest
Copy all content from "temporary" folder to exactly "...\sdkJ11\cmdline-tools\latest"
Open a terminal or cmd and go to "...\sdkJ11\cmdline-tools\latest\bin"
run the command >> sdkmanager "build-tools;33.0.2" "platforms;android-33" "platform-tools"
hint: you can get others android components by sdkmanager...
minimalist alternative: supporting JDK 1.8 + limited but light Ant system Apk build + Gradle <= 6.7
how to:
unpacked/install the ".zip" file to a folder like "sdkJ1.8"
open a command line terminal or cmd and go to folder the "sdkJ1.8\tools"
run the command >>android update sdk //to open a GUI SDK Manager
go to Tools and keep as is
Android SDK Tools (installed)
(x) Android SDK Platform-Tools
(x) Android SDK Build-Tools 29.0.3 (and others more recent)
go to Android R and uncheck all!
go to Android 10 API 29 uncheck all and check only
go to Extras and check:
(x)Android Support Repository
(x)Google USB Drive (Windows only...)
(x)Google Repository
(x)Google Play Services
Install 7 or up package!
IMPORTANT: on command line terminal or cmd go to folder "sdkJ1.8\tools\bin"
run the command >>sdkmanager --update
run the command >>sdkmanager "build-tools;30.0.2" "platforms;android-33"
IMPORTANT: build-tools = 30.0.3 is the maximum supported in this setup!
2.4 Get Ant builder
Simply extract the zip file to a convenient location...
2.5 Get Gradle builder
recommended versions
Java JDK 21: Gradle 8.5 or up
Java JDK 17: Gradle 8.2.1 or up
Java JDK 11: Gradle 7.6.3 or up
Java JDK 1.8: Gradle 6.7 or down
Use the option "extract here" to produce the folder "gradle-x.y.z" in a convenient location...
warning: Gradle build process need internet connection!!!
3. Using LAMW
3.1) Configure Paths:
Lazarus IDE menu "Tools" -> "[LAMW] Android Module Wizard" -> "Paths Settings ... "
hint: [MacOs >= 10.5] Path to Java JDK auto setting as: ${/usr/libexec/java_home}
3.2) How to: Create and Run your first Android Apk!
3.2.1) From Lazarus IDE select "Project" -> "New Project"
3.2.2) From displayed dialog select "[LAMW] GUI Android Module" and "Ok"
3.2.3) Fill the displayed form fields and "Ok" and "Save"
hint: "Path to Workspace" is your projects folder!
hint: Accept "default" options! (but pay attention to the * signage)
hint: search your project folder... you will find many treasures there! (look for lazarus project in ".../jni" folder)
3.2.4) From Lazarus IDE select "Run" -> "Build"
Success! Your sistem is up to produce your first Android Apk!
3.2.5) Configure you phone device to debug mode/developer options and plug it to the computer usb port
3.2.6) From Lazarus IDE select "Run" -> "[LAMW] Build Apk and Run"
Congratulations! You are now an Android Developer!
4. Others References