Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct - Extend msys search to all possible drives #1359

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions gvsbuild/utils/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,23 @@ def __check_tools(self, opts):
log.start("Checking msys tool")
msys_path = opts.msys_dir
if not msys_path or not Path.exists(msys_path):
msys_paths = [
Path(r"C:\msys64"),
Path(r"C:\msys32"),
Path(r"C:\tools\msys64"),
Path(r"C:\tools\msys32"),
drive_letters = ("C:", "D:", "E:", "F:")
possible_drives = [
drive for drive in drive_letters if os.path.exists(drive)
]
for path in msys_paths:
possible_paths = [
r"\msys64",
r"\tools\msys64",
r"\msys32",
r"\tools\msys32",
]
all_possible_paths = [
Path(drive + path)
for drive in possible_drives
for path in possible_paths
]

for path in all_possible_paths:
if Path.exists(path):
msys_path = path
self.opts.msys_dir = str(msys_path)
Expand Down