12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- # -*- coding:utf-8 -*-
- import sys
- import os
- import traceback
- import json
- from V1 import merge_ad_pkg
- def package():
- if len(sys.argv) < 2:
- print("参数数量不正确")
- exit(1)
- config = sys.argv[1]
- if not os.path.exists(config):
- print("配置文件不存在")
- exit(1)
- try:
- ret = merge_ad_pkg.startMerge(config)
- except:
- ret = False
- print(traceback.format_exc())
- if not ret:
- print("切包失败,请联系开发人员")
- exit(1)
- print("成功")
- exit(0)
- pass
- def read_config_use_new_script(json_file_path):
- with open(json_file_path, 'r') as f:
- params = json.load(f)
- if not 'useAapt2' in params['meta_config']:
- return None
- return params['meta_config']['useAapt2']
- if __name__ == "__main__":
- package()
|