-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (36 loc) · 1.2 KB
/
Makefile
File metadata and controls
42 lines (36 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
SHELL := /bin/zsh
ANDROID = PATH:/opt/android-sdk/build-tools/28.0.2
LOVE_NAME = game.love
BUILD_DIR = build
OUTPUT_DIR = ${BUILD_DIR}/output
NAME = test
APK_NAME = ${NAME}.apk
PACKAGE_NAME = com.${NAME}.flamendless
TEST_APK_NAME = ${OUTPUT_DIR}/${NAME}-unaligned.apk
KS_FILE = ${BUILD_DIR}/am2018.keystore
PASSWORD = flamendless
test:
echo "Testing"
love .
build-android: build-love apk-compile apk-sign apk-install
build-love:
echo "making .love file..."
noglob zip -9rv ${OUTPUT_DIR}/${LOVE_NAME} . -x *.git* *.md* *.txt* *.rst* *docs/* *.ase* *.aseprite* *.swp* *spec/* *test/* *rockspec* *.mak* *.yml* *ctags* *Makefile* *build/* *backup/* *res/* *examples/* *LICENSE*;
echo "made .love file!"
apk-compile:
echo "copying .love to build"
cp ${OUTPUT_DIR}/${LOVE_NAME} ${BUILD_DIR}/decoded/assets/
echo "copied!"
echo "compiling apk..."
apktool b -o ${OUTPUT_DIR}/${APK_NAME} ${BUILD_DIR}/decoded;
echo "compiled apk!"
apk-sign:
echo "signing apk..."
apk-signer -f ${OUTPUT_DIR}/${APK_NAME} -a flamendless -k ${KS_FILE} -s ${PASSWORD};
echo "signed apk!"
apk-install:
echo "adb installing..."
adb uninstall ${PACKAGE_NAME}
adb install ${TEST_APK_NAME}
echo "adb installed"
notify-send "APK INSTALLED!"