修改参数
parent
ce8375d98c
commit
43d0b70a57
|
|
@ -246,30 +246,35 @@ if __name__ == '__main__':
|
|||
# parser.add_option("-g", "--aab", dest="aab", help=('是否为上传Google Play的aab包'))
|
||||
parser.add_option("-m", "--mode", dest="mode", help=('打包模式, 选项: Release/Debug'))
|
||||
parser.add_option("-p", "--platform", dest="platform", help=('打包平台 选项: android/ios/webgl'))
|
||||
parser.add_option("-u", "--unityexe", dest="unityexe", help=('Unity可执行文件'))
|
||||
parser.add_option("-a", "--assets", dest="assets", help=('美术资源路径'))
|
||||
parser.add_option("-r", "--resources", dest="resources", help=('导出资源路径'))
|
||||
parser.add_option("-l", "--log", dest="log", help=('美术资源最新的git log'))
|
||||
parser.add_option("-d", "--upload", dest="upload", help=('是否上传'))
|
||||
# parser.add_option("-u", "--unityexe", dest="unityexe", help=('Unity可执行文件'))
|
||||
# parser.add_option("-a", "--assets", dest="assets", help=('美术资源路径'))
|
||||
# parser.add_option("-r", "--resources", dest="resources", help=('导出资源路径'))
|
||||
# parser.add_option("-l", "--log", dest="log", help=('美术资源最新的git log'))
|
||||
# parser.add_option("-d", "--upload", dest="upload", help=('是否上传'))
|
||||
parser.add_option("-s", "--special", dest="special", help=('指定构建的资源'))
|
||||
(opts, args) = parser.parse_args()
|
||||
opts.appversion = "1.0.0"
|
||||
opts.resversion = "1"
|
||||
opts.buildtype = "BuildBundle"
|
||||
opts.unityexe = "/Applications/Unity/Hub/Editor/2021.3.45f1/Unity.app/Contents/MacOS/Unity"
|
||||
opts.upload = "true"
|
||||
opts.log = "log/build.log"
|
||||
opts.assets = "/Volumes/Predator/find-object/find-object-art"
|
||||
opts.resources = "/Volumes/Predator/find-it/find-object-bundle-resource"
|
||||
|
||||
# 本地自测适用
|
||||
opts.aab = "false"
|
||||
opts.mode = "Debug"
|
||||
opts.platform = "Android"
|
||||
opts.assets = "/Users/a0729/gogs.git/find-vertical-art"
|
||||
opts.resources = "/Users/a0729/gogs.git/find-vertical-bundle-resource"
|
||||
opts.unityexe = "/Applications/Unity/Hub/Editor/2021.3.45f1/Unity.app/Contents/MacOS/Unity"
|
||||
opts.log = "log/build.log"
|
||||
opts.upload = "false"
|
||||
# opts.aab = "false"
|
||||
# opts.mode = "Debug"
|
||||
# opts.platform = "Android"
|
||||
# opts.assets = "/Users/a0729/gogs.git/find-vertical-art"
|
||||
# opts.resources = "/Users/a0729/gogs.git/find-vertical-bundle-resource"
|
||||
# opts.unityexe = "/Applications/Unity/Hub/Editor/2021.3.45f1/Unity.app/Contents/MacOS/Unity"
|
||||
# opts.log = "log/build.log"
|
||||
# opts.upload = "false"
|
||||
# opts.special = "main_30point_ws20250422_1"
|
||||
opts.special = "0"
|
||||
# opts.special = "0"
|
||||
#
|
||||
|
||||
print(f'test-- {opts}')
|
||||
is_upload = True if opts.upload == "true" else False
|
||||
|
||||
check_msg = check_params(opts)
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ def parse_psd(path, output_root, specific_files, platform):
|
|||
utils.mkdirs(levels_root_path)
|
||||
utils.mkdirs(thumbnail_root_path)
|
||||
version_path = os.path.join(output_root, f"../psd_version.json")
|
||||
# load_version()
|
||||
load_version()
|
||||
all_parse_asset_names = []
|
||||
for root, dirs, files in os.walk(path):
|
||||
for name in files:
|
||||
|
|
@ -198,8 +198,8 @@ def parse_psd(path, output_root, specific_files, platform):
|
|||
continue
|
||||
|
||||
hash_old = ""
|
||||
# if asset_id in versions:
|
||||
# hash_old = versions[asset_id]
|
||||
if asset_id in versions:
|
||||
hash_old = versions[asset_id]
|
||||
hash_now = utils.calc_hash(src_filename)
|
||||
print("文件:" + src_filename + " => old = " + hash_old + " now = " + hash_now)
|
||||
if hash_old != hash_now:
|
||||
|
|
@ -224,8 +224,8 @@ def parse_psd(path, output_root, specific_files, platform):
|
|||
psd_filename = "{}.psd".format(os.path.splitext(os.path.join(root, name))[0])
|
||||
run(psd_filename, levels_output_dir, thumbnail_output_dir)
|
||||
all_parse_asset_names.append(asset_id)
|
||||
# versions[asset_id] = hash_now
|
||||
# write_version()
|
||||
versions[asset_id] = hash_now
|
||||
write_version()
|
||||
os.remove(psd_filename)
|
||||
return all_parse_asset_names
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue