From 43810f858510cfa5b436dd48a31700e2eb63a31e Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Tue, 3 Sep 2019 23:07:21 +0300 Subject: [PATCH] OpenTTD JGR: added back music support --- .../jni/application/openttd-jgrpp/AndroidAppSettings.cfg | 6 +++--- project/jni/application/openttd-jgrpp/AndroidBuild.sh | 5 +++-- project/jni/application/openttd-jgrpp/readme.txt | 4 ++-- project/jni/application/openttd-jgrpp/src | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/project/jni/application/openttd-jgrpp/AndroidAppSettings.cfg b/project/jni/application/openttd-jgrpp/AndroidAppSettings.cfg index b29c6d76c..84f7699e4 100644 --- a/project/jni/application/openttd-jgrpp/AndroidAppSettings.cfg +++ b/project/jni/application/openttd-jgrpp/AndroidAppSettings.cfg @@ -7,7 +7,7 @@ AppName="OpenTTD JGR" AppFullName=org.openttd.jgrpp # Application version code (integer) -AppVersionCode=031500 +AppVersionCode=031501 # Application user-visible version name (string) AppVersionName="0.31.5" @@ -20,7 +20,7 @@ AppVersionName="0.31.5" # You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version for obb file # You can use .zip.xz archives for better compression, but you need to add 'lzma' to CompiledLibraries # Generate .zip.xz files like this: zip -0 -r data.zip your-data/* ; xz -8 data.zip -AppDataDownloadUrl="!!Data files|openttd-data-0.31.5-0.zip.xz^!!Internationalization files|icudt62l.zip.xz" +AppDataDownloadUrl="!!Data files|openttd-data-0.31.5-0.zip.xz^!!Config file|:.openttd/openttd.cfg:openttd-1.4.0.30.cfg^!!MIDI music support (18 Mb)|timidity.zip.xz^!!Internationalization files|icudt62l.zip.xz" # Reset SDL config when updating application to the new version (y) / (n) ResetSdlConfigForThisVersion=y @@ -274,7 +274,7 @@ MultiABI='arm64-v8a armeabi-v7a x86 x86_64' # Optional shared libraries to compile - removing some of them will save space # MP3 patents are expired, but libmad license is GPL, not LGPL # Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2 -CompiledLibraries="c++_shared jpeg png freetype expat fontconfig lzma lzo2 icui18n iculx icu-le-hb harfbuzz icudata icuuc" +CompiledLibraries="c++_shared jpeg png freetype timidity expat fontconfig lzma lzo2 icui18n iculx icu-le-hb harfbuzz icudata icuuc" # Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) CustomBuildScript=y diff --git a/project/jni/application/openttd-jgrpp/AndroidBuild.sh b/project/jni/application/openttd-jgrpp/AndroidBuild.sh index c8947a810..cab0a5446 100755 --- a/project/jni/application/openttd-jgrpp/AndroidBuild.sh +++ b/project/jni/application/openttd-jgrpp/AndroidBuild.sh @@ -33,9 +33,10 @@ CPU_TYPE=32 env LDFLAGS_BUILD="-L." \ env ANDROID=1 \ env CLANG=1 ../setEnvironment-$1.sh sh -c "cd openttd-$VER-$1 && env ../src/configure \ - --with-sdl --with-freetype --with-png --with-zlib --with-icu --without-fluidsynth \ + --with-sdl --with-freetype --with-png --with-zlib --with-icu --with-libtimidity='pkg-config libtimidity' \ --with-lzo2=$LOCAL_PATH/../../../obj/local/$ARCH/liblzo2.so --prefix-dir='.' --data-dir='' \ - --without-allegro --with-fontconfig --with-lzma --cpu-type=$CPU_TYPE --os=unix --cc-build=gcc --cxx-build=g++ --without-sse" + --without-allegro --with-fontconfig --with-lzma --cpu-type=$CPU_TYPE --os=unix --cc-build=gcc --cxx-build=g++ \ + --without-sse --without-xdg-basedir --without-fluidsynth" } || exit 1 NCPU=4 diff --git a/project/jni/application/openttd-jgrpp/readme.txt b/project/jni/application/openttd-jgrpp/readme.txt index 64ea2fbf4..f97645473 100644 --- a/project/jni/application/openttd-jgrpp/readme.txt +++ b/project/jni/application/openttd-jgrpp/readme.txt @@ -1,6 +1,6 @@ Quick compilation guide: -Install liblzma-dev and libfluidsynth-dev, it's needed for broken configure script -sudo apt-get install liblzma-dev libfluidsynth-dev +Install liblzma-dev and libtimidity-dev, it's needed for broken configure script +sudo apt-get install liblzma-dev libtimidity-dev Download my Git repo from https://github.com/pelya/commandergenius, then install Android SDK, Android NDK, then launch commands git submodule update --init --recursive diff --git a/project/jni/application/openttd-jgrpp/src b/project/jni/application/openttd-jgrpp/src index e9d456f03..e6bbdfea2 160000 --- a/project/jni/application/openttd-jgrpp/src +++ b/project/jni/application/openttd-jgrpp/src @@ -1 +1 @@ -Subproject commit e9d456f0330ba6b8e9dd11c6bd8027568333a88a +Subproject commit e6bbdfea29451ad0c6f9976415f9a521f0efbe01