File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ def main():
8888 .replace ('{{exe_suffix}}' , exe_suffix )
8989
9090 custom_command = task .get ('custom-command' )
91+ only_linux_command = task .get ('only-linux-command' )
92+ only_windows_command = task .get ('only-windows-command' )
9193
9294 # 检查Python文件是否存在
9395 if not python_file .exists ():
@@ -125,6 +127,18 @@ def main():
125127 cmd .append (f'--windows-icon-from-ico={ icon_path } ' )
126128 else :
127129 print (f"警告: 图标文件不存在 { icon_path } " )
130+ if only_windows_command :
131+ if isinstance (only_windows_command , str ):
132+ cmd .extend (only_windows_command .split ())
133+ elif isinstance (only_windows_command , list ):
134+ cmd .extend (only_windows_command )
135+ elif system_os == 'Linux' :
136+ if only_linux_command :
137+ if isinstance (only_linux_command , str ):
138+ cmd .extend (only_linux_command .split ())
139+ elif isinstance (only_linux_command , list ):
140+ cmd .extend (only_linux_command )
141+ cmd .append ('--clang' )
128142 else :
129143 # Linux/macOS 使用 clang
130144 cmd .append ('--clang' )
Original file line number Diff line number Diff line change 1414 timeout : 2700
1515 output-name-template : ' {{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
1616 custom-command : []
17+ only-linux-command : [
18+ ' --static-libpython=yes' # 使用静态链接,减少对系统库的依赖
19+ ]
20+ only-windows-command : []
You can’t perform that action at this time.
0 commit comments