update build.py for fdroid - a 'copyonly' mode that prepares the mobile/assets folder but doesn't run 'ant'
This commit is contained in:
parent
30594359f0
commit
18f9ef0c2e
17
build.py
17
build.py
@ -202,8 +202,8 @@ def copytree(src, dst, symlinks=False, ignore=None):
|
|||||||
|
|
||||||
# if we're building mobile too
|
# if we're building mobile too
|
||||||
if buildMobile:
|
if buildMobile:
|
||||||
if buildMobile not in ['debug','release']:
|
if buildMobile not in ['debug','release','copyonly']:
|
||||||
raise Exception("Error: buildMobile must be 'debug' or 'release'")
|
raise Exception("Error: buildMobile must be 'debug' or 'release' or 'copyonly'")
|
||||||
|
|
||||||
# compile the user location script
|
# compile the user location script
|
||||||
fn = "user-location.user.js"
|
fn = "user-location.user.js"
|
||||||
@ -232,13 +232,14 @@ if buildMobile:
|
|||||||
copytree(os.path.join(outDir,"plugins"), "mobile/assets/plugins")
|
copytree(os.path.join(outDir,"plugins"), "mobile/assets/plugins")
|
||||||
|
|
||||||
|
|
||||||
# now launch 'ant' to build the mobile project
|
if buildMobile != 'copyonly':
|
||||||
retcode = os.system("ant -buildfile mobile/build.xml %s" % buildMobile)
|
# now launch 'ant' to build the mobile project
|
||||||
|
retcode = os.system("ant -buildfile mobile/build.xml %s" % 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)
|
||||||
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) )
|
||||||
|
|
||||||
|
|
||||||
# vim: ai si ts=4 sw=4 sts=4 et
|
# vim: ai si ts=4 sw=4 sts=4 et
|
||||||
|
Loading…
x
Reference in New Issue
Block a user