diff --git a/.github/workflows/cmake-linux-codeql.yml b/.github/workflows/cmake-linux-codeql.yml index f760773a..93c98235 100644 --- a/.github/workflows/cmake-linux-codeql.yml +++ b/.github/workflows/cmake-linux-codeql.yml @@ -30,14 +30,14 @@ jobs: submodules: recursive persist-credentials: false - - uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 + - uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 with: languages: cpp queries: +security-and-quality - - uses: github/codeql-action/autobuild@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 + - uses: github/codeql-action/autobuild@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 - - uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 + - uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 with: upload: False output: sarif-results @@ -49,6 +49,6 @@ jobs: input: sarif-results/cpp.sarif output: sarif-results/cpp.sarif - - uses: github/codeql-action/upload-sarif@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 + - uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 with: sarif_file: sarif-results/cpp.sarif diff --git a/.github/workflows/cmake-macos.yml b/.github/workflows/cmake-macos.yml index 855f6e43..33a0edef 100644 --- a/.github/workflows/cmake-macos.yml +++ b/.github/workflows/cmake-macos.yml @@ -38,7 +38,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@48d3ad6db93f3627c8ee7a0454bc6f3744f7e730 # v4.3.1 with: - version: 6.10.3 + version: 6.11.2 arch: clang_64 cache: true diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index 78f412f5..909f7aaf 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -25,19 +25,19 @@ jobs: submodules: recursive persist-credentials: false - - name: Cache vcpkg + - name: Cache vcpkg and WiX uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | ${{ github.workspace }}/vcpkg_cache ~/.dotnet/tools ~/.wix - key: ${{ runner.os }}-${{ runner.arch }}-vcpkg-${{ hashFiles('./lib/libelectronic-id/vcpkg.json') }} + key: ${{ runner.os }}-${{ runner.arch }}-vcpkg-${{ hashFiles('./lib/libelectronic-id/vcpkg.json') }}-wix-7.0.0 - name: Install Qt x64 uses: jurplel/install-qt-action@48d3ad6db93f3627c8ee7a0454bc6f3744f7e730 # v4.3.1 with: - version: 6.11.1 + version: 6.11.2 arch: win64_msvc2022_64 cache: true aqtsource: git+https://github.com/miurahr/aqtinstall.git@16db45a70b5905ad596941b223469bc86a56901e @@ -50,7 +50,7 @@ jobs: - name: Install Qt arm64 uses: jurplel/install-qt-action@48d3ad6db93f3627c8ee7a0454bc6f3744f7e730 # v4.3.1 with: - version: 6.11.1 + version: 6.11.2 arch: win64_msvc2022_arm64_cross_compiled cache: true aqtsource: git+https://github.com/miurahr/aqtinstall.git@16db45a70b5905ad596941b223469bc86a56901e @@ -60,7 +60,7 @@ jobs: env: VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg_cache,readwrite run: | - .\build.ps1 -vcpkgroot C:\vcpkg -qt_dir $env:QT_DIR + .\build.ps1 -vcpkgroot C:\vcpkg -qt_dir $env:QT_DIR -acceptWixEULA - name: Test shell: pwsh diff --git a/CMakeLists.txt b/CMakeLists.txt index 85f7e9c0..3e5a87e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ elseif($ENV{CI_PIPELINE_IID}) else() set(BUILD_NUMBER 0) endif() -project(web-eid VERSION 2.10.0.${BUILD_NUMBER} +project(web-eid VERSION 2.11.0.${BUILD_NUMBER} DESCRIPTION "Web eID browser extension helper application" HOMEPAGE_URL https://github.com/web-eid/web-eid-app ) diff --git a/README.md b/README.md index 3908e993..e51defb7 100644 --- a/README.md +++ b/README.md @@ -314,7 +314,7 @@ To build the Debian package installer, run: - Download and install Git for Windows from https://git-scm.com/download/win - Download and install CMake from https://cmake.org/download/ - Install _Qt_ with the official [_Qt Online Installer_](https://www.qt.io/download-qt-installer), - choose _Custom installation > Qt 6.11.1_ and select the architecture(s) you need: + choose _Custom installation > Qt 6.11.2_ and select the architecture(s) you need: - _MSVC 2022 64-bit_ — for building the x64 binary - _MSVC 2022 ARM64_ — for building the ARM64 binary natively on an ARM64 host - _MSVC 2022 ARM64 (cross-compiled)_ — for building the ARM64 binary on an x64 host @@ -333,17 +333,19 @@ above, install the following: - Install _WiX_ toolset: - dotnet tool install --global wix --version 6.0.2 - wix extension -g add WixToolset.UI.wixext/6.0.2 - wix extension -g add WixToolset.Util.wixext/6.0.2 - wix extension -g add WixToolset.BootstrapperApplications.wixext/6.0.2 + dotnet tool install --global wix --version 7.0.0 + # After reviewing and accepting the WiX Toolset EULA: + wix eula accept wix7 + wix extension -g add WixToolset.UI.wixext/7.0.0 + wix extension -g add WixToolset.Util.wixext/7.0.0 + wix extension -g add WixToolset.BootstrapperApplications.wixext/7.0.0 Open _x64 Native Tools Command Prompt for VS 2022_, run `powershell` from that prompt and then run the following commands. This sets `PLATFORM=x64`, which the WiX installer target uses: git clone --recurse-submodules git@github.com:web-eid/web-eid-app.git cd web-eid-app - $QT_ROOT = "C:\Qt\6.11.1\msvc2022_64" # adjust arch suffix as needed + $QT_ROOT = "C:\Qt\6.11.2\msvc2022_64" # adjust arch suffix as needed $VCPKG_ROOT = "C:\vcpkg" $BUILD_TYPE = "RelWithDebInfo" @@ -367,17 +369,23 @@ To run tests: Use `build.ps1` to build both architectures and produce a combined installer bundle. WiX and vcpkg are installed automatically if not already present. +WiX 7 requires explicit acceptance of its [EULA](https://docs.firegiant.com/wix/osmf/). +After reviewing and accepting it, pass `-acceptWixEULA` on the first build to record +acceptance for the current user and computer: - powershell -ExecutionPolicy ByPass -File build.ps1 + powershell -ExecutionPolicy ByPass -File build.ps1 -acceptWixEULA + +Subsequent builds can omit `-acceptWixEULA`. Key parameters (all optional, with auto-detected defaults): | Parameter | Default | Description | |-----------------|----------------------|---------------------------------------------| -| `-qt_dir` | `C:\Qt\6.11.1` | Qt installation base directory | +| `-qt_dir` | `C:\Qt\6.11.2` | Qt installation base directory | | `-vcpkgroot` | `$env:VCPKG_ROOT` | vcpkg root directory | | `-crosscompile` | auto-detected | `$true` on x64 host, `$false` on ARM64 host | | `-sign` | _(none)_ | Certificate CN for code signing | +| `-acceptWixEULA` | `$false` | Record explicit acceptance of the WiX 7 EULA | ## Adding and updating translations diff --git a/build.ps1 b/build.ps1 index acabd3c1..a4dd4117 100644 --- a/build.ps1 +++ b/build.ps1 @@ -6,20 +6,30 @@ param( [string]$build_number = $(if ($null -eq $env:BUILD_NUMBER) {"0"} else {$env:BUILD_NUMBER}), [string]$version = (Select-String -Path "$webeid/CMakeLists.txt" -Pattern 'project\(web-eid VERSION (\d+\.\d+\.\d+)').Matches[0].Groups[1].Value + ".$build_number", [bool]$crosscompile = ($env:PROCESSOR_ARCHITECTURE -eq "AMD64"), - [string]$qt_dir = "C:\Qt\6.11.1", + [string]$qt_dir = "C:\Qt\6.11.2", [string]$qt_x64 = "$qt_dir\msvc2022_64", [string]$qt_arm64 = $(if ($crosscompile -and (Test-Path "$qt_dir\msvc2022_arm64_cross_compiled")) { "$qt_dir\msvc2022_arm64_cross_compiled" } else { "$qt_dir\msvc2022_arm64" }), [string]$buildtype = "RelWithDebInfo", - [string]$sign = $null + [string]$sign = $null, + [switch]$acceptWixEULA = $false ) $ErrorActionPreference = "Stop" -Try { & wix > $null } Catch { - & dotnet tool install --global --version 6.0.2 wix - & wix extension add -g WixToolset.UI.wixext/6.0.2 - & wix extension add -g WixToolset.Util.wixext/6.0.2 - & wix extension add -g WixToolset.BootstrapperApplications.wixext/6.0.2 +$installWixExtensions = $false +if(!(Get-Command wix -ErrorAction SilentlyContinue)) { + & dotnet tool install --global --version 7.0.0 wix + $installWixExtensions = $true +} + +if($acceptWixEULA) { + & wix eula accept wix7 +} + +if($installWixExtensions) { + & wix extension add -g WixToolset.UI.wixext/7.0.0 + & wix extension add -g WixToolset.Util.wixext/7.0.0 + & wix extension add -g WixToolset.BootstrapperApplications.wixext/7.0.0 } if(!(Test-Path -Path $vcpkgroot)) {