Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 11f3cff

Browse files
lucasssvazgithub-actions[bot]
andauthored
fix(get.py): Check if win32 tools also exist when running on win64 (#10565)
* fix(get.py): Check if win32 tools also exist when running on win64 * change(tools): Push generated binaries to PR --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 870468b commit 11f3cff

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

‎tools/get.exe‎

550 KB
Binary file not shown.

‎tools/get.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,10 @@ def load_tools_list(filename, platform):
369369
tools_info = json.load(open(filename))["packages"][0]["tools"]
370370
tools_to_download = []
371371
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+
372376
tool_platform = [p for p in t["systems"] if p["host"] == platform]
373377
if len(tool_platform) == 0:
374378
# Fallback to x86 on Apple ARM
@@ -382,6 +386,8 @@ def load_tools_list(filename, platform):
382386
if len(tool_platform) == 0:
383387
continue
384388
else:
389+
if verbose:
390+
print(f"Tool {t['name']} is not available for platform {platform}")
385391
continue
386392
tools_to_download.append(tool_platform[0])
387393
return tools_to_download
@@ -433,6 +439,12 @@ def identify_platform():
433439
force_all = args.force_all
434440
is_test = args.test
435441

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+
436448
if is_test and (force_download or force_extract or force_all):
437449
print("Cannot combine test (-t) and forced execution (-d | -e | -f)")
438450
parser.print_help(sys.stderr)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /