Version packages and standardize installation paths
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Version>0.1.0</Version>
|
<Version>0.1.1</Version>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $env:NuGetAudit='false'
|
|||||||
.\packaging\package.ps1 -Target ClientTermuxDeb
|
.\packaging\package.ps1 -Target ClientTermuxDeb
|
||||||
```
|
```
|
||||||
|
|
||||||
封装需要 [nFPM](https://nfpm.goreleaser.com/) 2.47.0 和 [WiX Toolset](https://wixtoolset.org/) 6.0.2。脚本默认从 `temp/tools/nfpm/nfpm.exe`、`temp/tools/wix.exe` 寻找,也可传 `-NfpmPath`、`-WixPath`。输出在 `artifacts/packages/`;这两个工具和发布产物均不提交仓库。Fedora/RHEL 的 ARM64 RPM 尚未配置。
|
封装需要 [nFPM](https://nfpm.goreleaser.com/) 2.47.0 和 [WiX Toolset](https://wixtoolset.org/) 6.0.2。脚本默认从 `temp/tools/nfpm/nfpm.exe`、`temp/tools/wix.exe` 寻找,也可传 `-NfpmPath`、`-WixPath`。输出在 `artifacts/packages/<版本>/`,例如 `artifacts/packages/0.1.1/`;这两个工具和发布产物均不提交仓库。Fedora/RHEL 的 ARM64 RPM 尚未配置。
|
||||||
|
|
||||||
## Server RPM 首次部署前提
|
## Server RPM 首次部署前提
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ Server 运行时只需 `--config /etc/charac/workspace-access.config`。这一
|
|||||||
|
|
||||||
服务单元保留 `ProtectSystem=strict`,并用 `ReadWritePaths=/tmp` 允许 .NET 在 `/tmp` 创建本机管理通道的 Unix socket 和 Data Protection 临时文件。不要启用 `PrivateTmp`:管理命令从服务外部以同一个 `charac` 账户连接该 socket,需要看到同一个 `/tmp`。已安装旧 RPM 的机器可先执行 `sudo systemctl edit charac-server`,在 `[Service]` 下添加 `ReadWritePaths=/tmp`,保存后运行 `sudo systemctl daemon-reload && sudo systemctl restart charac-server`;新版 RPM 将直接包含这一设置。
|
服务单元保留 `ProtectSystem=strict`,并用 `ReadWritePaths=/tmp` 允许 .NET 在 `/tmp` 创建本机管理通道的 Unix socket 和 Data Protection 临时文件。不要启用 `PrivateTmp`:管理命令从服务外部以同一个 `charac` 账户连接该 socket,需要看到同一个 `/tmp`。已安装旧 RPM 的机器可先执行 `sudo systemctl edit charac-server`,在 `[Service]` 下添加 `ReadWritePaths=/tmp`,保存后运行 `sudo systemctl daemon-reload && sudo systemctl restart charac-server`;新版 RPM 将直接包含这一设置。
|
||||||
|
|
||||||
Client RPM 安装自包含程序到 `/opt/charac/client`,并提供 `/usr/bin/charac` 命令。Windows MSI 安装到 `Program Files\nitload\Charac Client`,把安装目录加入系统 `PATH`;新终端可运行 `charac.exe --help`。MSI 内嵌所需文件,不依赖独立 CAB。两个 Client 包均不预置登录令牌或目标配置。
|
Client RPM 安装自包含程序到 `/opt/charac/client`,并提供 `/usr/bin/charac` 命令。Windows MSI 以 per-machine 方式安装到 `Program Files\nitload\charac`,会触发 UAC 管理员授权,并把安装目录加入系统 `PATH`;新终端可运行 `charac.exe --help`。MSI 内嵌所需文件,不依赖独立 CAB。两个 Client 包均不预置登录令牌或目标配置。
|
||||||
|
|
||||||
RPM 尚需在目标 Fedora/RHEL 机器进行实际安装、升级、卸载和 systemd 验收;Termux DEB 尚需在真实 Android/Termux 设备上安装、启动和登录验收;MSI 尚需在正常启用 Windows Installer 服务的 Windows 机器进行安装、升级、卸载验收。当前构建环境完成了 RPM 生成及文件头检查、Termux DEB 控制字段和文件路径检查、MSI 生成及文件表反编译检查;受限环境里的 ICE 校验无法连接 Windows Installer 服务。
|
RPM 尚需在目标 Fedora/RHEL 机器进行实际安装、升级、卸载和 systemd 验收;Termux DEB 尚需在真实 Android/Termux 设备上安装、启动和登录验收;MSI 尚需在正常启用 Windows Installer 服务的 Windows 机器进行安装、升级、卸载验收。当前构建环境完成了 RPM 生成及文件头检查、Termux DEB 控制字段和文件路径检查、MSI 生成及文件表反编译检查;受限环境里的 ICE 校验无法连接 Windows Installer 服务。
|
||||||
Client 可在用户级 INI 的 `[client] server` 写入默认 HTTPS origin,样例见仓库根目录 `client.config.example`;Client RPM 另安装到 `/usr/share/doc/charac-client/client.config.example`,MSI 则安装到程序目录。Windows 默认读取 `%APPDATA%\Charac\client.config`;Linux/Termux 默认读取 `$XDG_CONFIG_HOME/charac/client.config`,未设置时读取 `~/.config/charac/client.config`。首次执行无配置的 Client 命令会自动创建默认配置目录,但不会写入服务器地址。之后可直接执行 `charac connect`(Windows 为 `charac.exe connect`),或使用更短的 `charac connect https://access.example.com`;`--server <origin>` 可临时覆盖,`--config <路径>` 可在命令前选用其他配置。该文件只存入口地址,不存 OIDC 令牌;旧版 `%APPDATA%\CharRAC`、`~/.config/char-rac` 配置在新位置不存在时仍会自动读取。Client 安装级设备凭据仍独立存于用户本地应用数据目录,不能复制到多台设备共用。
|
Client 可在用户级 INI 的 `[client] server` 写入默认 HTTPS origin,样例见仓库根目录 `client.config.example`;Client RPM 另安装到 `/usr/share/doc/charac-client/client.config.example`,MSI 则安装到程序目录。Windows 默认读取 `%APPDATA%\Charac\client.config`;Linux/Termux 默认读取 `$XDG_CONFIG_HOME/charac/client.config`,未设置时读取 `~/.config/charac/client.config`。首次执行无配置的 Client 命令会自动创建默认配置目录,但不会写入服务器地址。之后可直接执行 `charac connect`(Windows 为 `charac.exe connect`),或使用更短的 `charac connect https://access.example.com`;`--server <origin>` 可临时覆盖,`--config <路径>` 可在命令前选用其他配置。该文件只存入口地址,不存 OIDC 令牌;旧版 `%APPDATA%\CharRAC`、`~/.config/char-rac` 配置在新位置不存在时仍会自动读取。Client 安装级设备凭据仍独立存于用户本地应用数据目录,不能复制到多台设备共用。
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ param(
|
|||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
$repository = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
$repository = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
||||||
$version = ([xml](Get-Content -LiteralPath (Join-Path $repository 'Directory.Build.props') -Raw)).Project.PropertyGroup.Version
|
$version = ([xml](Get-Content -LiteralPath (Join-Path $repository 'Directory.Build.props') -Raw)).Project.PropertyGroup.Version
|
||||||
$packages = Join-Path $repository 'artifacts/packages'
|
$packages = Join-Path $repository "artifacts/packages/$version"
|
||||||
$scratch = Join-Path $repository 'temp/packaging'
|
$scratch = Join-Path $repository 'temp/packaging'
|
||||||
New-Item -ItemType Directory -Path $packages, $scratch -Force | Out-Null
|
New-Item -ItemType Directory -Path $packages, $scratch -Force | Out-Null
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
UpgradeCode="0F2E0762-42F8-431B-BA94-B8BD63B0C103" Scope="perMachine">
|
UpgradeCode="0F2E0762-42F8-431B-BA94-B8BD63B0C103" Scope="perMachine">
|
||||||
<MajorUpgrade DowngradeErrorMessage="A newer Charac Client is already installed." />
|
<MajorUpgrade DowngradeErrorMessage="A newer Charac Client is already installed." />
|
||||||
<MediaTemplate EmbedCab="yes" />
|
<MediaTemplate EmbedCab="yes" />
|
||||||
<StandardDirectory Id="ProgramFiles6432Folder">
|
<StandardDirectory Id="ProgramFiles64Folder">
|
||||||
<Directory Id="CompanyFolder" Name="nitload">
|
<Directory Id="CompanyFolder" Name="nitload">
|
||||||
<Directory Id="INSTALLFOLDER" Name="Charac Client" />
|
<Directory Id="INSTALLFOLDER" Name="charac" />
|
||||||
</Directory>
|
</Directory>
|
||||||
</StandardDirectory>
|
</StandardDirectory>
|
||||||
<Component Id="ClientPath" Directory="INSTALLFOLDER" Guid="*">
|
<Component Id="ClientPath" Directory="INSTALLFOLDER" Guid="*">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<ApplicationId>com.nitload.charac</ApplicationId>
|
<ApplicationId>com.nitload.charac</ApplicationId>
|
||||||
<RootNamespace>Charac.Android</RootNamespace>
|
<RootNamespace>Charac.Android</RootNamespace>
|
||||||
<ApplicationVersion>1</ApplicationVersion>
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>0.1.1</ApplicationDisplayVersion>
|
||||||
<!--
|
<!--
|
||||||
Enables trim analyzers and full trimming during Release mode.
|
Enables trim analyzers and full trimming during Release mode.
|
||||||
To learn more, see: https://learn.microsoft.com/dotnet/core/deploying/trimming/trimming-options#trimming-granularity
|
To learn more, see: https://learn.microsoft.com/dotnet/core/deploying/trimming/trimming-options#trimming-granularity
|
||||||
|
|||||||
Reference in New Issue
Block a user