1.0.10:沿用 GC 命名,Linux 目标改为 arm64
命名 - 发布包名回到 GC-<版本>-<平台>(zip 与包内启动器同名),1.0.10 直接可用; GCL- 前缀只是预留,解析层同时认,等下个大版本再切 - LauncherArtifacts.PackageFileName / LauncherUpdater / 打包脚本 / 文档同步 Linux - 构建目标由 linux-amd64 改为 linux-arm64(GC.Tests 的 Linux 分支照样覆盖) - Flutter Linux 前端只有 x64 官方引擎产物,aarch64 主机构建时读 build/linux/arm64/release/bundle;x64 主机会明确跳过并说明原因, 不再产出装不上 arm 机器的 x64 包 - 清单平台表 linux-x64 -> linux-arm64,LabelOf 保留 linux-x64 别名读旧产物 版本 - Directory.Build.props 1.0.9 -> 1.0.10,version.json / model/version.json 重签 验证 - ./build.sh build:win-amd64 71MB、win-arm64 69MB,均为单顶层目录 + 包内 safedog/ + Flutter 前端 - GC.Tests --update-test 全部通过
This commit is contained in:
1 parent
097bfd198e
commit
b12dd1c7f9
12 files changed
+147
-113
No files matched your search
@@ -22,7 +22,7 @@
|
||||
-->
|
||||
<AvaloniaVersion>11.3.9</AvaloniaVersion>
|
||||
<MvvmVersion>8.2.2</MvvmVersion>
|
||||
<Version>1.0.9</Version>
|
||||
<Version>1.0.10</Version>
|
||||
<Company>Morris</Company>
|
||||
<Product>GC</Product>
|
||||
<NeutralLanguage>zh-Hans</NeutralLanguage>
|
||||
|
||||
@@ -29,7 +29,8 @@ public static class LauncherArtifacts
|
||||
"win-arm64" => "win-arm64",
|
||||
"osx-arm64" => "mac-arm64",
|
||||
"osx-x64" => "mac-x64",
|
||||
"linux-x64" => "linux-amd64",
|
||||
"linux-x64" => "linux-amd64", // 旧产物目录名,仍能读
|
||||
"linux-arm64" => "linux-arm64",
|
||||
_ => rid
|
||||
};
|
||||
|
||||
@@ -46,9 +47,9 @@ public static class LauncherArtifacts
|
||||
return new[] { label, rid };
|
||||
}
|
||||
|
||||
/// <summary>启动器包应有的文件名,如 <c>GCL-1.0.9-mac-arm64.zip</c>。</summary>
|
||||
/// <summary>启动器包应有的文件名,如 <c>GC-1.0.10-mac-arm64.zip</c>。</summary>
|
||||
public static string PackageFileName(string version, string rid)
|
||||
=> $"GCL-{version.Trim().TrimStart('v', 'V')}-{LabelOf(rid)}.zip";
|
||||
=> $"GC-{version.Trim().TrimStart('v', 'V')}-{LabelOf(rid)}.zip";
|
||||
|
||||
/// <summary>
|
||||
/// 判断某个 zip 名是不是「这个版本 + 这个平台」的启动器包。
|
||||
@@ -57,7 +58,8 @@ public static class LauncherArtifacts
|
||||
public static bool LooksLikePackage(string fileName, string version, string rid)
|
||||
{
|
||||
if (!fileName.EndsWith(".zip", StringComparison.OrdinalIgnoreCase)) return false;
|
||||
// 新包叫 GCL-<版本>-<平台>.zip;旧包(GC-)仍认,方便从旧版本升级。
|
||||
// 当前发布包叫 GC-<版本>-<平台>.zip;GCL- 前缀是为下个大版本预留的命名,
|
||||
// 这里一并认,免得到时候还要再改一次解析。
|
||||
if (!fileName.StartsWith("GCL-", StringComparison.OrdinalIgnoreCase) &&
|
||||
!fileName.StartsWith("GC-", StringComparison.OrdinalIgnoreCase)) return false;
|
||||
|
||||
|
||||
@@ -367,9 +367,9 @@ public static class LauncherUpdater
|
||||
else if (File.Exists(manifestCopy))
|
||||
File.Delete(manifestCopy);
|
||||
|
||||
// 包名:GCL-<版本>-<平台标签>.app/.exe(SAVEDOG 找不到时会自行扫描包内顶层)。
|
||||
// 包名:GC-<版本>-<平台标签>.app/.exe(SAVEDOG 找不到时会自行扫描包内顶层)。
|
||||
// Linux 的启动器没有扩展名,别硬加 .exe —— 那会让按包名查找永远落空。
|
||||
var packageName = $"GCL-{latest}-{PlatformLabel}" +
|
||||
var packageName = $"GC-{latest}-{PlatformLabel}" +
|
||||
(OperatingSystem.IsMacOS() ? ".app"
|
||||
: OperatingSystem.IsWindows() ? ".exe"
|
||||
: "");
|
||||
@@ -729,7 +729,8 @@ public static class LauncherUpdater
|
||||
// Linux 的启动器没有扩展名(GC-1.0.9-linux-amd64),以前只认 .app/.exe,
|
||||
// 结果解压完判定「没找到新版启动器」,Linux 更新永远失败。
|
||||
// 注意不能用 Path.HasExtension:版本号 9.9.9 里的点会让它误判成有扩展名。
|
||||
if (name.StartsWith("GCL-", StringComparison.OrdinalIgnoreCase) &&
|
||||
if ((name.StartsWith("GC-", StringComparison.OrdinalIgnoreCase) ||
|
||||
name.StartsWith("GCL-", StringComparison.OrdinalIgnoreCase)) &&
|
||||
name.EndsWith("-" + PlatformLabel, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
TryMarkExecutable(dest);
|
||||
|
||||
@@ -355,7 +355,7 @@ internal sealed class Applier
|
||||
{
|
||||
if (!fileName.EndsWith(".exe", StringComparison.OrdinalIgnoreCase)) return 0;
|
||||
|
||||
// 发布包把启动器改名成 GCL-<版本>-<系统>-<架构>.exe(旧包是 GC-),先按这个模式认出来。
|
||||
// 发布包把启动器改名成 GC-<版本>-<系统>-<架构>.exe(GCL- 是预留前缀),先按这个模式认出来。
|
||||
if (VersionedExePattern.IsMatch(fileName)) return 110;
|
||||
|
||||
var name = Path.GetFileNameWithoutExtension(fileName);
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ Windows 还需要 **VS Build Tools 的「使用 C++ 的桌面开发」工作负
|
||||
```bash
|
||||
# 按构建主机自动选目标,每条产物都带 Flutter 前端:
|
||||
# macOS 主机 → mac-arm64(原生)+ win-amd64 / win-arm64(mingw 交叉)
|
||||
# Linux 主机 → linux-amd64(原生)+ win-amd64 / win-arm64(mingw 交叉)
|
||||
# Linux 主机 → linux-arm64(仅 aarch64 主机)+ win-amd64 / win-arm64(mingw 交叉)
|
||||
# Windows 主机 → win-amd64 / win-arm64(原生)
|
||||
./build.sh build
|
||||
|
||||
@@ -96,7 +96,7 @@ sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-14-de
|
||||
`-lstdc++`,系统只装了 gcc-13 的开发包时链接会失败,报 `cannot find -lstdc++`。
|
||||
|
||||
产物布局:`GC-UI` + `lib/libflutter_linux_gtk.so` + `data/`,与官方 `flutter build
|
||||
linux` 的 bundle 一致,直接铺进 `dist/linux-amd64/`。
|
||||
linux` 的 bundle 一致,直接铺进 `dist/linux-arm64/`。
|
||||
|
||||
### Windows 前端交叉编译
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ internal static class Program
|
||||
Directory.CreateDirectory(stage);
|
||||
// Linux 的启动器没有扩展名,测试包名要跟着平台走
|
||||
var launcherExt = OperatingSystem.IsWindows() ? ".exe" : "";
|
||||
File.WriteAllText(Path.Combine(stage, "GCL-9.9.9-" + LauncherUpdater.PlatformLabel + launcherExt),
|
||||
File.WriteAllText(Path.Combine(stage, "GC-9.9.9-" + LauncherUpdater.PlatformLabel + launcherExt),
|
||||
"new launcher");
|
||||
var zip = Path.Combine(tmp, "GC-" + rid + ".zip");
|
||||
ZipFile.CreateFromDirectory(stage, zip);
|
||||
@@ -238,14 +238,14 @@ internal static class Program
|
||||
{
|
||||
var script = File.ReadAllText(scriptPath);
|
||||
Check(!script.Contains(tmp), "脚本不含绝对路径");
|
||||
Check(script.Contains("GCL-*") || script.Contains("GC-*"), "脚本按 GCL-*/GC-* 匹配删除");
|
||||
Check(script.Contains("GC-*") || script.Contains("GCL-*"), "脚本按 GC-*/GCL-* 匹配删除");
|
||||
}
|
||||
|
||||
// 5b) 只发产物、不发 Release:更新包只存在于仓库 dist/<系统>-<架构>/ 目录里。
|
||||
// 清单不写 url、不写 path,只给 dir + name + sha256,客户端要能自己找过去。
|
||||
var distDir = Path.Combine(remote, "dist", LauncherUpdater.PlatformLabel);
|
||||
Directory.CreateDirectory(distDir);
|
||||
var distName = "GCL-9.9.10-" + LauncherUpdater.PlatformLabel + ".zip";
|
||||
var distName = "GC-9.9.10-" + LauncherUpdater.PlatformLabel + ".zip";
|
||||
var distZip = Path.Combine(distDir, distName);
|
||||
File.Copy(zip, distZip, true);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ Windows 用 `.\build.ps1`,参数相同(`build / check / models / stamp / run
|
||||
|
||||
```
|
||||
<解压出来的目录>/ ← 压缩包里只有这一个文件夹
|
||||
GCL-<版本>-<平台>(.exe | .app/) 启动器
|
||||
GC-<版本>-<平台>(.exe | .app/) 启动器
|
||||
GC-UI(.exe) Flutter 前端
|
||||
safedog/GC-SAVEDOG[.exe] 更新守护进程(运行时复制到 .GC/safedog)
|
||||
data/ lib/ *.dll 后端与 Flutter 运行时
|
||||
@@ -225,8 +225,8 @@ Repository/
|
||||
|
||||
| 方式 | 清单字段 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| Release 附件(推荐) | `url` | `.../releases/download/<版本>/GCL-<版本>-<系统>-<架构>.zip` |
|
||||
| 仓库编译产物 | `path` / `dir` / `name` | `dist/<系统>-<架构>/GCL-<版本>-<系统>-<架构>.zip` |
|
||||
| Release 附件(推荐) | `url` | `.../releases/download/<版本>/GC-<版本>-<系统>-<架构>.zip` |
|
||||
| 仓库编译产物 | `path` / `dir` / `name` | `dist/<系统>-<架构>/GC-<版本>-<系统>-<架构>.zip` |
|
||||
|
||||
下载端按 `url` → `path` → `dist/<系统>-<架构>/` 目录扫描的顺序尝试,
|
||||
**每个候选都必须与清单里的 `sha256` 一致**(`sha256` 由签名保护),
|
||||
@@ -252,15 +252,15 @@ Repository/
|
||||
|
||||
| 产物 | 平台 |
|
||||
| --- | --- |
|
||||
| `dist/mac-arm64/GCL-<版本>-mac-arm64.zip` | macOS Apple Silicon(单顶层 `GCL-….app`) |
|
||||
| `dist/win-amd64/GCL-<版本>-win-amd64.zip` | Windows x64(单顶层 `GCL-…/`,含 Flutter 前端与 `safedog/`) |
|
||||
| `dist/win-arm64/GCL-<版本>-win-arm64.zip` | Windows on ARM 同上 |
|
||||
| `dist/linux-amd64/GCL-<版本>-linux-amd64.zip` | Linux x64 同上(启动器无扩展名) |
|
||||
| `dist/mac-arm64/GC-<版本>-mac-arm64.zip` | macOS Apple Silicon(单顶层 `GC-….app`) |
|
||||
| `dist/win-amd64/GC-<版本>-win-amd64.zip` | Windows x64(单顶层 `GC-…/`,含 Flutter 前端与 `safedog/`) |
|
||||
| `dist/win-arm64/GC-<版本>-win-arm64.zip` | Windows on ARM 同上 |
|
||||
| `dist/linux-arm64/GC-<版本>-linux-arm64.zip` | Linux ARM64 同上(启动器无扩展名,需在 aarch64 主机构建) |
|
||||
|
||||
平台目录就是「该平台的编译产物目录」:打包完成后只留最终 zip(原始 `.app` / `.exe`
|
||||
会被挪到 `build/trash/`,下次构建时移出,不做递归删除)。
|
||||
|
||||
发新版:`./build.sh build -version=1.0.10` → 把 `dist/<平台>/GCL-1.0.10-<平台>.zip`
|
||||
发新版:`./build.sh build` → 把 `dist/<平台>/GC-<版本>-<平台>.zip`
|
||||
上传到 Gitea Release(tag `v1.0.8`),**或者**直接提交/上传到仓库的
|
||||
`dist/<平台>/` 目录 → 提交并推送 `version.json` / `model/version.json`。
|
||||
两种都能被客户端识别,客户端下次启动就会看到更新。
|
||||
|
||||
+19
-5
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 目标平台按构建主机决定,每条产物都带 Flutter 前端:
|
||||
# macOS 主机 : mac-arm64(原生)+ win-amd64 / win-arm64(mingw 交叉)
|
||||
# Linux 主机 : linux-amd64(原生)+ win-amd64 / win-arm64(mingw 交叉)
|
||||
# Linux 主机 : linux-arm64(原生 / 交叉)+ win-amd64 / win-arm64(mingw 交叉)
|
||||
# Windows 主机: win-amd64 / win-arm64(原生)
|
||||
#
|
||||
# 前端是默认必需项:flutter 缺失或编译失败一律中断,不再悄悄产出只带 Avalonia
|
||||
@@ -23,6 +23,20 @@ bs_build() {
|
||||
MINGW*|MSYS*|CYGWIN*) : ;; # Windows 主机只能编 Windows
|
||||
*) BUILD_LINUX=1 ;;
|
||||
esac
|
||||
# Linux 目标已切成 arm64:Flutter 的 Linux 前端必须用 aarch64 主机自带的
|
||||
# engine 产物(官方只发 x64 版),x64 主机上强行编出来的是 x64 二进制,
|
||||
# 装到 arm 机器上跑不起来。这里直接跳过,并说明原因,不当成构建失败。
|
||||
if [ "$BUILD_LINUX" = 1 ]; then
|
||||
case "$(uname -m)" in
|
||||
aarch64|arm64) ;;
|
||||
*)
|
||||
BUILD_LINUX=0
|
||||
echo "!! 跳过 Linux 产物:目标为 linux-arm64,当前主机是 $(uname -m)"
|
||||
echo " (Flutter Linux 引擎只有 x64 官方产物,需在 aarch64 主机上构建)"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# 显式降级:允许在没有该平台 Flutter 宿主的情况下仍出 Avalonia 版包
|
||||
ALLOW_NO_UI="${GC_ALLOW_NO_UI:-0}"
|
||||
|
||||
@@ -91,9 +105,9 @@ bs_build() {
|
||||
|
||||
if [ "$BUILD_LINUX" = 1 ]; then
|
||||
progress_step "编译 Linux"
|
||||
_run_publish linux 70 publish_rid "linux-x64" "dist/linux-amd64" false || return 1
|
||||
publish_backend "linux-x64" "dist/linux-amd64" || return 1
|
||||
build_flutter_ui linux "dist/linux-amd64" || return 1
|
||||
_run_publish linux 70 publish_rid "linux-arm64" "dist/linux-arm64" false || return 1
|
||||
publish_backend "linux-arm64" "dist/linux-arm64" || return 1
|
||||
build_flutter_ui linux "dist/linux-arm64" || return 1
|
||||
fi
|
||||
|
||||
# Windows 前端:Windows 主机走官方 toolchain;Linux/macOS 主机用 mingw-w64 +
|
||||
@@ -116,7 +130,7 @@ bs_build() {
|
||||
prepare_runtime_layout "dist/win-amd64"
|
||||
prepare_runtime_layout "dist/win-arm64"
|
||||
if [ "$BUILD_LINUX" = 1 ]; then
|
||||
prepare_runtime_layout "dist/linux-amd64"
|
||||
prepare_runtime_layout "dist/linux-arm64"
|
||||
fi
|
||||
if [ -d "$ROOT_DIR/dist/mac-arm64/GC.app/Contents/MacOS" ]; then
|
||||
prepare_runtime_layout "dist/mac-arm64/GC.app/Contents/MacOS"
|
||||
|
||||
+40
-19
@@ -164,9 +164,10 @@ pack_models() {
|
||||
# 启动器更新包:只包含程序文件,排除 .GC(否则会覆盖用户已下载的模型与设置)
|
||||
#
|
||||
# 产物落点遵循「仓库 dist/<系统>-<架构>/」布局:
|
||||
# dist/mac-arm64/GCL-<版本>-mac-arm64.zip
|
||||
# dist/win-amd64/GCL-<版本>-win-amd64.zip
|
||||
# dist/win-arm64/GCL-<版本>-win-arm64.zip
|
||||
# dist/mac-arm64/GC-<版本>-mac-arm64.zip
|
||||
# dist/win-amd64/GC-<版本>-win-amd64.zip
|
||||
# dist/win-arm64/GC-<版本>-win-arm64.zip
|
||||
# dist/linux-arm64/GC-<版本>-linux-arm64.zip
|
||||
# 启动器更新时既可以从 Release 附件下载,也会到这些目录里找编译产物
|
||||
# (见 GC-DOWNLOAD/LauncherArtifacts.cs),所以两种发布方式都能用。
|
||||
#
|
||||
@@ -224,8 +225,28 @@ build_flutter_ui() {
|
||||
cp -R "$UI_SRC/build/macos/Build/Products/Release/GC-UI.app" "$ROOT_DIR/$DEST/"
|
||||
;;
|
||||
linux)
|
||||
# bundle/ 里是 GC-UI、lib/*.so 与 data/,整体铺到包的根目录
|
||||
cp -R "$UI_SRC/build/linux/x64/release/bundle/." "$ROOT_DIR/$DEST/"
|
||||
# bundle/ 里是 GC-UI、lib/*.so 与 data/,整体铺到包的根目录。
|
||||
# 目录名跟着目标架构走:aarch64 主机在 build/linux/arm64/,x64 在 build/linux/x64/。
|
||||
BUNDLE=""
|
||||
for cand in "$UI_SRC/build/linux/arm64/release/bundle" \
|
||||
"$UI_SRC/build/linux/x64/release/bundle"; do
|
||||
[ -d "$cand" ] && BUNDLE="$cand" && break
|
||||
done
|
||||
if [ -z "$BUNDLE" ]; then
|
||||
echo "!! 找不到 Flutter Linux bundle(期望 build/linux/{arm64,x64}/release/bundle)"
|
||||
return 1
|
||||
fi
|
||||
# 目标包是 arm64,却只编出 x64 bundle:说明主机架构不对,宁可失败也不出坏包
|
||||
case "$BUNDLE" in
|
||||
*/arm64/*) ;;
|
||||
*)
|
||||
if [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "arm64" ]; then
|
||||
echo "!! Linux 包目标为 arm64,但当前主机 $(uname -m) 只能编出 x64 前端"
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
cp -R "$BUNDLE/." "$ROOT_DIR/$DEST/"
|
||||
;;
|
||||
*)
|
||||
echo "!! 不支持的 Flutter 目标平台:$PLAT"
|
||||
@@ -279,9 +300,9 @@ pack_launcher() {
|
||||
[ -f "$EXE" ] || EXE=$(ls "$SRC"/*.exe 2>/dev/null | grep -v 'GC-SAVEDOG\|GC.UI.Server\|GC-UI' | head -1)
|
||||
[ -n "$EXE" ] || continue
|
||||
|
||||
# 包内只有一个顶层目录(GCL-<版本>-<平台>),解压后不会散落一屏 dll。
|
||||
# 包内只有一个顶层目录(GC-<版本>-<平台>),解压后不会散落一屏 dll。
|
||||
TMP="$ROOT_DIR/dist/.winpkg-$LABEL"
|
||||
PKGNAME="GCL-${VERSION}-${LABEL}"
|
||||
PKGNAME="GC-${VERSION}-${LABEL}"
|
||||
PKG="$TMP/$PKGNAME"
|
||||
rm -rf "$TMP"; mkdir -p "$PKG"
|
||||
cp -R "$SRC"/. "$PKG"/
|
||||
@@ -307,10 +328,10 @@ pack_launcher() {
|
||||
done
|
||||
|
||||
# --- Linux:整目录打包(启动器 + 守护 + 后端 + Flutter 前端)---
|
||||
SRC="$ROOT_DIR/dist/linux-amd64"
|
||||
SRC="$ROOT_DIR/dist/linux-arm64"
|
||||
if [ -d "$SRC" ]; then
|
||||
TMP="$ROOT_DIR/dist/.linuxpkg"
|
||||
PKGNAME="GCL-${VERSION}-linux-amd64"
|
||||
PKGNAME="GC-${VERSION}-linux-arm64"
|
||||
PKG="$TMP/$PKGNAME"
|
||||
rm -rf "$TMP"; mkdir -p "$PKG"
|
||||
cp -R "$SRC"/. "$PKG"/
|
||||
@@ -326,17 +347,17 @@ pack_launcher() {
|
||||
if [ ! -f "$PKG/GC-UI" ]; then
|
||||
echo " !! 包内没有 Flutter 前端,启动器将使用内置 Avalonia 界面"
|
||||
fi
|
||||
ZIP="$ROOT_DIR/dist/linux-amd64/$PKGNAME.zip"
|
||||
ZIP="$ROOT_DIR/dist/linux-arm64/$PKGNAME.zip"
|
||||
rm -f "$ZIP"
|
||||
( cd "$TMP" && zip -qry "$ZIP" "$PKGNAME" )
|
||||
rm -rf "$TMP"
|
||||
echo " -> dist/linux-amd64/$PKGNAME.zip"
|
||||
echo " -> dist/linux-arm64/$PKGNAME.zip"
|
||||
fi
|
||||
|
||||
# --- macOS:先得到真实 .app 目录(改名 + 同步 Info.plist)---
|
||||
MACAPP="$ROOT_DIR/dist/mac-arm64/GC.app"
|
||||
if [ -d "$MACAPP" ]; then
|
||||
FINAL="$ROOT_DIR/dist/GCL-${VERSION}-mac-arm64.app"
|
||||
FINAL="$ROOT_DIR/dist/GC-${VERSION}-mac-arm64.app"
|
||||
rm -rf "$FINAL"
|
||||
mv "$MACAPP" "$FINAL"
|
||||
chmod +x "$FINAL/Contents/MacOS/GC" 2>/dev/null || true
|
||||
@@ -350,14 +371,14 @@ pack_launcher() {
|
||||
fi
|
||||
|
||||
# --- 统一压缩:每个产物都打成同名 .zip,放进自己的平台目录 ---
|
||||
# GCL-1.0.3-mac-arm64.app -> dist/mac-arm64/GCL-1.0.3-mac-arm64.zip
|
||||
# GC-1.0.3-mac-arm64.app -> dist/mac-arm64/GC-1.0.3-mac-arm64.zip
|
||||
# 客户端下载时按「原名去掉扩展名 + .zip」取包,再解压回原名。
|
||||
echo "==> 压缩为 zip"
|
||||
for art in "$ROOT_DIR"/dist/GCL-"$VERSION"-*.exe "$ROOT_DIR"/dist/GCL-"$VERSION"-*.app; do
|
||||
for art in "$ROOT_DIR"/dist/GC-"$VERSION"-*.exe "$ROOT_DIR"/dist/GC-"$VERSION"-*.app; do
|
||||
[ -e "$art" ] || continue
|
||||
base=$(basename "$art")
|
||||
name="${base%.*}" # 去掉 .exe / .app
|
||||
label="${name#GCL-${VERSION}-}" # mac-arm64 / win-amd64
|
||||
label="${name#GC-${VERSION}-}" # mac-arm64 / win-amd64
|
||||
ZIP="$ROOT_DIR/dist/${label}/${name}.zip"
|
||||
mkdir -p "$ROOT_DIR/dist/${label}"
|
||||
rm -f "$ZIP"
|
||||
@@ -379,7 +400,7 @@ pack_launcher() {
|
||||
# 一次性删除又慢又不可逆,先挪走更安全(暂存区在下次构建开始时挪出 dist)。
|
||||
TRASH="$ROOT_DIR/build/trash"
|
||||
mkdir -p "$TRASH"
|
||||
for leftover in "$ROOT_DIR"/dist/GCL-"$VERSION"-*.exe "$ROOT_DIR"/dist/GCL-"$VERSION"-*.app; do
|
||||
for leftover in "$ROOT_DIR"/dist/GC-"$VERSION"-*.exe "$ROOT_DIR"/dist/GC-"$VERSION"-*.app; do
|
||||
[ -e "$leftover" ] || continue
|
||||
mv "$leftover" "$TRASH/$(basename "$leftover")-$(date +%s)" 2>/dev/null || true
|
||||
done
|
||||
@@ -388,15 +409,15 @@ pack_launcher() {
|
||||
stamp_launcher_only
|
||||
echo ""
|
||||
echo "==> dist 里可发布的 zip:"
|
||||
ls -lh "$ROOT_DIR"/dist/*/GCL-"$VERSION"-*.zip 2>/dev/null || true
|
||||
ls -lh "$ROOT_DIR"/dist/*/GC-"$VERSION"-*.zip 2>/dev/null || true
|
||||
}
|
||||
|
||||
# 删除 publish 过程中的中间目录:平台目录里只留最终 zip
|
||||
strip_intermediate_dirs() {
|
||||
for d in win-amd64 win-x64 win-arm64 mac-arm64 linux-amd64 linux-x64; do
|
||||
for d in win-amd64 win-x64 win-arm64 mac-arm64 linux-arm64 linux-x64; do
|
||||
[ -d "$ROOT_DIR/dist/$d" ] || continue
|
||||
find "$ROOT_DIR/dist/$d" -mindepth 1 -maxdepth 1 \
|
||||
! -name "GCL-${VERSION}-*.zip" -exec rm -rf {} + 2>/dev/null || true
|
||||
! -name "GC-${VERSION}-*.zip" -exec rm -rf {} + 2>/dev/null || true
|
||||
done
|
||||
find "$ROOT_DIR/dist" -name ".DS_Store" -delete 2>/dev/null || true
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ var packages = new Dictionary<string, Dictionary<string, object>>();
|
||||
// 不发 Release、只提交产物也能更新(用户明确要求支持这种布局)。
|
||||
// 两种都写:url 只是「去哪儿找」,真正的完整性凭据是下面的 sha256(受签名保护)。
|
||||
var releaseBase = $"{Repository}/releases/download/{launcherVersion}";
|
||||
foreach (var rid in new[] { "win-x64", "win-arm64", "osx-arm64", "osx-x64", "linux-x64" })
|
||||
foreach (var rid in new[] { "win-x64", "win-arm64", "osx-arm64", "osx-x64", "linux-arm64" })
|
||||
{
|
||||
var label = LauncherArtifacts.LabelOf(rid);
|
||||
var fileName = LauncherArtifacts.PackageFileName(launcherVersion, rid);
|
||||
|
||||
+31
-33
@@ -1,48 +1,46 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"generated": "2026-11-18T10:16:41Z",
|
||||
"generated": "2026-11-18T12:33:25Z",
|
||||
"repository": "https://git.xhmcl.com/Morris/GC",
|
||||
"branch": "main",
|
||||
"modelDir": "model",
|
||||
"launcher": {
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"revision": "",
|
||||
"packages": {
|
||||
"win-x64": {
|
||||
"path": "dist/win-amd64/GC-1.0.9-win-amd64.zip",
|
||||
"path": "dist/win-amd64/GC-1.0.10-win-amd64.zip",
|
||||
"dir": "dist/win-amd64",
|
||||
"name": "GC-1.0.9-win-amd64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-win-amd64.zip",
|
||||
"sha256": "0807f1005e2d8bd54316529670cf1c3c89a2df07bd39297145f21c9a0aae5f04",
|
||||
"size": 114372206
|
||||
"name": "GC-1.0.10-win-amd64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-win-amd64.zip",
|
||||
"sha256": "a2e581b82ccb61cc05f84f69c7ea7e3cd2e1eab0ed5118047e287453aab54d52",
|
||||
"size": 74322650
|
||||
},
|
||||
"win-arm64": {
|
||||
"path": "dist/win-arm64/GC-1.0.9-win-arm64.zip",
|
||||
"path": "dist/win-arm64/GC-1.0.10-win-arm64.zip",
|
||||
"dir": "dist/win-arm64",
|
||||
"name": "GC-1.0.9-win-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-win-arm64.zip",
|
||||
"sha256": "ffdc37f8ea5041d69be88ffbcbf9ba5d80f7fb97c6b3debc5a918ff89f9e7f60",
|
||||
"size": 110425463
|
||||
"name": "GC-1.0.10-win-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-win-arm64.zip",
|
||||
"sha256": "e0a41e49fd7d493ff92b7b5093b9ce5685988fe572cd1eff6cf95bb9a46eeb70",
|
||||
"size": 72067436
|
||||
},
|
||||
"osx-arm64": {
|
||||
"path": "dist/mac-arm64/GC-1.0.9-mac-arm64.zip",
|
||||
"path": "dist/mac-arm64/GC-1.0.10-mac-arm64.zip",
|
||||
"dir": "dist/mac-arm64",
|
||||
"name": "GC-1.0.9-mac-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-mac-arm64.zip",
|
||||
"sha256": "e62bbc8c9925d8158f850440600b5d16af7539c85651a5ebcc5f9a85d4c9bb01",
|
||||
"size": 60066040
|
||||
"name": "GC-1.0.10-mac-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-mac-arm64.zip"
|
||||
},
|
||||
"osx-x64": {
|
||||
"path": "dist/mac-x64/GC-1.0.9-mac-x64.zip",
|
||||
"path": "dist/mac-x64/GC-1.0.10-mac-x64.zip",
|
||||
"dir": "dist/mac-x64",
|
||||
"name": "GC-1.0.9-mac-x64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-mac-x64.zip"
|
||||
"name": "GC-1.0.10-mac-x64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-mac-x64.zip"
|
||||
},
|
||||
"linux-x64": {
|
||||
"path": "dist/linux-amd64/GC-1.0.9-linux-amd64.zip",
|
||||
"dir": "dist/linux-amd64",
|
||||
"name": "GC-1.0.9-linux-amd64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-linux-amd64.zip"
|
||||
"linux-arm64": {
|
||||
"path": "dist/linux-arm64/GC-1.0.10-linux-arm64.zip",
|
||||
"dir": "dist/linux-arm64",
|
||||
"name": "GC-1.0.10-linux-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-linux-arm64.zip"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -51,7 +49,7 @@
|
||||
"id": "contour-map",
|
||||
"version": "1.1",
|
||||
"build": "773ab2161d",
|
||||
"manifestSha256": "f86a3f83d5953cafc333585da3009d8846448f6a8a9df13b39cde57b36037733",
|
||||
"manifestSha256": "576c4088127982afaefeef6b3cd9ee2c0b062a94967ba854a090986d8136b0b6",
|
||||
"filesSha256": "a6bdf9b4273aabee50c3c94ceab4d0abee15f0df1af90c58bdbb796e0d2d5699",
|
||||
"files": 5,
|
||||
"dir": "model/contour-map"
|
||||
@@ -60,7 +58,7 @@
|
||||
"id": "earth-geography",
|
||||
"version": "1.9",
|
||||
"build": "cc68b8863b",
|
||||
"manifestSha256": "448f050fded46d7bfc8f0c3856e741c4a4f82523c8e012dd846ddcd400ff394a",
|
||||
"manifestSha256": "fcd38ab5e23bd6faefcdf2d199b0643c1d3c014c789eb862688d588b4434fdb8",
|
||||
"filesSha256": "c018ba481831e23d3183a38ac47251f19754c7464baa5d85b47cea7a49fcfa95",
|
||||
"files": 11,
|
||||
"dir": "model/earth-geography"
|
||||
@@ -69,7 +67,7 @@
|
||||
"id": "earth-revolution",
|
||||
"version": "1.7",
|
||||
"build": "53b7a0fbc3",
|
||||
"manifestSha256": "c69fc53f50213c6ab7658e1a761a20d2c55a7a344beb3c75a30393c26fa40167",
|
||||
"manifestSha256": "fc71fa7f6b524512ab7ad039e0ee759f45b8ac08ccdbca7e93297424fd36b64b",
|
||||
"filesSha256": "4cd45b0324a77574a0da3a939c2a6faebc785c5a24cb50136d62a78a6ea2e9b1",
|
||||
"files": 7,
|
||||
"dir": "model/earth-revolution"
|
||||
@@ -78,7 +76,7 @@
|
||||
"id": "earth-rotation",
|
||||
"version": "1.7",
|
||||
"build": "ecd52665f9",
|
||||
"manifestSha256": "cbf12a47747a331c9980260f39169b1813bb4b52a8916995fda05755267bddca",
|
||||
"manifestSha256": "2aabc7a6e35c42b671e5be62b09414628eff08c5646de8d50dd16a25bb804b1c",
|
||||
"filesSha256": "594b005a6a9f36cd0b5d4e4a7a0b1ab42d53c8032832545b71c3915493d56c8e",
|
||||
"files": 7,
|
||||
"dir": "model/earth-rotation"
|
||||
@@ -87,7 +85,7 @@
|
||||
"id": "scale-calculator",
|
||||
"version": "1.6",
|
||||
"build": "105653737d",
|
||||
"manifestSha256": "fc6f7deb1efb076cc0bbee732e7de8f007ed74bc837dba2268be1e0adc1839d3",
|
||||
"manifestSha256": "971b4438ebbbf4f8042d8ce035f696e713aae532c3b94231a2d9c60c102cef98",
|
||||
"filesSha256": "732dd26406e0f1e836970499d7ea644def332ce909d7f8aa0a403bbe7337e604",
|
||||
"files": 6,
|
||||
"dir": "model/scale-calculator"
|
||||
@@ -96,8 +94,8 @@
|
||||
"signature": {
|
||||
"alg": "ECDSA-P256-SHA256",
|
||||
"keyId": "gc-2026-12",
|
||||
"value": "A2jaSxRK1B43k8uOWmC/8diYG6JYUncGgjXW8B1ntO5Ag5rsG7Pb2gMz5ad6AcwjZ9zs8qtsSxJv8vLsUNXtWw==",
|
||||
"contentSha256": "3bf738a164537e5d575e75c314f0ac01af1cb5d4d7cb882489d8dedeb73f51e9",
|
||||
"signedAt": "2026-11-18T10:18:01Z"
|
||||
"value": "6mZUj+t6AExyLQbauvQSLCicUFUbesPGs0jTd6FGwjm+mxEud7e+0fvmmdo+HDFZY6NifIrVENIB6Q5TlLVS7g==",
|
||||
"contentSha256": "76cabe2d25001bf0a07aadc831bb6222bc00ed0114cde1e83ac8e29db6069a55",
|
||||
"signedAt": "2026-11-18T12:33:26Z"
|
||||
}
|
||||
}
|
||||
+31
-33
@@ -1,48 +1,46 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"generated": "2026-11-18T10:16:41Z",
|
||||
"generated": "2026-11-18T12:33:25Z",
|
||||
"repository": "https://git.xhmcl.com/Morris/GC",
|
||||
"branch": "main",
|
||||
"modelDir": "model",
|
||||
"launcher": {
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"revision": "",
|
||||
"packages": {
|
||||
"win-x64": {
|
||||
"path": "dist/win-amd64/GC-1.0.9-win-amd64.zip",
|
||||
"path": "dist/win-amd64/GC-1.0.10-win-amd64.zip",
|
||||
"dir": "dist/win-amd64",
|
||||
"name": "GC-1.0.9-win-amd64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-win-amd64.zip",
|
||||
"sha256": "0807f1005e2d8bd54316529670cf1c3c89a2df07bd39297145f21c9a0aae5f04",
|
||||
"size": 114372206
|
||||
"name": "GC-1.0.10-win-amd64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-win-amd64.zip",
|
||||
"sha256": "a2e581b82ccb61cc05f84f69c7ea7e3cd2e1eab0ed5118047e287453aab54d52",
|
||||
"size": 74322650
|
||||
},
|
||||
"win-arm64": {
|
||||
"path": "dist/win-arm64/GC-1.0.9-win-arm64.zip",
|
||||
"path": "dist/win-arm64/GC-1.0.10-win-arm64.zip",
|
||||
"dir": "dist/win-arm64",
|
||||
"name": "GC-1.0.9-win-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-win-arm64.zip",
|
||||
"sha256": "ffdc37f8ea5041d69be88ffbcbf9ba5d80f7fb97c6b3debc5a918ff89f9e7f60",
|
||||
"size": 110425463
|
||||
"name": "GC-1.0.10-win-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-win-arm64.zip",
|
||||
"sha256": "e0a41e49fd7d493ff92b7b5093b9ce5685988fe572cd1eff6cf95bb9a46eeb70",
|
||||
"size": 72067436
|
||||
},
|
||||
"osx-arm64": {
|
||||
"path": "dist/mac-arm64/GC-1.0.9-mac-arm64.zip",
|
||||
"path": "dist/mac-arm64/GC-1.0.10-mac-arm64.zip",
|
||||
"dir": "dist/mac-arm64",
|
||||
"name": "GC-1.0.9-mac-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-mac-arm64.zip",
|
||||
"sha256": "e62bbc8c9925d8158f850440600b5d16af7539c85651a5ebcc5f9a85d4c9bb01",
|
||||
"size": 60066040
|
||||
"name": "GC-1.0.10-mac-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-mac-arm64.zip"
|
||||
},
|
||||
"osx-x64": {
|
||||
"path": "dist/mac-x64/GC-1.0.9-mac-x64.zip",
|
||||
"path": "dist/mac-x64/GC-1.0.10-mac-x64.zip",
|
||||
"dir": "dist/mac-x64",
|
||||
"name": "GC-1.0.9-mac-x64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-mac-x64.zip"
|
||||
"name": "GC-1.0.10-mac-x64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-mac-x64.zip"
|
||||
},
|
||||
"linux-x64": {
|
||||
"path": "dist/linux-amd64/GC-1.0.9-linux-amd64.zip",
|
||||
"dir": "dist/linux-amd64",
|
||||
"name": "GC-1.0.9-linux-amd64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.9/GC-1.0.9-linux-amd64.zip"
|
||||
"linux-arm64": {
|
||||
"path": "dist/linux-arm64/GC-1.0.10-linux-arm64.zip",
|
||||
"dir": "dist/linux-arm64",
|
||||
"name": "GC-1.0.10-linux-arm64.zip",
|
||||
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.0.10/GC-1.0.10-linux-arm64.zip"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -51,7 +49,7 @@
|
||||
"id": "contour-map",
|
||||
"version": "1.1",
|
||||
"build": "773ab2161d",
|
||||
"manifestSha256": "f86a3f83d5953cafc333585da3009d8846448f6a8a9df13b39cde57b36037733",
|
||||
"manifestSha256": "576c4088127982afaefeef6b3cd9ee2c0b062a94967ba854a090986d8136b0b6",
|
||||
"filesSha256": "a6bdf9b4273aabee50c3c94ceab4d0abee15f0df1af90c58bdbb796e0d2d5699",
|
||||
"files": 5,
|
||||
"dir": "model/contour-map"
|
||||
@@ -60,7 +58,7 @@
|
||||
"id": "earth-geography",
|
||||
"version": "1.9",
|
||||
"build": "cc68b8863b",
|
||||
"manifestSha256": "448f050fded46d7bfc8f0c3856e741c4a4f82523c8e012dd846ddcd400ff394a",
|
||||
"manifestSha256": "fcd38ab5e23bd6faefcdf2d199b0643c1d3c014c789eb862688d588b4434fdb8",
|
||||
"filesSha256": "c018ba481831e23d3183a38ac47251f19754c7464baa5d85b47cea7a49fcfa95",
|
||||
"files": 11,
|
||||
"dir": "model/earth-geography"
|
||||
@@ -69,7 +67,7 @@
|
||||
"id": "earth-revolution",
|
||||
"version": "1.7",
|
||||
"build": "53b7a0fbc3",
|
||||
"manifestSha256": "c69fc53f50213c6ab7658e1a761a20d2c55a7a344beb3c75a30393c26fa40167",
|
||||
"manifestSha256": "fc71fa7f6b524512ab7ad039e0ee759f45b8ac08ccdbca7e93297424fd36b64b",
|
||||
"filesSha256": "4cd45b0324a77574a0da3a939c2a6faebc785c5a24cb50136d62a78a6ea2e9b1",
|
||||
"files": 7,
|
||||
"dir": "model/earth-revolution"
|
||||
@@ -78,7 +76,7 @@
|
||||
"id": "earth-rotation",
|
||||
"version": "1.7",
|
||||
"build": "ecd52665f9",
|
||||
"manifestSha256": "cbf12a47747a331c9980260f39169b1813bb4b52a8916995fda05755267bddca",
|
||||
"manifestSha256": "2aabc7a6e35c42b671e5be62b09414628eff08c5646de8d50dd16a25bb804b1c",
|
||||
"filesSha256": "594b005a6a9f36cd0b5d4e4a7a0b1ab42d53c8032832545b71c3915493d56c8e",
|
||||
"files": 7,
|
||||
"dir": "model/earth-rotation"
|
||||
@@ -87,7 +85,7 @@
|
||||
"id": "scale-calculator",
|
||||
"version": "1.6",
|
||||
"build": "105653737d",
|
||||
"manifestSha256": "fc6f7deb1efb076cc0bbee732e7de8f007ed74bc837dba2268be1e0adc1839d3",
|
||||
"manifestSha256": "971b4438ebbbf4f8042d8ce035f696e713aae532c3b94231a2d9c60c102cef98",
|
||||
"filesSha256": "732dd26406e0f1e836970499d7ea644def332ce909d7f8aa0a403bbe7337e604",
|
||||
"files": 6,
|
||||
"dir": "model/scale-calculator"
|
||||
@@ -96,8 +94,8 @@
|
||||
"signature": {
|
||||
"alg": "ECDSA-P256-SHA256",
|
||||
"keyId": "gc-2026-12",
|
||||
"value": "A2jaSxRK1B43k8uOWmC/8diYG6JYUncGgjXW8B1ntO5Ag5rsG7Pb2gMz5ad6AcwjZ9zs8qtsSxJv8vLsUNXtWw==",
|
||||
"contentSha256": "3bf738a164537e5d575e75c314f0ac01af1cb5d4d7cb882489d8dedeb73f51e9",
|
||||
"signedAt": "2026-11-18T10:18:01Z"
|
||||
"value": "6mZUj+t6AExyLQbauvQSLCicUFUbesPGs0jTd6FGwjm+mxEud7e+0fvmmdo+HDFZY6NifIrVENIB6Q5TlLVS7g==",
|
||||
"contentSha256": "76cabe2d25001bf0a07aadc831bb6222bc00ed0114cde1e83ac8e29db6069a55",
|
||||
"signedAt": "2026-11-18T12:33:26Z"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user