Skip to content

Commit 2869516

Browse files
Windows 11 (arm64) - PR Artifacts - Vulkan headers - CPack workaround (#1866)
* Added Windows arm64 platform * test run * Added XProtect race condition workaround * Update Changelog * typo * Collect the correct QT dlls on Windows * Add SignalHandling to Windows * Add missing ENABLE_MDNS * Windows console updates * Clean-up * Add package build presets in preset template * Disable DirectX grabber per default * Correct output position param * Replaced exceptions by signaling errors in main program * Snap removed as it has its own repo NSIS replaced by INNO Setup Workflow adapted, as DX9 Grabber is no longer included * INNO Setup fixes * Set windows console to info output * Fix double message on "Default Password is set" * update inno setup * fix windows autostart + icon edit * Removed "-c" console option on Window * Removed "-c" console option on Window (2) * Rename "-v" & "--verbose" options to "-i" & "--info to not overlap with version information * Clean-up logging options * Remove hard exit()s when database and hyperion versions are not compatible * Fix Non schema elements were not removed when validating configuration * On Windows arm64 install Python 3.13.3 --------- Co-authored-by: LordGrey <[email protected]>
1 parent 37bf1cc commit 2869516

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1363
-2085
lines changed

.github/workflows/qt5_6.yml

Lines changed: 33 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
- name: 📥 Install dependencies
132132
uses: tecolicom/actions-use-homebrew-tools@v1
133133
with:
134-
tools: qt@${{ inputs.qt_version }} vulkan-headers coreutils
134+
tools: qt@${{ inputs.qt_version }} coreutils
135135
key: ${{ runner.os }}-${{ matrix.architecture }}-homebrew-packages-${{ inputs.qt_version }}
136136

137137
- name: 💾 Download Pre-Build Dependencies
@@ -146,25 +146,9 @@ jobs:
146146
- name: 👷 Build ${{ env.HINT }}
147147
shell: bash
148148
run: |
149-
# Remove once issue with Homebrew cache action is fixed
150-
brew reinstall --formula cmake
151-
152149
# Build
153150
cmake --preset macos-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }}
154-
cmake --build --preset macos-${{ env.BUILD_TYPE }}
155-
# CPack workaround for macOS 13
156-
attempt=0
157-
max_attempts=5
158-
while [ $attempt -lt $max_attempts ]; do
159-
if cd build && cpack; then
160-
echo "Package created successfully"
161-
break
162-
else
163-
echo "Failed to create package, retrying..."
164-
sleep 10
165-
fi
166-
attempt=$((attempt + 1))
167-
done
151+
cmake --build --preset macos-${{ env.BUILD_TYPE }} --target package
168152
env:
169153
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}
170154
HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }}
@@ -183,10 +167,20 @@ jobs:
183167
######################
184168

