SDL: build.sh will accept app name to compile, so you can do './build.sh -r ballfield' to switch projects

This commit is contained in:
Sergii Pylypenko
2015-08-06 20:06:48 +03:00
parent 96586aacd0
commit 4ec5d67fbb
2 changed files with 28 additions and 8 deletions

View File

@@ -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

View File

@@ -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;
}