fix(packaging): 修复 Windows 安装与固件打包并完善客户端文案
构建客户端 / 检查(类型 + 单元测试) (push) Canceled after 0s
构建客户端 / Linux x64(deb + AppImage) (push) Canceled after 0s
构建客户端 / Windows x64(NSIS 安装包) (push) Canceled after 0s
构建客户端 / macOS 通用(.app + .dmg) (push) Canceled after 0s

- fix(installer): 修复低完整性产物无法写入临时目录的问题,并在 CI 打包前后检查完整性标签
- fix(firmware): 从本次 Cargo ELF 打包并同步配套镜像,修正短目录说明与 LLVM 搜索顺序
- fix(installer): 修复中文完成页和页眉遮挡,侧栏使用等比缩放的原始 Logo
- style(client): 应用图标增加圆角,统一“裁判系统客户端”命名
- fix(config): 安装提示改用可选本地热点配置,排除 Wi-Fi 凭据
- docs: 润色项目说明并统一裁判系统术语
- test(packaging): 补充 Windows 完整性和固件打包回归,覆盖外部输出目录、旧镜像与重复生成

验证:Windows NSIS 构建及原生页面预览;通用与本地安装配置编译;固件 release 构建、重复打包和客户端离线校验;6 项固件打包回归与 Windows 权限回归;git diff --check。未执行实机烧录。
This commit is contained in:
2026-10-21 09:25:17 +08:00
parent 6a0eb14b28
commit 054379dc64
52 changed files with 1070 additions and 280 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 12 KiB

+3 -3
View File
@@ -1,9 +1,9 @@
<!-- RMIC::2026 应用图标(矢量源)。
由 https://simba-robotics.com/logo.svg 生成:把原图 1024 画布的 viewBox 收窄、标志居中,
底色用界面的 --deep。位图(PNG / ICO / ICNS)由这一份光栅化得到;
底色沿用界面的深色背景,圆角之外透明。位图(PNG / ICO / ICNS)由这一份光栅化得到;
小尺寸另有一版更大的缩放比(见 docs/desktop/client.md 的「队标」一节)。 -->
<svg width="1024" height="1024" viewBox="0 0 270.93333 270.93333" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="270.93333" height="270.93333" fill="#080b12"/>
<svg width="1024" height="1024" viewBox="0 0 270.93333 270.93333" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">
<rect x="0" y="0" width="270.93333" height="270.93333" rx="56.44" fill="#080b12"/>
<g transform="translate(135.4667 135.4667) scale(0.82) translate(-135.28 -136.22)">
<g
inkscape:label="图层 1"

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

