소스 검색

2个游戏

DONGGUOLIANGNEW\edy 1 년 전
부모
커밋
29ea23eaed
2개의 변경된 파일81개의 추가작업 그리고 0개의 파일을 삭제
  1. 31 0
      列王的纷争百度/script.py
  2. 50 0
      奥特曼英雄归来百度/script.py

+ 31 - 0
列王的纷争百度/script.py

@@ -0,0 +1,31 @@
+# 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
+
+
+def script_pre(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+
+    mipmap = os.path.join(decompileDir, "res/mipmap-anydpi-v26")
+    values = os.path.join(decompileDir, "res/values-anydpi-v26")
+    if os.path.exists(mipmap):
+        distutils.dir_util.remove_tree(mipmap)
+    if os.path.exists(values):
+        distutils.dir_util.remove_tree(values)
+    logging.info("-----debug-----")
+
+
+def script_last(workspace_sdk_dir, extract_dir, channel_sdk_info, new_game_channel_info, game_info):
+    return
+
+
+if __name__ == '__main__':
+    script_pre("", "f:\\ztest", "", "", "")

+ 50 - 0
奥特曼英雄归来百度/script.py

@@ -0,0 +1,50 @@
+# coding:utf8
+
+__author__ = 'Snow'
+
+import os
+import logging
+import xml.dom.minidom
+import re
+import shutil
+import glob
+import distutils.dir_util
+
+ANDROID_NS = 'http://schemas.android.com/apk/res/android'
+from xml.etree import ElementTree as ET
+
+
+def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    sdk_id = channelSdkInfo['id']
+    if sdk_id == "180017":
+        modify_manifest(decompileDir)
+
+
+def script_pre(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    ""
+
+
+def modify_manifest(decompileDir):
+    # 原始文件路径
+    xmlparse = os.path.join(decompileDir, 'AndroidManifest.xml')
+    # 修改后的文件路径
+    output_file_path = 'your_modified_file.xml'
+
+    # 要删除的字符串
+    string_to_remove = '<action android:name="" />'
+
+    # 读取原始文件内容
+    with open(xmlparse, 'r') as file:
+        file_contents = file.read()
+
+    # 删除指定的字符串
+    modified_contents = file_contents.replace(string_to_remove, '')
+
+    # 将修改后的内容写回文件
+    with open(xmlparse, 'w') as file:
+        file.write(modified_contents)
+
+
+
+if __name__ == '__main__':
+    modify_manifest("C:/Users/edy/Desktop")