From 5198be017ecc5a3502ac8dbb4dcd3f949c0869cc Mon Sep 17 00:00:00 2001 From: pelya Date: Mon, 12 Jul 2010 14:30:03 +0300 Subject: [PATCH] Added application version to ChangeAppettings --- alienblaster/ChangeAppSettings.sh | 18 +++++++++++++++++- alienblaster/project/AndroidManifest.xml | 5 +++-- alienblaster/readme.txt | 6 +++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/alienblaster/ChangeAppSettings.sh b/alienblaster/ChangeAppSettings.sh index 87b9a9dcd..f5b8ebe9b 100755 --- a/alienblaster/ChangeAppSettings.sh +++ b/alienblaster/ChangeAppSettings.sh @@ -51,6 +51,18 @@ if [ -n "$var" ] ; then MultiABI="$var" fi +echo -n "\nApplication version code (integer) ($AppVersionCode): " +read var +if [ -n "$var" ] ; then + AppVersionCode="$var" +fi + +echo -n "\nApplication user-visible version name (string) ($AppVersionName): " +read var +if [ -n "$var" ] ; then + AppVersionName="$var" +fi + echo -n "\nOptional shared libraries to compile - removing some of them will save space\nMP3 support by libMAD is encumbered by patents and libMAD is GPL-ed\n" grep 'Available libraries:' project/jni/Application.mk grep 'depends on' project/jni/Application.mk @@ -89,6 +101,8 @@ echo DownloadToSdcard=$DownloadToSdcard >> AppSettings.cfg echo SdlVideoResize=$SdlVideoResize >> AppSettings.cfg echo NeedDepthBuffer=$NeedDepthBuffer >> AppSettings.cfg echo MultiABI=$MultiABI >> AppSettings.cfg +echo AppVersionCode=$AppVersionCode >> AppSettings.cfg +echo AppVersionName=$\"AppVersionName\" >> AppSettings.cfg echo CompiledLibraries=\"$CompiledLibraries\" >> AppSettings.cfg echo ReadmeText=\'$ReadmeText\' >> AppSettings.cfg @@ -137,7 +151,9 @@ ReadmeText="`echo $ReadmeText | sed 's/\"/\\\\\\\\\"/g' | sed 's/[&%]//g'`" echo Patching project/AndroidManifest.xml cat project/AndroidManifest.xml | \ sed "s/package=.*/package=\"$AppFullName\"/" | \ - sed "s/android:screenOrientation=.*/android:screenOrientation=\"$ScreenOrientation1\"/" > \ + sed "s/android:screenOrientation=.*/android:screenOrientation=\"$ScreenOrientation1\"/" | \ + sed "s^android:versionCode=.*^android:versionCode=\"$AppVersionCode\"^" | \ + sed "s^android:versionName=.*^android:versionName=\"$AppVersionName\"^" > \ project/AndroidManifest.xml.1 mv -f project/AndroidManifest.xml.1 project/AndroidManifest.xml diff --git a/alienblaster/project/AndroidManifest.xml b/alienblaster/project/AndroidManifest.xml index 43ed708df..d1cfa858b 100644 --- a/alienblaster/project/AndroidManifest.xml +++ b/alienblaster/project/AndroidManifest.xml @@ -2,7 +2,8 @@ + android:versionName="1.0" +> - + diff --git a/alienblaster/readme.txt b/alienblaster/readme.txt index 5410052d0..81753ce47 100644 --- a/alienblaster/readme.txt +++ b/alienblaster/readme.txt @@ -21,7 +21,8 @@ Keys Home, Search and End Call will force application quit, and because of a bug in my SDL implementation application will crash. Back key is mapped to Escape, and both Menu and cursor keys center / trackball click are mapped to Enter. Newer Android phones like HTC Evo have no keyboard at all, so there are just 3 usable keys - -Menu, Volume Up and Volume Down. Because of that the accelerometer is configured to trigger cursor key events. +Menu, Volume Up and Volume Down (and Escape of course). +Because of that the accelerometer is configured to trigger cursor key events. This port also supports GL ES + SDL combo - there is GLXGears demo app in project/jni/application/glxgears, remove all files from project/jni/application/src and put glxgears.c there to check if it works. @@ -35,6 +36,9 @@ HTC G1/Nexus One has native screen resolution 480x320, HTC Evo has 800x480, so d any screen resolution. SDL_ListModes()[0] will always return native screen resolution, you may use 640x480 or 800x600 but it will be resized to fit the screen. +Also make sure that your HW textures are not wider than 1024 pixels, or it will fail to allocate such +texture on HTC G1. Software surfaces may be of any size of course (but you don't want to do expensive memcpy). +There is a trick to make To compile your own app, put your app sources into project/jni/application dir (remove Alien Blaster first), and launch script ChangeAppSettings.sh - it will put the name of your app in several places in sources.