: Automating Qt Visual Studio 2022 Add-in Installation and Configuration in GitHub Actions
-
wrote on 10 Jul 2024, 11:22 last edited by
Hi,
I am seeking guidance on automating the installation and configuration of the Qt Visual Studio 2022 add-in using GitHub Actions. Here’s what I’ve done so far and where I need help:What I Have Achieved:
Successfully checked out the main project.
Automated the installation of Rust 1.76.0, Node.js, Yarn, and Python.What I Want to Achieve:
Install Qt VS plug-in: Automatically download and install qt-vsaddin-msvc2022-3.0.2.vsix.
Configure Qt Version and Path in Visual Studio2022: Use devenv.com to add Qt version 6.6.1 and set the path to the Qt installation in the repository (QT_PATH).Where I Am Stuck:
Qt VS Add-in Installation: The installation step for the Qt VS Add-in does not seem to execute properly in my GitHub Actions workflow.
Setting Qt Version: The command to set the Qt version in Visual Studio using devenv.com is not working as expected.
Relevant Code Snippets:env: QT_VERSION: 6.6.1 DEVENV_PATH2: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.com QT_PATH: ${{ github.workspace }}\Qt\6.6.1\msvc2019_64 permissions: contents: read jobs: build: runs-on: windows-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Install Visual Studio 2022 uses: microsoft/setup-msbuild@v1.0.2
Download and Install Qt VS plug-in:
- name: Download Qt VS add-in:
run: | curl -L -o qt-vsaddin-msvc2022-3.0.2.vsix https://download.qt.io/development_releases/vsaddin/3.0.2/qt-vsaddin-msvc2022-3.0.2.vsix start /wait msiexec /i qt-vsaddin-msvc2022-3.0.2.vsix /quiet shell: cmd
Set Qt Version in Visual Studio:
- name: Set Qt version in Visual Studio run: | "%DEVENV_PATH2%" /command "Qt5.QtOptions.QtVersions.AddVersion?Name=6.6.1&Path=%QT_PATH%" shell: cmd
Specific Issues:
Setting Qt Version and path: The command to set the Qt version using devenv.com fails to execute correctly.
1/1