Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ name: Check
on:
pull_request:
workflow_dispatch:
inputs:
build_offline_installer:
description: Build and upload the offline Windows installer
type: boolean
default: false
workflow_call:

permissions:
Expand Down Expand Up @@ -44,6 +49,7 @@ jobs:

check:
name: Lint, test and build
if: github.event_name != 'workflow_dispatch' || !inputs.build_offline_installer
runs-on: windows-latest
timeout-minutes: 60
defaults:
Expand Down Expand Up @@ -97,3 +103,45 @@ jobs:
# After the builds above, which download the crate sources it reads.
- name: Third-party notices
run: node scripts/notices.mjs --check

offline-installer:
name: Build offline Windows installer
if: github.event_name == 'workflow_dispatch' && inputs.build_offline_installer
runs-on: windows-latest
timeout-minutes: 90
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .node-version
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
version: 12.14.0
- name: Install Rust
run: |
rustup toolchain install stable-x86_64-pc-windows-msvc --profile minimal --no-self-update
rustup default stable-x86_64-pc-windows-msvc
- run: pnpm install --frozen-lockfile
- name: Build NSIS installer
run: pnpm tauri build
- name: Verify bundled WebView2 installer
shell: pwsh
run: |
$setup = (Get-ChildItem target/release/bundle/nsis/*-setup.exe | Select-Object -First 1).FullName
$listing = & 7z l -slt $setup
if ($LASTEXITCODE -ne 0) { throw "7-Zip could not inspect $setup" }
if (-not ($listing | Select-String -SimpleMatch "MicrosoftEdgeWebView2RuntimeInstaller.exe")) {
throw "The installer does not contain the WebView2 offline runtime installer"
}
Get-FileHash $setup -Algorithm SHA256
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: argus-offline-installer
path: target/release/bundle/nsis/*-setup.exe
if-no-files-found: error
retention-days: 7
6 changes: 3 additions & 3 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ Get the latest version from [GitHub Releases](https://github.com/Ray-lea/Argus/r

| File | Description |
|---|---|
| `Argus_<version>_x64-setup.exe` | **Installer (recommended).** Installs for all users into Program Files; installing and updating require administrator permission. Supports in-app updates. |
| `Argus_<version>_x64.exe` | **Portable version.** Runs directly and shares settings and data with the installed version; no automatic updates. |
| `Argus_<version>_x64-setup.exe` | **Installer (recommended).** Includes the WebView2 Runtime for offline installation. Installs for all users into Program Files; installing and updating require administrator permission. Supports in-app updates. |
| `Argus_<version>_x64.exe` | **Portable version.** Requires an existing WebView2 Runtime installation. Runs directly and shares settings and data with the installed version; no automatic updates. |
| `SHA256SUMS.txt` | SHA-256 checksums of the files above. |

> [!NOTE]
Expand All @@ -79,7 +79,7 @@ Get the latest version from [GitHub Releases](https://github.com/Ray-lea/Argus/r
## 💻 System requirements

- Windows 10 version 22H2 (build 19045) or later, including Windows 11; x64 only
- WebView2 Runtime (included in Windows 11)
- WebView2 Runtime (included in Windows 11; installed offline by the installer if missing)

See [compatibility](docs/guide/hardware-data.md#系统兼容范围) (Chinese) for tested Windows versions, feature differences and permission requirements.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ Argus 通过 Rust 直接读取 Windows 原生接口,以 Tauri 2 与 SolidJS

| 文件 | 说明 |
|---|---|
| `Argus_<版本>_x64-setup.exe` | **安装版(推荐)**。为所有用户安装到 Program Files,安装与更新需要管理员授权;支持应用内更新。 |
| `Argus_<版本>_x64.exe` | **免安装版**。直接运行,与安装版共用设置与数据,不支持自动更新。 |
| `Argus_<版本>_x64-setup.exe` | **安装版(推荐)**。内含 WebView2 运行时,可在离线环境安装;为所有用户安装到 Program Files,安装与更新需要管理员授权;支持应用内更新。 |
| `Argus_<版本>_x64.exe` | **免安装版**。直接运行,需系统已安装 WebView2 运行时;与安装版共用设置与数据,不支持自动更新。 |
| `SHA256SUMS.txt` | 上述文件的 SHA-256 校验值。 |

> [!NOTE]
Expand All @@ -79,7 +79,7 @@ Argus 通过 Rust 直接读取 Windows 原生接口,以 Tauri 2 与 SolidJS
## 💻 系统要求

- Windows 10 22H2(内部版本 19045)及以上版本,包括 Windows 11;仅支持 x64 架构
- WebView2 运行时(Windows 11 已内置)
- WebView2 运行时(Windows 11 已内置;安装版在缺少时离线安装)

已验证的系统版本、功能差异与权限要求见[兼容范围](docs/guide/hardware-data.md#系统兼容范围)。

Expand Down
8 changes: 6 additions & 2 deletions docs/development/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

推送到分支不会触发检查,也没有 nightly 或定时构建。推送前在本地运行 `start.bat check`:它包含 `check.yml` 中的 TypeScript、Biome、文案检查、前端单元测试、rustfmt 和 Clippy,不含前端构建、Rust 单元测试和许可声明检查。

需要单独取得未签名的离线安装包时,在 Actions 页面手动运行 `Check`,选择包含改动的分支并勾选 `build_offline_installer`。该模式在 Windows 上构建 NSIS 安装包、确认其中包含 WebView2 离线安装器,然后上传保留 7 天的 `argus-offline-installer` 工作流产物;不创建版本标签、更新签名或 GitHub Release。未勾选时仍运行原有检查。

## 提交信息

```text
Expand Down Expand Up @@ -129,13 +131,15 @@ gh run watch # 选择刚开始的 Check,等待结束

| 文件 | 说明 |
|---|---|
| `Argus_<版本>_x64-setup.exe` | NSIS 安装程序:为所有用户安装到 Program Files(需要管理员授权)、按 Windows 显示语言使用简体中文或英文界面、不允许降级;单页安装界面,已安装旧版本时原地升级;卸载时询问是否一并卸载特权服务,并做任务管理器恢复检查。界面见[安装程序](#安装程序) |
| `Argus_<版本>_x64.exe` | 免安装版主程序(即 `argus.exe`)。与安装版使用相同的设置、历史和开机启动项,数据同样在 `%APPDATA%`、`%LOCALAPPDATA%`,不能应用内更新。放在标准用户可写的文件夹时,安装特权服务存在被替换提权的风险,见[设置 → 权限](../guide/settings.md#权限) |
| `Argus_<版本>_x64-setup.exe` | NSIS 安装程序:内含 WebView2 Evergreen 完整安装器,缺少运行时时可离线安装;为所有用户安装到 Program Files(需要管理员授权)、按 Windows 显示语言使用简体中文或英文界面、不允许降级;单页安装界面,已安装旧版本时原地升级;卸载时询问是否一并卸载特权服务,并做任务管理器恢复检查。界面见[安装程序](#安装程序) |
| `Argus_<版本>_x64.exe` | 免安装版主程序(即 `argus.exe`),需系统预先安装 WebView2 运行时。与安装版使用相同的设置、历史和开机启动项,数据同样在 `%APPDATA%`、`%LOCALAPPDATA%`,不能应用内更新。放在标准用户可写的文件夹时,安装特权服务存在被替换提权的风险,见[设置 → 权限](../guide/settings.md#权限) |
| `SHA256SUMS.txt` | 上面两个文件的 SHA-256,可用 `sha256sum -c SHA256SUMS.txt` 校验 |
| `latest.json`、`beta.json` | 应用内更新的清单,只在稳定版上,见[更新通道](#更新通道) |

带预发布后缀的版本标记为 Pre-release。程序没有代码签名,首次运行时 Windows SmartScreen 会提示“未知发布者”。

安装包使用 Tauri 的 `offlineInstaller` 模式:构建机在打包时获取 WebView2 Evergreen 完整安装器,并将其封装进 NSIS 安装包;目标机器缺少 WebView2 时,安装程序直接使用包内文件。安装包体积因此增加约 127 MB。此前已发布的安装包不受此配置影响。

## 更新签名密钥

Windows Authenticode 的测试接入见 [Windows 代码签名](signing.md)。测试签名工作流独立于正式发布;以下密钥仍用于应用内更新验证,与 Windows 代码签名证书分开管理。
Expand Down
3 changes: 3 additions & 0 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
],
"windows": {
"allowDowngrades": false,
"webviewInstallMode": {
"type": "offlineInstaller"
},
"nsis": {
"installMode": "perMachine",
"languages": [
Expand Down