24 Commits

Author SHA1 Message Date
Gerhard Stein
338c3e73b6 Commander Genius update 2017-02-25 12:22:12 +01:00
Gerhard Stein
e2e742da0a python3 updates 2017-02-25 12:21:25 +01:00
Gerhard Stein
19c3445715 Merge branch 'sdl_android' of github.com:pelya/commandergenius into python3_testing 2017-02-10 19:56:47 +01:00
Gerhard Stein
892a4f01c3 enabled for x86 2017-02-09 17:11:15 +01:00
Gerhard Stein
00ed556dd4 fixed include issue 2017-02-08 17:54:17 +01:00
Gerhard Stein
e256f76b48 automatic creation of env 2017-02-05 16:52:37 +01:00
Gerhard Stein
700f6329bf Merge branch 'sdl_android' into python3_testing 2017-02-05 15:19:18 +01:00
Gerhard Stein
27fea957aa Merge branch 'sdl_android' of github.com:pelya/commandergenius into sdl_android 2017-02-05 15:15:23 +01:00
Gerhard Stein
f472f15963 Version update 2017-02-05 15:14:48 +01:00
Gerhard Stein
f708fe930b python3 support for x86 arch added. There are still bugs though. With arms it works fine 2017-01-28 13:06:28 +01:00
Gerhard Stein
3e49726ddc Updated Commander Genius 2017-01-25 20:15:20 +01:00
Gerhard Stein
214a70495b Updated Commander Genius 2017-01-25 19:46:03 +01:00
Gerhard Stein
df8388ac16 Python3 improvementso 2017-01-25 19:30:37 +01:00
Gerhard Stein
5ad5a3fd38 Further automatizations 2017-01-22 13:43:24 +01:00
Gerhard Stein
bff9883181 Merge branch 'sdl_android' into python3_testing 2017-01-21 11:11:45 +01:00
Gerhard Stein
e8861109ed Python3 as submodule 2017-01-01 13:45:31 +01:00
Gerhard Stein
1757a3e3a9 Merge branch 'sdl_android' into python3_testing 2017-01-01 11:28:23 +01:00
Gerhard Stein
58ab8b2618 Commander Genius Update 2017-01-01 11:01:25 +01:00
Gerhard Stein
304bffa18a Merge branch 'sdl_android' of github.com:pelya/commandergenius into python3_testing 2016-12-31 13:57:07 +01:00
Gerhard Stein
82b7b33327 added some include for the apps 2016-12-27 21:53:55 +01:00
Gerhard Stein
73d920684c python3 updates 2016-12-27 21:45:29 +01:00
Gerhard Stein
fdb5f2572a Merge branch 'sdl_android' into python3_testing 2016-12-27 14:57:54 +01:00
Gerhard Stein
616a69a5c5 Fixes and improvements 2016-12-03 14:18:33 +01:00
Gerhard Stein
1194788eb9 Added Python3. (Still testing integration) 2016-12-03 11:31:30 +01:00
19 changed files with 125 additions and 24 deletions

6
.gitmodules vendored
View File

@@ -75,5 +75,7 @@
[submodule "project/jni/application/ninslash/src"] [submodule "project/jni/application/ninslash/src"]
path = project/jni/application/ninslash/src path = project/jni/application/ninslash/src
url = git@github.com:pelya/Ninslash.git url = git@github.com:pelya/Ninslash.git
branch = master [submodule "project/jni/python3/python3-android"]
update = merge path = project/jni/python3/python3-android
url = http://github.com/gerstrong/python3-android.git

View File

