From cb07ed2575f3d0f7ea333707339b2edac669fed1 Mon Sep 17 00:00:00 2001 From: Batcave <11814593+batcaveMessi@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:06:03 +0200 Subject: [PATCH 01/10] p7zip is preinstalled in macos --- action/src/main.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/action/src/main.ts b/action/src/main.ts index 6817e43b..8350942e 100644 --- a/action/src/main.ts +++ b/action/src/main.ts @@ -344,11 +344,6 @@ const run = async (): Promise => { // Install Qt and tools if not cached if (!internalCacheHit) { - // 7-zip is required, and not included on macOS - if (process.platform === "darwin") { - await exec("brew install p7zip"); - } - // Install dependencies via pip await execPython("pip install", ["setuptools", "wheel", `"py7zr${inputs.py7zrVersion}"`]); From b80103e20abb510f242699ee4e7853e0f457d0e0 Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:10:54 +0000 Subject: [PATCH 02/10] Update the version number to v4 in the example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d8e7530d..6290e6b2 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,7 @@ Example value: `--external 7z` ```yml - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: '5.15.2' host: 'windows' From dd0a5399e0683610655d6d524d3f80b9ecda21bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 23:41:36 +0000 Subject: [PATCH 03/10] Bump braces from 3.0.2 to 3.0.3 in /action Bumps [braces](/~https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](/~https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](/~https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] --- action/package-lock.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/action/package-lock.json b/action/package-lock.json index 318d0412..b70a70cd 100644 --- a/action/package-lock.json +++ b/action/package-lock.json @@ -792,12 +792,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1275,9 +1275,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -2798,12 +2798,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "callsites": { @@ -3158,9 +3158,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" From 8784c1fc1864c42da7a1c965f41c105f61e0adf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= <79349457+MehdiChinoune@users.noreply.github.com> Date: Sun, 28 Jul 2024 13:51:01 +0100 Subject: [PATCH 04/10] Fix installing Qt6 6.8.0 on Windows --- action/src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action/src/main.ts b/action/src/main.ts index 8350942e..c0f84b1a 100644 --- a/action/src/main.ts +++ b/action/src/main.ts @@ -163,7 +163,9 @@ class Inputs { this.arch = "android_armv7"; } } else if (this.host === "windows") { - if (compareVersions(this.version, ">=", "5.15.0")) { + if (compareVersions(this.version, ">=", "6.8.0")) { + this.arch = "win64_msvc2022_64"; + } else if (compareVersions(this.version, ">=", "5.15.0")) { this.arch = "win64_msvc2019_64"; } else if (compareVersions(this.version, "<", "5.6.0")) { this.arch = "win64_msvc2013_64"; From 6118f79a332f283aa643279f2e668552044fedf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= <79349457+MehdiChinoune@users.noreply.github.com> Date: Sun, 4 Aug 2024 06:07:58 +0100 Subject: [PATCH 05/10] Update README.md about default arch for each Qt version --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6290e6b2..f613350b 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,9 @@ Windows w/ Qt >= 5.6 && Qt < 5.9: `win64_msvc2015_64` Windows w/ Qt >= 5.9 && Qt < 5.15: `win64_msvc2017_64` -Windows w/ Qt >= 5.15: `win64_msvc2019_64` +Windows w/ Qt >= 5.15 && Qt < 6.8: `win64_msvc2019_64` + +Windows w/ Qt >= 6.8: `win64_msvc2022_64` Android: `android_armv7` From ba3fb7da943018a353041fecb4832147c5725122 Mon Sep 17 00:00:00 2001 From: Dave Dalcino Date: Sun, 29 Sep 2024 16:37:11 -0700 Subject: [PATCH 06/10] Test tool paths --- .github/workflows/test.yml | 51 ++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33b88978..579ab78e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -211,7 +211,7 @@ jobs: uses: ./ with: tools-only: true - tools: tools_ifw tools_qtcreator,qt.tools.qtcreator + tools: tools_ifw tools_qtcreator,qt.tools.qtcreator tools_cmake tools_ninja tools_conan add-tools-to-path: ${{ matrix.qt.add-tools-to-path }} cache: ${{ matrix.cache == 'cached' }} @@ -220,26 +220,45 @@ jobs: shell: bash run: | echo "Path: ${PATH}" - # Check if QtIFW is installed - which archivegen - archivegen --version - - # Check if QtCreator is installed: QtCreator includes the CLI program 'qbs' on all 3 platforms - which qbs - qbs --version + set -x + + # tools_ifw: use `archivegen` to test that Tools/QtInstallerFramework/4.7/bin is added to path + # tools_qtcreator: use `qbs` to test that Tools/QtCreator/bin or "Qt Creator.app/Contents/MacOS/" is added to path + # tools_cmake: test that Tools/CMake/bin or Tools/CMake/CMake.app/Contents/bin is added to path + # tools_ninja: test that Tools/Ninja is added to path + # tools_conan: test that Tools/Conan is added to path + + for tool_name in archivegen qbs cmake ninja conan; do + which "${tool_name}" + "${tool_name}" --version + done + - name: Test that installed tools are not in the path if: ${{ matrix.qt.tools-only-build && !matrix.qt.add-tools-to-path }} shell: bash run: | echo "Path: ${PATH}" + set -x + # Check that QtIFW has been installed ls ../Qt/Tools/QtInstallerFramework/*/bin/ | grep archivegen - - # Check that QtIFW is not in the path - ! which archivegen - ! archivegen --version - - # Check that qbs (from QtCreator) is not in the path - ! which qbs - ! qbs --version + # Check that QtCreator has been installed + [[ -e "../Qt/Tools/QtCreator/bin/qbs" || -e "../Qt/Qt Creator.app/Contents/MacOS/qbs" ]] + # Check that CMake has been installed + [[ -e "../Qt/Tools/CMake/bin/cmake" || -e "../Qt/Tools/CMake/CMake.app/Contents/bin/cmake" ]] + # Check that Ninja has been installed + [[ -e "../Qt/Tools/Ninja/ninja" ]] + # Check that Conan has been installed + [[ -e "../Qt/Tools/Conan/conan" ]] + + # tools_ifw: use `archivegen` to test that Tools/QtInstallerFramework/4.7/bin is not added to path + # tools_qtcreator: use `qbs` to test that Tools/QtCreator/bin or "Qt Creator.app/Contents/MacOS/" is not added to path + # tools_cmake: test that Tools/CMake/bin or Tools/CMake/CMake.app/Contents/bin is not added to path + # tools_ninja: test that Tools/Ninja is not added to path + # tools_conan: test that Tools/Conan is not added to path + + for tool_name in archivegen qbs cmake ninja conan; do + ! which "${tool_name}" + ! "${tool_name}" --version + done From 8a51e2656bc250f5767ca9c6ec25fb31faa7e0bd Mon Sep 17 00:00:00 2001 From: Dave Dalcino Date: Sun, 29 Sep 2024 19:12:01 -0700 Subject: [PATCH 07/10] Add missing tool paths to PATH --- action/src/main.ts | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/action/src/main.ts b/action/src/main.ts index 8350942e..a7ac36c6 100644 --- a/action/src/main.ts +++ b/action/src/main.ts @@ -1,4 +1,5 @@ import * as crypto from "crypto"; +import * as fs from "fs"; import * as os from "os"; import * as path from "path"; import * as process from "process"; @@ -25,10 +26,32 @@ const setOrAppendEnvVar = (name: string, value: string): void => { core.exportVariable(name, newValue); }; -const toolsPaths = (installDir: string): string[] => - ["Tools/**/bin", "*.app/Contents/MacOS", "*.app/**/bin"].flatMap((p: string): string[] => - glob.sync(`${installDir}/${p}`) - ); +const dirExists = (dir: string): boolean => { + try { + return fs.statSync(dir).isDirectory(); + } catch (err) { + return false; + } +}; + +// Names of directories for tools (tools_conan & tools_ninja) that include binaries in the +// base directory instead of a bin directory (ie 'Tools/Conan', not 'Tools/Conan/bin') +const binlessToolDirectories = ["Conan", "Ninja"]; + +const toolsPaths = (installDir: string): string[] => { + const binlessPaths: string[] = binlessToolDirectories + .map((dir) => `${installDir}/Tools/${dir}`) + .filter((dir) => dirExists(dir)); + return [ + "Tools/**/bin", + "*.app/Contents/MacOS", + "*.app/**/bin", + "Tools/*/*.app/Contents/MacOS", + "Tools/*/*.app/**/bin", + ] + .flatMap((p: string): string[] => glob.sync(`${installDir}/${p}`)) + .concat(binlessPaths); +}; const pythonCommand = (command: string, args: readonly string[]): string => { const python = process.platform === "win32" ? "python" : "python3"; From e376b82caaf9ed6b9c8979b1bb52fe706faba92e Mon Sep 17 00:00:00 2001 From: Benjamin Owad Date: Sat, 12 Oct 2024 15:13:12 -0400 Subject: [PATCH 08/10] Test 6.8 instead of 6.7 --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 579ab78e..ccbe5dbb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,8 +51,8 @@ jobs: requested: "6.3.*" # In Qt 6.2.0+, qtwebengine requires qtpositioning and qtwebchannel modules: qtwebengine qtpositioning qtwebchannel - - version: "6.7.0" - requested: "6.7.0" + - version: "6.8.0" + requested: "6.8.0" modules: qtwebengine qtpositioning qtwebchannel - tools-only-build: true add-tools-to-path: true From b9760ab01f548abc52e3649b6ec31dbecfe229d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A5IGA?= <164882787+Xphalnos@users.noreply.github.com> Date: Sun, 20 Oct 2024 11:53:13 +0200 Subject: [PATCH 09/10] Use msvc2022 for Qt 6.7.3 --- action/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action/src/main.ts b/action/src/main.ts index f4ee293c..e6bc18d0 100644 --- a/action/src/main.ts +++ b/action/src/main.ts @@ -186,7 +186,7 @@ class Inputs { this.arch = "android_armv7"; } } else if (this.host === "windows") { - if (compareVersions(this.version, ">=", "6.8.0")) { + if (compareVersions(this.version, ">=", "6.7.3")) { this.arch = "win64_msvc2022_64"; } else if (compareVersions(this.version, ">=", "5.15.0")) { this.arch = "win64_msvc2019_64"; From 5d50465bcd509eb41c9bc309cd4ed800e0a80e82 Mon Sep 17 00:00:00 2001 From: Benjamin O Date: Thu, 7 Nov 2024 10:45:40 -0500 Subject: [PATCH 10/10] Revert "Test 6.8 instead of 6.7" This reverts commit e376b82caaf9ed6b9c8979b1bb52fe706faba92e. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ccbe5dbb..579ab78e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,8 +51,8 @@ jobs: requested: "6.3.*" # In Qt 6.2.0+, qtwebengine requires qtpositioning and qtwebchannel modules: qtwebengine qtpositioning qtwebchannel - - version: "6.8.0" - requested: "6.8.0" + - version: "6.7.0" + requested: "6.7.0" modules: qtwebengine qtpositioning qtwebchannel - tools-only-build: true add-tools-to-path: true