@@ -0,0 +1,32 @@
; Tauri-specific messages. Standard buttons, directory/install pages and
; uninstaller controls use NSIS's bundled SimpChinese language.
; This file is included after MUI_LANGUAGE, so it can override the NLF's font.
SetFont /LANG=${LANG_SIMPCHINESE} "Microsoft YaHei UI" 9
LangString addOrReinstall ${LANG_SIMPCHINESE} "重新安装或修复程序"
LangString alreadyInstalled ${LANG_SIMPCHINESE} "已安装此版本"
LangString alreadyInstalledLong ${LANG_SIMPCHINESE} "此电脑已安装客户端版本 ${VERSION}。请选择重新安装或卸载,然后点击“下一步”。"
LangString appRunning ${LANG_SIMPCHINESE} "RMIC::2026 正在运行。请先关闭软件,再重试。"
LangString appRunningOkKill ${LANG_SIMPCHINESE} "RMIC::2026 正在运行。$\n点击“确定”将关闭程序。"
LangString chooseMaintenanceOption ${LANG_SIMPCHINESE} "选择你所需的安装维护操作。"
LangString choowHowToInstall ${LANG_SIMPCHINESE} "请选择本软件安装范围。"
LangString createDesktop ${LANG_SIMPCHINESE} "创建桌面快捷方式"
LangString dontUninstall ${LANG_SIMPCHINESE} "保留现有版本并继续"
LangString dontUninstallDowngrade ${LANG_SIMPCHINESE} "保留现有版本"
LangString failedToKillApp ${LANG_SIMPCHINESE} "无法结束 RMIC::2026。请手动关闭软件后重试。"
LangString installingWebview2 ${LANG_SIMPCHINESE} "正在安装 WebView2 运行时……"
LangString newerVersionInstalled ${LANG_SIMPCHINESE} "此电脑已安装较新的 RMIC::2026。继续安装将降级,建议先卸载当前版本。请选择操作,然后点击“下一步”。"
LangString older ${LANG_SIMPCHINESE} "较旧"
LangString olderOrUnknownVersionInstalled ${LANG_SIMPCHINESE} "此电脑已安装 RMIC::2026,版本:$R4。建议先卸载现有程序,再安装新版本。请选择操作,然后点击“下一步”。"
LangString silentDowngrades ${LANG_SIMPCHINESE} "本安装包不允许静默降级。请打开安装界面选择维护操作。$\n"
LangString unableToUninstall ${LANG_SIMPCHINESE} "无法卸载现有程序。请关闭正在运行的 RMIC::2026 后重试。"
LangString uninstallApp ${LANG_SIMPCHINESE} "卸载 RMIC::2026"
LangString uninstallBeforeInstalling ${LANG_SIMPCHINESE} "先卸载现有程序,再继续安装"
LangString unknown ${LANG_SIMPCHINESE} "未知"
LangString webview2AbortError ${LANG_SIMPCHINESE} "WebView2 安装未完成,RMIC::2026 无法启动。请检查网络连接后重新运行安装程序。"
LangString webview2DownloadError ${LANG_SIMPCHINESE} "WebView2 下载失败。错误信息:$0"
LangString webview2DownloadSuccess ${LANG_SIMPCHINESE} "WebView2 安装引导程序已下载。"
LangString webview2Downloading ${LANG_SIMPCHINESE} "正在下载 WebView2 安装引导程序……"
LangString webview2InstallError ${LANG_SIMPCHINESE} "WebView2 安装失败,退出代码:$1"
LangString webview2InstallSuccess ${LANG_SIMPCHINESE} "WebView2 运行时已安装。"
LangString deleteAppData ${LANG_SIMPCHINESE} "同时删除应用数据"
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="132" height="57" viewBox="0 0 132 57">
<rect width="132" height="57" fill="#ffffff"/>
<image href="../icons/icon.svg" x="8" y="7" width="43" height="43"/>
<text x="61" y="26" font-family="monospace" font-size="15" font-weight="700" fill="#35475f">RMIC</text>
<text x="60" y="44" font-family="monospace" font-size="17" font-weight="700" fill="#e8232b">::2026</text>
</svg>

After

Width:  |  Height:  |  Size: 427 B

