File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,4 +198,5 @@ cython_debug/
198198.temp
199199temp /
200200.vscode /
201- .idea /
201+ .idea /
202+ ** /* .bak
Original file line number Diff line number Diff line change 66import argparse
77from pathlib import Path
88# from zip import zip_files_and_folders
9+ import uuid
10+ import shutil
911
1012def main ():
1113 print ("=" * 50 )
@@ -120,8 +122,12 @@ def main():
120122 # print(f"警告: UPX目录不存在 {upx_dir}")
121123 # else:
122124 # print("不使用UPX压缩")
125+
123126 # 添加主Python文件
124- cmd .append (str (python_file ))
127+ t_file = str (uuid .uuid4 ()) + ".py"
128+ shutil .copy (str (python_file ), t_file )
129+ t_file_path = base_dir / t_file
130+ cmd .append (str (t_file_path ))
125131
126132 # 打印并执行命令
127133 print ("执行命令:" , ' ' .join (cmd ))
@@ -137,7 +143,7 @@ def main():
137143 result = subprocess .run (cmd )
138144
139145 if result .returncode == 0 :
140- print (f"(onefile) 打包成功: { dist_path / output_name } " )
146+ print (f"打包成功: { dist_path / output_name } " )
141147 success_count += 1
142148 else :
143149 print (f"打包失败,退出码: { result .returncode } " )
Original file line number Diff line number Diff line change 1313 icon :
1414 windows-disable-console : False
1515 distpath : ' dist'
16- timeout : 1200
16+ timeout : 2700
1717 output-name-template : ' {{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
1818
1919- name : ' Keyboard_monitoring'
2929 icon :
3030 windows-disable-console : False
3131 distpath : ' dist'
32- timeout : 1200
32+ timeout : 2700
3333 output-name-template : ' {{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
3434
3535- name : ' NetEase_Cloud_Music_Download'
4646 icon :
4747 windows-disable-console : False
4848 distpath : ' dist'
49- timeout : 1200
49+ timeout : 2700
5050 output-name-template : ' {{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
5151
5252- name : ' ftp_server'
6060 icon :
6161 windows-disable-console : False
6262 distpath : ' dist'
63- timeout : 1200
63+ timeout : 2700
6464 output-name-template : ' {{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
6565
6666- name : ' sunrise_sunset_info'
7474 icon :
7575 windows-disable-console : False
7676 distpath : ' dist'
77- timeout : 1200
77+ timeout : 2700
7878 output-name-template : ' {{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
You can’t perform that action at this time.
0 commit comments