| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 import glob | 3 import glob |
| 4 import json | 4 import json |
| 5 import os | 5 import os |
| 6 import re | 6 import re |
| 7 import shutil | 7 import shutil |
| 8 import string | 8 import string |
| 9 import subprocess | 9 import subprocess |
| 10 import sys | 10 import sys |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 env=build_environment) | 78 env=build_environment) |
| 79 subprocess.check_call([_MULTI_L10N_PATH, "--cfg", "adblockbrowser-cfg.py"], | 79 subprocess.check_call([_MULTI_L10N_PATH, "--cfg", "adblockbrowser-cfg.py"], |
| 80 env=build_environment) | 80 env=build_environment) |
| 81 | 81 |
| 82 dist_path = os.path.join(_ABB_PATH, obj_dir, "dist") | 82 dist_path = os.path.join(_ABB_PATH, obj_dir, "dist") |
| 83 arch_suffix = _ARCH_X86_I386 if architecture == _ARCH_X86 else _ARCH_ARM | 83 arch_suffix = _ARCH_X86_I386 if architecture == _ARCH_X86 else _ARCH_ARM |
| 84 [manifest_path] = glob.glob(os.path.join( | 84 [manifest_path] = glob.glob(os.path.join( |
| 85 dist_path, "fennec-*.multi.android-%s.json" % arch_suffix)) | 85 dist_path, "fennec-*.multi.android-%s.json" % arch_suffix)) |
| 86 with open(manifest_path) as manifest_file: | 86 with open(manifest_path) as manifest_file: |
| 87 manifest = json.load(manifest_file) | 87 manifest = json.load(manifest_file) |
| 88 | 88 apk_name = "fennec-%s.multi.android-%s-unsigned-unaligned.apk" % ( |
| 89 apk_path = os.path.join(dist_path, "gecko-unsigned-unaligned.apk") | 89 manifest["moz_app_version"], architecture) |
| 90 apk_path = os.path.join(dist_path, apk_name) |
| 90 if build_mode == _BUILD_RELEASE: | 91 if build_mode == _BUILD_RELEASE: |
| 91 target_apk_name = "adblockbrowser-%s-%s.apk" % ( | 92 target_apk_name = "adblockbrowser-%s-%s.apk" % ( |
| 92 manifest["moz_app_version"], architecture) | 93 manifest["moz_app_version"], architecture) |
| 93 else: | 94 else: |
| 94 target_apk_name = "adblockbrowser-%s.%s-%s.apk" % ( | 95 target_apk_name = "adblockbrowser-%s.%s-%s.apk" % ( |
| 95 manifest["moz_app_version"], manifest["buildid"], architecture) | 96 manifest["moz_app_version"], manifest["buildid"], architecture) |
| 96 target_apk_path = os.path.join(dist_path, target_apk_name) | 97 target_apk_path = os.path.join(dist_path, target_apk_name) |
| 97 shutil.copyfile(apk_path, target_apk_path) | 98 shutil.copyfile(apk_path, target_apk_path) |
| 98 | 99 |
| 99 target_manifest_path = re.sub(r".apk$", ".json", target_apk_path) | 100 target_manifest_path = re.sub(r".apk$", ".json", target_apk_path) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 sys.exit(6) | 163 sys.exit(6) |
| 163 | 164 |
| 164 if do_build: | 165 if do_build: |
| 165 apk_path = _build(architecture, distribution_mode, build_mode, | 166 apk_path = _build(architecture, distribution_mode, build_mode, |
| 166 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH) | 167 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH) |
| 167 if do_sign: | 168 if do_sign: |
| 168 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME, | 169 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME, |
| 169 config.ANDROID_SDK_PATH) | 170 config.ANDROID_SDK_PATH) |
| 170 else: | 171 else: |
| 171 print apk_path | 172 print apk_path |
| OLD | NEW |