@@ -369,6 +369,10 @@ def load_tools_list(filename, platform):
369
369
tools_info = json .load (open (filename ))["packages" ][0 ]["tools" ]
370
370
tools_to_download = []
371
371
for t in tools_info :
372
+ if platform == "x86_64-mingw32" :
373
+ if "i686-mingw32" not in [p ["host" ] for p in t ["systems" ]]:
374
+ raise Exception ("Windows x64 requires both i686-mingw32 and x86_64-mingw32 tools" )
375
+
372
376
tool_platform = [p for p in t ["systems" ] if p ["host" ] == platform ]
373
377
if len (tool_platform ) == 0 :
374
378
# Fallback to x86 on Apple ARM
@@ -382,6 +386,8 @@ def load_tools_list(filename, platform):
382
386
if len (tool_platform ) == 0 :
383
387
continue
384
388
else :
389
+ if verbose :
390
+ print (f"Tool { t ['name' ]} is not available for platform { platform } " )
385
391
continue
386
392
tools_to_download .append (tool_platform [0 ])
387
393
return tools_to_download
@@ -433,6 +439,12 @@ def identify_platform():
433
439
force_all = args .force_all
434
440
is_test = args .test
435
441
442
+ # Set current directory to the script location
443
+ if getattr (sys , "frozen" , False ):
444
+ os .chdir (os .path .dirname (sys .executable ))
445
+ else :
446
+ os .chdir (os .path .dirname (os .path .abspath (__file__ )))
447
+
436
448
if is_test and (force_download or force_extract or force_all ):
437
449
print ("Cannot combine test (-t) and forced execution (-d | -e | -f)" )
438
450
parser .print_help (sys .stderr )
0 commit comments