diff --git a/changeAppSettings.sh b/changeAppSettings.sh index 3c5906aa9..38db3d6e9 100755 --- a/changeAppSettings.sh +++ b/changeAppSettings.sh @@ -405,7 +405,7 @@ echo "# Available architectures: armeabi-v7a arm64-v8a x86 x86_64" >> AndroidApp echo MultiABI=\'$MultiABI\' >> AndroidAppSettings.cfg echo >> AndroidAppSettings.cfg echo "# Optional shared libraries to compile - removing some of them will save space" >> AndroidAppSettings.cfg -echo "# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed" >> AndroidAppSettings.cfg +echo "# MP3 patents are expired, but libmad license is GPL, not LGPL" >> AndroidAppSettings.cfg grep 'Available' project/jni/SettingsTemplate.mk >> AndroidAppSettings.cfg echo CompiledLibraries=\"$CompiledLibraries\" >> AndroidAppSettings.cfg echo >> AndroidAppSettings.cfg @@ -1102,8 +1102,6 @@ fi ./copyAssets.sh || exit 1 rm -rf project/jni/android-support -echo "$NDK_TOOLCHAIN_VERSION" | grep 'clang' > /dev/null || \ - ln -s "`which ndk-build | sed 's@/ndk-build@@'`/sources/android/support" project/jni/android-support rm -rf project/res/drawable/banner.png if [ -e project/jni/application/src/banner.png ]; then diff --git a/project/java/MainActivity.java b/project/java/MainActivity.java index 084eb1f18..8aab7b017 100644 --- a/project/java/MainActivity.java +++ b/project/java/MainActivity.java @@ -871,6 +871,8 @@ public class MainActivity extends Activity screenKeyboard.setTextColor(this.getResources().getColor(android.R.color.background_light)); if( isRunningOnOUYA() && Globals.TvBorders ) screenKeyboard.setPadding(100, 100, 100, 100); // Bad bad HDMI TVs all have cropped borders + else + screenKeyboard.setPadding(20, 20, 20, 20); // Account for rounded screen corners _screenKeyboard = screenKeyboard; _videoLayout.addView(_screenKeyboard); //_screenKeyboard.setKeyListener(new TextKeyListener(TextKeyListener.Capitalize.NONE, false)); @@ -1195,6 +1197,7 @@ public class MainActivity extends Activity File libpath = new File(getFilesDir().getAbsolutePath() + "/../lib/" + libname); Log.i("SDL", "libSDL: loading lib " + libpath.getAbsolutePath()); System.load(libpath.getPath()); + Log.i("SDL", "libSDL: loaded lib " + libpath.getAbsolutePath()); } catch( UnsatisfiedLinkError e ) { @@ -1205,11 +1208,13 @@ public class MainActivity extends Activity File libpath = new File(getFilesDir().getAbsolutePath() + "/" + libname); Log.i("SDL", "libSDL: loading lib " + libpath.getAbsolutePath()); System.load(libpath.getPath()); + Log.i("SDL", "libSDL: loaded lib " + libpath.getAbsolutePath()); } catch( UnsatisfiedLinkError ee ) { Log.i("SDL", "libSDL: error loading lib " + l + ": " + ee.toString()); System.loadLibrary(l); + Log.i("SDL", "libSDL: loaded lib " + l + " from app lib path"); } } } diff --git a/project/jni/Application.mk b/project/jni/Application.mk index 758fd1213..5d22f6f71 100644 --- a/project/jni/Application.mk +++ b/project/jni/Application.mk @@ -3,7 +3,10 @@ APP_PROJECT_PATH := $(call my-dir)/.. include jni/Settings.mk APP_STL := c++_static -APP_CFLAGS := -Oz -DNDEBUG -g # -Oz works best with clang +APP_CFLAGS := -g +ifneq ($(NDK_DEBUG),1) +APP_CFLAGS += -Oz -DNDEBUG # -Oz works best with clang +endif APP_PIE := true # This feature makes executables incompatible to Android API 15 or lower, but executables without PIE will not run on Android 5.0 and newer SDL_EXCLUDE_LIBGCC := -Wl,--exclude-libs,libgcc.a SDL_EXCLUDE_LIBUNWIND := -Wl,--exclude-libs,libunwind.a diff --git a/project/jni/SettingsTemplate.mk b/project/jni/SettingsTemplate.mk index 6976dcffb..5a9f2f167 100644 --- a/project/jni/SettingsTemplate.mk +++ b/project/jni/SettingsTemplate.mk @@ -6,7 +6,7 @@ APP_AVAILABLE_STATIC_LIBS := jpeg png freetype fontconfig xerces ogg vorbis flac boost_regex boost_serialization boost_signals boost_stacktrace_basic boost_stacktrace_noop \ boost_system boost_test_exec_monitor boost_thread boost_timer boost_type_erasure boost_unit_test_framework boost_wave boost_wserialization \ glu icudata icutest icui18n icuio icule iculx icutu icuuc icu-le-hb harfbuzz sdl_savepng android_support \ - gl4es nanogl gd + gl4es nanogl gd guichan # 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 APP_MODULES := application sdl-1.2 sdl_main sdl_native_helpers jpeg png ogg flac vorbis freetype tremor ogg diff --git a/project/jni/application/ballfield/AndroidAppSettings.cfg b/project/jni/application/ballfield/AndroidAppSettings.cfg index b57a87ed8..56ad0e328 100644 --- a/project/jni/application/ballfield/AndroidAppSettings.cfg +++ b/project/jni/application/ballfield/AndroidAppSettings.cfg @@ -67,7 +67,7 @@ SwVideoMode=y SdlVideoResize=y # Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n) -SdlVideoResizeKeepAspect=y +SdlVideoResizeKeepAspect=n # Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer InhibitSuspend=y @@ -269,7 +269,7 @@ APP_PLATFORM= # Specify architectures to compile, 'all' or 'y' to compile for all architectures. # Available architectures: armeabi-v7a x86 arm64-v8a x86_64 -MultiABI='armeabi-v7a arm64-v8a x86 x86_64' +MultiABI='arm64-v8a' # armeabi-v7a x86 x86_64 # Optional shared libraries to compile - removing some of them will save space # MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed diff --git a/project/jni/application/ballfield/ballfield.cpp b/project/jni/application/ballfield/ballfield.cpp index 875fbc478..2a4c359c0 100644 --- a/project/jni/application/ballfield/ballfield.cpp +++ b/project/jni/application/ballfield/ballfield.cpp @@ -715,7 +715,7 @@ int main(int argc, char* argv[]) if(evt.key.keysym.sym == SDLK_2) { __android_log_print(ANDROID_LOG_INFO, "Ballfield", "Async text input started"); - asyncTextInputBuf[0] = 0; + strcpy(asyncTextInputBuf, "async"); SDL_ANDROID_GetScreenKeyboardTextInputAsync(asyncTextInputBuf, sizeof(asyncTextInputBuf)); } if(evt.key.keysym.sym == SDLK_3) @@ -768,7 +768,7 @@ int main(int argc, char* argv[]) } } } - if( screenKeyboardShown != SDL_IsScreenKeyboardShown(NULL)) + if( screenKeyboardShown != SDL_IsScreenKeyboardShown(NULL) ) { __android_log_print(ANDROID_LOG_INFO, "Ballfield", "Screen keyboard shown: %d -> %d", screenKeyboardShown, SDL_IsScreenKeyboardShown(NULL)); screenKeyboardShown = SDL_IsScreenKeyboardShown(NULL); diff --git a/project/jni/application/openlierox/AndroidAppSettings.cfg b/project/jni/application/openlierox/AndroidAppSettings.cfg index 2afd5597a..dff7bcbdd 100644 --- a/project/jni/application/openlierox/AndroidAppSettings.cfg +++ b/project/jni/application/openlierox/AndroidAppSettings.cfg @@ -7,10 +7,10 @@ AppName="OpenLieroX" AppFullName=openlierox.net # Application version code (integer) -AppVersionCode=10580525 +AppVersionCode=10580526 # Application user-visible version name (string) -AppVersionName="0.58rc5a25" +AppVersionName="0.58rc5a26" # 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, other downloads should be selected by user from startup config menu @@ -269,7 +269,7 @@ MultiABI='armeabi-v7a arm64-v8a x86 x86_64' # arm64-v8a x86 x86_64 # Optional shared libraries to compile - removing some of them will save space # MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed # 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="sdl_image sdl_mixer xml2 curl gd jpeg vorbis ogg lzma mad" +CompiledLibraries="sdl_image sdl_mixer xml2 curl ssl crypto gd jpeg vorbis ogg lzma mad" # Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) CustomBuildScript=n diff --git a/project/jni/application/openlierox/java.patch b/project/jni/application/openlierox/java.patch index dbfef06b0..91c852a9e 100644 --- a/project/jni/application/openlierox/java.patch +++ b/project/jni/application/openlierox/java.patch @@ -11,9 +11,9 @@ index 9e6150a..09ade66 100644 if( Globals.TouchscreenKeyboardTheme == 4 ) nativeSetupScreenKeyboardButtons(loadRaw(p, R.raw.retro)); if( Globals.TouchscreenKeyboardTheme == 5 ) ---- /dev/null 2018-04-10 21:06:44.327303421 +0300 -+++ b/project/java/RunFromOtherApp.java 2018-05-17 22:21:46.816651827 +0300 -@@ -0,0 +1,108 @@ +--- /dev/null 2018-12-13 18:37:19.876000065 +0200 ++++ Connect.java 2018-12-17 21:16:01.027001714 +0200 +@@ -0,0 +1,115 @@ +/* +Simple DirectMedia Layer +Java source code (C) 2009-2014 Sergii Pylypenko @@ -105,7 +105,7 @@ index 9e6150a..09ade66 100644 +import android.content.ComponentName; + + -+public class RunFromOtherApp extends Activity ++public class Connect extends Activity +{ + @Override + protected void onCreate(Bundle savedInstanceState) @@ -114,9 +114,16 @@ index 9e6150a..09ade66 100644 + + Intent main = new Intent(this, MainActivity.class); + main.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); -+ if( getIntent().getScheme() != null && getIntent().getScheme().equals("openlierox") ) ++ if( getIntent().getScheme() != null && getIntent().getScheme().equals("openlierox") && getIntent().getData() != null && getIntent().getData().getHost().equals("connect") ) + { -+ main.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, getIntent().getData().getHost() + ":" + getIntent().getData().getPort()); ++ main.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, getIntent().getData().getPath().replace("/","").replace("!",":")); ++ } ++ if( getIntent().getScheme() != null && getIntent().getScheme().equals("https") && getIntent().getData() != null && getIntent().getData().getPath().contains("connect") ) ++ { ++ if( getIntent().getData().getQueryParameter("a") != null ) ++ main.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, getIntent().getData().getQueryParameter("a").replace("!",":")); ++ else ++ main.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, getIntent().getData().getPath().replace("/connect/","").replace("!",":")); + } + startActivity(main); + finish(); diff --git a/project/jni/application/openlierox/project.patch b/project/jni/application/openlierox/project.patch index 429ee0549..4405f07ba 100644 --- a/project/jni/application/openlierox/project.patch +++ b/project/jni/application/openlierox/project.patch @@ -1,21 +1,26 @@ --- a/project/AndroidManifest.xml 2018-05-17 22:12:08.421817275 +0300 +++ a/project/AndroidManifest.xml 2018-05-17 22:14:05.186301554 +0300 -@@ -27,6 +27,19 @@ +@@ -27,6 +27,24 @@ -+ + -+ -+ + + ++ + + ++ ++ ++ ++ ++ ++ +