Improve build tools

- Makefile provides "locale" and "mobile" as targets. Mobile also installs and starts app
- build.py returns error code if ant fails
This commit is contained in:
fkloft 2013-12-10 22:22:48 +01:00
parent 010682ffa6
commit 2c4bda7357
2 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,16 @@
default: default: mklocal
./build.py
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: clean:
ant -f mobile/build.xml clean ant -f mobile/build.xml clean

View File

@ -289,6 +289,7 @@ if buildMobile:
if retcode != 0: if retcode != 0:
print ("Error: mobile app failed to build. ant returned %d" % retcode) 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: else:
shutil.copy("mobile/bin/IITC_Mobile-%s.apk" % buildMobile, os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile) ) shutil.copy("mobile/bin/IITC_Mobile-%s.apk" % buildMobile, os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile) )