tmp
This commit is contained in:
parent
f9302f11a7
commit
51b333c3d7
3 changed files with 22 additions and 18 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,8 +1,6 @@
|
||||||
/Dockerfile
|
/Dockerfile
|
||||||
/app/result
|
|
||||||
/app/result/*
|
/app/result/*
|
||||||
/app/obj
|
!/app/result/.gitkeep
|
||||||
/app/obj/*
|
/app/obj/*
|
||||||
/app/bin
|
!/app/obj/.gitkeep
|
||||||
/app/bin/*
|
|
||||||
/app/app.apk
|
/app/app.apk
|
||||||
|
|
34
app/Makefile
34
app/Makefile
|
@ -1,4 +1,5 @@
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
|
|
||||||
SHELL=/bin/makefile-bash-wrapper.sh
|
SHELL=/bin/makefile-bash-wrapper.sh
|
||||||
|
|
||||||
# symlink
|
# symlink
|
||||||
|
@ -21,17 +22,18 @@ SHELL=/bin/makefile-bash-wrapper.sh
|
||||||
-storepass armena -keypass armena -alias helljniKey -keyalg RSA -v
|
-storepass armena -keypass armena -alias helljniKey -keyalg RSA -v
|
||||||
|
|
||||||
# aapt "package" together the dalvik/hex stuff (and "assets" and "res")
|
# aapt "package" together the dalvik/hex stuff (and "assets" and "res")
|
||||||
./result/unsigned.apk : ./bin/classes.dex ./result ./assets ./bin ./AndroidManifest.xml
|
./result/unsigned.apk : ./result/bin/classes.dex ./assets ./AndroidManifest.xml
|
||||||
rm -rvf "$@"
|
rm -rvf "$@"
|
||||||
source app-config.sh; $${ANDROID_SDK_ROOT}/$$(tr ';' '/' < android-sdk/.installed.buildtools.version.current)/aapt package \
|
source app-config.sh; $${ANDROID_SDK_ROOT}/$$(tr ';' '/' < android-sdk/.installed.buildtools.version.current)/aapt package \
|
||||||
-v -u -f -M ./AndroidManifest.xml -S ./res \
|
-v -u -f -M ./AndroidManifest.xml -S ./res \
|
||||||
-I $${ANDROID_SDK_ROOT}/$$(tr ';' '/' < android-sdk/.installed.platforms.version.current)/android.jar -A ./assets -F $@ ./bin
|
-I $${ANDROID_SDK_ROOT}/$$(tr ';' '/' < android-sdk/.installed.platforms.version.current)/android.jar -A ./assets -F $@ ./result/bin
|
||||||
|
|
||||||
# convert "java class"es files (i.e bytecode to dalvic/d8 android thing
|
# convert "java class"es files (i.e bytecode to dalvic/d8 android thing
|
||||||
./bin/classes.dex : ./obj/package ./obj/package/AppActivity.class ./bin
|
./result/bin/classes.dex : ./obj/package/AppActivity.class
|
||||||
|
mkdir -p ./result/bin
|
||||||
ls ./obj/package/*.class
|
ls ./obj/package/*.class
|
||||||
source app-config.sh; $${ANDROID_SDK_ROOT}/$$(tr ';' '/' < android-sdk/.installed.buildtools.version.current)/d8 $$(realpath --relative-to=. $<)/*.class \
|
source app-config.sh; $${ANDROID_SDK_ROOT}/$$(tr ';' '/' < android-sdk/.installed.buildtools.version.current)/d8 $$(realpath --relative-to=. $<)/*.class \
|
||||||
--lib $${ANDROID_SDK_ROOT}/$$(tr ';' '/' < android-sdk/.installed.platforms.version.current)/android.jar --output bin
|
--lib $${ANDROID_SDK_ROOT}/$$(tr ';' '/' < android-sdk/.installed.platforms.version.current)/android.jar --output ./result/bin
|
||||||
|
|
||||||
# compile (javac) the class from
|
# compile (javac) the class from
|
||||||
./obj/package/AppActivity.class : ./src/package/AppActivity.java ./src/package/R.java ./obj/package
|
./obj/package/AppActivity.class : ./src/package/AppActivity.java ./src/package/R.java ./obj/package
|
||||||
|
@ -39,7 +41,7 @@ SHELL=/bin/makefile-bash-wrapper.sh
|
||||||
-sourcepath ./src $$(realpath --relative-to=/src $<)
|
-sourcepath ./src $$(realpath --relative-to=/src $<)
|
||||||
|
|
||||||
# generate teh AppActivity.java (template)
|
# generate teh AppActivity.java (template)
|
||||||
./src/package/AppActivity.java: ./src/package app-config.sh
|
./src/package/AppActivity.java: app-config.sh
|
||||||
./.Makefile.scripts/make--AppActivity.java.sh > $@
|
./.Makefile.scripts/make--AppActivity.java.sh > $@
|
||||||
|
|
||||||
# make the resources "R.java" thing
|
# make the resources "R.java" thing
|
||||||
|
@ -56,19 +58,23 @@ SHELL=/bin/makefile-bash-wrapper.sh
|
||||||
./AndroidManifest.xml: app-config.sh
|
./AndroidManifest.xml: app-config.sh
|
||||||
./.Makefile.scripts/make--AndroidManifest.xml
|
./.Makefile.scripts/make--AndroidManifest.xml
|
||||||
|
|
||||||
# recipe to make directories (if) needed
|
app/.s:
|
||||||
./result ./bin ./assets ./src/ ./obj:
|
source app-config.sh
|
||||||
mkdir -p "$@"
|
|
||||||
|
|
||||||
# make symlinksa and directories (to cater for the "helpful" java thing, to use folders for package names and yes we need a package name :( )
|
|
||||||
./src/package: app-config.sh
|
|
||||||
set -x; source app-config.sh; PKGDIR=$$(echo "$$APP_PACKAGE" | tr '.' '/'); mkdir -p src/$$PKGDIR; rm -rf $@ ; ln -sfrv src/$$PKGDIR $@
|
|
||||||
|
|
||||||
./obj/package: app-config.sh
|
|
||||||
source app-config.sh; PKGDIR=$$(echo "$$APP_PACKAGE" | tr '.' '/'); mkdir -p obj/$$PKGDIR; rm -rf $@; ln -sfrv obj/$$PKGDIR $@
|
|
||||||
|
|
||||||
app-config.sh:
|
app-config.sh:
|
||||||
./.Makefile.scripts/make--app-config.sh
|
./.Makefile.scripts/make--app-config.sh
|
||||||
|
# make symlinks and directories (to cater for the "helpful" java thing, to use folders for package names and yes we need a package name :( )
|
||||||
|
#source app-config.sh
|
||||||
|
#PKGDIR=$$(echo "$$APP_PACKAGE" | tr '.' '/')
|
||||||
|
#for DIR in src obj
|
||||||
|
#do
|
||||||
|
# mkdir -p $$DIR/$$PKGDIR
|
||||||
|
# ln -snfrv $$DIR/$$PKGDIR $$DIR/package
|
||||||
|
#done
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf obj/*
|
||||||
|
rm -rf result/*
|
||||||
FORCE:
|
FORCE:
|
||||||
@true
|
@true
|
||||||
|
|
0
app/obj/.gitkeep
Normal file
0
app/obj/.gitkeep
Normal file
Loading…
Add table
Reference in a new issue