185169
windows:
186-
name: 🪟 Windows x64
187-
runs-on: windows-2022
170+
name: 🪟 Windows ${{ matrix.architecture }}
171+
runs-on: ${{ matrix.architecture == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
188172
env:
189-
LIBJPEG_TURBO_VERSION: 3.0.1
173+
LIBJPEG_TURBO_VERSION: 3.1.0
174+
strategy:
175+
fail-fast: false
176+
matrix:
177+
architecture: [ arm64, x64 ]
178+
isQt5:
179+
- ${{ inputs.qt_version == '5' }}
180+
exclude:
181+
- isQt5: true
182+
architecture: arm64
183+
190184
steps:
191185
- name: ⬇ Checkout
192186
uses: actions/checkout@v4
@@ -198,63 +192,48 @@ jobs:
198192
shell: bash
199193
run: tr -d '\n' < .version > temp && mv temp .version && echo -n "+PR${{ inputs.pull_request_number }}" >> .version
200194

201-
- name: 💾 Restore DirectX SDK (if available)
202-
uses: ethanjli/[email protected]
195+
- name: 📥 Install Python
196+
uses: actions/setup-python@v5
203197
with:
204-
url: https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe
205-
destination: .\installer\dxsdk-jun10.exe
206-
cache-key: dxsdk-jun10
207-
208-
- name: 💾 Restore libjpeg-turbo (if available)
209-
uses: ethanjli/[email protected]
210-
with:
211-
url: https://sourceforge.net/projects/libjpeg-turbo/files/${{ env.LIBJPEG_TURBO_VERSION }}/libjpeg-turbo-${{ env.LIBJPEG_TURBO_VERSION }}-vc64.exe
212-
destination: .\installer\libjpeg-turbo.exe
213-
cache-key: libjpeg-turbo
214-
215-
- name: 📥 Extract DirectX SDK & libjpeg-turbo
216-
run: |
217-
7z x -aoa .\installer\dxsdk-jun10.exe DXSDK/Include DXSDK/Lib -oC:\
218-
echo "DXSDK_DIR=C:\DXSDK" | Out-File -FilePath $env:GITHUB_ENV -Append
219-
7z x -aoa .\installer\libjpeg-turbo.exe bin include lib -oC:\turbojpeg
220-
echo "TURBOJPEG_DIR=C:\turbojpeg" | Out-File -FilePath $env:GITHUB_ENV -Append
221-
222-
- name: 📥 Install Vulkan SDK
223-
if: ${{ inputs.qt_version == '6' }}
224-
uses: jakoch/install-vulkan-sdk-action@v1
225-
with:
226-
install_runtime: false
227-
cache: true
228-
stripdown: true
198+
python-version: '3.13.3'
199+
architecture: ${{ matrix.architecture }}
229200

230201
- name: 📥 Install Qt
231-
uses: jurplel/install-qt-action@v4
202+
# If the following PR is merged, you can switch back to jurplel/install-qt-action
203+
# https://github.com/jurplel/install-qt-action/pull/273
204+
uses: jdpurcell/install-qt-action@v5
232205
with:
233-
version: ${{ inputs.qt_version == '6' && '6.8' || '5.15.*' }}
206+
version: ${{ inputs.qt_version == '6' && '6.8.*' || '5.15.*' }}
234207
target: 'desktop'
235208
modules: ${{ inputs.qt_version == '6' && 'qtserialport qtwebsockets' || '' }}
236209
cache: 'true'
237210
cache-key-prefix: 'cache-qt-windows'
211+
setup-python: 'false'
212+
213+
- name: 📥 Install latest CMake and Ninja
214+
uses: lukka/get-cmake@latest
238215

239216
- name: 🛠️ Setup MSVC
240217
uses: ilammy/msvc-dev-cmd@v1
218+
with:
219+
arch: ${{ matrix.architecture }}
241220

242221
- name: 💾 Download Pre-Build Dependencies
243222
id: dependencies
244223
uses: ./.github/actions/download-pre-built-deps
245224
with:
246225
os: 'windows'
247-
architecture: 'x64'
226+
architecture: ${{ matrix.architecture }}
248227
qt_version: ${{ inputs.qt_version }}
249-
build_type: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}
228+
build_type: ${{ inputs.event_name == 'pull_request' && 'relwithdebinfo' || 'release' }}
250229

251230
- name: 👷 Build ${{ env.HINT }}
252231
shell: cmd
253232
run: |
254233
cmake --preset windows-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }}
255234
cmake --build --preset windows-${{ env.BUILD_TYPE }} --target package
256235
env:
257-
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}
236+
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'relwithdebinfo' || 'release' }}
258237
HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }}
259238

260239
- name: 📦 Upload
@@ -264,7 +243,7 @@ jobs:
264243
name: ${{ inputs.event_name == 'pull_request' && env.NAME || format('artifact-{0}', env.NAME) }}
265244
path: ${{ inputs.event_name == 'pull_request' && 'build/*.exe' || 'build/Hyperion-*' }}
266245
env:
267-
NAME: ${{ inputs.qt_version == '6' && 'windows_x64_qt6' || 'windows_x64' }}
246+
NAME: ${{ inputs.qt_version == '6' && format('windows_{0}_qt6', matrix.architecture) || format('windows_{0}', matrix.architecture) }}
268247

269248
#####################################
270249
###### Publish GitHub Releases ######

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
### ⚠️ Breaking Changes
1010

