Commit 4f5bf85e by sikang

update script

parent 4bafac38
...@@ -380,3 +380,17 @@ class Function: ...@@ -380,3 +380,17 @@ class Function:
"signging_storePassword": "%s" % new_config['signging_storePassword'], "signging_storePassword": "%s" % new_config['signging_storePassword'],
} }
self.update_properties(config, lines) self.update_properties(config, lines)
#copy logo
def find_logo(self,config):
path = "/Users/connor/Downloads/%s"%config['corp_id']
file = {}
for root, dirs, files in os.walk(path):
for file in files:
if "logo_512" in file and "logo" not in file.keys():
file['logo'] = file
if "1024_500" in file and "top" not in file.keys():
file['top'] = file
print(file)
...@@ -58,7 +58,9 @@ print("24、插入混淆代码") ...@@ -58,7 +58,9 @@ print("24、插入混淆代码")
print("25、插入混淆layout") print("25、插入混淆layout")
print("26、启用/禁用代码") print("26、启用/禁用代码")
print("27、签名SHA1") print("27、签名SHA1")
print("28、安装apk到手机") print("121、安装apk到手机")
print("122、裁切脚本logo和置顶图")
print("123、替换设计图")
command = int(input("请输入指令编号:")) command = int(input("请输入指令编号:"))
...@@ -174,5 +176,11 @@ elif command == 26: ...@@ -174,5 +176,11 @@ elif command == 26:
elif command == 27: elif command == 27:
Function().upate_keytore_sign(config) Function().upate_keytore_sign(config)
elif command == 28: elif command == 121:
Shell().install_app(config) Shell().install_app(config)
elif command == 122:
Shell().install_app(config)
elif command == 123:
Function().find_logo(config)
...@@ -125,4 +125,4 @@ class Shell: ...@@ -125,4 +125,4 @@ class Shell:
file_name = "%s_%s" % ( file_name = "%s_%s" % (
config['corp_id'], config['app_name'].replace(" ", "_")) config['corp_id'], config['app_name'].replace(" ", "_"))
apk_local = "%s/resGuardApks/%s_release.apk" % (config['root'], file_name) apk_local = "%s/resGuardApks/%s_release.apk" % (config['root'], file_name)
os.system("adb install %s"%apk_local) os.system("adb install %s"%apk_local)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment