Skip to content

feat: 安装位置不在 Program Files 时,安装程序说明哪些文件仍在那里 - #154

Merged
Ray-lea merged 2 commits into
Ray-lea:mainfrom
digital-bombyx:feat/installer-program-files-note
Nov 22, 2026
Merged

Ray-lea merged 2 commits into
Ray-lea:mainfrom
digital-bombyx:feat/installer-program-files-note

Conversation

@digital-bombyx

Copy link
Copy Markdown
Contributor

改动概述 / Summary

安装位置不在 Program Files 时,安装页在安装位置下方显示一行说明:特权服务、管理员运行与内核传感器的文件仍位于 Program Files。默认位置的页面不变。

When the install folder is outside Program Files, the install page shows a note under the location line: files for the privileged service, "Run as administrator" and kernel sensors stay in Program Files. The page is unchanged for the default folder.

改动原因 / Motivation

Refs #136

选择 D 盘等其他文件夹安装后,用户会在 C:\Program Files 中看到 Argus Privileged、Argus Runtime 等文件夹,开启管理员运行时进程也从那里运行,因而以为程序没有安装到所选位置。这些组件以管理员或 SYSTEM 权限运行,必须放在只有管理员可写的目录,否则普通用户可替换它们来提升权限,所以不能移到安装目录;但安装时没有任何说明。

复现:运行安装程序 → “更改” → 选择 D:\Argus。期望:页面说明哪些文件仍会位于 Program Files 及原因。

改动思路 / Approach

只增加说明,不改变安装位置或组件的放置方式。说明仅在安装位置不在 $PROGRAMFILES64 下时显示(不区分大小写的前缀比较),此时安装位置一行上移,说明占据其下方两行;默认位置的布局与之前完全相同,避免挤占主按钮周围的空间。路径不写死在文案中,用新的 {programFiles} 占位符在运行时取 $PROGRAMFILES64。

改动明细 / Changes

  • packaging/windows/installer-ui.nsh:安装页新增说明文本;ArgusPlaceNote 按安装位置显示或隐藏说明,并移动安装位置与“更改”链接;更改位置后重新判断。
  • locales/*/installer.json:8 种语言新增 ArgusProgramFilesNote,术语沿用安装程序与设置页的现有译文(特权服务、管理员运行、内核传感器)。
  • scripts/lib/installer-locales.mjs:新增占位符 {programFiles} → $PROGRAMFILES64。

影响与依赖 / Impact and dependencies

  • 影响范围 / Affected behavior: 仅安装程序的安装页显示;安装行为不变。
  • 兼容性与权限 / Compatibility and permissions: 无 / None.
  • 依赖 PR 与合并顺序 / PR dependencies and merge order: 无 / None.

改动后界面截图 / UI screenshots

安装程序安装页,安装位置改为 F:\Argus;俄文系统语言,深色主题,100% 缩放。
Installer page with the install folder changed to F:\Argus; Russian system language, dark theme, 100% scale.

改动前(当前发布版)/ Before (current release) 改动后 / After
Before: no note After: note under the install location

验证 / Validation

  • 验证提交或构建版本 / Tested commit or build: e3878e9;预览安装程序由本提交的 renderInstaller 与 installerStrings 生成,内含开发构建的 argus.exe(仅查看页面,未执行安装)
  • 环境与数据来源 / Environment and data source: Windows 11 (26200),NSIS 3.13,俄文系统语言,深色主题
命令或操作步骤 / Command or steps 预期结果 / Expected 实际结果与证据 / Actual result and evidence
node scripts/i18n.mjs 8 种语言键与占位符一致 8 locales, 2347 keys each, OK
node --test scripts/tests/installer-locales.test.mjs scripts/tests/bundle.test.mjs scripts/tests/locale-validation.test.mjs 全部通过 9 passed
makensis 编译预览安装程序 无错误 通过(仅模板原有的 6010 警告)
默认位置 C:\Program Files\Argus 不显示说明,布局与之前相同 符合
“更改” → F:\Argus 安装位置上移,下方显示两行说明 符合,见截图
改回 Program Files 下的文件夹 说明隐藏,安装位置回到原位 符合
按安装程序字体(Segoe UI、Microsoft YaHei UI、Microsoft JhengHei UI、Yu Gothic UI,12 px)测量 8 种语言的说明宽度 每种语言不超过两行(452 px 宽) 均为两行
  • 未覆盖的场景与原因 / Unverified scenarios and reasons: 仅实际查看了俄文界面,其他语言按字体测量确认行数;未查看浅色主题与 125%/150% 缩放;未运行完整 pnpm check 与发布构建打包(改动限于安装程序界面与文案)。

提交前检查 / Checklist

  • 标题与提交信息符合 Conventional Commits / The title and commit messages follow Conventional Commits.
  • 已完成与改动范围相符的验证,并填写实际结果 / Validation appropriate to the change is complete and actual results are recorded.
  • 涉及 UI 的改动已附可直接查看的改后截图,交互与显示行为修复同样适用 / UI changes include viewable after screenshots, including interaction and visibility fixes.
  • 涉及持续开销的改动已附对照测量 / N/A
  • 新增或修改文案已同步全部支持的语言,遵循术语表,并通过 pnpm i18n / Added or changed UI text covers all supported locales, follows the glossary and passes pnpm i18n.
  • 行为变化已同步相关文档及受影响的官网演示 / N/A:仅新增安装页说明,安装行为不变
  • 依赖变化已更新 THIRD-PARTY-NOTICES.txt / N/A

特权服务、管理员运行与内核传感器的文件以管理员或 SYSTEM 权限运行,无论安装到哪里都放在
只有管理员可写的 Program Files 中,否则普通用户可以替换它们来提升权限。选择其他文件夹安装时,
用户此前看不到这一点,误以为程序没有安装到所选位置。现在安装页的安装位置不在 Program Files
时,其下方显示一行说明,安装位置随之上移;默认位置的页面不变,更改位置后即时更新。
安装文案新增 {programFiles} 占位符($PROGRAMFILES64)。

Refs Ray-lea#136
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-20T14:49:08.627740Z
We couldn’t complete this review. Comment @codex review to try again.
e3878e9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

安装位置不在 Program Files 时,不再在安装位置下方显示两行说明,改为在安装位置
文字之后显示信息图标(Segoe MDL2 Assets),指针悬停在图标或安装位置上时以提示
显示说明;路径较长时以省略号缩短,为图标留出位置。安装位置一行不再上移,页面
布局与默认位置相同。

说明改为“出于安全考虑,特权服务、管理员运行与内核传感器的文件仍存放在
{programFiles},仅在开启这些功能后创建。”,各语言同步修改。提示按页面宽度换行,
深色主题下使用深色样式,停留 30 秒。

Refs Ray-lea#136

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
@Ray-lea
Ray-lea merged commit 295a240 into Ray-lea:main Nov 22, 2026
Ray-lea added a commit that referenced this pull request Nov 22, 2026
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants