Files
LanMountainDesktop/docs/HOST_DISCOVERY.md
lincube 4cb52e56c7 Launcher (#4)
* 激进的更新

* 试试

* fix.可爱的我一直在修CI(

* fix.启动器一定要能够启动

* feat.尝试弄了AOT的启动器。

* fix.修CI,好像是因为Linux那边有个问题,反正修就对了。

* fix.ci难修,为什么liunx跑不起来呢?

* Update build.yml

* Update LanMountainDesktop.csproj

* changed.调整了启动逻辑,优化了更新页面。

* changed.优化了更新体验

* feat.依旧试增量更新这一块,看看velopack

* fix.我们试验性地修复了启动器无法正常启动的问题,原因可能是这个画面没有启动,就GUI没显示。然后还把编译问题修了一下。

* fix.继续修ci,ci怎么天天炸

* changed.velopack,试试rust

* fix.修ci,修融合桌面,修启动器

* fix.GitHub Action工作流怎么天天出问题

* feat.引入velopack,不好,是rust(至少内存很安全了。

* chore: migrate release pipeline to signed filemap and wire rainyun s3

* fix: make optional s3 upload step workflow-parse safe

* fix: make delta pack generation robust for empty diffs and linux paths

* chore: rotate launcher update public key for pdc signing

* fix: restore stable launcher update public key

* fix: sync launcher public key with update signing secret

* fix: normalize PEM line endings in signing key validation

* fix: rotate launcher public key to match ci signing secret

* fix: compare signing keys by SPKI instead of PEM text

* refactor update backend to host-managed PDC pipeline

* fix release workflow env key collisions

* relax publish-pdc precheck to require S3 only

* set GH_TOKEN for PDCC installer step

* ci: add local pdc mock fallback for release publish

* ci: fix pdc mock process log redirection

* ci: fallback pdcc signing key to update private key

* ci: ensure pdcc signing passphrase env is always set

* ci: create pdcc publish root before invoking client

* ci: set pdcc version variable from release version

* ci: decouple pdcc installer version from publish config version

* ci: package pdcc subchannels with generated filemap and changelog

* ci: make local pdc mock diff return empty for fast fallback

* ci: fix pdcc variable mapping and pdc signing prechecks

* Update App.axaml.cs

* ci: wire aws cli credentials for rainyun s3

* ci: pin pdcc client version separately from app version

* ci: harden local pdc mock transport handling

* ci: publish pdcc subchannels in one pass

* ci: add pdcc publish heartbeat and timeout

* ci: fix pdcc publish workdir bootstrap

* feat.Penguin Logistics Online Network Distribution System

* ci: fix plonds s3 probe and signing fallback

* ci: validate signing key and quiet missing baselines

* ci: relax aws checksum mode for rainyun s3

* ci: avoid multipart uploads to rainyun s3

* ci: handle empty plonds baselines safely

* ci.plonds

* Rebuild release pipeline around PLONDS and DDSS

* Fix Windows installer script path in release workflow
2026-04-21 20:59:52 +08:00

79 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 主程序发现配置指南
Launcher 支持灵活的主程序发现机制,可以通过多种方式配置主程序路径。
## 发现优先级
1. **环境变量** (`LMD_HOST_PATH`) - 最高优先级
2. **配置文件** (`host-discovery.json`)
3. **开发模式保存的路径** - 通过调试窗口选择
4. **部署目录** (`app-*`)
5. **开发路径** - 自动搜索解决方案中的 bin 目录
6. **额外配置路径** - 自定义搜索路径
7. **递归搜索** - 如果启用
## 配置方式
### 1. 环境变量
设置 `LMD_HOST_PATH` 环境变量指向主程序可执行文件:
```powershell
$env:LMD_HOST_PATH = "C:\MyApp\LanMountainDesktop.exe"
```
### 2. 配置文件
在应用根目录创建 `host-discovery.json`
```json
{
"HostPath": "C:\\Custom\\Path\\LanMountainDesktop.exe",
"AdditionalPaths": [
"${AppRoot}/custom",
"${UserProfile}/dev/build",
"C:/Program Files/LanMountainDesktop/*"
]
}
```
### 3. 开发模式
在错误窗口中按 `Ctrl+Shift+D` 打开调试窗口,启用开发模式并选择自定义路径。路径会自动保存,下次启动时优先使用。
## 路径变量
配置文件支持以下变量:
- `${AppRoot}` - 应用根目录
- `${BaseDirectory}` - Launcher 所在目录
- `${UserProfile}` - 用户主目录
- `${LocalAppData}` - 本地应用数据目录
## 通配符支持
`AdditionalPaths` 支持通配符:
```json
{
"AdditionalPaths": [
"C:/Builds/*/LanMountainDesktop.exe",
"${AppRoot}/versions/*/app.exe"
]
}
```
## 递归搜索
启用递归搜索可以自动在子目录中查找主程序:
```csharp
var options = new HostDiscoveryOptions
{
RecursiveSearch = true,
MaxRecursionDepth = 3
};
```
注意:递归搜索可能影响启动性能,建议仅在必要时启用。