diff --git a/.gitmodules b/.gitmodules
index 379ee1cba..c52029818 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,15 +4,11 @@
[submodule "project/jni/boost/src"]
path = project/jni/boost/src
url = git@github.com:pelya/Boost-for-Android.git
+ branch = master2
+ update = merge
[submodule "project/jni/application/commandergenius/commandergenius"]
path = project/jni/application/commandergenius/commandergenius
url = git@github.com:gerstrong/Commander-Genius.git
-[submodule "project/jni/application/frogatto"]
- path = project/jni/application/frogatto
- url = git@github.com:frogatto/frogatto.git
-[submodule "project/jni/application/ufoai/ufoai"]
- path = project/jni/application/ufoai/ufoai
- url = git://ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
[submodule "project/jni/application/openarena/engine"]
path = project/jni/application/openarena/engine
url = git@github.com:pelya/openarena-engine.git
@@ -31,15 +27,18 @@
[submodule "project/jni/application/xserver/xserver"]
path = project/jni/application/xserver/xserver
url = git@github.com:pelya/xserver.git
+ branch = xsdl2
+ update = merge
[submodule "android-shmem"]
path = project/jni/shmem
url = git@github.com:pelya/android-shmem.git
+ branch = master
+ update = merge
[submodule "project/jni/application/hid-pc-keyboard/src"]
path = project/jni/application/hid-pc-keyboard/src
url = git@github.com:pelya/android-keyboard-gadget.git
-[submodule "project/jni/application/xserver-gimp/xserver"]
- path = project/jni/application/xserver-gimp/xserver
- url = git@github.com:pelya/xserver.git
+ branch = master
+ update = merge
[submodule "project/jni/iconv/src"]
path = project/jni/iconv/src
url = git@github.com:pelya/libiconv-libicu-android.git
@@ -49,9 +48,6 @@
[submodule "project/jni/application/openttd/src"]
path = project/jni/application/openttd/src
url = git@github.com:pelya/openttd-android.git
-[submodule "project/jni/application/xserver-debian/xserver"]
- path = project/jni/application/xserver-debian/xserver
- url = git@github.com:pelya/xserver.git
[submodule "project/jni/application/uae4all2"]
path = project/jni/application/uae4all2
url = git@github.com:lubomyr/uae4all2.git
@@ -64,19 +60,12 @@
[submodule "project/jni/application/vice/vice"]
path = project/jni/application/vice/vice
url = git@github.com:lubomyr/vice-2.4.git
-[submodule "project/jni/openssl/openssl/jni"]
- path = project/jni/openssl/openssl/jni
- url = https://android.googlesource.com/platform/external/openssl
- branch = lollipop-mr1-dev
[submodule "project/jni/application/xserver/pulseaudio"]
path = project/jni/application/xserver/pulseaudio
url = git@github.com:pelya/pulseaudio-android.git
[submodule "project/jni/application/bochs/bochs"]
path = project/jni/application/bochs/bochs
url = git@github.com:lubomyr/bochs.git
-[submodule "project/jni/boringssl/boringssl/jni"]
- path = project/jni/boringssl/boringssl/jni
- url = https://android.googlesource.com/platform/external/boringssl
[submodule "project/jni/application/supertux/supertux"]
path = project/jni/application/supertux/supertux
url = git@github.com:pelya/supertux.git
@@ -89,3 +78,4 @@
[submodule "project/jni/python3/python3-android"]
path = project/jni/python3/python3-android
url = http://github.com/gerstrong/python3-android.git
+
diff --git a/aar2jar.py b/aar2jar.py
index f2821f58b..25f9bdfdf 100755
--- a/aar2jar.py
+++ b/aar2jar.py
@@ -70,7 +70,7 @@ def convert_project(project_name, output_dir):
os.rename(os.path.join(your_file_dest_path, 'classes.jar'), os.path.join(your_file_dest_path, project_name + '.jar'))
shutil.move(os.path.join(your_file_dest_path, project_name + '.jar'), os.path.join(your_file_dest_path, 'libs/' + project_name + '.jar'))
# Call android update. So we have to install android first, then add it into PATH
- command = "android update lib-project -p " + os.path.join(output_dir, project_name) + " -t 10"
+ command = "android update lib-project -p " + os.path.join(output_dir, project_name) + " -t android-25"
os.system(command)
# Update project.properties file
with open(os.path.join(output_dir, project_name, 'project.properties'), "a") as myfile:
diff --git a/bugs.txt b/bugs.txt
old mode 100755
new mode 100644
diff --git a/build.sh b/build.sh
index c88e8292e..eb899092f 100755
--- a/build.sh
+++ b/build.sh
@@ -6,6 +6,7 @@ run_apk=false
sign_apk=false
build_release=true
quick_rebuild=false
+QUICK_REBUILD_ARGS=
if [ "$#" -gt 0 -a "$1" = "-s" ]; then
shift
@@ -26,6 +27,7 @@ fi
if [ "$#" -gt 0 -a "$1" = "-q" ]; then
shift
quick_rebuild=true
+ QUICK_REBUILD_ARGS=APP_ABI=armeabi-v7a
fi
if [ "$#" -gt 0 -a "$1" = "release" ]; then
@@ -169,7 +171,7 @@ strip_libs() {
return 0
}
-cd project && env PATH=$NDKBUILDPATH BUILD_NUM_CPUS=$NCPU nice -n19 ndk-build -j$NCPU V=1 && \
+cd project && env PATH=$NDKBUILDPATH BUILD_NUM_CPUS=$NCPU nice -n19 ndk-build -j$NCPU V=1 $QUICK_REBUILD_ARGS && \
strip_libs && \
cd .. && ./copyAssets.sh && cd project && \
{ if $build_release ; then \
diff --git a/changeAppSettings.sh b/changeAppSettings.sh
index 661acbfc7..d08103d41 100755
--- a/changeAppSettings.sh
+++ b/changeAppSettings.sh
@@ -930,7 +930,7 @@ $SEDI "s/public static String AppMainLibraries.*/public static String AppMainLib
echo Patching project/jni/Settings.mk
echo '# DO NOT EDIT THIS FILE - it is automatically generated, edit file SettingsTemplate.mk' > project/jni/Settings.mk
cat project/jni/SettingsTemplate.mk | \
- sed "s/APP_MODULES := .*/APP_MODULES := application sdl-$LibSdlVersion sdl_main sdl_native_helpers jpeg png ogg flac vorbis freetype $CompiledLibraries/" | \
+ sed "s/APP_MODULES := .*/APP_MODULES := sdl-$LibSdlVersion sdl_main sdl_native_helpers jpeg png ogg flac vorbis freetype $CompiledLibraries application/" | \
sed "s/APP_ABI := .*/APP_ABI := $MultiABI/" | \
sed "s/SDL_JAVA_PACKAGE_PATH := .*/SDL_JAVA_PACKAGE_PATH := $AppFullNameUnderscored/" | \
sed "s^SDL_CURDIR_PATH := .*^SDL_CURDIR_PATH := $DataPath^" | \
@@ -1007,7 +1007,18 @@ else
cd $CURDIR
$SEDI "s/==GOOGLEPLAYGAMESERVICES_APP_ID==/$GooglePlayGameServicesId/g" project/res/values/strings.xml
- grep 'google-play-services' project/local.properties > /dev/null || {
+ grep 'play-services' project/local.properties > /dev/null || {
+
+ PROGUARD=`which android`
+ PROGUARD=`dirname $PROGUARD`/proguard/lib/proguard.jar
+ java -jar $PROGUARD | grep 'ProGuard, version 5.3.2' || {
+ 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.2.tar.gz"
+ echo "Unpack it, then place file proguard.jar to $PROGUARD"
+ exit 1
+ }
+
# Ant is way too smart, and adds current project path in front of the ${sdk.dir}
echo "android.library.reference.1=play-services/games/play-services-games-$PLAY_SERVICES_VER" >> project/local.properties
echo "android.library.reference.2=play-services/drive/play-services-drive-$PLAY_SERVICES_VER" >> project/local.properties
@@ -1020,19 +1031,6 @@ else
echo 'proguard.config=proguard.cfg;proguard-local.cfg' >> project/local.properties
ln -s -f $SDK_DIR/extras/android/compatibility/v4/android-support-v4.jar project/libs
}
- if false; then
- [ -e $SDK_DIR/extras/google/google_play_services/libproject/google-play-services_lib/build.xml ] || \
- android update project -t android-23 -p $SDK_DIR/extras/google/google_play_services/libproject/google-play-services_lib
- [ -e $SDK_DIR/extras/android/compatibility/v7/mediarouter/build.xml ] || { \
- android update project -t android-23 -p $SDK_DIR/extras/android/compatibility/v7/mediarouter
- echo 'android.library.reference.1=../../../../../../../../../../../../../../${sdk.dir}/extras/android/compatibility/v7/appcompat' >> $SDK_DIR/extras/android/compatibility/v7/mediarouter/local.properties
- }
- [ -e $SDK_DIR/extras/android/compatibility/v7/appcompat/build.xml ] || \
- android update project -t android-23 -p $SDK_DIR/extras/android/compatibility/v7/appcompat
- [ -e $SDK_DIR/extras/android/compatibility/v7/palette/build.xml ] || \
- android update project -t android-23 -p $SDK_DIR/extras/android/compatibility/v7/palette && \
- mkdir -p $SDK_DIR/extras/android/compatibility/v7/palette/src
- fi
fi
if [ -e project/jni/application/src/project.patch ]; then patch -p1 --dry-run -f -R < project/jni/application/src/project.patch > /dev/null 2>&1 || patch -p1 --no-backup-if-mismatch < project/jni/application/src/project.patch || exit 1 ; fi
diff --git a/project/AndroidManifestTemplate.xml b/project/AndroidManifestTemplate.xml
index 2013af968..8c0c07132 100644
--- a/project/AndroidManifestTemplate.xml
+++ b/project/AndroidManifestTemplate.xml
@@ -48,7 +48,7 @@
/>
-
+
diff --git a/project/java/Settings.java b/project/java/Settings.java
index df9eed248..da85b52b9 100644
--- a/project/java/Settings.java
+++ b/project/java/Settings.java
@@ -89,7 +89,7 @@ public class Settings
static void Save(final MainActivity p)
{
try {
- ObjectOutputStream out = new ObjectOutputStream(p.openFileOutput( SettingsFileName, p.MODE_WORLD_READABLE ));
+ ObjectOutputStream out = new ObjectOutputStream(p.openFileOutput( SettingsFileName, p.MODE_PRIVATE ));
out.writeInt(SETTINGS_FILE_VERSION);
out.writeBoolean(Globals.DownloadToSdcard);
out.writeBoolean(Globals.PhoneHasArrowKeys);
@@ -401,8 +401,11 @@ public class Settings
return;
} catch( FileNotFoundException e ) {
+ Log.i("SDL", "libSDL: settings file not found: " + e);
} catch( SecurityException e ) {
+ Log.i("SDL", "libSDL: settings file cannot be opened: " + e);
} catch ( IOException e ) {
+ Log.i("SDL", "libSDL: settings file cannot be read: " + e);
DeleteFilesOnUpgrade(p);
if( Globals.ResetSdlConfigForThisVersion )
{
@@ -508,7 +511,7 @@ public class Settings
public static void DeleteSdlConfigOnUpgradeAndRestart(final MainActivity p)
{
try {
- ObjectOutputStream out = new ObjectOutputStream(p.openFileOutput( SettingsFileName, p.MODE_WORLD_READABLE ));
+ ObjectOutputStream out = new ObjectOutputStream(p.openFileOutput( SettingsFileName, p.MODE_PRIVATE ));
out.writeInt(-1);
out.close();
} catch( FileNotFoundException e ) {
diff --git a/project/jni/SettingsTemplate.mk b/project/jni/SettingsTemplate.mk
index 6d19a5ebd..58b8a92cb 100644
--- a/project/jni/SettingsTemplate.mk
+++ b/project/jni/SettingsTemplate.mk
@@ -1,11 +1,13 @@
+# To filter out static libs from all libs in makefile
+APP_AVAILABLE_STATIC_LIBS := jpeg png freetype fontconfig xerces ogg vorbis flac boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread boost_locale glu icudata icutest icui18n icuio icule iculx icutu icuuc sdl_savepng android_support gl4es nanogl
+
# 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
-# To filter out static libs from all libs in makefile
-APP_AVAILABLE_STATIC_LIBS := jpeg png tremor freetype xerces ogg tremor vorbis flac boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread boost_locale glu icudata icutest icui18n icuio icule iculx icutu icuuc sdl_savepng android_support gl4es nanogl
-
+ifeq ($(APP_ABI),)
APP_ABI := armeabi
+endif
# The namespace in Java file, with dots replaced with underscores
SDL_JAVA_PACKAGE_PATH := net_sourceforge_clonekeenplus
diff --git a/project/jni/application/Android.mk b/project/jni/application/Android.mk
index 2f8fdf47a..f162fbeea 100644
--- a/project/jni/application/Android.mk
+++ b/project/jni/application/Android.mk
@@ -49,6 +49,9 @@ LOCAL_SHARED_LIBRARIES := sdl-$(SDL_VERSION) $(filter-out $(APP_AVAILABLE_STATIC
LOCAL_STATIC_LIBRARIES := $(filter $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES))
+$(warning APP LOCAL_SHARED_LIBRARIES $(LOCAL_SHARED_LIBRARIES))
+$(warning APP LOCAL_STATIC_LIBRARIES $(LOCAL_STATIC_LIBRARIES))
+
APP_STL := gnustl_static
LOCAL_LDLIBS := $(APPLICATION_GLES_LIBRARY) -ldl -llog -lz # -lgnustl_static
diff --git a/project/jni/application/ballfield/ballfield.cpp b/project/jni/application/ballfield/ballfield.cpp
index a32122265..78cd94345 100644
--- a/project/jni/application/ballfield/ballfield.cpp
+++ b/project/jni/application/ballfield/ballfield.cpp
@@ -442,6 +442,8 @@ int main(int argc, char* argv[])
int accel[5], screenjoy[4], gamepads[4][8];
SDL_Surface *mouse[4];
int screenKeyboardShown = 0;
+ int asyncTextInput = 0;
+ char asyncTextInputBuf[256];
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
@@ -691,11 +693,14 @@ int main(int argc, char* argv[])
if(evt.key.keysym.sym == SDLK_1)
{
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_2, 0);
+ SDL_ANDROID_OpenExternalWebBrowser("http:/google.com/");
}
if(evt.key.keysym.sym == SDLK_2)
{
- SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_DPAD, 1);
- screen = SDL_SetVideoMode(SCREEN_W, SDL_GetVideoSurface()->h + 1, bpp, flags);
+ __android_log_print(ANDROID_LOG_INFO, "Ballfield", "Async text input started");
+ asyncTextInput = 1;
+ asyncTextInputBuf[0] = 0;
+ SDL_ANDROID_GetScreenKeyboardTextInputAsync(asyncTextInputBuf, sizeof(asyncTextInputBuf));
}
if(evt.key.keysym.sym == SDLK_3)
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_DPAD, 0);
@@ -752,6 +757,14 @@ int main(int argc, char* argv[])
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Screen keyboard shown: %d -> %d", screenKeyboardShown, SDL_IsScreenKeyboardShown(NULL));
screenKeyboardShown = SDL_IsScreenKeyboardShown(NULL);
}
+ if( asyncTextInput )
+ {
+ if( SDL_ANDROID_GetScreenKeyboardTextInputAsync(asyncTextInputBuf, sizeof(asyncTextInputBuf)) == SDL_ANDROID_TEXTINPUT_ASYNC_FINISHED)
+ {
+ __android_log_print(ANDROID_LOG_INFO, "Ballfield", "Async text input: %s", asyncTextInputBuf);
+ asyncTextInput = 0;
+ }
+ }
/* Animate */
x_speed = 500.0 * sin(t * 0.37);
diff --git a/project/jni/application/bochs/bochs b/project/jni/application/bochs/bochs
index cdc6b9a6f..b8c3ab277 160000
--- a/project/jni/application/bochs/bochs
+++ b/project/jni/application/bochs/bochs
@@ -1 +1 @@
-Subproject commit cdc6b9a6f842d6ceed9c2dd07d5d2bfb3a23cce1
+Subproject commit b8c3ab2779e8e29ce5156eae589070a56d100a0c
diff --git a/project/jni/application/commandergenius/AndroidData/gamecatalogue.zip b/project/jni/application/commandergenius/AndroidData/gamecatalogue.zip
new file mode 100644
index 000000000..796d15030
Binary files /dev/null and b/project/jni/application/commandergenius/AndroidData/gamecatalogue.zip differ
diff --git a/project/jni/application/commandergenius/AndroidData/keen1.zip b/project/jni/application/commandergenius/AndroidData/keen1.zip
index 5a134dfee..c64cee758 100644
Binary files a/project/jni/application/commandergenius/AndroidData/keen1.zip and b/project/jni/application/commandergenius/AndroidData/keen1.zip differ
diff --git a/project/jni/application/commandergenius/AndroidData/keen4.zip b/project/jni/application/commandergenius/AndroidData/keen4.zip
index cf81305e1..c5e59c039 100644
Binary files a/project/jni/application/commandergenius/AndroidData/keen4.zip and b/project/jni/application/commandergenius/AndroidData/keen4.zip differ
diff --git a/project/jni/application/ninslash/AndroidAppSettings.cfg b/project/jni/application/ninslash/AndroidAppSettings.cfg
index e6b6b0c09..f388eb328 100644
--- a/project/jni/application/ninslash/AndroidAppSettings.cfg
+++ b/project/jni/application/ninslash/AndroidAppSettings.cfg
@@ -7,10 +7,10 @@ AppName="Ninslash"
AppFullName=ninslash.com
# Application version code (integer)
-AppVersionCode=02012
+AppVersionCode=02117
# Application user-visible version name (string)
-AppVersionName="0.2.0.12"
+AppVersionName="0.2.1.17"
# 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
@@ -24,7 +24,7 @@ AppDataDownloadUrl="!!Game data|data.zip"
ResetSdlConfigForThisVersion=y
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
-DeleteFilesOnUpgrade="libsdl-DownloadFinished-0.flag"
+DeleteFilesOnUpgrade="libsdl-DownloadFinished-0.flag .ninslash/settings.cfg"
# 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/
@@ -200,10 +200,10 @@ NonBlockingSwapBuffers=n
RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP"
# Number of virtual keyboard keys (currently 6 is maximum)
-AppTouchscreenKeyboardKeysAmount=0
+AppTouchscreenKeyboardKeysAmount=4
# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)
-RedefinedKeysScreenKb="TAB"
+RedefinedKeysScreenKb="M N V B"
# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu
RedefinedKeysScreenKbNames="Show_scores"
@@ -223,7 +223,7 @@ TouchscreenKeysTheme=2
# Redefine gamepad keys to SDL keysyms, button order is:
# A B X Y L1 R1 L2 R2 LThumb RThumb
-RedefinedKeysGamepad="RETURN PAGEDOWN TAB T SPACE RCTRL RETURN RCTRL SPACE PAGEDOWN"
+RedefinedKeysGamepad="LCTRL M Q TAB SPACE MOUSE_LEFT MOUSE_RIGHT E SPACE E"
# How long to show startup menu button, in msec, 0 to disable startup menu
StartupMenuButtonTimeout=3000
@@ -252,7 +252,7 @@ APP_PLATFORM=android-21
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
# Available architectures: armeabi armeabi-v7a x86 mips arm64-v8a
-MultiABI='armeabi-v7a'
+MultiABI='armeabi-v7a x86'
# 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/ninslash/AndroidPreBuild.sh b/project/jni/application/ninslash/AndroidPreBuild.sh
index d392c5f3f..9609b5582 100755
--- a/project/jni/application/ninslash/AndroidPreBuild.sh
+++ b/project/jni/application/ninslash/AndroidPreBuild.sh
@@ -23,6 +23,7 @@ python scripts/cmd5.py src/engine/shared/protocol.h src/game/generated/protocol.
echo "Archiving data"
mkdir -p ../AndroidData
+ln -sf ../src/logo.png ../AndroidData
rm -f ../AndroidData/data.zip
zip -r ../AndroidData/data.zip data *.txt *.cfg "example configs" >/dev/null
diff --git a/project/jni/application/ninslash/src b/project/jni/application/ninslash/src
index a877391fc..721417db3 160000
--- a/project/jni/application/ninslash/src
+++ b/project/jni/application/ninslash/src
@@ -1 +1 @@
-Subproject commit a877391fc0df8421cdeeea45204632a179b11ce5
+Subproject commit 721417db327fc76628adcf673b068a7a75810d49
diff --git a/project/jni/application/openttd/AndroidAppSettings.cfg b/project/jni/application/openttd/AndroidAppSettings.cfg
index 30f2056c9..e81fea1c3 100644
--- a/project/jni/application/openttd/AndroidAppSettings.cfg
+++ b/project/jni/application/openttd/AndroidAppSettings.cfg
@@ -7,10 +7,10 @@ AppName="OpenTTD"
AppFullName=org.openttd.sdl
# Application version code (integer)
-AppVersionCode=16163
+AppVersionCode=16164
# Application user-visible version name (string)
-AppVersionName="1.6.1.63"
+AppVersionName="1.6.1.64"
# 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
@@ -18,7 +18,7 @@ AppVersionName="1.6.1.63"
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
# these files are put inside .apk package by 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, first associated with the file
-AppDataDownloadUrl="!!Data files - 20 Mb|openttd-data-1.6.1-0.zip.xz^!!Config file|:.openttd/openttd.cfg:openttd-1.4.0.30.cfg^!!MIDI music support (18 Mb)|timidity.zip.xz|http://sourceforge.net/projects/libsdl-android/files/timidity.zip.xz^!!Internationalization files|icudt52l.zip.xz|http://sourceforge.net/projects/libsdl-android/files/icudt52l.zip.xz^HD graphics - 220 Mb download|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/abase-0.1.2-0.zip.xz/download|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/zBase-v5588.zip.xz/download"
+AppDataDownloadUrl="!!Data files - 20 Mb|openttd-data-1.6.1-1.zip.xz^!!Config file|:.openttd/openttd.cfg:openttd-1.4.0.30.cfg^!!MIDI music support (18 Mb)|timidity.zip.xz|http://sourceforge.net/projects/libsdl-android/files/timidity.zip.xz^!!Internationalization files|icudt52l.zip.xz|http://sourceforge.net/projects/libsdl-android/files/icudt52l.zip.xz^HD graphics - 220 Mb download|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/abase-0.1.2-0.zip.xz/download|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/zBase-v5588.zip.xz/download"
# Reset SDL config when updating application to the new version (y) / (n)
ResetSdlConfigForThisVersion=n
diff --git a/project/jni/application/openttd/AndroidBuild.sh b/project/jni/application/openttd/AndroidBuild.sh
index 0c4622d02..7fff92219 100755
--- a/project/jni/application/openttd/AndroidBuild.sh
+++ b/project/jni/application/openttd/AndroidBuild.sh
@@ -25,4 +25,4 @@ uname -s | grep -i "linux" > /dev/null && NCPU=`cat /proc/cpuinfo | grep -c -i p
LIBATOMIC=
echo $1 | grep 'arm' && LIBATOMIC=-latomic
-env CLANG=1 LIBATOMIC=$LIBATOMIC ../setEnvironment-$1.sh sh -c "cd openttd-$VER-$1 && make -j$NCPU VERBOSE=1 STRIP='' LIBS='-lsdl-1.2 -llzo2 -lpng -ltimidity -lfreetype -lfontconfig -lexpat -licui18n -liculx -licule -licuuc -licudata -lgcc -lz -lc -lgnustl_static -lsupc++ $LIBATOMIC'" && cp -f openttd-$VER-$1/objs/release/openttd libapplication-$1.so || exit 1
+env CLANG=1 LIBATOMIC=$LIBATOMIC ../setEnvironment-$1.sh sh -c "cd openttd-$VER-$1 && make -j$NCPU VERBOSE=1 STRIP='' LIBS='-lsdl-1.2 -llzo2 -lpng -ltimidity -lfontconfig -lfreetype -lexpat -licui18n -liculx -licule -licuuc -licudata -lgcc -lz -lc -lgnustl_static -lsupc++ $LIBATOMIC'" && cp -f openttd-$VER-$1/objs/release/openttd libapplication-$1.so || exit 1
diff --git a/project/jni/application/openttd/build-pc.sh b/project/jni/application/openttd/build-pc.sh
index 750614b08..06a7aea8c 100755
--- a/project/jni/application/openttd/build-pc.sh
+++ b/project/jni/application/openttd/build-pc.sh
@@ -20,6 +20,7 @@ export LD_LIBRARY_PATH=/usr/local/lib
if [ -z "$1" ]; then
./openttd -d 2 -r 854x480 #-g opntitle.sav
else
- gdb -ex run --args \
+ #gdb -ex run --args \
+ valgrind --track-fds=yes --log-file=valgrind.log --leak-check=full \
./openttd -d 2 -r 854x480 #-g opntitle.sav
fi
diff --git a/project/jni/application/openttd/pack-data.sh b/project/jni/application/openttd/pack-data.sh
index c544e94f0..a22a208b2 100755
--- a/project/jni/application/openttd/pack-data.sh
+++ b/project/jni/application/openttd/pack-data.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-VER=1.6.1-0
+VER=1.6.1-1
cd data
rm -f ../AndroidData/openttd-data-*.zip.xz ../AndroidData/openttd-data-*.zip
diff --git a/project/jni/application/openttd/src b/project/jni/application/openttd/src
index 1a247739e..f03484e84 160000
--- a/project/jni/application/openttd/src
+++ b/project/jni/application/openttd/src
@@ -1 +1 @@
-Subproject commit 1a247739e4a8c25ac38d4aa8b9c1cb345d836f19
+Subproject commit f03484e84ba64a806d59da435d68398bda32caf9
diff --git a/project/jni/fontconfig/Android.mk b/project/jni/fontconfig/Android.mk
index 73246dbf6..7b447f214 100644
--- a/project/jni/fontconfig/Android.mk
+++ b/project/jni/fontconfig/Android.mk
@@ -23,4 +23,4 @@ LOCAL_C_INCLUDES := \
LOCAL_SRC_FILES := $(addprefix src/, $(notdir $(wildcard $(LOCAL_PATH)/src/*.c) $(wildcard $(LOCAL_PATH)/src/*.cpp)))
-include $(BUILD_SHARED_LIBRARY)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/project/jni/openssl/compile.sh b/project/jni/openssl/compile.sh
index 193a3de98..bb620269a 100755
--- a/project/jni/openssl/compile.sh
+++ b/project/jni/openssl/compile.sh
@@ -48,3 +48,5 @@ done
rm -rf include
cp -r -L build/armeabi-v7a/include ./ || exit 1
+sed -i.tmp 's@".*/dist/.*"@"."@g' include/openssl/opensslconf.h
+rm -f include/openssl/opensslconf.h.tmp
diff --git a/project/jni/openssl/include/openssl/opensslconf.h b/project/jni/openssl/include/openssl/opensslconf.h
index d6b328bc3..7fac1ff5d 100644
--- a/project/jni/openssl/include/openssl/opensslconf.h
+++ b/project/jni/openssl/include/openssl/opensslconf.h
@@ -118,8 +118,8 @@ extern "C" {
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
-#define ENGINESDIR "/home/pelya/src/endless_space/bochs/sdl/project/jni/openssl/build/armeabi-v7a/dist/lib/engines"
-#define OPENSSLDIR "/home/pelya/src/endless_space/bochs/sdl/project/jni/openssl/build/armeabi-v7a/dist/ssl"
+#define ENGINESDIR "."
+#define OPENSSLDIR "."
#endif
#endif
diff --git a/project/jni/sdl-1.2/include/SDL_screenkeyboard.h b/project/jni/sdl-1.2/include/SDL_screenkeyboard.h
index 4a2c403d0..b9df63db7 100644
--- a/project/jni/sdl-1.2/include/SDL_screenkeyboard.h
+++ b/project/jni/sdl-1.2/include/SDL_screenkeyboard.h
@@ -100,6 +100,9 @@ extern DECLSPEC int SDLCALL SDL_ANDROID_GetScreenKeyboardSize(void);
/* Set a particular button to pass a mouse/multitouch events down to the application, by default all buttons block touch events */
extern DECLSPEC int SDLCALL SDL_ANDROID_SetScreenKeyboardButtonGenerateTouchEvents(int buttonId, int generateEvents);
+/* Prevent a button from sharing touch events with other buttons, if they overlap */
+extern DECLSPEC int SDLCALL SDL_ANDROID_SetScreenKeyboardPreventButtonOverlap(int prevent);
+
/* Configure a button to stay pressed after touch, and un-press after second touch, to emulate Ctrl/Alt/Shift keys */
extern DECLSPEC int SDLCALL SDL_ANDROID_SetScreenKeyboardButtonStayPressedAfterTouch(int buttonId, int stayPressed);
diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidinput-queue-compat.c b/project/jni/sdl-1.2/src/video/android/SDL_androidinput-queue-compat.c
index fd9ee5f1c..9a6a86f70 100644
--- a/project/jni/sdl-1.2/src/video/android/SDL_androidinput-queue-compat.c
+++ b/project/jni/sdl-1.2/src/video/android/SDL_androidinput-queue-compat.c
@@ -523,7 +523,6 @@ void SDL_ANDROID_DeferredTextInput()
{
if( SDL_ANDROID_TextInputFinished )
{
- SDL_ANDROID_TextInputFinished = 0;
SDL_ANDROID_IsScreenKeyboardShownFlag = 0;
}
}
diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidinput-queue-fast.c b/project/jni/sdl-1.2/src/video/android/SDL_androidinput-queue-fast.c
index 974640cd5..cb2ce4376 100644
--- a/project/jni/sdl-1.2/src/video/android/SDL_androidinput-queue-fast.c
+++ b/project/jni/sdl-1.2/src/video/android/SDL_androidinput-queue-fast.c
@@ -306,7 +306,6 @@ void SDL_ANDROID_DeferredTextInput()
{
if( SDL_ANDROID_TextInputFinished )
{
- SDL_ANDROID_TextInputFinished = 0;
SDL_ANDROID_IsScreenKeyboardShownFlag = 0;
}
}
diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c
index e4d31f434..5075ca3aa 100644
--- a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c
+++ b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c
@@ -266,14 +266,22 @@ extern int SDL_Flip(SDL_Surface *screen);
extern SDL_Surface *SDL_GetVideoSurface(void);
#endif
+JNIEXPORT void JNICALL
+JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMotionEvent) ( JNIEnv* env, jobject thiz, jint x, jint y, jint action, jint pointerId, jint force, jint radius );
+
void SDL_ANDROID_CallJavaShowScreenKeyboard(const char * oldText, char * outBuf, int outBufLen, int async)
{
+ int i;
JNIEnv *JavaEnv = GetJavaEnv();
// Clear mouse button state, to avoid repeated clicks on the text field in some apps
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_LEFT );
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_RIGHT );
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_MIDDLE );
+ for (i = 0; i < MAX_MULTITOUCH_POINTERS; i++)
+ {
+ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMotionEvent) ( NULL, NULL, 0, 0, MOUSE_UP, i, 0, 0 );
+ }
SDL_ANDROID_TextInputFinished = 0;
SDL_ANDROID_IsScreenKeyboardShownFlag = 1;
@@ -327,7 +335,7 @@ void SDL_ANDROID_CallJavaHideScreenKeyboard()
int SDL_ANDROID_IsScreenKeyboardShown()
{
- return SDL_ANDROID_IsScreenKeyboardShownFlag;
+ return SDL_ANDROID_IsScreenKeyboardShownFlag || SDL_ANDROID_AsyncTextInputActive;
}
JNIEXPORT void JNICALL
diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.h b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.h
index e25573b24..5586ad534 100644
--- a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.h
+++ b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.h
@@ -71,6 +71,7 @@ extern void SDL_ANDROID_CallJavaHideScreenKeyboard();
extern void SDL_ANDROID_CallJavaSetScreenKeyboardHintMessage(const char *hint);
extern int SDL_ANDROID_IsScreenKeyboardShown();
extern int SDL_ANDROID_IsScreenKeyboardShownFlag;
+extern int SDL_ANDROID_AsyncTextInputActive;
extern int SDL_ANDROID_drawTouchscreenKeyboard();
extern void SDL_ANDROID_VideoContextLost();
extern void SDL_ANDROID_VideoContextRecreated();
diff --git a/project/jni/sdl-1.2/src/video/android/SDL_touchscreenkeyboard.c b/project/jni/sdl-1.2/src/video/android/SDL_touchscreenkeyboard.c
index 61c1015c3..20e053040 100644
--- a/project/jni/sdl-1.2/src/video/android/SDL_touchscreenkeyboard.c
+++ b/project/jni/sdl-1.2/src/video/android/SDL_touchscreenkeyboard.c
@@ -58,6 +58,7 @@ static SDL_Rect hiddenButtons[SDL_ANDROID_SCREENKEYBOARD_BUTTON_NUM];
static short buttonsize = 1;
static short buttonDrawSize = 1;
static float transparency = 128.0f/255.0f;
+static int preventButtonOverlap = 0;
static SDL_Rect arrows[MAX_JOYSTICKS], arrowsExtended[MAX_JOYSTICKS], buttons[MAX_BUTTONS];
static SDL_Rect arrowsDraw[MAX_JOYSTICKS], buttonsDraw[MAX_BUTTONS];
@@ -95,6 +96,8 @@ static int themeType = 0;
static int joystickTouchPoints[MAX_JOYSTICKS*2];
static int floatingScreenJoystick = 0;
+int SDL_ANDROID_AsyncTextInputActive = 0;
+
static void R_DumpOpenGlState(void);
static inline int InsideRect(const SDL_Rect * r, int x, int y)
@@ -488,7 +491,34 @@ unsigned SDL_ANDROID_processTouchscreenKeyboard(int x, int y, int action, int po
if( action == MOUSE_DOWN )
{
//__android_log_print(ANDROID_LOG_INFO, "libSDL", "touch %03dx%03d ptr %d action %d", x, y, pointerId, action);
- for( j = 0; j < joyAmount; j++ )
+ int processOtherButtons = 1;
+
+ for( i = 0; i < MAX_BUTTONS; i++ )
+ {
+ if( ! buttons[i].h || ! buttons[i].w )
+ continue;
+ if( InsideRect( &buttons[i], x, y) )
+ {
+ processed |= 1<= SDL_ANDROID_SCREENKEYBOARD_BUTTON_NUM )
diff --git a/project/project.properties b/project/project.properties
index 916037e33..f72b9716b 100644
--- a/project/project.properties
+++ b/project/project.properties
@@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
-target=android-23
+target=android-25
diff --git a/readme.txt b/readme.txt
index 2e22e4c09..4f6ed16bc 100644
--- a/readme.txt
+++ b/readme.txt
@@ -11,9 +11,11 @@ Installation
============
Install latest Android SDK and NDK from http://developer.android.com/index.html
-You'll need to install Java Ant too. Since for building apk files some java classes are needed as well,
-it is recommended to install OpenJDK and its development files. (On RPM based distros
-usually called java-x.x.x-openjdk and java-x.x.x-openjdk-devel)
+Add both to your PATH env variable 0 you sohuld be albe to run commands 'ndk-build' and 'android'.
+You will need to install Java Ant too.
+it is recommended to install OpenJDK and its development files.
+On RPM based distros they are usually called java-x.x.x-openjdk and java-x.x.x-openjdk-devel.
+On Debian or Ubuntu you install them like this: sudo apt-get install openjdk-8-jdk ant
The application will run on Android 2.3 and above, but will use features from Android 6.0 if available.
The most supported environment for this port is Linux, MacOs should be okay too.
If you're developing under Windows you'd better install Portable Ubuntu, to get proper Linux environment