Skip to content

Commit

Permalink
perf: 优化打包工具
Browse files Browse the repository at this point in the history
  • Loading branch information
Cassianvale committed Jan 28, 2024
1 parent 3581471 commit 5393a05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyinstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ def package_scripts():
shutil.make_archive('palworld-python-script', 'zip', 'dist')
print("palworld-python-script 打包成功!")

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


if __name__ == '__main__':
package_scripts()
Expand Down

0 comments on commit 5393a05

Please sign in to comment.