mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
NSIS: add support for Windows ARM64 build
Qt >=6.8 can native compile on Windows ARM64 machine, and GitHub also provides windows-11-arm runner. so I think It's time to add support. I've tested from my branch and Snapdragon 8cx gen3 computer. all ci build passed. Closes #11465 PR #23328.
This commit is contained in:
36
.github/workflows/ci_windows.yaml
vendored
36
.github/workflows/ci_windows.yaml
vendored
@@ -10,8 +10,8 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
name: Build (${{ matrix.libt_version }}, ${{ matrix.config.arch }})
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
permissions:
|
||||
actions: write
|
||||
|
||||
@@ -19,6 +19,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
libt_version: ["2.0.11", "1.2.20"]
|
||||
config:
|
||||
- os: windows-latest
|
||||
arch: x64
|
||||
qt_arch: win64_msvc2022_64
|
||||
|
||||
env:
|
||||
boost_path: "${{ github.workspace }}/../boost"
|
||||
@@ -33,6 +37,8 @@ jobs:
|
||||
|
||||
- name: Setup devcmd
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.config.arch }}
|
||||
|
||||
- name: Install build tools
|
||||
run: |
|
||||
@@ -57,19 +63,19 @@ jobs:
|
||||
New-Item `
|
||||
-Force `
|
||||
-ItemType File `
|
||||
-Path "${{ env.vcpkg_path }}/triplets_overlay/x64-windows-static-md-release.cmake"
|
||||
-Path "${{ env.vcpkg_path }}/triplets_overlay/${{ matrix.config.arch }}-windows-static-md-release.cmake"
|
||||
# OpenSSL isn't compatible with `/guard:cf` flag so we omit it for now, see: https://github.com/openssl/openssl/issues/22554
|
||||
Add-Content `
|
||||
-Path "${{ env.vcpkg_path }}/triplets_overlay/x64-windows-static-md-release.cmake" `
|
||||
-Value @("set(VCPKG_TARGET_ARCHITECTURE x64)",
|
||||
-Path "${{ env.vcpkg_path }}/triplets_overlay/${{ matrix.config.arch }}-windows-static-md-release.cmake" `
|
||||
-Value @("set(VCPKG_TARGET_ARCHITECTURE ${{ matrix.config.arch }})",
|
||||
"set(VCPKG_LIBRARY_LINKAGE static)",
|
||||
"set(VCPKG_CRT_LINKAGE dynamic)",
|
||||
"set(VCPKG_BUILD_TYPE release)")
|
||||
# clear buildtrees after each package installation to reduce disk space requirements
|
||||
$packages = `
|
||||
"boost-build:x64-windows-static-md-release",
|
||||
"openssl:x64-windows-static-md-release",
|
||||
"zlib:x64-windows-static-md-release"
|
||||
"boost-build:${{ matrix.config.arch }}-windows-static-md-release",
|
||||
"openssl:${{ matrix.config.arch }}-windows-static-md-release",
|
||||
"zlib:${{ matrix.config.arch }}-windows-static-md-release"
|
||||
${{ env.vcpkg_path }}/vcpkg.exe upgrade `
|
||||
--no-dry-run `
|
||||
--overlay-triplets="${{ env.vcpkg_path }}/triplets_overlay"
|
||||
@@ -97,7 +103,7 @@ jobs:
|
||||
move "${{ github.workspace }}/../boost_*" "${{ env.boost_path }}"
|
||||
cd "${{ env.boost_path }}"
|
||||
#.\bootstrap.bat
|
||||
${{ env.vcpkg_path }}/installed/x64-windows-static-md-release/tools/boost-build/b2.exe `
|
||||
${{ env.vcpkg_path }}/installed/${{ matrix.config.arch }}-windows-static-md-release/tools/boost-build/b2.exe `
|
||||
stage `
|
||||
toolset=msvc `
|
||||
--stagedir=.\ `
|
||||
@@ -107,7 +113,7 @@ jobs:
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: "6.9.1"
|
||||
arch: win64_msvc2022_64
|
||||
arch: ${{ matrix.config.qt_arch }}
|
||||
archives: qtbase qtsvg qttools
|
||||
cache: true
|
||||
|
||||
@@ -134,7 +140,7 @@ jobs:
|
||||
-DBUILD_SHARED_LIBS=OFF `
|
||||
-Ddeprecated-functions=OFF `
|
||||
-Dstatic_runtime=OFF `
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md-release
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.config.arch }}-windows-static-md-release
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
|
||||
@@ -151,7 +157,7 @@ jobs:
|
||||
-DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/install/lib/cmake/LibtorrentRasterbar" `
|
||||
-DMSVC_RUNTIME_DYNAMIC=ON `
|
||||
-DTESTING=ON `
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md-release `
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.config.arch }}-windows-static-md-release `
|
||||
-DVERBOSE_CONFIGURE=ON `
|
||||
--graphviz=build/target_graph.dot
|
||||
cmake --build build --target qbt_update_translations
|
||||
@@ -196,7 +202,7 @@ jobs:
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}
|
||||
name: qBittorrent-CI_Windows-${{ matrix.config.arch }}_libtorrent-${{ matrix.libt_version }}
|
||||
path: upload
|
||||
|
||||
- name: Install NSIS
|
||||
@@ -207,10 +213,10 @@ jobs:
|
||||
- name: Create installer
|
||||
run: |
|
||||
7z x -o"dist/windows/" "dist/windows/NSISPlugins.zip"
|
||||
makensis /DQBT_DIST_DIR="../../upload/qBittorrent" /WX dist/windows/qbittorrent.nsi
|
||||
makensis /DQBT_CPU_ARCH="${{ matrix.config.arch }}" /DQBT_DIST_DIR="../../upload/qBittorrent" /WX dist/windows/qbittorrent.nsi
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}-setup
|
||||
name: qBittorrent-CI_Windows-${{ matrix.config.arch }}_libtorrent-${{ matrix.libt_version }}-setup
|
||||
path: dist/windows/qbittorrent_*_setup.exe
|
||||
|
||||
Reference in New Issue
Block a user