From 44a12574aedf07da41b87cf466d46bf5c2670684 Mon Sep 17 00:00:00 2001 From: parhelia512 <0011d3@gmail.com> Date: Sat, 20 Sep 2025 13:09:45 +0800 Subject: [PATCH 1/3] ci: add Windows on Arm build --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++------ script/deploy_woa.sh | 22 +++++++++++++++++++++ 2 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 script/deploy_woa.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17eefa0..4e8b1a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,25 +17,28 @@ jobs: include: - cross_os: windows cross_arch: amd64 - go_version: "1.25.0" + go_version: "1.25.1" + - cross_os: windows + cross_arch: arm64 + go_version: "1.25.1" - cross_os: linux cross_arch: amd64 - go_version: "1.25.0" + go_version: "1.25.1" - cross_os: linux cross_arch: arm64 - go_version: "1.25.0" + go_version: "1.25.1" - cross_os: darwin cross_arch: amd64 go_version: "1.24.7" - cross_os: darwin cross_arch: arm64 - go_version: "1.25.0" + go_version: "1.25.1" - cross_os: windowslegacy cross_arch: amd64 - go_version: "1.25.0" + go_version: "1.25.1" - cross_os: windowslegacy cross_arch: 386 - go_version: "1.25.0" + go_version: "1.25.1" fail-fast: false runs-on: ubuntu-latest steps: @@ -94,6 +97,9 @@ jobs: - platform: windows-latest qt_version: "6.9.0" target: x86_64 + - platform: windows-11-arm + qt_version: "6.9.0" + target: arm64 - platform: ubuntu-22.04 qt_version: "6.9.0" target: amd64 @@ -130,6 +136,11 @@ jobs: uses: bwoodsend/setup-winlibs-action@v1.15 with: architecture: ${{ matrix.target }} + - name: Install MSVC compiler + if: matrix.platform == 'windows-11-arm' + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: arm64 - name: Download Artifacts uses: actions/download-artifact@v4.3.0 with: @@ -184,6 +195,17 @@ jobs: ninja -j2 cd .. ./script/deploy_windows.sh ${{ matrix.target }} + - name: WOA - Generate MakeFile and Build + shell: bash + if: matrix.platform == 'windows-11-arm' + run: | + mkdir build + cd build + curl -fLso srslist.h "https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h" + cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. + ninja -j2 + cd .. + ./script/deploy_woa.sh - name: Build Installer with NSIS shell: cmd if: matrix.platform == 'windows-latest' && matrix.qt_version != '6.2.12' @@ -286,6 +308,10 @@ jobs: zip -9 -r $version_standalone-windowslegacy64.zip Throne rm -rf Throne #### + mv windows-arm64 Throne + zip -9 -r $version_standalone-windows-arm64.zip Throne + rm -rf Throne + #### mkdir Throne mv macos-arm64/Throne.app Throne/Throne.app zip -9 --symlinks -r $version_standalone-macos-arm64.zip Throne diff --git a/script/deploy_woa.sh b/script/deploy_woa.sh new file mode 100644 index 0000000..88e8060 --- /dev/null +++ b/script/deploy_woa.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +source script/env_deploy.sh +DEST=$DEPLOYMENT/windows-arm64 +rm -rf $DEST +mkdir -p $DEST + +#### copy exe #### +cp $BUILD/Throne.exe $DEST + +cd download-artifact +cd *windows-arm64 +tar xvzf artifacts.tgz -C ../../ +cd ../.. + +#### deploy qt & DLL runtime #### +pushd $DEST +windeployqt Throne.exe --no-translations --no-system-d3d-compiler --no-opengl-sw --no-svg --verbose 2 +popd + +rm -rf $DEST/dxcompiler.dll $DEST/dxil.dll From 7806bc678638cf051e1b012322dd0093c21c660a Mon Sep 17 00:00:00 2001 From: parhelia512 <0011d3@gmail.com> Date: Sat, 20 Sep 2025 13:12:02 +0800 Subject: [PATCH 2/3] ci: revise permission access --- script/deploy_woa.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 script/deploy_woa.sh diff --git a/script/deploy_woa.sh b/script/deploy_woa.sh old mode 100644 new mode 100755 From 10283eafd1c4633b922a85aceca6ba6f30a9c4c4 Mon Sep 17 00:00:00 2001 From: parhelia512 <0011d3@gmail.com> Date: Sat, 20 Sep 2025 14:38:20 +0800 Subject: [PATCH 3/3] fix --- cmake/windows/windows.cmake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmake/windows/windows.cmake b/cmake/windows/windows.cmake index fb34cdf..9bcef01 100644 --- a/cmake/windows/windows.cmake +++ b/cmake/windows/windows.cmake @@ -13,12 +13,7 @@ generate_product_version( ) add_definitions(-DUNICODE -D_UNICODE -DNOMINMAX) set(GUI_TYPE WIN32) -if (MINGW) - if (NOT DEFINED MinGW_ROOT) - set(MinGW_ROOT "C:/msys64/mingw64") - endif () -else () +if (MSVC) add_compile_options("/utf-8") - add_compile_options("/std:c++17") add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS) endif ()