Merge pull request #346 from Piasy/master

Fix Android install script issue:
This commit is contained in:
Sascha Willems 2017-06-26 19:37:19 +02:00 committed by GitHub
commit ea726e617f
3 changed files with 4 additions and 5 deletions

View file

@ -71,7 +71,7 @@ print("Building all examples...")
for example in EXAMPLES: for example in EXAMPLES:
print(COLOR_GREEN + "Building %s (%d/%d)" % (example, CURR_INDEX, len(EXAMPLES)) + COLOR_END) print(COLOR_GREEN + "Building %s (%d/%d)" % (example, CURR_INDEX, len(EXAMPLES)) + COLOR_END)
if subprocess.call("python build.py %s %s" % (example, BUILD_ARGUMENTS)) != 0: if subprocess.call(("python build.py %s %s" % (example, BUILD_ARGUMENTS)).split(' ')) != 0:
print("Error during build process for %s" % example) print("Error during build process for %s" % example)
sys.exit(-1) sys.exit(-1)
CURR_INDEX += 1 CURR_INDEX += 1

View file

@ -29,7 +29,7 @@ if not os.path.isfile(os.path.join(PROJECT_FOLDER, "build.xml")):
ANDROID_CMD = "android" ANDROID_CMD = "android"
if os.name == 'nt': if os.name == 'nt':
ANDROID_CMD += ".bat" ANDROID_CMD += ".bat"
if subprocess.call("%s update project -p ./%s -t %s" % (ANDROID_CMD, PROJECT_FOLDER, SDK_VERSION)) != 0: if subprocess.call(("%s update project -p ./%s -t %s" % (ANDROID_CMD, PROJECT_FOLDER, SDK_VERSION)).split(' ')) != 0:
print("Error: Project update failed!") print("Error: Project update failed!")
sys.exit(-1) sys.exit(-1)
@ -43,7 +43,7 @@ SHADER_DIR = EXAMPLE_JSON["directories"]["shaders"]
# Additional # Additional
ADDITIONAL_DIRS = [] ADDITIONAL_DIRS = []
ADDITIONAL_FILES = [] ADDITIONAL_FILES = []
if "additional" in EXAMPLE_JSON["assets"]: if "assets" in EXAMPLE_JSON and "additional" in EXAMPLE_JSON["assets"]:
ADDITIONAL = EXAMPLE_JSON["assets"]["additional"] ADDITIONAL = EXAMPLE_JSON["assets"]["additional"]
if "directories" in ADDITIONAL: if "directories" in ADDITIONAL:
ADDITIONAL_DIRS = ADDITIONAL["directories"] ADDITIONAL_DIRS = ADDITIONAL["directories"]

View file

@ -8,7 +8,6 @@ if answer:
for arg in sys.argv[1:]: for arg in sys.argv[1:]:
if arg == "-validation": if arg == "-validation":
BUILD_ARGUMENTS += "-validation" BUILD_ARGUMENTS += "-validation"
if subprocess.call("python build-all.py -deploy %s" % BUILD_ARGUMENTS) != 0: if subprocess.call(("python build-all.py -deploy %s" % BUILD_ARGUMENTS).split(' ')) != 0:
print("Error: Not all examples may have been installed!") print("Error: Not all examples may have been installed!")
sys.exit(-1) sys.exit(-1)