Merge branch 'sdl_android' into python3_testing
This commit is contained in:
28
.gitmodules
vendored
28
.gitmodules
vendored
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
4
build.sh
4
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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/>
|
||||
</application>
|
||||
|
||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23"/>
|
||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25"/>
|
||||
<!-- ==INTERNET== --> <uses-permission android:name="android.permission.INTERNET" />
|
||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Submodule project/jni/application/bochs/bochs updated: cdc6b9a6f8...b8c3ab2779
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Submodule project/jni/application/ninslash/src updated: a877391fc0...721417db32
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Submodule project/jni/application/openttd/src updated: 1a247739e4...f03484e84b
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -523,7 +523,6 @@ void SDL_ANDROID_DeferredTextInput()
|
||||
{
|
||||
if( SDL_ANDROID_TextInputFinished )
|
||||
{
|
||||
SDL_ANDROID_TextInputFinished = 0;
|
||||
SDL_ANDROID_IsScreenKeyboardShownFlag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +306,6 @@ void SDL_ANDROID_DeferredTextInput()
|
||||
{
|
||||
if( SDL_ANDROID_TextInputFinished )
|
||||
{
|
||||
SDL_ANDROID_TextInputFinished = 0;
|
||||
SDL_ANDROID_IsScreenKeyboardShownFlag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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<<i;
|
||||
if( pointerInButtonRect[i] == -1 )
|
||||
{
|
||||
pointerInButtonRect[i] = pointerId;
|
||||
if( i == BUTTON_TEXT_INPUT )
|
||||
SDL_ANDROID_ToggleScreenKeyboardTextInput(NULL);
|
||||
else if( buttonsStayPressedAfterTouch[i] )
|
||||
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_GetKeyboardState(NULL)[buttonKeysyms[i]] == 0 ? SDL_PRESSED : SDL_RELEASED, buttonKeysyms[i], 0 );
|
||||
else
|
||||
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_PRESSED, buttonKeysyms[i], 0 );
|
||||
if( preventButtonOverlap )
|
||||
{
|
||||
processOtherButtons = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for( j = 0; j < joyAmount && processOtherButtons; j++ )
|
||||
{
|
||||
if( InsideRect( &arrows[j], x, y ) )
|
||||
{
|
||||
@@ -521,25 +551,10 @@ unsigned SDL_ANDROID_processTouchscreenKeyboard(int x, int y, int action, int po
|
||||
oldArrows = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for( i = 0; i < MAX_BUTTONS; i++ )
|
||||
{
|
||||
if( ! buttons[i].h || ! buttons[i].w )
|
||||
continue;
|
||||
if( InsideRect( &buttons[i], x, y) )
|
||||
{
|
||||
processed |= 1<<i;
|
||||
if( pointerInButtonRect[i] == -1 )
|
||||
if( preventButtonOverlap )
|
||||
{
|
||||
pointerInButtonRect[i] = pointerId;
|
||||
if( i == BUTTON_TEXT_INPUT )
|
||||
SDL_ANDROID_ToggleScreenKeyboardTextInput(NULL);
|
||||
else if( buttonsStayPressedAfterTouch[i] )
|
||||
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_GetKeyboardState(NULL)[buttonKeysyms[i]] == 0 ? SDL_PRESSED : SDL_RELEASED, buttonKeysyms[i], 0 );
|
||||
else
|
||||
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_PRESSED, buttonKeysyms[i], 0 );
|
||||
processOtherButtons = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -610,10 +625,13 @@ unsigned SDL_ANDROID_processTouchscreenKeyboard(int x, int y, int action, int po
|
||||
int processOtherButtons = 1;
|
||||
for( i = 0; i < MAX_BUTTONS; i++ )
|
||||
{
|
||||
if( buttonsGenerateSdlEvents[i] && pointerInButtonRect[i] == pointerId )
|
||||
if( pointerInButtonRect[i] == pointerId )
|
||||
{
|
||||
processOtherButtons = 0;
|
||||
break;
|
||||
if (buttonsGenerateSdlEvents[i] || preventButtonOverlap)
|
||||
{
|
||||
processOtherButtons = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( processOtherButtons )
|
||||
@@ -1231,10 +1249,14 @@ SDL_AndroidTextInputAsyncStatus_t SDLCALL SDL_ANDROID_GetScreenKeyboardTextInput
|
||||
if( SDL_ANDROID_TextInputFinished )
|
||||
{
|
||||
SDL_ANDROID_TextInputFinished = 0;
|
||||
SDL_ANDROID_IsScreenKeyboardShownFlag = 0;
|
||||
SDL_ANDROID_AsyncTextInputActive = 0;
|
||||
return SDL_ANDROID_TEXTINPUT_ASYNC_FINISHED;
|
||||
}
|
||||
SDL_ANDROID_CallJavaShowScreenKeyboard(textBuf, textBuf, textBufSize, 1);
|
||||
if( !SDL_ANDROID_IsScreenKeyboardShownFlag && !SDL_ANDROID_AsyncTextInputActive )
|
||||
{
|
||||
SDL_ANDROID_AsyncTextInputActive = 1;
|
||||
SDL_ANDROID_CallJavaShowScreenKeyboard(textBuf, textBuf, textBufSize, 1);
|
||||
}
|
||||
return SDL_ANDROID_TEXTINPUT_ASYNC_IN_PROGRESS;
|
||||
}
|
||||
|
||||
@@ -1276,6 +1298,12 @@ int SDLCALL SDL_ANDROID_SetScreenKeyboardButtonGenerateTouchEvents(int buttonId,
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SDLCALL SDL_ANDROID_SetScreenKeyboardPreventButtonOverlap(int prevent)
|
||||
{
|
||||
preventButtonOverlap = prevent;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SDLCALL SDL_ANDROID_SetScreenKeyboardButtonStayPressedAfterTouch(int buttonId, int stayPressed)
|
||||
{
|
||||
if( buttonId < 0 || buttonId >= SDL_ANDROID_SCREENKEYBOARD_BUTTON_NUM )
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-23
|
||||
target=android-25
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user