-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from shiertier/main
Prevent accidental interruption
- Loading branch information
Showing
8 changed files
with
138 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Python编译文件 | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# 打包目录 | ||
dist/ | ||
build/ | ||
*.egg-info/ | ||
|
||
# 虚拟环境 | ||
venv/ | ||
env/ | ||
ENV/ | ||
|
||
# IDE配置 | ||
.idea/ | ||
.vscode/ | ||
|
||
# 日志文件 | ||
*.log | ||
|
||
# 打包文件 | ||
*.spec | ||
pod_config.zip | ||
pod_config.json | ||
pod.zip | ||
|
||
# 系统文件 | ||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import PyInstaller.__main__ | ||
import os | ||
import shutil | ||
|
||
# 清理之前的构建文件 | ||
if os.path.exists("build"): | ||
shutil.rmtree("build") | ||
if os.path.exists("dist"): | ||
shutil.rmtree("dist") | ||
|
||
# 确保输出目录存在 | ||
if not os.path.exists("dist"): | ||
os.makedirs("dist") | ||
|
||
# 打包命令行版本 | ||
PyInstaller.__main__.run([ | ||
'pod_client_cmd.py', | ||
'--name=pod_client_cmd', | ||
'--onefile', | ||
'--console', | ||
'--clean', # 清理临时文件 | ||
]) | ||
|
||
# 打包GUI版本 | ||
PyInstaller.__main__.run([ | ||
'pod_client.py', | ||
'--name=pod_client_gui', | ||
'--onefile', | ||
'--noconsole', # GUI版本不显示控制台 | ||
'--windowed', | ||
'--clean', # 清理临时文件 | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters