From 0b2eb5b106001184d7269fc47b361915b89be1a6 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Sun, 27 Sep 2026 02:31:26 +0800 Subject: [PATCH] [fix] bundle missing Slint runtime in Windows packages --- .github/workflows/build.yml | 20 ++++++-------------- apps/desktop/scripts/windows/nsis_script.nsi | 6 ++++-- apps/desktop/xmake/targets.lua | 9 +++++++-- docs/releases/v1.5.2.md | 12 ------------ 4 files changed, 17 insertions(+), 30 deletions(-) delete mode 100644 docs/releases/v1.5.2.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7f78163..40d863b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -689,7 +689,8 @@ jobs: @("crossdesk_service.exe", "crossdesk_service.exe"), @("crossdesk_session_helper.exe", "crossdesk_session_helper.exe"), @("crossdesk_privacy_cursor_helper.exe", "crossdesk_privacy_cursor_helper.exe"), - @("crossdesk_privacy_window.dll", "crossdesk_privacy_window.dll") + @("crossdesk_privacy_window.dll", "crossdesk_privacy_window.dll"), + @("slint_cpp.dll", "slint_cpp.dll") ) foreach ($file in $portableFiles) { @@ -791,23 +792,14 @@ jobs: echo "PATCH_NUMBER=${PATCH_NUMBER}" >> $GITHUB_OUTPUT - name: Prepare release notes - env: - RELEASE_TAG: ${{ steps.version.outputs.VERSION_WITH_V }} - VERSION_BASE: ${{ steps.version.outputs.VERSION_BASE }} run: | - if [[ -f "docs/releases/${RELEASE_TAG}.md" ]]; then - cp "docs/releases/${RELEASE_TAG}.md" release-notes.md - elif [[ -f "docs/releases/v${VERSION_BASE}.md" ]]; then - cp "docs/releases/v${VERSION_BASE}.md" release-notes.md - else - cat > release-notes.md << 'EOF' + cat > "$RUNNER_TEMP/release-notes.md" << 'EOF' Binary release only. Source code is not included. ## Code signing policy Free code signing provided by [SignPath.io](https://signpath.io/), certificate by [SignPath Foundation](https://signpath.org/). EOF - fi - name: Rename artifacts run: | @@ -833,7 +825,7 @@ jobs: prerelease: false files: release/* generate_release_notes: false - body_path: release-notes.md + body_path: ${{ runner.temp }}/release-notes.md - name: Create or update 'latest' tag run: | @@ -851,7 +843,7 @@ jobs: prerelease: false files: release/* generate_release_notes: false - body_path: release-notes.md + body_path: ${{ runner.temp }}/release-notes.md - name: Upload artifacts to server uses: burnett01/rsync-deployments@5.2 @@ -903,7 +895,7 @@ jobs: } EOF jq --arg release_name "Release ${{ steps.version.outputs.VERSION_WITH_V }}" \ - --rawfile release_notes release-notes.md \ + --rawfile release_notes "$RUNNER_TEMP/release-notes.md" \ '.releaseName = $release_name | .releaseNotes = $release_notes' \ version.json > version-with-notes.json mv version-with-notes.json version.json diff --git a/apps/desktop/scripts/windows/nsis_script.nsi b/apps/desktop/scripts/windows/nsis_script.nsi index e96d5a2e..bfd94ee0 100644 --- a/apps/desktop/scripts/windows/nsis_script.nsi +++ b/apps/desktop/scripts/windows/nsis_script.nsi @@ -90,8 +90,10 @@ installApp: File "..\..\..\..\build\windows\x64\release\crossdesk_session_helper.exe" File "..\..\..\..\build\windows\x64\release\crossdesk_privacy_cursor_helper.exe" File "..\..\..\..\build\windows\x64\release\crossdesk_privacy_window.dll" - ; Bundle runtime DLLs from the release output directory - File /x crossdesk_privacy_window.dll "..\..\..\..\build\windows\x64\release\*.dll" + ; Require the Slint runtime so an incomplete build cannot be packaged. + File "..\..\..\..\build\windows\x64\release\slint_cpp.dll" + ; Bundle the remaining runtime DLLs from the release output directory + File /x crossdesk_privacy_window.dll /x slint_cpp.dll "..\..\..\..\build\windows\x64\release\*.dll" ; Amyuni usbmmidd_v2 virtual display driver for headless hosts. xmake ; copies apps\desktop\resources\windows\usbmmidd_v2 into the release ; output directory after building crossdesk; its License.txt ships with it. diff --git a/apps/desktop/xmake/targets.lua b/apps/desktop/xmake/targets.lua index 8697c2c2..b8ea6f26 100644 --- a/apps/desktop/xmake/targets.lua +++ b/apps/desktop/xmake/targets.lua @@ -41,6 +41,11 @@ function setup_targets() os.cp(runtime_dll, target:targetdir()) end + -- Keep runtime deployment independent of each target's after_build callback. + rule("crossdesk.slint_runtime") + after_build(copy_slint_runtime) + rule_end() + -- Amyuni usbmmidd_v2 virtual display driver for headless Windows hosts. -- The installer and the portable archive pick it up from the target -- directory; the runtime looks for it next to the executables. @@ -208,7 +213,7 @@ function setup_targets() add_includedirs("apps/desktop/src/gui", "apps/desktop/src/gui/assets/fonts", "apps/desktop/src/gui/assets/localization") add_files("apps/desktop/tests/slint_ui_smoke_test.cpp") - after_build(copy_slint_runtime) + add_rules("crossdesk.slint_runtime") target("version_checker_test") set_kind("binary") @@ -569,6 +574,6 @@ function setup_targets() "apps/desktop/src/platform/linux/daemon_backend.cpp", "apps/desktop/src/platform/linux/headless/headless_session.cpp") end - after_build(copy_slint_runtime) + add_rules("crossdesk.slint_runtime") after_build(copy_usbmmidd_package) end diff --git a/docs/releases/v1.5.2.md b/docs/releases/v1.5.2.md deleted file mode 100644 index 697678bd..00000000 --- a/docs/releases/v1.5.2.md +++ /dev/null @@ -1,12 +0,0 @@ -# **更新内容** - -1. Windows 新增无显示器远程控制支持,内置虚拟显示器驱动,可自动创建 1920×1080 虚拟屏幕;无法启用时自动切换至兼容采集模式。 -2. 设置中新增“强制中继”选项,方便在直连不稳定的网络中使用中继连接。 -3. 主窗口新增随机密码刷新,优化密码重试时的输入体验,并统一为 6 位密码。 -4. 改善断线重连,修复旧会话阻碍重新连接及已保存密码未正确复用的问题。 -5. 修复 Windows 远程控制和 Web 控制中的键鼠输入、光标显示及会话路由问题。 -6. 改善 Windows 显示器热插拔后的屏幕编号、鼠标定位和隐私屏稳定性。 -7. 修复远程画面缩放后的鼠标位置偏差,以及部分视频帧无法正常显示的问题。 -8. 修复展开网络状态后屏幕切换菜单的位置偏移。 - -PC 客户端版本为 v1.5.2。Windows 无屏自动适配需将采集方式设为“自动”;自动安装和插入虚拟显示器需安装并运行 CrossDesk Service,或以管理员身份运行客户端。