Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
周振烽
channel_package
Commits
0cb39380
Commit
0cb39380
authored
5 years ago
by
周振烽
Browse files
Options
Download
Email Patches
Plain Diff
增加dealProxy 进打包流程
parent
c352d8bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
cp/package_tools/apktool.py
cp/package_tools/apktool.py
+1
-0
cp/package_tools/main.py
cp/package_tools/main.py
+6
-6
cp_upload/channelconfig/明朝
cp_upload/channelconfig/明朝
+2
-1
No files found.
cp/package_tools/apktool.py
View file @
0cb39380
...
...
@@ -394,6 +394,7 @@ class apkTool(object):
apk_path
=
cpath
.
chandir
(
self
.
cname
,
self
.
fname
)
self
.
_deCompileApk
(
apk_path
,
self
.
CBuildDir
())
self
.
dealFile
()
self
.
dealProxy
()
self
.
dealRes
()
self
.
dealManifest
()
self
.
dealSpecial
()
...
...
This diff is collapsed.
Click to expand it.
cp/package_tools/main.py
View file @
0cb39380
...
...
@@ -2,7 +2,6 @@
from
functools
import
partial
import
os
from
xml.dom.minidom
import
parse
from
xml.dom.minidom
import
parseString
...
...
@@ -14,7 +13,7 @@ import datetime
apkDir
=
os
.
path
.
join
(
os
.
getcwd
(),
'apks'
)
# 渠道APK , chan(cname, fname)
killDir
=
os
.
path
.
join
(
os
.
getcwd
(),
'demoChannel'
)
# 反编译
templetDir
=
os
.
path
.
join
(
os
.
getcwd
(),
'templet'
)
# CP母包目录
templetDir
=
os
.
path
.
join
(
os
.
getcwd
(),
'templet'
)
# CP母包目录
resultDir
=
os
.
path
.
join
(
os
.
getcwd
(),
'result'
)
# 编译结果
configDir
=
os
.
path
.
join
(
os
.
getcwd
(),
'channelconfig'
)
# 后期存入MongoDB
specialDir
=
os
.
path
.
join
(
os
.
getcwd
(),
'special'
)
...
...
@@ -87,11 +86,9 @@ def copyTree(src, dst, force=False):
def
dealFile
(
apk
,
force
=
'null'
):
print
(
"开始处理文件:"
+
apk
)
killPath
=
os
.
path
.
join
(
killDir
,
apk
)
copyTree
(
os
.
path
.
join
(
templetDir
,
"assets"
),
killPath
)
libsDir
=
os
.
path
.
join
(
templetDir
,
"lib"
)
...
...
@@ -233,8 +230,11 @@ def xmlToJson(xml, aleradyContent):
return
jsonStr
except
Exception
:
pass
rea
def
jsonToXml
(
jsDict
):
convertXml
=
''
try
:
...
...
@@ -644,14 +644,14 @@ if __name__ == '__main__':
version
=
args
.
targetSDKVersion
# 版本的模板
targetapk
=
args
.
targetApk
# 目标apk 名
if
targetapk
:
channelName
=
targetapk
[:
targetapk
.
index
(
'demo'
)]
# channel 渠道名称接出来
channelName
=
targetapk
[:
targetapk
.
index
(
'demo'
)]
# channel 渠道名称接出来
if
version
!=
None
and
targetapk
!=
None
:
templetDir
=
templetDir
+
'_'
+
version
configFile
=
os
.
path
.
join
(
configDir
,
channelName
+
'.config'
)
with
open
(
configFile
,
'r'
)
as
f
:
content
=
str
(
f
.
read
())
CONFIG
=
dict
(
json
.
loads
(
content
))
#
从 cache 中读出
CONFIG
=
dict
(
json
.
loads
(
content
))
#
从 cache 中读出
deCompileApk
(
targetapk
)
dealFile
(
targetapk
)
...
...
This diff is collapsed.
Click to expand it.
cp_upload/channelconfig/明朝
View file @
0cb39380
...
...
@@ -5,5 +5,5 @@
"ZKFX_PACKID": "40",
"ZKFX_CHLID": "11",
"ZK_AGENT_KEY": "a83daf18-4260-4eff-b3e5-ff8ce6d5fc19",
"ZK_AGNET_APPID": "100454"
,
"ZK_AGNET_APPID": "100454"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment