Merge branch 'sdl_android' of github.com:pelya/commandergenius

This commit is contained in:
Sergii Pylypenko
2016-06-28 22:21:50 +03:00
17 changed files with 84 additions and 22 deletions

View File

@@ -170,7 +170,7 @@ AppUsesMultitouch=y
AppRecordsAudio=n
# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n)
AccessSdCard=
AccessSdCard=y
# Application needs Internet access. If you disable it, you'll have to bundle all your data files inside .apk (y) / (n)
AccessInternet=

View File

@@ -18,6 +18,7 @@
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_screenkeyboard.h>
#include <SDL/SDL_android.h>
#define fprintf(X, ...) __android_log_print(ANDROID_LOG_INFO, "Ballfield", __VA_ARGS__)
#define printf(...) __android_log_print(ANDROID_LOG_INFO, "Ballfield", __VA_ARGS__)
@@ -686,7 +687,10 @@ int main(int argc, char* argv[])
if(evt.key.keysym.sym == SDLK_0)
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_2, 1);
if(evt.key.keysym.sym == SDLK_1)
{
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_2, 0);
SDL_ANDROID_RequestExternalStorageRuntimePermission();
}
if(evt.key.keysym.sym == SDLK_2)
{
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_DPAD, 1);

View File

@@ -7,10 +7,10 @@ AppName="Commander Genius"
AppFullName=net.sourceforge.clonekeenplus
# Application version code (integer)
AppVersionCode=193000
AppVersionCode=195000
# Application user-visible version name (string)
AppVersionName="1.9.3.0 Beta"
AppVersionName="1.9.5.0 Beta"
# 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
@@ -201,7 +201,7 @@ FirstStartMenuOptions=''
# 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)
MultiABI='all'
MultiABI='n'
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
AppMinimumRAM=64
@@ -209,18 +209,19 @@ AppMinimumRAM=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="ogg sdl_image boost_system"
CompiledLibraries="sdl_image boost_system crypto ssl curl vorbis ogg"
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
CustomBuildScript=n
# Aditional CFLAGS for application
AppCflags='-frtti -fexceptions -finline-functions -DOGG=1 -DANDROID=1 -DREFKEEN_VER_KDREAMS -DGRMODE=EGAGR -DREFKEEN_VER_KDREAMS_ANYEGA_ALL -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'
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'
# Additional LDFLAGS for application
#AppLdflags='-ltremor'
AppLdflags='-lvorbis -logg'
#AppLdflags='-lvorbis -logg -lcrypto -lssl -lcurl'
AppLdflags='-lz -lvorbis -logg'
# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable
AppOverlapsSystemHeaders=

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -21,6 +21,7 @@ fi
# Do not generate shared game logic libs - QVM files are used instead
# ../setEnvironment-armeabi.sh sh -c "cd vm/build/release-android-$1/baseq3 && \$STRIP --strip-unneeded *.so && zip ../../../../AndroidData/binaries.zip *.so"
env PATH=`pwd`/..:$PATH \
../setEnvironment-$1.sh make -j8 -C engine release \
PLATFORM=android ARCH=$1 USE_GLES=1 USE_LOCAL_HEADERS=0 BUILD_CLIENT_SMP=0 \
USE_OPENAL=1 USE_OPENAL_DLOPEN=0 USE_VOIP=1 USE_CURL=1 USE_CURL_DLOPEN=0 USE_CODEC_VORBIS=1 USE_MUMBLE=0 USE_FREETYPE=1 \

View File

@@ -88,11 +88,21 @@ while test $# -gt 0; do
--cflags)
echo -I${prefix}/include
;;
--libs)
echo -l$PKG
;;
--static-libs)
echo -l$PKG
--libs|--static-libs)
case $PKG in
curl|libcurl)
echo -lcurl-sdl -l:libssl.so.sdl.0.so -l:libcrypto.so.sdl.0.so
;;
crypto|libcrypto)
echo -l:libcrypto.so.sdl.0.so
;;
openssl|ssl|libssl)
echo -l:libssl.so.sdl.0.so -l:libcrypto.so.sdl.0.so
;;
*)
echo -l$PKG
;;
esac
;;
*)
;;

View File

@@ -4,13 +4,13 @@ CURDIR=`pwd`
PACKAGE_NAME=`grep AppFullName AndroidAppSettings.cfg | sed 's/.*=//'`
[ -e pulseaudio/android-build.sh ] && {
if [ -e pulseaudio/android-build.sh ]; then
[ -e pulseaudio/$1/install/bin/pulseaudio ] || {
cd pulseaudio
./android-build.sh || exit 1
cd ..
} || exit 1
} || exit 1
fi
../setEnvironment-$1.sh sh -c '\
$CC $CFLAGS -Werror=format -c main.c -o main-'"$1.o" || exit 1
@@ -72,7 +72,7 @@ xkb/.libs/libxkbstubs.a \
composite/.libs/libcomposite.a \
os/.libs/libos.a \
hw/kdrive/linux/.libs/liblinux.a \
-lpixman-1 -lXfont -lXau -lXdmcp -lfontenc -lts -lfreetype -landroid-shmem -lcrypto' \
-lpixman-1 -lXfont -lXau -lXdmcp -lfontenc -lts -lfreetype -landroid-shmem -l:libcrypto.so.sdl.0.so' \
|| exit 1
rm -rf $CURDIR/tmp-$1