mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:29:12 +02:00
First version of a non-ant build system for the Android APK
git-svn-id: trunk@36346 -
This commit is contained in:
parent
3fe5879ba3
commit
dbf6d2c8f6
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3472,6 +3472,7 @@ examples/androidlcl/android/AndroidManifest.xml svneol=native#text/plain
|
||||
examples/androidlcl/android/build.properties svneol=native#text/plain
|
||||
examples/androidlcl/android/build.sh svneol=native#text/plain
|
||||
examples/androidlcl/android/build.xml svneol=native#text/plain
|
||||
examples/androidlcl/android/build_debug_apk.bat svneol=native#text/plain
|
||||
examples/androidlcl/android/default.properties svneol=native#text/plain
|
||||
examples/androidlcl/android/local.properties svneol=native#text/plain
|
||||
examples/androidlcl/android/res/drawable-hdpi/icon.png -text svneol=unset#image/png
|
||||
|
26
examples/androidlcl/android/build_debug_apk.bat
Normal file
26
examples/androidlcl/android/build_debug_apk.bat
Normal file
@ -0,0 +1,26 @@
|
||||
REM Adjust these paths to yours
|
||||
SET PATH=C:\Programas\android-sdk\tools;C:\Programas\android-sdk\platform-tools\;C:\Progra~1\Java\jdk1.6.0_20\bin
|
||||
SET ANDROID_HOME=C:\Programas\android-sdk
|
||||
SET APK_SDK_PLATFORM=C:\Programas\android-sdk\platforms\android-8
|
||||
SET APK_PROJECT_PATH=F:\Programas\lazarussvn\examples\androidlcl\android
|
||||
|
||||
mkdir bin
|
||||
mkdir bin\classes
|
||||
mkdir gen
|
||||
mkdir gen\com
|
||||
mkdir gen\com\pascal
|
||||
mkdir gen\com\pascal\lcltest
|
||||
|
||||
REM Resource compilation
|
||||
aapt p -f -M AndroidManifest.xml -F bin\androidlcltest.ap_ -I %APK_SDK_PLATFORM%\android.jar -S res -m -J gen
|
||||
|
||||
REM Java compiler
|
||||
javac -classpath %APK_SDK_PLATFORM%\android.jar -d bin\classes src\com\pascal\lcltest\LCLActivity.java
|
||||
|
||||
REM DX to convert the java bytecode to dalvik bytecode
|
||||
dx --dex --no-strict --output=%APK_PROJECT_PATH%\bin\classes.dex %APK_PROJECT_PATH%\bin\classes\com\pascal\lcltest\LCLActivity.class
|
||||
|
||||
REM Now build the unsigned APK
|
||||
apkbuilder bin\androidlcltest-unsigned.apk -u -z bin\androidlcltest.ap_ -f bin\classes.dex
|
||||
|
||||
pause
|
Loading…
Reference in New Issue
Block a user