Ver código fonte

新增脚本 新凡人修仙

dongguoliang@kuaifazs.com 4 anos atrás
pai
commit
b2748ce3fb
2 arquivos alterados com 63 adições e 0 exclusões
  1. 1 0
      .gitignore
  2. 62 0
      新凡人修仙传酷派/script.py

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 venv/
 .idea/
 *.zip
+*.pyc

+ 62 - 0
新凡人修仙传酷派/script.py

@@ -0,0 +1,62 @@
+# coding:utf8
+
+__author__ = 'dong'
+
+import os
+import logging
+import xml.dom.minidom
+import re
+import shutil
+import glob
+from xml.etree.ElementTree import ElementTree, Element
+import distutils.dir_util
+
+from xml.etree import ElementTree as ET
+
+ANDROID_NS = 'http://schemas.android.com/apk/res/android'
+
+
+def script_init(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    return
+
+
+def script_first(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    return
+
+
+def script_second(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    src = os.path.join(decompileDir, "res/values/public.xml")
+    if os.path.exists(src):
+        src = src.replace('\\', '/')
+        os.remove(src)
+    return
+
+
+def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    return
+
+
+def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    return
+
+
+def handle_public_xml(public_xml_path):
+    if not os.path.exists(public_xml_path):
+        logging.info('public_xml is null: ' + public_xml_path)
+        return
+    new_lines = []
+    with open(public_xml_path, 'r+') as f:
+        for line in f.readlines():
+            # l = line.strip()
+            if line.find("wrap_content") > -1:
+                continue
+            new_lines.append(line)
+        f.seek(0)
+        f.truncate()
+        f.writelines(new_lines)
+    return
+
+
+if __name__ == '__main__':
+    # script("", "E:\\apk\\youhua\\LYJY360_12412_360逆向_1.23.00", "", "", "")
+    modify_manifest("G:\\autopack2.0_kuaifa\\tool\\workspace\\mhlskp\\15377\\extract\\")