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

This commit is contained in:
Sergii Pylypenko
2013-04-24 20:54:16 +03:00
6 changed files with 1339 additions and 13 deletions

1320
build/envsetup.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2664,7 +2664,7 @@ class Settings
nativeSetEnv( "DATADIR", Globals.DataDir ); nativeSetEnv( "DATADIR", Globals.DataDir );
nativeSetEnv( "UNSECURE_STORAGE_DIR", Globals.DataDir ); nativeSetEnv( "UNSECURE_STORAGE_DIR", Globals.DataDir );
nativeSetEnv( "HOME", Globals.DataDir ); nativeSetEnv( "HOME", Globals.DataDir );
nativeSetEnv( "ANDROID_VERSION", android.os.Build.VERSION.SDK_INT ); nativeSetEnv( "ANDROID_VERSION", String.valueOf(android.os.Build.VERSION.SDK_INT) );
try { try {
DisplayMetrics dm = new DisplayMetrics(); DisplayMetrics dm = new DisplayMetrics();
p.getWindowManager().getDefaultDisplay().getMetrics(dm); p.getWindowManager().getDefaultDisplay().getMetrics(dm);

View File

@@ -5,7 +5,7 @@ AppName="Commander Genius"
AppFullName=net.sourceforge.clonekeenplus AppFullName=net.sourceforge.clonekeenplus
ScreenOrientation=h ScreenOrientation=h
InhibitSuspend=n InhibitSuspend=n
AppDataDownloadUrl="!Keen1|keen1.zip^!Keen4|keen4.zip^!Keen7|keen7.zip^High-quality GFX and music - 50 Mb|http://sourceforge.net/projects/clonekeenplus/files/High%20Quality%20Packs/Version%201.x/hqpv19.zip/download" AppDataDownloadUrl="!Keen1|keen1.zip^!Keen4|keen4.zip^!Keen7|keen7.zip^High-quality GFX and music - 50 Mb|http://sourceforge.net/projects/clonekeenplus/files/High%20Quality%20Packs/Version%202.x/hqpv20.zip/download"
VideoDepthBpp=24 VideoDepthBpp=24
NeedDepthBuffer=n NeedDepthBuffer=n
NeedStencilBuffer=n NeedStencilBuffer=n
@@ -31,21 +31,23 @@ AppUsesJoystick=n
AppUsesAccelerometer=y AppUsesAccelerometer=y
AppUsesGyroscope=n AppUsesGyroscope=n
AppUsesMultitouch=n AppUsesMultitouch=n
AppRecordsAudio=n
NonBlockingSwapBuffers=n NonBlockingSwapBuffers=n
RedefinedKeys="LCTRL LALT NO_REMAP NO_REMAP RETURN ESCAPE" RedefinedKeys="LCTRL LALT NO_REMAP NO_REMAP RETURN ESCAPE"
AppTouchscreenKeyboardKeysAmount=4 AppTouchscreenKeyboardKeysAmount=4
AppTouchscreenKeyboardKeysAmountAutoFire=1 AppTouchscreenKeyboardKeysAmountAutoFire=1
RedefinedKeysScreenKb="LCTRL LALT SPACE RETURN" RedefinedKeysScreenKb="LCTRL LALT SPACE RETURN"
RedefinedKeysScreenKbNames="LCTRL LALT SPACE RETURN"
StartupMenuButtonTimeout=3000 StartupMenuButtonTimeout=3000
HiddenMenuOptions='' HiddenMenuOptions=''
FirstStartMenuOptions='' FirstStartMenuOptions=''
MultiABI=n MultiABI=n
AppMinimumRAM=64 AppMinimumRAM=64
AppVersionCode=120000 AppVersionCode=140000
AppVersionName="1.2 Beta" AppVersionName="1.4 Beta"
ResetSdlConfigForThisVersion=n ResetSdlConfigForThisVersion=n
DeleteFilesOnUpgrade="%" DeleteFilesOnUpgrade="%"
CompiledLibraries="tremor ogg" CompiledLibraries="tremor ogg sdl_image"
CustomBuildScript=n CustomBuildScript=n
AppCflags='-frtti -fexceptions -finline-functions -O2 -DTREMOR=1 -DANDROID=1 -DBUILD_TYPE=LINUX -DTARGET_LNX=1 -Werror=strict-aliasing -Werror=cast-align -Werror=pointer-arith -Werror=address -std=c++11' AppCflags='-frtti -fexceptions -finline-functions -O2 -DTREMOR=1 -DANDROID=1 -DBUILD_TYPE=LINUX -DTARGET_LNX=1 -Werror=strict-aliasing -Werror=cast-align -Werror=pointer-arith -Werror=address -std=c++11'
AppLdflags='-ltremor' AppLdflags='-ltremor'

View File

@@ -37,7 +37,7 @@ RedefinedKeys="SPACE SPACE NO_REMAP NO_REMAP RETURN ESCAPE LCTRL"
AppTouchscreenKeyboardKeysAmount=5 AppTouchscreenKeyboardKeysAmount=5
AppTouchscreenKeyboardKeysAmountAutoFire=0 AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="SLASH BACKSPACE TAB END LCTRL SPACE UNKNOWN UNKNOWN UNKNOWN UNKNOWN" RedefinedKeysScreenKb="SLASH BACKSPACE TAB END LCTRL SPACE UNKNOWN UNKNOWN UNKNOWN UNKNOWN"
RedefinedKeysScreenKbNames="Change_weapon Sniper_view Show_scores Jump/centerview Fire Jump" RedefinedKeysScreenKbNames="Change_weapon Sniper_view Show_scores Center_view Fire Jump"
StartupMenuButtonTimeout=3000 StartupMenuButtonTimeout=3000
HiddenMenuOptions='OptionalDownloadConfig DisplaySizeConfig' HiddenMenuOptions='OptionalDownloadConfig DisplaySizeConfig'
FirstStartMenuOptions='' FirstStartMenuOptions=''

View File

@@ -30,7 +30,7 @@ How to compile demo application
Launch commands Launch commands
rm project/jni/application/src rm project/jni/application/src
ln -s ballfield project/jni/application/src ln -s ballfield project/jni/application/src
./ChangeAppSettings.sh -a ./changeAppSettings.sh -a
android update project -p project -t android-15 android update project -p project -t android-15
Then edit file build.sh if needed to add NDK dir to your PATH, then launch it. Then edit file build.sh if needed to add NDK dir to your PATH, then launch it.
It will compile a bunch of libs under project/libs/armeabi, It will compile a bunch of libs under project/libs/armeabi,
@@ -59,6 +59,10 @@ to compile it remove project/jni/application/src symlink and make new one pointi
Note that GL ES is NOT pure OpenGL - there are no glBegin() and glEnd() call and other widely used functions, Note that GL ES is NOT pure OpenGL - there are no glBegin() and glEnd() call and other widely used functions,
and generally it will take a lot of effort to port OpenGL application to GL ES. and generally it will take a lot of effort to port OpenGL application to GL ES.
How to compile a specific SDL based application
===============================================
. build/envsetup.sh
build
How to compile your own application How to compile your own application
=================================== ===================================