diff --git a/build.sh b/build.sh index a16e44da1..8c90e596d 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,7 @@ sign_apk=false sign_bundle=false build_release=true do_zipalign=true -named_variant="sdl" +named_variant="" base_app_name="" # Fix Gradle compilation error @@ -78,6 +78,7 @@ if [ "$#" -gt 0 ]; then fi base_app_name=$(grep -Po 'AppFullName\=\K[[:alnum:].]+\.(?=[[:alnum:]]+)' AndroidAppSettings.cfg) +[ -z "${named_variant}" ] && named_variant=$(grep -Po 'AppFullName\=\K[[:alnum:].]+' AndroidAppSettings.cfg | grep -Po '[[:alnum:]]+$') function project_needs_setup { local app_name=$(grep -Po 'AppFullName\=\K[.[:alnum:]]+' AndroidAppSettings.cfg) diff --git a/changeAppSettings.sh b/changeAppSettings.sh index 732e85faf..328e85016 100755 --- a/changeAppSettings.sh +++ b/changeAppSettings.sh @@ -1130,17 +1130,6 @@ else done $SEDI "s/==GOOGLEPLAYGAMESERVICES_APP_ID==/$GooglePlayGameServicesId/g" project/res/values/strings.xml - - PROGUARD=`which android` - [ -z "$PROGUARD" ] && PROGUARD=$ANDROID_SDK_ROOT/tools/android - PROGUARD=`dirname $PROGUARD`/proguard/lib/proguard.jar - java -jar $PROGUARD | grep 'ProGuard, version 5.3' || { - echo "Error: ProGuard is too old" - echo "You need to update ProGuard. Download it here:" - echo "https://sourceforge.net/projects/proguard/files/proguard/5.3/proguard5.3.3.zip" - echo "Unpack it, then place file proguard.jar to $PROGUARD" - #exit 1 - } fi if [ -e "project/jni/application/src/AndroidData/assetpack" ] ; then diff --git a/project/jni/application/ballfield/AndroidAppSettings.cfg b/project/jni/application/ballfield/AndroidAppSettings.cfg index b9948e91f..41cb76432 100644 --- a/project/jni/application/ballfield/AndroidAppSettings.cfg +++ b/project/jni/application/ballfield/AndroidAppSettings.cfg @@ -12,12 +12,14 @@ AppVersionCode=101 # Application user-visible version name (string) AppVersionName="1.01" -# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' +# Specify path to download application data in zip archive in the form "Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' # If you'll start Description with '!' symbol it will be enabled by default, '!!' will also hide the entry from the menu, so it cannot be disabled # If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped # If the URL does not contain 'http://' or 'https://', it is treated as file from 'project/jni/application/src/AndroidData' dir - # these files are put inside .apk package by the build system -# 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 specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version for the obb file +# You can mount expansion files created with jobb tool if you put 'mnt:main.12345' or 'mnt:patch.12345' +# The mount directory will be returned by calling getenv("ANDROID_OBB_MOUNT_DIR") # 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="!!Game data is 1 Mb|ballfield3.zip" @@ -30,9 +32,9 @@ DeleteFilesOnUpgrade="%" # Here you may type readme text, which will be shown during startup. Format is: # Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/ -ReadmeText='^Readme text' +ReadmeText='' | sed 's/\\n/\\\\n/g' -# libSDL version to use (1.2/1.3/2.0) +# libSDL version to use (1.2/2) LibSdlVersion=1.2 # Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape @@ -191,6 +193,9 @@ AccessInternet= # Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n) ImmersiveMode=y +# Draw in the display cutout area. (y) / (n) +DrawInDisplayCutout= + # Hide Android system mouse cursor image when USB mouse is attached (y) or (n) - the app must draw it's own mouse cursor HideSystemMousePointer= @@ -207,11 +212,14 @@ NonBlockingSwapBuffers=n # Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE ESCAPE" -# Number of virtual keyboard keys (currently 6 is maximum) +# Number of virtual keyboard keys - currently 12 keys is the maximum AppTouchscreenKeyboardKeysAmount=6 -# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right) -RedefinedKeysScreenKb="0 1 2 3 4 5 6 7 8 9" +# Define SDL keysyms for multitouch gestures - pinch-zoom in, pinch-zoom out, rotate left, rotate right +RedefinedKeysScreenGestures="6 7 8 9 " + +# Redefine on-screen keyboard keys to SDL keysyms - currently 12 keys is the maximum +RedefinedKeysScreenKb="0 1 2 3 4 5 " # Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu RedefinedKeysScreenKbNames="0 1 2 3 4 5 6 7 8 9" @@ -245,7 +253,7 @@ RedefinedKeysFourthGamepad="KP0 KP1 KP2 KP3 KP4 KP5 KP6 KP7 KP8 KP9 KP_PERIOD KP # How long to show startup menu button, in msec, 0 to disable startup menu StartupMenuButtonTimeout=1000 -# Menu items to hide from startup menu, available menu items: +# Menu items to hide from startup menu, available menu items (SDL 1.2 only): # SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.StorageAccessConfig SettingsMenuMisc.CommandlineConfig SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced HiddenMenuOptions='' @@ -273,7 +281,8 @@ MultiABI='arm64-v8a' # 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 +# 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 +# rep 'Available' project/jni/SettingsTemplate.mk CompiledLibraries="sdl_image c++_shared" # Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) @@ -318,4 +327,3 @@ GooglePlayGameServicesId= # The app will open files with following extension, file path will be added to commandline params AppOpenFileExtension='png PNG jpg JPG jpeg JPEG gif GIF' - diff --git a/project/jni/application/openttd/download-data.sh b/project/jni/application/openttd/download-data.sh index 6508d812b..894b98ceb 100755 --- a/project/jni/application/openttd/download-data.sh +++ b/project/jni/application/openttd/download-data.sh @@ -13,6 +13,7 @@ MSX_VERSION=$(curl --fail https://cdn.openttd.org/openmsx-releases/latest.yaml | # Base game data +mkdir -p ./data-plat-indp pushd ./data-plat-indp if ! [ -e "./opengfx-${GFX_VERSION}.tar" ]; then