-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.py
More file actions
40 lines (29 loc) · 841 Bytes
/
Copy pathinstall.py
File metadata and controls
40 lines (29 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
""" 安装打包工具,用于打包应用程序
:author: 闻煜
:time: 2022/09/23
"""
import os
import platform
def main() -> None:
""" 主函数, 程序从该函数开始运行。
:return:
"""
install()
return None
def install() -> bool:
""" 将工具自动打包
:return:
"""
# 打包vbuilder.py为exe
if platform.system() == "Windows":
os.system("pyinstaller.exe -F -i .\\icon\\version.ico .\\vbuilder.py")
else:
os.system("pyinstaller -F -i ./icon/version.ico ./vbuilder.py")
# 打包update_gui.py为exe
if platform.system() == "Windows":
os.system("pyinstaller.exe -F -i .\\icon\\update.ico .\\update_gui.py")
else:
os.system("pyinstaller -F -i ./icon/update.ico ./update_gui.py")
return True
if __name__ == '__main__':
main()