11+
- Rename "-v" & "--verbose" options to "-i" & "--info to not overlap with version information
12+
1113
#### JSON-API
1214
- Standardized subscription update elements: `ledcolors-imagestream-update`, `ledcolors-ledstream-update`, and `logmsg-update` now return data under `data` instead of `result`.
1315
- Global configuration elements are now separated from instance-specific ones.
@@ -39,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3941
- Enhanced error dialog with additional details
4042
- LED preview displays the associated instance name
4143
- **HTTP Server:** Support for **Cross-Origin Resource Sharing (CORS)** (#1496)
44+
- **GitHub builds** Added Windows 11 on arm64 platform
4245

4346
#### JSON-API
4447
- New event subscriptions: `Suspend`, `Resume`, `Idle`, `IdleResume`, `Restart`, `Quit`
@@ -116,13 +119,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116119
- Use of smart pointers
117120
- UI code streamlining
118121
- Improved `install_pr` script
122+
- Replaced exceptions by signaling errors in main program and standalone grabbers
119123
- Enhanced resilience and error handling
120124

121125
- **Build:**
122126
- Updated **CompileHowto for macOS**. _Thanks to @Rastafabisch_ (#1757)
123127
- Added missing `ENABLE_MDNS`. _Thanks to @Links2004_ (#1711)
124128
- Build system now uses **pre-built dependencies** to reduce resource usage
125129
- Introduced **CMakePresets** and a **CMakeUserPresets** template
130+
- GitHub Windows, Pull request artifacts are built with RelWithDebInfo (#1865 )
126131

127132
#### JSON-API
128133
- Consistent token authorization across sessions and single requests
@@ -145,6 +150,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
145150
- Removed: `session-updates` subscription
146151
- Deprecated: `serverinfo/subscribe`
147152
- Use `subscribe` / `unsubscribe` subcommands instead
153+
- Deprecated: DirectX grabber in favour of the new DXGI DDA grabber
154+
- Removed "-c" console option on Windows. Hyperion can be started via terminal to get the required console output
148155

149156
## [2.0.16](https://github.com/hyperion-project/hyperion.ng/releases/tag/2.0.16) - 2024-01
150157

CMakeLists.txt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ if(${CMAKE_SYSTEM} MATCHES "Linux")
170170
set(DEFAULT_DEV_TINKERFORGE ON)
171171
set(DEFAULT_CEC ON)
172172
elseif (WIN32)
173-
set(DEFAULT_DX ON)
174173
set(DEFAULT_DDA ON)
175174
set(DEFAULT_MF ON)
176175
else()
@@ -204,6 +203,10 @@ if("${PLATFORM}" MATCHES "osx")
204203
set(DEFAULT_OSX ON)
205204
set(DEFAULT_AUDIO OFF)
206205

206+
elseif ("${PLATFORM}" MATCHES "windows")
207+
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386|i686|amd64|x86_64|AMD64")
208+
set(DEFAULT_DX OFF)
209+
endif()
207210
elseif ("${PLATFORM}" MATCHES "rpi")
208211
set(DEFAULT_DISPMANX ON)
209212
set(DEFAULT_DEV_WS281XPWM ON)
@@ -576,7 +579,7 @@ endif()
576579
# Search for Windows SDK
577580
if(MSVC)
578581
find_package(WindowsSDK REQUIRED)
579-
message(STATUS "WINDOWS SDK: ${WINDOWSSDK_LATEST_DIR} ${WINDOWSSDK_LATEST_NAME}")
582+
message(STATUS "WINDOWS SDK: ${WINDOWSSDK_LATEST_DIR} (${WINDOWSSDK_LATEST_NAME})")
580583
message(STATUS "MSVC VERSION: ${MSVC_VERSION}")
581584
endif()
582585

@@ -605,7 +608,11 @@ if(NOT DEFINED QTDIR)
605608
if(MSVC)
606609
FIRSTSUBDIR(SUBDIRQT "C:/Qt")
607610
if(NOT ${SUBDIRQT} STREQUAL "")
608-
set(QTDIR "${SUBDIRQT}/msvc2019_64")
611+
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64|ARM64|arm64")
612+
set(QTDIR "${SUBDIRQT}/msvc2019_arm64")
613+
else()
614+
set(QTDIR "${SUBDIRQT}/msvc2019_64")
615+
endif()
609616
endif()
610617
elseif ("${PLATFORM}" MATCHES "osx")
611618
foreach(QT_VERSION 6 5)
@@ -651,6 +658,11 @@ if("${QT_VERSION}" VERSION_LESS "${QT_MIN_VERSION}")
651658
message(FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}")
652659
endif()
653660

661+
# Pseydo target WrapVulkanHeaders::WrapVulkanHeaders for Qt6
662+
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6 AND NOT TARGET WrapVulkanHeaders::WrapVulkanHeaders)
663+
add_library(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE IMPORTED)
664+
endif()
665+
654666
find_package(Qt${QT_VERSION_MAJOR} ${QT_VERSION} COMPONENTS Core Gui Network Sql Widgets REQUIRED)
655667

656668
message(STATUS "Qt version used: ${QT_VERSION}")

CMakePresets.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@
9898
"CMAKE_BUILD_TYPE": "Release"
9999
}
100100
},
101+
{
102+
"name": "relwithdebinfo",
103+
"hidden": true,
104+
"cacheVariables": {
105+
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
106+
}
107+
},
101108
{
102109
"name": "ninja-base",
103110
"hidden": true,
@@ -166,6 +173,17 @@
166173
"rhs": "Windows"
167174
}
168175
},
176+
{
177+
"name": "windows-relwithdebinfo",
178+
"displayName": "Windows (RelWithDebInfo) (msvc)",
179+
"description": "Build with MSVC's CL as Release with Debug Symbols",
180+
"inherits": [ "base", "relwithdebinfo", "msvc" ],
181+
"condition": {
182+
"type": "equals",
183+
"lhs": "${hostSystemName}",
184+
"rhs": "Windows"
185+
}
186+
},
169187
{
170188
"name": "windows-debug",
171189
"displayName": "Windows (debug) (msvc)",
@@ -238,6 +256,19 @@
238256
"rhs": "Windows"
239257
}
240258
},
259+
{
260+
"name": "windows-relwithdebinfo",
261+
"displayName": "Windows (RelWithDebInfo) (msvc)",
262+
"description": "Build with MSVC's CL as Release with Debug Symbols",
263+
"configuration": "RelWithDebInfo",
264+
"targets": "all",
265+
"configurePreset": "windows-relwithdebinfo",
266+
"condition": {
267+
"type": "equals",
268+
"lhs": "${hostSystemName}",
269+
"rhs": "Windows"
270+
}
271+
},
241272
{
242273
"name": "windows-debug",
243274
"displayName": "Windows (debug) (msvc)",

assets/webconfig/js/content_index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,23 +292,23 @@ async function handlePasswordRequirement(event) {
292292
}
293293

294294
const loginEvent = await waitForEvent("cmd-authorize-login");
295-
handleLogin(loginEvent);
295+
handleLogin(loginEvent, token !== null);
296296
} else {
297297
$("#main-nav, #top-navbar").hide();
298298

299299
if (token) {
300300
requestTokenAuthorization(token);
301301

302302
const loginEvent = await waitForEvent("cmd-authorize-login");
303-
handleLogin(loginEvent);
303+
handleLogin(loginEvent, true);
304304
} else {
305305
loadContentTo("#page-content", "login");
306306
}
307307
}
308308
}
309309

310-
function handleLogin(event) {
311-
if (window.defaultPasswordIsSet && getStorage("suppressDefaultPwWarning") !== "true") {
310+
function handleLogin(event, isLoggedIn = false) {
311+
if (isLoggedIn && window.defaultPasswordIsSet && getStorage("suppressDefaultPwWarning") !== "true") {
312312
const msg = `
313313
<div class="text-right">
314314
${$.i18n('dashboard_message_do_not_show_again')}
@@ -336,7 +336,6 @@ function handleLogin(event) {
336336
async function handleSchema(event) {
337337
window.serverSchema = event.response.info;
338338
window.schema = window.serverSchema.properties;
339-
340339
}
341340

342341
function getStoredInstance() {

cmake/FindDebBuilder.cmake

Lines changed: 0 additions & 23 deletions
This file was deleted.

cmake/FindRpmBuilder.cmake

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)