aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-lib/src/util.ts18
-rw-r--r--qt-ui/src/util.ts3
2 files changed, 17 insertions, 4 deletions
diff --git a/qt-lib/src/util.ts b/qt-lib/src/util.ts
index 4f07479..573a8e0 100644
--- a/qt-lib/src/util.ts
+++ b/qt-lib/src/util.ts
@@ -66,10 +66,20 @@ export function isMultiWorkspace(): boolean {
}
export async function locateQmakeExeFilePath(selectedQtPath: string) {
- return (
- (await existing(path.join(selectedQtPath, 'bin', 'qmake' + OSExeSuffix))) ||
- (await existing(path.join(selectedQtPath, 'bin', 'qmake6' + OSExeSuffix)))
- );
+ const qmakeVersions = ['qmake', 'qmake6'];
+ const suffixes = [OSExeSuffix];
+ if (IsWindows) {
+ suffixes.push('.bat');
+ }
+ for (const qmake of qmakeVersions) {
+ for (const suffix of suffixes) {
+ const qmakePath = path.join(selectedQtPath, 'bin', qmake + suffix);
+ if (await exists(qmakePath)) {
+ return qmakePath;
+ }
+ }
+ }
+ return undefined;
}
export function compareVersions(version1: string, version2: string) {
diff --git a/qt-ui/src/util.ts b/qt-ui/src/util.ts
index ded5ed5..a0f2553 100644
--- a/qt-ui/src/util.ts
+++ b/qt-ui/src/util.ts
@@ -58,6 +58,9 @@ export async function locateDesigner(selectedQtPath: string) {
return designerExePath;
}
const qmakeExePath = await locateQmakeExeFilePath(selectedQtPath);
+ if (!qmakeExePath) {
+ return '';
+ }
const designer = extractDesignerExePathFromQtPath(qmakeExePath);
if (await designer) {
return designer;