File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,22 +106,22 @@ def main():
106106 if icon :
107107 icon_path = base_dir / icon
108108 if icon_path .exists ():
109- cmd .extend ([ '--windows-icon-from-ico=icon.ico' , str (icon_path )] )
109+ cmd .append ( f '--windows-icon-from-ico={ str (icon_path )} ' )
110110 else :
111111 print (f"警告: 图标文件不存在 { icon_path } " )
112112
113- # if arrch == "ARM64":
114- # print("UPX不支持当前架构")
115- # else:
116- # if use_upx:
117- # if upx_dir.exists():
118- # cmd.append('--plugin-enable=upx')
119- # cmd.extend([ '--upx-binary', str(upx_dir)] )
120- # print(f"使用UPX压缩: {upx_dir}")
121- # else:
122- # print(f"警告: UPX目录不存在 {upx_dir}")
123- # else:
124- # print("不使用UPX压缩")
113+ if arrch == "ARM64" :
114+ print ("UPX不支持当前架构" )
115+ else :
116+ if use_upx :
117+ if upx_dir .exists ():
118+ cmd .append ('--plugin-enable=upx' )
119+ cmd .append ( f '--upx-binary= { str (upx_dir )} ' )
120+ print (f"使用UPX压缩: { upx_dir } " )
121+ else :
122+ print (f"警告: UPX目录不存在 { upx_dir } " )
123+ else :
124+ print ("不使用UPX压缩" )
125125
126126 # 添加主Python文件
127127 t_file = str (uuid .uuid4 ()) + ".py"
Original file line number Diff line number Diff line change 88 ' rich' ,
99 ' Pillow'
1010 ]
11- # upx: true
11+ upx : true
1212 # onefile: 2 # 0:文件夹 1:单文件 2:两者
13- icon :
13+ icon : package\assets\favicon.ico
1414 windows-disable-console : False
1515 distpath : ' dist'
1616 timeout : 2700
2525 ' pywin32' ,
2626 ' psutil'
2727 ]
28- # upx: true
28+ upx : true
2929 # onefile: 1
30- icon :
30+ icon : package\assets\favicon.ico
3131 windows-disable-console : False
3232 distpath : ' dist'
3333 timeout : 2700
4242 ' tabulate' ,
4343 ' mutagen'
4444 ]
45- # upx: true
45+ upx : true
4646 # onefile: 1
47- icon :
47+ icon : package\assets\favicon.ico
4848 windows-disable-console : False
4949 distpath : ' dist'
5050 timeout : 2700
5656 install-requirements : [
5757 ' pyftpdlib'
5858 ]
59- # upx: true
59+ upx : true
6060 # onefile: 1
61- icon :
61+ icon : package\assets\favicon.ico
6262 windows-disable-console : False
6363 distpath : ' dist'
6464 timeout : 2700
7171 ' pyftpdlib' ,
7272 ' astropy'
7373 ]
74- # upx: true
74+ upx : true
7575 # onefile: 1 # 0:文件夹 1:单文件 2:两者
76- icon :
76+ icon : package\assets\favicon.ico
7777 windows-disable-console : False
7878 distpath : ' dist'
7979 timeout : 2700
You can’t perform that action at this time.
0 commit comments