Skip to content

Commit dc77acb

Browse files
committed
Build windows Arm64 binaries
IB-6662 Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent 62f084e commit dc77acb

3 files changed

Lines changed: 25 additions & 21 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
container: ubuntu:${{ matrix.container }}
7070
strategy:
7171
matrix:
72-
container: ['22.04', '24.04', '25.04', '25.10']
72+
container: ['22.04', '24.04', '25.10']
7373
arch: ['amd64', 'arm64']
7474
env:
7575
DEBIAN_FRONTEND: noninteractive
@@ -112,7 +112,7 @@ jobs:
112112
container: fedora:${{ matrix.container }}
113113
strategy:
114114
matrix:
115-
container: [41, 42, 43]
115+
container: [42, 43]
116116
steps:
117117
- name: Download artifact
118118
uses: dawidd6/action-download-artifact@v11
@@ -139,10 +139,11 @@ jobs:
139139
path: build/qdigidoc4*.rpm
140140
windows:
141141
name: Build on Windows
142-
runs-on: windows-2022
142+
runs-on: ${{ matrix.platform == 'arm64' && 'windows-11-arm' || 'windows-2025' }}
143143
strategy:
144144
matrix:
145145
vcver: [143]
146+
platform: [x64, arm64]
146147
env:
147148
VER_SUFFIX: .VS${{ matrix.vcver }}
148149
steps:
@@ -155,7 +156,7 @@ jobs:
155156
with:
156157
workflow: build.yml
157158
branch: master
158-
name: msi_${{ matrix.vcver }}_x64
159+
name: msi_${{ matrix.vcver }}_${{ matrix.platform }}
159160
path: ./
160161
repo: open-eid/libdigidocpp
161162
- name: Install artifact
@@ -166,7 +167,7 @@ jobs:
166167
uses: actions/cache@v4
167168
with:
168169
path: ${{ github.workspace }}/vcpkg_cache
169-
key: vcpkg-${{ matrix.vcver }}-${{ hashFiles('vcpkg.json') }}
170+
key: vcpkg-${{ matrix.vcver }}-${{ matrix.platform }}-${{ hashFiles('vcpkg.json') }}
170171
- name: Prepare vcpkg
171172
uses: lukka/run-vcpkg@v11
172173
with:
@@ -178,12 +179,12 @@ jobs:
178179
- name: Install Qt
179180
uses: jurplel/install-qt-action@v4
180181
with:
181-
version: 6.9.2
182-
arch: win64_msvc2022_64
182+
version: 6.9.3
183+
arch: ${{ matrix.platform == 'arm64' && 'win64_msvc2022_arm64' || 'win64_msvc2022_64' }}
183184
- name: Setup dev env
184185
uses: ilammy/msvc-dev-cmd@v1
185186
with:
186-
arch: x64
187+
arch: ${{ matrix.platform }}
187188
- name: Install WiX
188189
run: |
189190
dotnet tool install -g wix --version 6.0.2
@@ -198,7 +199,7 @@ jobs:
198199
- name: Archive artifacts
199200
uses: actions/upload-artifact@v4
200201
with:
201-
name: msi_${{ matrix.vcver }}_x64
202+
name: msi_${{ matrix.vcver }}_${{ matrix.platform }}
202203
path: |
203204
build/*.msi
204205
build/*.appx

client/CMakeLists.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
get_target_property(qtCore_install_prefix Qt6::qmake IMPORTED_LOCATION)
2-
get_filename_component(qtCore_install_prefix ${qtCore_install_prefix} DIRECTORY)
31
get_filename_component(TSL_FILENAME ${TSL_URL} NAME_WLE)
42
set(TSL_LIST ${TSL_FILENAME} ${TSL_INCLUDE})
53
list(TRANSFORM TSL_LIST APPEND .xml)
@@ -16,7 +14,7 @@ else()
1614
OUTPUT ${TSL_LIST}
1715
DEPENDS TSLDownload
1816
COMMAND $<TARGET_FILE:TSLDownload> ${CMAKE_CURRENT_BINARY_DIR} ${TSL_URL} ${TSL_INCLUDE}
19-
WORKING_DIRECTORY ${qtCore_install_prefix}
17+
WORKING_DIRECTORY ${QT_HOST_PATH}
2018
)
2119
endif()
2220

@@ -241,10 +239,11 @@ elseif(WIN32)
241239
${CMAKE_SOURCE_DIR}/common/WelcomeDlg.wxs
242240
${CMAKE_SOURCE_DIR}/common/WixUI_Minimal.wxs
243241
)
242+
get_filename_component(QT_BASE_DIR "${Qt6_DIR}/../../.." ABSOLUTE)
244243
add_custom_target(msi DEPENDS ${PROJECT_NAME}
245244
COMMAND ${WIX_CMD} -o "${MSI_FILE}.msi"
246245
#Build MSI with QT
247-
COMMAND ${WIX_CMD} -d qt_path=${qtCore_install_prefix} -o "${MSI_FILE}.qt.msi"
246+
COMMAND ${WIX_CMD} -d qt_path=${QT_BASE_DIR}/bin -o "${MSI_FILE}.qt.msi"
248247
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
249248
)
250249
if(SIGNCERT)
@@ -261,10 +260,12 @@ elseif(WIN32)
261260
endif()
262261
set(PLATFORM $ENV{PLATFORM})
263262
configure_file(${CMAKE_SOURCE_DIR}/AppxManifest.xml.cmake ${CMAKE_BINARY_DIR}/AppxManifest.xml)
264-
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
265-
set(OPENSSL_SUFFIX "-x64")
266-
else()
263+
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
264+
set(OPENSSL_SUFFIX "-arm64")
265+
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
267266
set(OPENSSL_SUFFIX "")
267+
else()
268+
set(OPENSSL_SUFFIX "-x64")
268269
endif()
269270
add_custom_target(appx DEPENDS ${PROJECT_NAME}
270271
COMMAND ${CMAKE_COMMAND} -E remove ${MSI_FILE}.appx

qdigidoc4.wxs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<?if $(sys.BUILDARCH) = x64 ?>
2-
<?define OpenSSLSuffix = "-x64" ?>
3-
<?else?>
1+
<?if $(sys.BUILDARCH) = x86 ?>
42
<?define OpenSSLSuffix = "" ?>
3+
<?else?>
4+
<?define OpenSSLSuffix = "-$(sys.BUILDARCH)" ?>
55
<?endif?>
66

77
<?if $(env.VisualStudioVersion) = "17.0" ?>
@@ -18,7 +18,7 @@
1818

1919
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
2020
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
21-
<Package Name="DigiDoc4 Client" UpgradeCode="67932072-aa9e-45e3-b697-d825349f273d"
21+
<Package Name="DigiDoc4 Client $(sys.BUILDARCH)" UpgradeCode="67932072-aa9e-45e3-b697-d825349f273d"
2222
Language="1033" Version="!(bind.FileVersion.qdigidoc4.exe)" Manufacturer="RIA" Scope="perMachine">
2323
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
2424
<Icon Id="qdigidoc4.ico" SourceFile="$(var.ico_path)" />
@@ -92,9 +92,11 @@
9292
<File Source="$(var.qt_path)\Qt6PrintSupport$(var.qt_suffix).dll" />
9393
<File Source="$(var.qt_path)\Qt6Svg$(var.qt_suffix).dll" />
9494
<File Source="$(var.qt_path)\Qt6Widgets$(var.qt_suffix).dll" />
95+
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
96+
<?if $(sys.BUILDARCH) != arm64 ?>
9597
<File Source="$(var.qt_path)\D3DCompiler_47.dll" />
9698
<File Source="$(var.qt_path)\opengl32sw.dll" />
97-
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
99+
<?endif?>
98100
<File Subdirectory="platforms" Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
99101
<File Subdirectory="tls" Source="$(var.qt_path)\..\plugins\tls\qopensslbackend$(var.qt_suffix).dll" />
100102
<File Subdirectory="styles" Source="$(var.qt_path)\..\plugins\styles\qmodernwindowsstyle$(var.qt_suffix).dll" />

0 commit comments

Comments
 (0)