|
@@ -3,6 +3,8 @@ import common_utils
|
|
import xml_utils
|
|
import xml_utils
|
|
import os.path
|
|
import os.path
|
|
import xml.etree.ElementTree as ET
|
|
import xml.etree.ElementTree as ET
|
|
|
|
+import json
|
|
|
|
+
|
|
|
|
|
|
namespaces = {'android': 'http://schemas.android.com/apk/res/android'}
|
|
namespaces = {'android': 'http://schemas.android.com/apk/res/android'}
|
|
encoding = 'UTF-8'
|
|
encoding = 'UTF-8'
|
|
@@ -15,10 +17,12 @@ def execute(game, sdk, config):
|
|
subChannel = config['subChannel']
|
|
subChannel = config['subChannel']
|
|
|
|
|
|
createJmhyProperties(game, sdk, subChannel, config)
|
|
createJmhyProperties(game, sdk, subChannel, config)
|
|
- #ret = deleteSplash(game, sdk, subChannel, config)
|
|
|
|
addLauncher(game, sdk, subChannel, config)
|
|
addLauncher(game, sdk, subChannel, config)
|
|
common_utils.changeApplication(game, sdk, subChannel, config, 'com.tygrm.sdk.TYRApplication')
|
|
common_utils.changeApplication(game, sdk, subChannel, config, 'com.tygrm.sdk.TYRApplication')
|
|
|
|
|
|
|
|
+ #生成json
|
|
|
|
+
|
|
|
|
+
|
|
return 0
|
|
return 0
|
|
|
|
|
|
|
|
|
|
@@ -169,4 +173,33 @@ def addGameLauncherActivity(manifest, screenOrientation, activity):
|
|
application = root.find('application')
|
|
application = root.find('application')
|
|
application.insert(0, activity)
|
|
application.insert(0, activity)
|
|
|
|
|
|
- tree.write(manifest, encoding)
|
|
|
|
|
|
+ tree.write(manifest, encoding)
|
|
|
|
+
|
|
|
|
+def addAKJson(game, sdk, subChannel, config):
|
|
|
|
+ '''
|
|
|
|
+ 添加config.json
|
|
|
|
+ '''
|
|
|
|
+ if 'tianyuyou' not in config:
|
|
|
|
+ return 0
|
|
|
|
+
|
|
|
|
+ print('add config.json...')
|
|
|
|
+ decompliePath = file_utils.getDecompliePath(game, sdk, subChannel, config['cache'])
|
|
|
|
+ configJson = os.path.join(decompliePath, 'assets', 'tygrm_ak.json')
|
|
|
|
+ jsonText = json.dumps(config['configData'], ensure_ascii=False)
|
|
|
|
+ file_utils.createFile(configJson, jsonText)
|
|
|
|
+ return 0
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+def addPJson(game, sdk, subChannel, config):
|
|
|
|
+ '''
|
|
|
|
+ 添加config.json
|
|
|
|
+ '''
|
|
|
|
+ if 'configData' not in config:
|
|
|
|
+ return 0
|
|
|
|
+
|
|
|
|
+ print('add config.json...')
|
|
|
|
+ decompliePath = file_utils.getDecompliePath(game, sdk, subChannel, config['cache'])
|
|
|
|
+ configJson = os.path.join(decompliePath, 'assets', 'jmhy_config.json')
|
|
|
|
+ jsonText = json.dumps(config['configData'], ensure_ascii=False)
|
|
|
|
+ file_utils.createFile(configJson, jsonText)
|
|
|
|
+ return 0
|