|
@@ -29,10 +29,11 @@ def pack(game, sdk, config):
|
|
|
ret = decomplie(game, sdk, subChannel, config)
|
|
|
if ret:
|
|
|
return ret
|
|
|
- # 删除旧代码
|
|
|
- '''ret = removeOldCode(game, sdk, subChannel, config)
|
|
|
- if ret:
|
|
|
- return ret'''
|
|
|
+ if 'deleteList' in config:
|
|
|
+ # 删除旧资源
|
|
|
+ ret = removeOldRes(game, sdk, subChannel, config)
|
|
|
+ if ret:
|
|
|
+ return ret
|
|
|
# 删除一些不支持的属性
|
|
|
ret = removeNoSupportAttr(game, sdk, subChannel, config)
|
|
|
if ret:
|
|
@@ -136,10 +137,6 @@ def pack(game, sdk, config):
|
|
|
ret = apksignerApk(game, sdk, subChannel, config)
|
|
|
if ret:
|
|
|
return ret
|
|
|
- # 添加渠道信息
|
|
|
- '''ret = addChannel(game, sdk, subChannel, config)
|
|
|
- if ret:
|
|
|
- return ret'''
|
|
|
# 清理产生的中间文件
|
|
|
if config['clearCache']:
|
|
|
clearTemp(game, sdk, subChannel, config)
|
|
@@ -162,6 +159,18 @@ def decomplie(game, sdk, subChannel, config):
|
|
|
|
|
|
return file_utils.execJarCmd(apktoolPath, 'd -f "%s" -o "%s"' % (gamePath, decompliePath))
|
|
|
|
|
|
+def removeOldRes(game, sdk, subChannel, config):
|
|
|
+ '''
|
|
|
+ 删除旧资源
|
|
|
+ '''
|
|
|
+ print('delete res ...')
|
|
|
+ decompliePath = file_utils.getDecompliePath(game, sdk, subChannel, config['cache'])
|
|
|
+ for subPath in config['deleteList']:
|
|
|
+ resPath = os.path.join(decompliePath, subPath)
|
|
|
+ os.remove(resPath)
|
|
|
+ print('delete ' + resPath)
|
|
|
+ return 0
|
|
|
+
|
|
|
def removeOldCode(game, sdk, subChannel, config):
|
|
|
'''
|
|
|
删除旧代码
|