Skip to content

Commit 5393a05

Browse files
committed
perf: 优化打包工具
1 parent 3581471 commit 5393a05

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: pyinstaller.py

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ def package_scripts():
2929
shutil.make_archive('palworld-python-script', 'zip', 'dist')
3030
print("palworld-python-script 打包成功!")
3131

32+
# 打包成功后放入dist文件夹,如果已存在则覆盖
33+
if os.path.exists('dist/palworld-python-script.zip'):
34+
os.remove('dist/palworld-python-script.zip')
35+
shutil.move('palworld-python-script.zip', 'dist')
36+
print("打包后的palworld-python-script.zip已放入dist文件夹!")
37+
3238

3339
if __name__ == '__main__':
3440
package_scripts()

0 commit comments

Comments
 (0)