@@ -110,7 +110,7 @@ def main():
110110 task = MyDict (task )
111111 try :
112112 print (f"\n { '=' * 40 } " )
113- print (f"开始打包任务: [{ i } /{ len (config )} ] { name } " )
113+ print (f"开始打包任务: [{ i } /{ len (config )} ] { task . get ( ' name' ) } " )
114114 print (f"{ '=' * 40 } " )
115115
116116 # 解析任务参数 - 使用路径规范化
@@ -119,10 +119,11 @@ def main():
119119 requirements = task .get ('install-requirements' , [])
120120 enable_plugins = task .get ('enable-plugins' , [])
121121
122- icon = task .get ('icon' )
122+ # icon = task.get('icon')
123123 name = task .get ('name' )
124124 version = task .get ('version' )
125125 timeout = task .get ('timeout' , 60 * 45 )
126+ os_list = task .get ('os-list' , ['Linux' ,'Windows' ])
126127
127128 # c-compiler
128129 # c_compiler_clang = task.get('c-compiler', {}).get('clang', False)
@@ -155,8 +156,8 @@ def main():
155156 only_windows_command = task .get ('only-windows-command' )
156157 clean_cache = task .get ('clean-cache' )
157158
158- if Machine not in task . get ( 'os' , [ 'Windows' , 'Linux' ]) :
159- print (f"警告: 任务 [{ i } /{ len (config )} { name } ] 不支持当前操作系统 { Machine } " )
159+ if system_os not in os_list :
160+ print (f"警告: 任务 [{ i } /{ len (config )} ] { name } 不支持当前操作系统 { system_os } " )
160161 task_error_list .append (name )
161162 continue
162163
@@ -305,10 +306,10 @@ def main():
305306 shutil .rmtree (temp_output_path )
306307
307308 except Exception as e :
308- print (f"任务[{ i } /{ len (config )} { name } ]失败: { str (e )} " )
309+ print (f"任务[{ i } /{ len (config )} { task . get ( ' name' ) } ]失败: { str (e )} " )
309310 import traceback
310311 traceback .print_exc ()
311- task_error_list .append (name )
312+ task_error_list .append (task . get ( ' name' ) )
312313
313314 # 输出最终结果
314315 print ("\n " + "=" * 50 )
0 commit comments