Skip to content

Commit 8974ccd

Browse files
committed
qt_minimal: consider .exe files for binaries on Windows
1 parent e5f198c commit 8974ccd

File tree

1 file changed

+19
-1
lines changed
  • crates/qt-build-utils/src/installation/qt_minimal

1 file changed

+19
-1
lines changed

crates/qt-build-utils/src/installation/qt_minimal/mod.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,19 @@ impl TryFrom<PathBuf> for QtInstallationQtMinimal {
4545
.join(folder)
4646
.join(crate::QtTool::QtPaths.binary_name())
4747
})
48-
.find(|path| path.exists())
48+
.find(|path| {
49+
if path.exists() {
50+
return true;
51+
}
52+
53+
// NOTE: try with .exe for Windows
54+
let path_exe = path.with_extension("exe");
55+
if path.exists() {
56+
return true;
57+
}
58+
59+
return false;
60+
})
4961
else {
5062
return Err(anyhow::anyhow!(
5163
"Failed to find qtpaths in Qt path: {}",
@@ -159,6 +171,12 @@ impl QtInstallation for QtInstallationQtMinimal {
159171
if path.exists() {
160172
return Ok(path);
161173
}
174+
175+
// NOTE: try with .exe for Windows
176+
let path_exe = path.with_extension("exe");
177+
if path.exists() {
178+
return Ok(path);
179+
}
162180
}
163181

164182
Err(anyhow::anyhow!(

0 commit comments

Comments
 (0)