@@ -11,7 +11,9 @@ ICU := $(foreach ARCH, $(ARCHES32), $(foreach NAME, $(ICU_LIBS), icuuc/lib/$(ARC
OPENSSL := $(foreach ARCH, $(ARCHES32) $(ARCHES64), openssl/lib-$(ARCH)/libcrypto.so.sdl.1.so openssl/lib-$(ARCH)/libssl.so.sdl.1.so) OPENSSL := $(foreach ARCH, $(ARCHES32) $(ARCHES64), openssl/lib-$(ARCH)/libcrypto.so.sdl.1.so openssl/lib-$(ARCH)/libssl.so.sdl.1.so)
LIBS := $(ICONV) $(ICU) $(OPENSSL) PYTHON3 := $(foreach ARCH, $(ARCHES32) $(ARCHES64), python3/lib-$(ARCH)/libcrypto.so.sdl.1.so python3/lib-$(ARCH)/libssl.so.sdl.1.so)
LIBS := $(ICONV) $(ICU) $(OPENSSL) $(PYTHON3)
prebuilt-libraries: $(LIBS) prebuilt-libraries: $(LIBS)
@@ -32,3 +34,6 @@ $(ICONV) $(ICU):
$(OPENSSL): $(OPENSSL):
cd openssl && ./compile.sh cd openssl && ./compile.sh
$(PYTHON3):
cd python3 && ./compile.sh

View File

@@ -7,10 +7,10 @@ AppName="Commander Genius"
AppFullName=net.sourceforge.clonekeenplus AppFullName=net.sourceforge.clonekeenplus
# Application version code (integer) # Application version code (integer)
AppVersionCode=198500 AppVersionCode=198700
# Application user-visible version name (string) # Application user-visible version name (string)
AppVersionName="1.9.8.4 Beta" AppVersionName="1.9.8.7 Beta"
# 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, other downloads should be selected by user from startup config menu # 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.9.8.4 Beta"
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir - # 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 # these files are put inside .apk package by build system
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS # Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
AppDataDownloadUrl="!Games Center|gamecatalogue.zip^!Keen1|keen1.zip^!Keen4|keen4.zip^High-quality GFX and music - 55 Mb|http://sourceforge.net/projects/clonekeenplus/files/High%20Quality%20Packs/Version%202.x/hqpv26.zip/download" AppDataDownloadUrl="!Games Center|gamecatalogue.zip^!Keen1|keen1.zip^!Keen4|keen4.zip^!Python3 support - 20 Mb|http://sourceforge.net/projects/clonekeenplus/files/extras/python35-assets-android.zip/download ^High-quality GFX and music - 55 Mb|http://sourceforge.net/projects/clonekeenplus/files/High%20Quality%20Packs/Version%202.x/hqpv26.zip/download"
# Reset SDL config when updating application to the new version (y) / (n) # Reset SDL config when updating application to the new version (y) / (n)
ResetSdlConfigForThisVersion=y ResetSdlConfigForThisVersion=y
@@ -201,27 +201,27 @@ FirstStartMenuOptions=''
# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices, # Enable multi-ABI binary, with hardware FPU support - it will also work on old devices,
# but .apk size is 2x bigger (y) / (n) / (x86) / (all) # but .apk size is 2x bigger (y) / (n) / (x86) / (all)
MultiABI='n' MultiABI='x86'
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower # Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
AppMinimumRAM=64 AppMinimumRAM=64
# Optional shared libraries to compile - removing some of them will save space # 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 # 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 # 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 python3 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 boost_system crypto ssl curl vorbis ogg" CompiledLibraries="sdl_image boost_system crypto ssl curl vorbis ogg python3"
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) # Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
CustomBuildScript=n CustomBuildScript=n
# Aditional CFLAGS for application # Aditional CFLAGS for application
AppCflags='-frtti -fexceptions -finline-functions -DOGG=1 -DDOWNLOADER=1 -DANDROID=1 -DREFKEEN_VER_KDREAMS -DGRMODE=EGAGR -DREFKEEN_VER_KDREAMS_ANYEGA_ALL -DIOAPI_NO_64 -DBUILD_TYPE=LINUX -DTARGET_LNX=1 -DNOTYPESAVE -Werror=strict-aliasing -Werror=cast-align -Werror=pointer-arith -Werror=address -std=c++11 -Ijni/../jni/application/commandergenius/commandergenius/lib/GsKit -Ijni/vorbis/include/vorbis -Ijni/curl/include' AppCflags='-frtti -fexceptions -finline-functions -DOGG=1 -DDOWNLOADER=1 -DANDROID=1 -DREFKEEN_VER_KDREAMS -DUSE_PYTHON3=1 -DGRMODE=EGAGR -DREFKEEN_VER_KDREAMS_ANYEGA_ALL -DIOAPI_NO_64 -DBUILD_TYPE=LINUX -DTARGET_LNX=1 -DNOTYPESAVE -Werror=strict-aliasing -Werror=cast-align -Werror=pointer-arith -Werror=address -std=c++11 -Ijni/../jni/application/commandergenius/commandergenius/lib/GsKit -Ijni/vorbis/include/vorbis -Ijni/curl/include -Ijni/python3/include/python3.5m'
# Additional LDFLAGS for application # Additional LDFLAGS for application
#AppLdflags='-ltremor' #AppLdflags='-ltremor'
#AppLdflags='-lvorbis -logg -lcrypto -lssl -lcurl' #AppLdflags='-lvorbis -logg -lcrypto -lssl -lcurl'
AppLdflags='-lz -lvorbis -logg' AppLdflags='-lz -lvorbis -logg -lpython3 -lpython3.5m'
# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable # If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable
AppOverlapsSystemHeaders= AppOverlapsSystemHeaders=

View File

@@ -0,0 +1,41 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
$(info Serial result = $(TARGET_ARCH))
LOCAL_MODULE := python3.5m
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/$(TARGET_ARCH)
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES :=
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib/$(TARGET_ARCH) -llog
LOCAL_SRC_FILES = lib/$(TARGET_ARCH)/libpython3.5m.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := python3
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/$(TARGET_ARCH)
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := python3.5m
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib/$(TARGET_ARCH) -llog
LOCAL_SRC_FILES = lib/$(TARGET_ARCH)/libpython3.so
include $(PREBUILT_SHARED_LIBRARY)

53
project/jni/python3/compile.sh Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/sh
#ARCH_LIST="arm64-v8a x86 mips armeabi-v7a armeabi"
#ARCH_LIST="arm x86 mips arm64"
ARCH_LIST="arm x86"
mkdir -p build
build() {
pushd python3-android
if [ -f env ]; then
rm env
fi
if [ -f mk/env.mk ]; then
rm mk/env.mk
fi
echo ANDROID_PLATFORM=$1 > env
cat env.noarch >> env
make all ANDROID_PLATFORM=$1
popd
}
PIDS=""
for ARCH in $ARCH_LIST; do
build $ARCH &
PIDS="$PIDS $!"
done
for PID in $PIDS; do
wait $PID || exit 1
done
# Set some symbolic links for android ndk toolkit access
rm include
rm -rf lib
mkdir -p lib
ln -s python3-android/build/13b-18-arm-linux-androideabi-4.9/include include
pushd lib
ln -s ../python3-android/build/13b-18-arm-linux-androideabi-4.9/lib arm
ln -s ../python3-android/build/13b-18-x86-4.9/lib x86
popd