+47
View File
@@ -0,0 +1,47 @@
; Included by Tauri before its Modern UI pages. Keep the upstream installer
; template, upgrade handling and current-user installation behavior.
!ifndef RMIC_INSTALLER_THEME
!define RMIC_INSTALLER_THEME
; CJK dialog units have a different width/height ratio from the bitmap.
!define MUI_WELCOMEFINISHPAGE_BITMAP_STRETCH AspectFitHeight
; Header art is narrower than the standard 150px canvas so height-based
; scaling stays within the image area of the 9pt Chinese dialog.
!define MUI_HEADERIMAGE_BITMAP_STRETCH AspectFitHeight
!define MUI_WELCOMEPAGE_TITLE "欢迎安装$\r$\n裁判系统客户端"
!define MUI_WELCOMEPAGE_TEXT "本程序运行内存需求约为 400MB。$\r$\n$\r$\n点击“下一步”选择安装位置。"
!define MUI_DIRECTORYPAGE_TEXT_TOP "软件仅为当前 Windows 用户安装。请选择有写入权限的文件夹。"
!define MUI_FINISHPAGE_TITLE "安装完成"
; MUI reserves 60 dialog units above the two checkboxes: keep six short lines.
; Optional local guidance is excluded from version control.
!if /FileExists "${__FILEDIR__}/network.local.nsh"
!include "${__FILEDIR__}/network.local.nsh"
!endif
!ifdef RMIC_INSTALLER_WIFI_SSID & RMIC_INSTALLER_WIFI_PASS
!define MUI_FINISHPAGE_TEXT "裁判系统客户端已安装完成。$\r$\n首次启动请选择模式并绑定裁判系统。$\r$\n裁判系统会自动连接以下热点;请将$\r$\n本机也连接到同一网络。$\r$\n名称(SSID):${RMIC_INSTALLER_WIFI_SSID}$\r$\n密码:${RMIC_INSTALLER_WIFI_PASS}"
!else
!define MUI_FINISHPAGE_TEXT "裁判系统客户端已安装完成。$\r$\n首次启动请选择模式并绑定裁判系统。$\r$\n请让本机与裁判系统连接到同一网络。$\r$\n网络名称和密码请向现场工作人员确认。"
!endif
!define MUI_FINISHPAGE_TEXT_LARGE
!define MUI_FINISHPAGE_RUN_TEXT "启动裁判系统客户端"
!define MUI_INSTFILESPAGE_COLORS "E7ECF5 080B13"
!macro NSIS_HOOK_PREINSTALL
DetailPrint "正在安装 RMIC::2026 ${VERSION}。"
DetailPrint "安装位置:$INSTDIR"
!macroend
!macro NSIS_HOOK_POSTINSTALL
DetailPrint "程序文件与快捷方式已创建。请点击“下一步”完成安装。"
!macroend
!macro NSIS_HOOK_PREUNINSTALL
DetailPrint "正在移除 RMIC::2026 的程序文件与快捷方式。"
!macroend
!macro NSIS_HOOK_POSTUNINSTALL
DetailPrint "RMIC::2026 卸载步骤已完成。"
!macroend
!endif
+8
View File
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='utf-8'?>
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 270.93333 270.93333">
<g id="layer1">
<path d="m 120.18387,65.065937 -8.00358,13.862771 h 27.77765 l 0.0541,0.09409 30.76276,53.283672 -35.41234,61.33599 -0.008,0.0143 -7.99546,13.84855 -0.008,0.0143 h 16.00718 44.01701 l -5.80572,10.05592 h -66.94744 l -0.007,0.0105 h -6.48395 l 5.81384,-10.07013 8.00358,-13.86278 28.83631,-49.94524 8.0036,-13.86276 H 142.78056 114.57375 107.01421 83.392663 67.385498 l -8.004262,13.86276 -42.562363,73.72043 -8.0035837,13.86278 H 24.822458 84.211033 l -0.0914,0.15771 h 16.007157 11.36098 l 0.007,-0.0105 h 62.07111 16.00784 l 0.0105,-0.0175 h 41.16526 15.05748 16.00718 l -8.00358,-13.86278 -5.81181,-10.06608 -8.00358,-13.86276 h -16.00718 -12.5848 -16.00784 l -0.0156,0.0278 h -1.6347 -0.80551 -12.33705 l 27.39928,-47.45699 8.00358,-13.86276 -5.11392,-8.85783 -11.76441,-20.37651 h 31.64205 l 5.06519,-8.773893 2.9384,-5.088885 h -15.13465 -48.55152 l 8.00358,13.862778 h 0.0297 l 16.87765,29.23434 -35.40286,61.31975 h -13.23258 l 27.41688,-47.48812 8.00358,-13.8621 -8.00358,-13.86276 -22.75918,-39.420912 h 60.26447 l -8.00332,-13.862894 h -32.42792 v -0.09409 z M 75.389113,143.70806 h 23.62222 7.558857 28.2075 l -28.83633,49.94523 -8.003587,13.86278 -5.11257,8.85512 -5.1119,-8.85512 -8.00427,-13.86278 H 63.701872 46.553462 l 8.574205,-14.85103 8.003585,-13.86277 z" style="fill:#ffffff;stroke-width:0.904925;paint-order:stroke fill markers" id="path24" />
<path d="m 134.72691,41.313757 -8.00358,13.862771 h 62.89352 16.00718 31.56419 l -8.00358,-13.862771 h -31.5642 -16.00717 z" style="fill:#ffffff;stroke-width:1.17159;paint-order:stroke fill markers" id="path26" />
<path d="M 243.26673,60.098895 A 11.644196,11.644196 0 0 0 231.62281,71.742811 11.644196,11.644196 0 0 0 243.26673,83.386727 11.644196,11.644196 0 0 0 254.91131,71.742811 11.644196,11.644196 0 0 0 243.26673,60.098895 Z" style="fill:#ff0000;stroke-width:0.513476;paint-order:stroke fill markers" id="path25" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -0,0 +1,4 @@
; Copy to network.local.nsh and fill in the event's hotspot information.
; network.local.nsh is ignored by Git and must not be committed.
!define RMIC_INSTALLER_WIFI_SSID "现场热点名称"
!define RMIC_INSTALLER_WIFI_PASS "现场热点密码"
Binary file not shown.

