diff --git a/ChangeAppSettings.sh b/ChangeAppSettings.sh index 148cd107f..50f1565c7 100755 --- a/ChangeAppSettings.sh +++ b/ChangeAppSettings.sh @@ -18,10 +18,14 @@ fi var="" -echo -n "\n===== libSDL on Android configuration =====\n\nIf you will supply empty string as answer the previous value will be used\n" +echo +echo "===== libSDL on Android configuration =====" +echo +echo "If you will supply empty string as answer the previous value will be used" if [ -z "$LibSdlVersion" -o -z "$AUTO" ]; then -echo -n "\nlibSDL version to use (1.2 or 1.3) ($LibSdlVersion): " +echo +echo -n "libSDL version to use (1.2 or 1.3) ($LibSdlVersion): " read var if [ -n "$var" ] ; then LibSdlVersion="$var" @@ -29,7 +33,8 @@ fi fi if [ -z "$AppName" -o -z "$AUTO" ]; then -echo -n "\nSpecify application name (e.x. My Application) ($AppName): " +echo +echo -n "Specify application name (e.x. My Application) ($AppName): " read var if [ -n "$var" ] ; then AppName="$var" @@ -37,7 +42,8 @@ fi fi if [ -z "$AppFullName" -o -z "$AUTO" ]; then -echo -n "\nSpecify reversed site name of application (e.x. com.mysite.myapp) ($AppFullName): " +echo +echo -n "Specify reversed site name of application (e.x. com.mysite.myapp) ($AppFullName): " read var if [ -n "$var" ] ; then AppFullName="$var" @@ -45,7 +51,8 @@ fi fi if [ -z "$ScreenOrientation" -o -z "$AUTO" ]; then -echo -n "\nSpecify screen orientation: (v)ertical or (h)orizontal ($ScreenOrientation): " +echo +echo -n "Specify screen orientation: (v)ertical or (h)orizontal ($ScreenOrientation): " read var if [ -n "$var" ] ; then ScreenOrientation="$var" @@ -53,13 +60,15 @@ fi fi if [ -z "$AppDataDownloadUrl" -o -z "$AUTO" ]; then -echo -n "\nSpecify path to download application data in zip archive in the form 'Description|URL|MirrorURL|...'" -echo -n "\nYou may specify additional paths to additional downloads delimited by newlines (empty line to finish)" -echo -n "\nIf you'll start Description with '!' symbol it will be enabled by default,\nother downloads should be selected by user from config menu" -echo -n "\nIf the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as-is to the application dir and not unzipped" -echo -n "\nIf the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -\nthese files are put inside .apk package by build system\n" -echo -n "\nAlso beware of 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS\n" -echo -n "`echo $AppDataDownloadUrl | tr '^' '\\n'`" +echo +echo "Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL|...'" +echo "You may specify additional paths to additional downloads delimited by newlines (empty line to finish)" +echo "If you'll start Description with '!' symbol it will be enabled by default,\nother downloads should be selected by user from config menu" +echo "If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as-is to the application dir and not unzipped" +echo "If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -" +echo "these files are put inside .apk package by build system" +echo "Also beware of 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS" +echo "`echo $AppDataDownloadUrl | tr '^' '\\n'`" echo AppDataDownloadUrl1="" while true; do @@ -80,7 +89,8 @@ fi fi if [ -z "$SdlVideoResize" -o -z "$AUTO" ]; then -echo -n "\nApplication window should be resized to fit into native device screen (480x320 or 800x480) (y) or (n) ($SdlVideoResize): " +echo +echo "Application window should be resized to fit into native device screen (480x320 or 800x480) (y) or (n) ($SdlVideoResize): " read var if [ -n "$var" ] ; then SdlVideoResize="$var" @@ -88,7 +98,8 @@ fi fi if [ -z "$SdlVideoResizeKeepAspect" -o -z "$AUTO" ]; then -echo -n "\nApplication resizing should use 4:3 aspect ratio, creating black bars (y) or (n) ($SdlVideoResizeKeepAspect): " +echo +echo -n "Application resizing should use 4:3 aspect ratio, creating black bars (y) or (n) ($SdlVideoResizeKeepAspect): " read var if [ -n "$var" ] ; then SdlVideoResizeKeepAspect="$var" @@ -96,7 +107,8 @@ fi fi if [ -z "$NeedDepthBuffer" -o -z "$AUTO" ]; then -echo -n "\nEnable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n) ($NeedDepthBuffer): " +echo +echo -n "Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n) ($NeedDepthBuffer): " read var if [ -n "$var" ] ; then NeedDepthBuffer="$var" @@ -105,7 +117,9 @@ fi if [ "$LibSdlVersion" = "1.2" ]; then if [ -z "$SwVideoMode" -o -z "$AUTO" ]; then - echo -n "\nApplication uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL,\nthis will allow small speed optimization (y) or (n) ($SwVideoMode): " + echo + echo "Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL," + echo -n "this will allow small speed optimization (y) or (n) ($SwVideoMode): " read var if [ -n "$var" ] ; then SwVideoMode="$var" @@ -116,7 +130,8 @@ else fi if [ -z "$AppUsesMouse" -o -z "$AUTO" ]; then -echo -n "\nApplication uses mouse (y) or (n) ($AppUsesMouse): " +echo +echo -n "Application uses mouse (y) or (n) ($AppUsesMouse): " read var if [ -n "$var" ] ; then AppUsesMouse="$var" @@ -124,7 +139,8 @@ fi fi if [ -z "$AppNeedsTwoButtonMouse" -o -z "$AUTO" ]; then -echo -n "\nApplication needs two-button mouse, will also enable advanced point-and-click features (y) or (n) ($AppNeedsTwoButtonMouse): " +echo +echo -n "Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n) ($AppNeedsTwoButtonMouse): " read var if [ -n "$var" ] ; then AppNeedsTwoButtonMouse="$var" @@ -132,7 +148,9 @@ fi fi if [ -z "$AppNeedsArrowKeys" -o -z "$AUTO" ]; then -echo -n "\nApplication needs arrow keys (y) or (n), if (y) the accelerometer or touchscreen keyboard\nwill be used as arrow keys if phone does not have dpad/trackball ($AppNeedsArrowKeys): " +echo +echo "Application needs arrow keys (y) or (n), if (y) the accelerometer or touchscreen keyboard" +echo -n "will be used as arrow keys if phone does not have dpad/trackball ($AppNeedsArrowKeys): " read var if [ -n "$var" ] ; then AppNeedsArrowKeys="$var" @@ -140,7 +158,8 @@ fi fi if [ -z "$AppNeedsTextInput" -o -z "$AUTO" ]; then -echo -n "\nApplication needs text input (y) or (n), enables button for text input on screen ($AppNeedsTextInput): " +echo +echo -n "Application needs text input (y) or (n), enables button for text input on screen ($AppNeedsTextInput): " read var if [ -n "$var" ] ; then AppNeedsTextInput="$var" @@ -148,7 +167,10 @@ fi fi if [ -z "$AppUsesJoystick" -o -z "$AUTO" ]; then -echo -n "\nApplication uses joystick (y) or (n), the accelerometer (2-axis) or orientation sensor (3-axis)\nwill be used as joystick 0, also on-screen DPAD will be used as joystick -\nmake sure you can navigate all app menus with joystick or mouse ($AppUsesJoystick): " +echo +echo "Application uses joystick (y) or (n), the accelerometer (2-axis) or orientation sensor (3-axis)" +echo "will be used as joystick 0, also on-screen DPAD will be used as joystick -" +echo -n "make sure you can navigate all app menus with joystick or mouse ($AppUsesJoystick): " read var if [ -n "$var" ] ; then AppUsesJoystick="$var" @@ -156,7 +178,9 @@ fi fi if [ -z "$AppHandlesJoystickSensitivity" -o -z "$AUTO" ]; then -echo -n "\nApplication will handle joystick center and sensitivity itself, \nSDL will send raw accelerometer data and won't show 'Accelerometer sensitivity' dialog (y) or (n) ($AppHandlesJoystickSensitivity): " +echo +echo "Application will handle joystick center and sensitivity itself, " +echo -n "SDL will send raw accelerometer data and won't show 'Accelerometer sensitivity' dialog (y) or (n) ($AppHandlesJoystickSensitivity): " read var if [ -n "$var" ] ; then AppHandlesJoystickSensitivity="$var" @@ -164,7 +188,9 @@ fi fi if [ -z "$AppUsesMultitouch" -o -z "$AUTO" ]; then -echo -n "\nApplication uses multitouch (y) or (n), multitouch events are passed as 4-axis joysticks 1-5, with pressure and size,\nor additionally as SDL_FINGERDOWN/UP/MOTION events in SDL 1.3, with SDL pressure = Android pressure * Andorid touchspot size ($AppUsesMultitouch): " +echo +echo "Application uses multitouch (y) or (n), multitouch events are passed as 4-axis joysticks 1-5, with pressure and size," +echo -n "or additionally as SDL_FINGERDOWN/UP/MOTION events in SDL 1.3, with SDL pressure = Android pressure * Andorid touchspot size ($AppUsesMultitouch): " read var if [ -n "$var" ] ; then AppUsesMultitouch="$var" @@ -172,8 +198,9 @@ fi fi if [ -z "$NonBlockingSwapBuffers" -o -z "$AUTO" ]; then -echo -n "\nApplication implements Android-specific routines to put to background, and will not draw anything to screen\n" -echo -n "between SDL_ACTIVEEVENT->SDL_APPACTIVE lost / gained notifications - you should check for them\n" +echo +echo "Application implements Android-specific routines to put to background, and will not draw anything to screen" +echo "between SDL_ACTIVEEVENT->SDL_APPACTIVE lost / gained notifications - you should check for them" echo -n "rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n) ($NonBlockingSwapBuffers): " read var if [ -n "$var" ] ; then @@ -182,7 +209,9 @@ fi fi if [ -z "$InhibitSuspend" -o -z "$AUTO" ]; then -echo -n "\nPrevent device from going to sleep while application is running (y) or (n) - this setting is\napplied automatically if you're using accelerometer, but may be useful for video players etc ($InhibitSuspend): " +echo +echo "Prevent device from going to sleep while application is running (y) or (n) - this setting is" +echo -n "applied automatically if you're using accelerometer, but may be useful for video players etc ($InhibitSuspend): " read var if [ -n "$var" ] ; then InhibitSuspend="$var" @@ -190,12 +219,13 @@ fi fi if [ -z "$RedefinedKeys" -o -z "$AUTO" ]; then -echo -n "\nRedefine common keys to SDL keysyms" -echo -n "\nMENU and BACK hardware keys and TOUCHSCREEN virtual 'key' are available on all devices, other keys may be absent" -echo -n "\nSEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices" -echo -n "\nTOUCHSCREEN DPAD_CENTER VOLUMEUP VOLUMEDOWN MENU BACK CAMERA ENTER DEL SEARCH CALL - Java keycodes" -echo -n "\n$RedefinedKeys - current SDL keycodes" -echo -n "\n: " +echo +echo "Redefine common keys to SDL keysyms" +echo "MENU and BACK hardware keys and TOUCHSCREEN virtual 'key' are available on all devices, other keys may be absent" +echo "SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices" +echo "TOUCHSCREEN DPAD_CENTER VOLUMEUP VOLUMEDOWN MENU BACK CAMERA ENTER DEL SEARCH CALL - Java keycodes" +echo "$RedefinedKeys - current SDL keycodes" +echo -n ": " read var if [ -n "$var" ] ; then RedefinedKeys="$var" @@ -203,7 +233,8 @@ fi fi if [ -z "$AppTouchscreenKeyboardKeysAmount" -o -z "$AUTO" ]; then -echo -n "\nNumber of virtual keyboard keys (currently 7 is maximum) ($AppTouchscreenKeyboardKeysAmount): " +echo +echo -n "Number of virtual keyboard keys (currently 7 is maximum) ($AppTouchscreenKeyboardKeysAmount): " read var if [ -n "$var" ] ; then AppTouchscreenKeyboardKeysAmount="$var" @@ -211,7 +242,8 @@ fi fi if [ -z "$AppTouchscreenKeyboardKeysAmountAutoFire" -o -z "$AUTO" ]; then -echo -n "\nNumber of virtual keyboard keys that support autofire (currently 2 is maximum) ($AppTouchscreenKeyboardKeysAmountAutoFire): " +echo +echo -n "Number of virtual keyboard keys that support autofire (currently 2 is maximum) ($AppTouchscreenKeyboardKeysAmountAutoFire): " read var if [ -n "$var" ] ; then AppTouchscreenKeyboardKeysAmountAutoFire="$var" @@ -222,9 +254,10 @@ if [ -z "$RedefinedKeysScreenKb" -o -z "$AUTO" ]; then if [ -z "$RedefinedKeysScreenKb" ]; then RedefinedKeysScreenKb="$RedefinedKeys" fi -echo -n "\nRedefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)" -echo -n "\n$RedefinedKeysScreenKb - current SDL keycodes" -echo -n "\n: " +echo +echo "Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)" +echo "$RedefinedKeysScreenKb - current SDL keycodes" +echo -n ": " read var if [ -n "$var" ] ; then RedefinedKeysScreenKb="$var" @@ -232,7 +265,9 @@ fi fi if [ -z "$MultiABI" -o -z "$AUTO" ]; then -echo -n "\nEnable multi-ABI binary, with hardware FPU support - \nit will also work on old devices, but .apk size is 2x bigger (y) or (n) ($MultiABI): " +echo +echo "Enable multi-ABI binary, with hardware FPU support - " +echo -n "it will also work on old devices, but .apk size is 2x bigger (y) or (n) ($MultiABI): " read var if [ -n "$var" ] ; then MultiABI="$var" @@ -240,7 +275,8 @@ fi fi if [ -z "$AppVersionCode" -o "-$AUTO" != "-a" ]; then -echo -n "\nApplication version code (integer) ($AppVersionCode): " +echo +echo -n "Application version code (integer) ($AppVersionCode): " read var if [ -n "$var" ] ; then AppVersionCode="$var" @@ -248,7 +284,8 @@ fi fi if [ -z "$AppVersionName" -o "-$AUTO" != "-a" ]; then -echo -n "\nApplication user-visible version name (string) ($AppVersionName): " +echo +echo -n "Application user-visible version name (string) ($AppVersionName): " read var if [ -n "$var" ] ; then AppVersionName="$var" @@ -256,7 +293,8 @@ fi fi if [ -z "$CustomBuildScript" -o -z "$AUTO" ]; then -echo -n "\nApplication uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) ($CustomBuildScript): " +echo +echo -n "Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) ($CustomBuildScript): " read var if [ -n "$var" ] ; then CustomBuildScript="$var" @@ -264,7 +302,8 @@ fi fi if [ -z "$AUTO" ]; then -echo -n "\nAditional CFLAGS for application ($AppCflags): " +echo +echo -n "Aditional CFLAGS for application ($AppCflags): " read var if [ -n "$var" ] ; then AppCflags="$var" @@ -272,10 +311,13 @@ fi fi if [ -z "$AUTO" ]; then -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" +echo +echo "Optional shared libraries to compile - removing some of them will save space" +echo "MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed" grep 'Available' project/jni/SettingsTemplate.mk grep 'depends on' project/jni/SettingsTemplate.mk -echo -n "Current: $CompiledLibraries\n\n: " +echo "Current: $CompiledLibraries" +echo -n ": " read var if [ -n "$var" ] ; then CompiledLibraries="$var" @@ -283,7 +325,8 @@ fi fi if [ -z "$AUTO" ]; then -echo -n "\nAdditional LDFLAGS for application ($AppLdflags): " +echo +echo -n "Additional LDFLAGS for application ($AppLdflags): " read var if [ -n "$var" ] ; then AppLdflags="$var" @@ -291,24 +334,17 @@ fi fi if [ -z "$AUTO" ]; then -echo -n "\nBuild only following subdirs (empty will build all dirs, ignored with custom script) ($AppSubdirsBuild): " +echo +echo -n "Build only following subdirs (empty will build all dirs, ignored with custom script) ($AppSubdirsBuild): " read var if [ -n "$var" ] ; then AppSubdirsBuild="$var" fi fi -if [ -z "$AppUseCrystaXToolchain" -o -z "$AUTO" ]; then -echo -n "\nApplication requires C++ RTTI and exceptions - you will need CrystaX toolchain installed at\n" -echo -n `which ndk-build | sed 's@/[^/]*/ndk-build@/android-ndk-r4-crystax@'` "(y) or (n) ($AppUseCrystaXToolchain): " -read var -if [ -n "$var" ] ; then - AppUseCrystaXToolchain="$var" -fi -fi - if [ -z "$AUTO" ]; then -echo -n "\nApplication command line parameters, including app name as 0-th param ($AppCmdline): " +echo +echo -n "Application command line parameters, including app name as 0-th param ($AppCmdline): " read var if [ -n "$var" ] ; then AppCmdline="$var" @@ -316,10 +352,14 @@ fi fi if [ -z "$ReadmeText" -o -z "$AUTO" ]; then -echo -n "\nHere you may type some short readme text that will be shown when app data is downloaded." -echo -n "\nCurrent text:\n" -echo -n "`echo $ReadmeText | tr '^' '\\n'`" -echo -n "\n\nNew text (empty line to finish):\n\n" +echo +echo "Here you may type some short readme text - it is currently not used anywhere" +echo "Current text:" +echo +echo "`echo $ReadmeText | tr '^' '\\n'`" +echo +echo "New text (empty line to finish):" +echo ReadmeText1="" while true; do @@ -370,7 +410,6 @@ echo CustomBuildScript=$CustomBuildScript >> AndroidAppSettings.cfg echo AppCflags=\'$AppCflags\' >> AndroidAppSettings.cfg echo AppLdflags=\'$AppLdflags\' >> AndroidAppSettings.cfg echo AppSubdirsBuild=\'$AppSubdirsBuild\' >> AndroidAppSettings.cfg -echo AppUseCrystaXToolchain=$AppUseCrystaXToolchain >> AndroidAppSettings.cfg echo AppCmdline=\'$AppCmdline\' >> AndroidAppSettings.cfg echo ReadmeText=\'$ReadmeText\' >> AndroidAppSettings.cfg diff --git a/project/jni/application/ballfield/AndroidAppSettings.cfg b/project/jni/application/ballfield/AndroidAppSettings.cfg index c1512e7a9..0471859bd 100644 --- a/project/jni/application/ballfield/AndroidAppSettings.cfg +++ b/project/jni/application/ballfield/AndroidAppSettings.cfg @@ -30,6 +30,5 @@ CustomBuildScript=n AppCflags='-O2 -finline-functions' AppLdflags='' AppSubdirsBuild='' -AppUseCrystaXToolchain=n AppCmdline='' -ReadmeText='^' +ReadmeText='^Readme text'