From 2c4bda7357ce9ad5b3bda3869aa3bf550e3d8d60 Mon Sep 17 00:00:00 2001 From: fkloft Date: Tue, 10 Dec 2013 22:22:48 +0100 Subject: [PATCH] Improve build tools - Makefile provides "locale" and "mobile" as targets. Mobile also installs and starts app - build.py returns error code if ant fails --- Makefile | 14 ++++++++++++-- build.py | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 336e5120..c2f82707 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,16 @@ -default: - ./build.py +default: mklocal +local: mklocal +mobile: mkmobile + +mklocal: + ./build.py local + +mkmobile: + ./build.py mobile + adb install -r build/mobile/IITC_Mobile-debug.apk + adb shell am start -n com.cradle.iitc_mobile/com.cradle.iitc_mobile.IITC_Mobile clean: ant -f mobile/build.xml clean + diff --git a/build.py b/build.py index 97f808e6..ec04387d 100755 --- a/build.py +++ b/build.py @@ -289,6 +289,7 @@ if buildMobile: if retcode != 0: print ("Error: mobile app failed to build. ant returned %d" % retcode) + exit(1) # ant may return 256, but python seems to allow only values <256 else: shutil.copy("mobile/bin/IITC_Mobile-%s.apk" % buildMobile, os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile) )