After

Width:  |  Height:  |  Size: 650 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+14
View File
@@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="164" height="338" viewBox="0 0 164 338">
<rect width="164" height="338" fill="#080b13"/>
<path d="M0 126H164M0 150H164M0 174H164M0 198H164M0 222H164M22 110V246M46 110V246M70 110V246M94 110V246M118 110V246M142 110V246" stroke="#141d2c" fill="none"/>
<text x="18" y="27" font-family="monospace" font-size="9" fill="#94a1b8">SIMBA ROBOTICS</text>
<text x="17" y="62" font-family="monospace" font-size="29" font-weight="700" fill="#e7ecf5">RMIC</text>
<text x="17" y="92" font-family="monospace" font-size="26" font-weight="700" fill="#e8232b">::</text>
<text x="48" y="92" font-family="monospace" font-size="26" font-weight="700" fill="#e7ecf5">2026</text>
<path d="M18 103H146" stroke="#26344a"/>
<path d="M18 103H48" stroke="#e8232b"/>
<image href="logo.svg" x="18" y="117" width="128" height="128" preserveAspectRatio="xMidYMid meet"/>
<text x="18" y="290" font-family="sans-serif" font-size="13" font-weight="700" fill="#e7ecf5">裁判系统客户端</text>
<text x="18" y="314" font-family="sans-serif" font-size="9" fill="#94a1b8">仅供第九届机甲大师校内赛使用</text>
<text x="18" y="330" font-family="sans-serif" font-size="7.5" fill="#616e86">黑龙江大学 Simba 战队</text>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

+2 -2
View File
@@ -40,8 +40,8 @@
"active": true,
"targets": "all",
"category": "Utility",
"shortDescription": "RMIC::2026 —— 视野链路终端",
"longDescription": "RMIC::2026 视野链路终端。用户端:一路画面 + 装甲条与瞄准器。裁判端:两路画面 + 双方血量 + 装甲板发现列表 + 截图与录制。",
"shortDescription": "RMIC::2026 裁判系统客户端",
"longDescription": "RMIC::2026 裁判系统客户端。用户端:一路画面 + 装甲条与瞄准器。裁判端:两路画面 + 双方血量 + 装甲板发现列表 + 截图与录制。",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
+25
View File
@@ -0,0 +1,25 @@
{
"$schema": "https://schema.tauri.app/config/2",
"build": {
"beforeBuildCommand": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/prepare-windows-bundle.ps1 && pnpm build",
"beforeBundleCommand": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/prepare-windows-bundle.ps1"
},
"bundle": {
"windows": {
"nsis": {
"installMode": "currentUser",
"languages": ["SimpChinese"],
"displayLanguageSelector": false,
"customLanguageFiles": {
"SimpChinese": "installer/SimpChinese.nsh"
},
"installerHooks": "installer/hooks.nsh",
"installerIcon": "icons/icon.ico",
"uninstallerIcon": "icons/icon.ico",
"headerImage": "installer/header.bmp",
"sidebarImage": "installer/sidebar.bmp",
"uninstallerHeaderImage": "installer/header.bmp"
}
}
}
}