94592c1406
So long, autotools! This is my last MPD related project to migrate away from it. It has its strengths, but also very obvious weaknesses and weirdnesses. Today, many of its quirks are not needed anymore, and are cumbersome and slow. Now welcome our new Meson overlords!
25 lines
476 B
Bash
Executable File
25 lines
476 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
S=`dirname "$0"`
|
|
AAPT=$1
|
|
BASE_JAR=$2
|
|
JAVA_PKG=$3
|
|
JAVA_PKG_PATH=$4
|
|
APK_FILE="$5"
|
|
D=`dirname "$APK_FILE"`
|
|
|
|
rm -rf "$D/res"
|
|
mkdir -p "$D/res/drawable" "$D/src"
|
|
cp "$D/icon.png" "$D/notification_icon.png" "$D/res/drawable/"
|
|
|
|
"$AAPT" package -f -m --auto-add-overlay \
|
|
--custom-package "$JAVA_PKG" \
|
|
-M "$S/AndroidManifest.xml" \
|
|
-S "$D/res" \
|
|
-S "$S/res" \
|
|
-J "$D/src" \
|
|
-I "$BASE_JAR" \
|
|
-F "$D/resources.apk"
|
|
|
|
cp "$D/src/$JAVA_PKG_PATH/R.java" "$D/"
|