diff --git a/.github/actions/prepare-deps-win32/action.yml b/.github/actions/prepare-deps-win32/action.yml index fa1d690ce..e2378b70a 100644 --- a/.github/actions/prepare-deps-win32/action.yml +++ b/.github/actions/prepare-deps-win32/action.yml @@ -19,7 +19,7 @@ runs: choco install ` jom ` nasm ` - nodejs + wixtoolset & "C:\Program Files\OpenSSL\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- | Out-Host (Join-Path $Env:ProgramFiles NASM) | Out-File $Env:GITHUB_PATH -Append (Join-Path (Get-Item -Path "${Env:ProgramFiles(x86)}\WiX Toolset v3.*")[0].FullName bin) | Out-File $Env:GITHUB_PATH -Append diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index f2118426f..1bf492d20 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -504,12 +504,18 @@ jobs: windows: needs: [ what-to-make ] - runs-on: windows-2022 if: ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-dist == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }} strategy: fail-fast: false matrix: - arch: [x64, x86] + include: + - arch: x86 + runner: windows-2022 + - arch: x64 + runner: windows-2022 + - arch: arm64 + runner: windows-11-arm + runs-on: ${{ matrix.runner }} steps: - name: Show Configuration run: | diff --git a/dist/msi/CMakeLists.txt b/dist/msi/CMakeLists.txt index 9141b0e24..73e1ee2ec 100644 --- a/dist/msi/CMakeLists.txt +++ b/dist/msi/CMakeLists.txt @@ -1,9 +1,14 @@ include(UtilityFunctions.cmake) -if(CMAKE_SIZEOF_VOID_P EQUAL 8) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|ARM64)$") + set(ARCH arm64) + set(TR_OPENSSL_ARCH "-arm64") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) set(ARCH x64) + set(TR_OPENSSL_ARCH "-x64") else() set(ARCH x86) + set(TR_OPENSSL_ARCH "") endif() set(VERSION "${TR_USER_AGENT_PREFIX}") @@ -43,11 +48,6 @@ if(NOT TR_QT_DIR) set(TR_QT_DIR "$/..") endif() -set(TR_OPENSSL_ARCH) -if(ARCH STREQUAL "x64") - set(TR_OPENSSL_ARCH "-x64") -endif() - if(OPENSSL_VERSION MATCHES "^3[.]") set(TR_OPENSSL_CRYPTO_NAME "libcrypto-3${TR_OPENSSL_ARCH}.dll") set(TR_OPENSSL_SSL_NAME "libssl-3${TR_OPENSSL_ARCH}.dll") diff --git a/dist/msi/Transmission.wxs b/dist/msi/Transmission.wxs index b198fa53b..88637ac37 100644 --- a/dist/msi/Transmission.wxs +++ b/dist/msi/Transmission.wxs @@ -3,8 +3,8 @@ - - + + diff --git a/release/windows/build-openssl.ps1 b/release/windows/build-openssl.ps1 index fe8b2e2ce..ccc77a5ee 100644 --- a/release/windows/build-openssl.ps1 +++ b/release/windows/build-openssl.ps1 @@ -11,7 +11,12 @@ function global:Build-OpenSsl([string] $PrefixDir, [string] $Arch, [string] $Dep $SourceDir = Invoke-DownloadAndUnpack $Url $Filename $BuildDir = $SourceDir - $ConfigName = if ($Arch -eq 'x86') { 'VC-WIN32' } else { 'VC-WIN64A' } + $ConfigName = switch ($Arch) { + 'x86' { 'VC-WIN32' } + 'x64' { 'VC-WIN64A' } + 'arm64' { 'VC-WIN64-ARM' } + } + $ConfigOptions = @( "--prefix=${PrefixDir}" '--api=1.1.0' diff --git a/release/windows/build-qt6.ps1 b/release/windows/build-qt6.ps1 index 7433ccbdd..7a852b8d9 100644 --- a/release/windows/build-qt6.ps1 +++ b/release/windows/build-qt6.ps1 @@ -31,7 +31,6 @@ function global:Build-Qt6([string] $PrefixDir, [string] $Arch, [string] $DepsPre $BuildDir = Join-Path $SourceDir .build $ConfigOptions = @( - '-platform'; 'win32-msvc' '-opensource' '-confirm-license' '-prefix'; $PrefixDir @@ -112,11 +111,6 @@ function global:Build-Qt6([string] $PrefixDir, [string] $Arch, [string] $DepsPre "-DCMAKE_PREFIX_PATH=${DepsPrefixDir}" ) - if ($env:LDFLAGS) { - # Patch to add our linker flags, mainly /PDBALTPATH - Edit-TextFile (Join-Path $SourceDir qtbase mkspecs win32-msvc qmake.conf) '(^QMAKE_CXXFLAGS\b.*)' "`$1`nQMAKE_LFLAGS += ${env:LDFLAGS}" - } - # No need in GUI and some other tools Edit-TextFile (Join-Path $SourceDir qttools src CMakeLists.txt) 'TARGET Qt::Widgets' 'QT_FEATURE_designer' Edit-TextFile (Join-Path $SourceDir qttools src CMakeLists.txt) 'add_subdirectory[(]qdoc[)]' '' diff --git a/release/windows/main.ps1 b/release/windows/main.ps1 index 9ea5dbfd8..66d660366 100644 --- a/release/windows/main.ps1 +++ b/release/windows/main.ps1 @@ -6,7 +6,7 @@ Param( [string] $Mode, [Parameter(Mandatory=$true)] - [ValidateSet('x86', 'x64')] + [ValidateSet('x86', 'x64', 'arm64')] [string] $BuildArch, [Parameter()]