From 4ec5d67fbb598071632a110ae8cfbdf01337f822 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Thu, 6 Aug 2015 20:06:48 +0300 Subject: [PATCH] SDL: build.sh will accept app name to compile, so you can do './build.sh -r ballfield' to switch projects --- build.sh | 34 +++++++++++++++++++++------ project/jni/application/xserver/gfx.c | 2 +- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index d17bf0fda..3c1cbdafd 100755 --- a/build.sh +++ b/build.sh @@ -39,14 +39,34 @@ if [ "$#" -gt 0 -a "$1" = "debug" ]; then export NDK_DEBUG=1 fi +if [ "$#" -gt 0 -a "$1" '!=' "-h" ]; then + echo "Switching build target to $1" + if [ -e project/jni/application/$1 ]; then + rm -f project/jni/application/src + ln -s "$1" project/jni/application/src + else + echo "Error: no app $1 under project/jni/application" + echo "Available applications:" + cd project/jni/application + for f in *; do + if [ -e "$f/AndroidAppSettings.cfg" ]; then + echo "$f" + fi + done + exit 1 + fi + shift +fi + if [ "$#" -gt 0 -a "$1" = "-h" ]; then - echo "Usage: $0 [-s] [-i] [-r] [-q] [debug|release]" - echo " -s: sign APK file after building" - echo " -i: install APK file to device after building" - echo " -r: run APK file on device after building" - echo " -q: quick-rebuild C code, without rebuilding Java files" - echo " debug: build debug package" - echo " release: build release package (default)" + echo "Usage: $0 [-s] [-i] [-r] [-q] [debug|release] [app-name]" + echo " -s: sign APK file after building" + echo " -i: install APK file to device after building" + echo " -r: run APK file on device after building" + echo " -q: quick-rebuild C code, without rebuilding Java files" + echo " debug: build debug package" + echo " release: build release package (default)" + echo " app-name: directory under project/jni/application to be compiled" exit 0 fi diff --git a/project/jni/application/xserver/gfx.c b/project/jni/application/xserver/gfx.c index 4fd6c91d8..e68c544bb 100644 --- a/project/jni/application/xserver/gfx.c +++ b/project/jni/application/xserver/gfx.c @@ -114,7 +114,7 @@ static int unpackFiles(const char *archive, const char *script, const char *dele { sprintf(unpackLog[0], "Error: not enough free space on internal storage"); sprintf(unpackLog[1], "Available %llu Mb, required %d Mb", (uint64_t)freeSpace.f_bsize * freeSpace.f_bavail / 1024 / 1024, freeSpaceRequiredMb); - sprintf(unpackLog[2], "Please uninstall large apps to free more space on internal storage"); + sprintf(unpackLog[2], "Uninstall large apps to free more space on internal storage"); sleep(1); continue; }