game_script.py 688 B

123456789101112131415161718192021
  1. import file_utils
  2. import common_utils
  3. import xml_utils
  4. import os.path
  5. import xml.etree.ElementTree as ET
  6. namespaces = {'android' : 'http://schemas.android.com/apk/res/android'}
  7. encoding = 'UTF-8'
  8. def execute(game, sdk, config):
  9. print('execute %s game script...' % game)
  10. subChannel = config['subChannel']
  11. decompliePath = file_utils.getDecompliePath(game, sdk, subChannel, config['cache'])
  12. manifest = os.path.join(decompliePath, 'AndroidManifest.xml')
  13. activityName = 'com.tencent.android.tpush.XGPushActivity'
  14. #删除Activity
  15. xml_utils.deleteActivityByName(manifest, activityName)
  16. file_utils.copyGameSmaliCode(game, sdk, subChannel, config)
  17. return 0