diff --git a/project/gradle.properties b/project/gradle.properties index 3e927b11e..a03b35489 100644 --- a/project/gradle.properties +++ b/project/gradle.properties @@ -18,4 +18,4 @@ android.useAndroidX=true # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true diff --git a/project/jni/application/openttd/pack-data.sh b/project/jni/application/openttd/pack-data.sh index 620a15210..3243e7511 100755 --- a/project/jni/application/openttd/pack-data.sh +++ b/project/jni/application/openttd/pack-data.sh @@ -7,33 +7,41 @@ ARCH=$1 ANDROID_DATA_FULLPATH=$(realpath ./AndroidData/) # Base game data -pushd ./data -rm -f ${ANDROID_DATA_FULLPATH}/openttd-data-*.zip.xz ${ANDROID_DATA_FULLPATH}/openttd-data-*.zip +[ -e ${ANDROID_DATA_FULLPATH}/openttd-data-$VER.zip.xz ] && [ -n "$NO_REBUILD_DATA" ] || { + pushd ./data + rm -f ${ANDROID_DATA_FULLPATH}/openttd-data-*.zip.xz ${ANDROID_DATA_FULLPATH}/openttd-data-*.zip -pushd ./baseset - cp ../../data-plat-indp/opengfx*.tar . - cp ../../data-plat-indp/opensfx*.tar . - cp -r ../../data-plat-indp/openmsx*/ . -popd + pushd ./baseset + cp ../../data-plat-indp/opengfx*.tar . + cp ../../data-plat-indp/opensfx*.tar . + cp -r ../../data-plat-indp/openmsx*/ . + popd -zip -0 -r ${ANDROID_DATA_FULLPATH}/openttd-data-$VER.zip ./ && xz -8 ${ANDROID_DATA_FULLPATH}/openttd-data-$VER.zip -popd + zip -0 -r ${ANDROID_DATA_FULLPATH}/openttd-data-$VER.zip ./ && xz -8 ${ANDROID_DATA_FULLPATH}/openttd-data-$VER.zip + popd +} # Timidity -pushd ../../timidity/samples/ -rm -f ${ANDROID_DATA_FULLPATH}/timidity.zip.xz ${ANDROID_DATA_FULLPATH}/timidity.zip -cp ./timidity.zip ${ANDROID_DATA_FULLPATH}/timidity.zip && xz -8 ${ANDROID_DATA_FULLPATH}/timidity.zip -popd +[ -e ${ANDROID_DATA_FULLPATH}/timidity.zip.xz ] && [ -n "$NO_REBUILD_DATA" ] || { + pushd ../../timidity/samples/ + rm -f ${ANDROID_DATA_FULLPATH}/timidity.zip.xz ${ANDROID_DATA_FULLPATH}/timidity.zip + cp ./timidity.zip ${ANDROID_DATA_FULLPATH}/timidity.zip && xz -8 ${ANDROID_DATA_FULLPATH}/timidity.zip + popd +} # ICU # TODO handle versioning. Use Makefile var -pushd ../../iconv/src/$ARCH/ -rm -f ${ANDROID_DATA_FULLPATH}/icudt62l.zip.xz ${ANDROID_DATA_FULLPATH}/icudt62l.zip -zip -0 ${ANDROID_DATA_FULLPATH}/icudt62l.zip share/icu/62.1/icudt62l.dat && xz -8 ${ANDROID_DATA_FULLPATH}/icudt62l.zip -popd +[ -e ${ANDROID_DATA_FULLPATH}/icudt62l.zip.xz ] && [ -n "$NO_REBUILD_DATA" ] || { + pushd ../../iconv/src/$ARCH/ + rm -f ${ANDROID_DATA_FULLPATH}/icudt62l.zip.xz ${ANDROID_DATA_FULLPATH}/icudt62l.zip + zip -0 ${ANDROID_DATA_FULLPATH}/icudt62l.zip share/icu/62.1/icudt62l.dat && xz -8 ${ANDROID_DATA_FULLPATH}/icudt62l.zip + popd +} # Fonts -pushd ../../freetype/ -rm -f ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip.xz ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip -zip -0 -r ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip ./fonts/ && xz -8 ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip -popd +[ -e ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip.xz ] && [ -n "$NO_REBUILD_DATA" ] || { + pushd ../../freetype/ + rm -f ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip.xz ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip + zip -0 -r ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip ./fonts/ && xz -8 ${ANDROID_DATA_FULLPATH}/openttd-fonts.zip + popd +} diff --git a/project/jni/freetype/fonts/DroidSerif-Bold.ttf b/project/jni/freetype/fonts/DroidSerif-Bold.ttf new file mode 100644 index 000000000..543c8a374 Binary files /dev/null and b/project/jni/freetype/fonts/DroidSerif-Bold.ttf differ