4 Commits
Author SHA1 Message Date
Morris 3c74effb4c release: 1.1.1 发布清单与签名(Windows 双架构) 2026-11-19 18:22:05 +08:00
Morris f03046bffd release: 1.1.1 版本号 2026-11-19 18:19:35 +08:00
Morris 2cd18b4e5f Merge pull request 'fix: 修复模型检测/自动下载与启动器更新' (#25) from fix/model-source-and-updater into main
Reviewed-on: #25
2026-11-19 05:48:49 +00:00
Morris 023e9468db fix: 修复模型检测/自动下载与启动器更新
PR 审核 / 后端编译 (pull_request) Canceled after 0s
PR 审核 / 后端自检 (pull_request) Canceled after 0s
PR 审核 / 前端检查(Flutter) (pull_request) Canceled after 0s
PR 审核 / 安全扫描 (pull_request) Canceled after 0s
PR 审核 / 审核汇总 (pull_request) Canceled after 0s
- ModelSourceClient: 自托管 Gitea 源(git.xhmcl.com)ArchiveCandidates 之前
  直接 yield break,只能靠系统 git clone。没装 git 的机器「检测模型/下载/
  自动更新」全部失效。补上 archive/<branch>.zip 归档地址(已实测可用),
  下载经 ResumableDownloader 完成,无需系统 git。fake-git 实测 5/5 模型可检测。
- LauncherUpdater.HashZipPayloadAsync: 只找 GC.dll/GC/GC*.dll,但产物自 1.0.10
  起是 GCL-<版本>-<平台> 单文件,找不到主程序 -> sha256 无法比对 -> 不提示更新。
  改为优先匹配 GCL- 主程序(排除 GC-UI/GC-SAVEDOG/.GC),兼容旧 GC 命名。
  实测已从「无法比对 sha256」变为能算出远端包 sha256。
- version.json / model/version.json: 5 个模型的 manifestSha256 与仓库实际模型
  json 不符(发布时 updatedAt 漂移导致),使模型自动更新每次因校验失败被丢弃
  (「没有自动下载」)。按当前模型 json 实际 sha256 修正并重新签名(gc-2026-12),
  两份清单保持一致;launcher 包 sha256/size 与版本号不动。
2026-11-19 13:17:22 +08:00
11 changed files with 92 additions and 68 deletions

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@
-->
<AvaloniaVersion>11.3.9</AvaloniaVersion>
<MvvmVersion>8.2.2</MvvmVersion>
<Version>1.1.0</Version>
<Version>1.1.1</Version>
<Company>Morris</Company>
<Product>GC</Product>
<NeutralLanguage>zh-Hans</NeutralLanguage>
+20 -2
View File
@@ -194,8 +194,26 @@ public static class LauncherUpdater
{
using var ms = new MemoryStream(zip);
using var archive = new System.IO.Compression.ZipArchive(ms, System.IO.Compression.ZipArchiveMode.Read);
// 找主程序:app 内的可执行文件 / GC.dll / 单文件 exe
var entry = archive.Entries.FirstOrDefault(e =>
// 发布包从 1.0.10 起改为 GCL 命名 + 单文件 + 单顶层目录,主程序是
// <顶层>/GCL-<版本>-<平台>.exe (Windows)
// <顶层>/GCL-<版本>-<平台> (Linux,无扩展名)
// <顶层>/GCL-<版本>-mac-arm64.app/... (macOS)
// 旧布局则是 GC.dll / GC / GC*.dll。先找新名,再退回旧名,兼容老发布包。
// 注意排除 GC-UI / GC-SAVEDOG / .GC/bin 里的附属程序,它们不是启动器本体。
bool IsLauncher(System.IO.Compression.ZipArchiveEntry e)
{
var n = e.Name;
if (n.Length == 0) return false; // 目录条目
if (n.StartsWith("GC-UI", StringComparison.OrdinalIgnoreCase) ||
n.StartsWith("GC-SAVEDOG", StringComparison.OrdinalIgnoreCase)) return false;
if (e.FullName.Replace('\\', '/').Contains("/.GC/")) return false;
if (n.StartsWith("GCL-", StringComparison.OrdinalIgnoreCase)) return true;
return false;
}
var entry = archive.Entries.FirstOrDefault(IsLauncher)
?? archive.Entries.FirstOrDefault(e =>
e.Name.Equals("GC.dll", StringComparison.OrdinalIgnoreCase))
?? archive.Entries.FirstOrDefault(e =>
e.Name.Equals("GC", StringComparison.OrdinalIgnoreCase))
+7 -1
View File
@@ -154,7 +154,13 @@ public sealed class ModelSourceClient : IModelSourceClient
else if (host.Contains("gitee.com"))
yield return $"https://gitee.com/{owner}/{repo}/repository/archive/{b}.zip";
else
yield break;
{
// 自托管 Gitea(如 git.xhmcl.com):用 archive/<branch>.zip 拉源码归档。
// 关键:不能在这里 yield break —— 那样就只剩 git clone 一条路,
// 用户机器没装 git 时「检测模型 / 下载 / 自动更新」会全部失效。
// 归档下载走 ResumableDownloader,无需系统 git。
yield return $"{uri.GetLeftPart(UriPartial.Authority)}/{owner}/{repo}/archive/{b}.zip";
}
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.1.0+1
version: 1.1.1+1
environment:
sdk: ^3.5.4
+1 -1
View File
@@ -26,5 +26,5 @@
"frame": "#0A1524"
},
"build": "773ab2161d",
"updatedAt": "2026-11-18T10:16:41Z"
"updatedAt": "2026-11-19T10:20:00Z"
}
+1 -1
View File
@@ -26,5 +26,5 @@
"frame": "#0A1524"
},
"build": "cc68b8863b",
"updatedAt": "2026-11-18T10:16:41Z"
"updatedAt": "2026-11-19T10:20:00Z"
}
+1 -1
View File
@@ -32,5 +32,5 @@
"frame": "#0A1524"
},
"build": "53b7a0fbc3",
"updatedAt": "2026-11-18T10:16:41Z"
"updatedAt": "2026-11-19T10:20:00Z"
}
+1 -1
View File
@@ -32,5 +32,5 @@
"frame": "#0A1524"
},
"build": "ecd52665f9",
"updatedAt": "2026-11-18T10:16:41Z"
"updatedAt": "2026-11-19T10:20:00Z"
}
+1 -1
View File
@@ -33,5 +33,5 @@
"frame": "#F4F6FB"
},
"build": "105653737d",
"updatedAt": "2026-11-18T10:16:41Z"
"updatedAt": "2026-11-19T10:20:00Z"
}
+29 -29
View File
@@ -1,46 +1,46 @@
{
"schema": 1,
"generated": "2026-11-18T13:05:57Z",
"generated": "2026-11-19T10:20:00Z",
"repository": "https://git.xhmcl.com/Morris/GC",
"branch": "main",
"modelDir": "model",
"launcher": {
"version": "1.1.0",
"version": "1.1.1",
"revision": "",
"packages": {
"win-x64": {
"path": "dist/win-amd64/GCL-1.1.0-win-amd64.zip",
"path": "dist/win-amd64/GCL-1.1.1-win-amd64.zip",
"dir": "dist/win-amd64",
"name": "GCL-1.1.0-win-amd64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-win-amd64.zip",
"sha256": "adfdca03bd84ad1a831da4925795dd4ee5b9f79f654a7a8208abcb6f3dbc4f3b",
"size": 74984771
"name": "GCL-1.1.1-win-amd64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-win-amd64.zip",
"sha256": "a03532606121280a1553ea73e56d6f9e8cc6cd9eefaf49f8c62857733199c10f",
"size": 74993562
},
"win-arm64": {
"path": "dist/win-arm64/GCL-1.1.0-win-arm64.zip",
"path": "dist/win-arm64/GCL-1.1.1-win-arm64.zip",
"dir": "dist/win-arm64",
"name": "GCL-1.1.0-win-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-win-arm64.zip",
"sha256": "2ef3f657a4ff61d9cc62100daed8d399ad0635f120c5f38589a4efd3a8e76d9a",
"size": 72527477
"name": "GCL-1.1.1-win-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-win-arm64.zip",
"sha256": "0cd3e045fbc2415bb170e545bb720841eb4c5ebc01a98e03105618a2b7bace46",
"size": 72535103
},
"osx-arm64": {
"path": "dist/mac-arm64/GCL-1.1.0-mac-arm64.zip",
"path": "dist/mac-arm64/GCL-1.1.1-mac-arm64.zip",
"dir": "dist/mac-arm64",
"name": "GCL-1.1.0-mac-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-mac-arm64.zip"
"name": "GCL-1.1.1-mac-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-mac-arm64.zip"
},
"osx-x64": {
"path": "dist/mac-x64/GCL-1.1.0-mac-x64.zip",
"path": "dist/mac-x64/GCL-1.1.1-mac-x64.zip",
"dir": "dist/mac-x64",
"name": "GCL-1.1.0-mac-x64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-mac-x64.zip"
"name": "GCL-1.1.1-mac-x64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-mac-x64.zip"
},
"linux-arm64": {
"path": "dist/linux-arm64/GCL-1.1.0-linux-arm64.zip",
"path": "dist/linux-arm64/GCL-1.1.1-linux-arm64.zip",
"dir": "dist/linux-arm64",
"name": "GCL-1.1.0-linux-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-linux-arm64.zip"
"name": "GCL-1.1.1-linux-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-linux-arm64.zip"
}
}
},
@@ -49,7 +49,7 @@
"id": "contour-map",
"version": "1.1",
"build": "773ab2161d",
"manifestSha256": "f673521f7462324a2a461253ed975c9f89abc4df34b937cad70a2a134623456d",
"manifestSha256": "ac3231d55175757b4c477ad6a3c398c041db9511061f0c650d2c10efca881103",
"filesSha256": "a6bdf9b4273aabee50c3c94ceab4d0abee15f0df1af90c58bdbb796e0d2d5699",
"files": 5,
"dir": "model/contour-map"
@@ -58,7 +58,7 @@
"id": "earth-geography",
"version": "1.9",
"build": "cc68b8863b",
"manifestSha256": "89e3afa8843fb080c81e062967790cddba54665b182e4a0819c8c1fd737d5189",
"manifestSha256": "f69ceb758c643701480af441da26dfa64e190c9e583073deba211bac3e2a6e1a",
"filesSha256": "c018ba481831e23d3183a38ac47251f19754c7464baa5d85b47cea7a49fcfa95",
"files": 11,
"dir": "model/earth-geography"
@@ -67,7 +67,7 @@
"id": "earth-revolution",
"version": "1.7",
"build": "53b7a0fbc3",
"manifestSha256": "31f20837131573957101f7fba9a653c8785f6dbda5fd678862148a9f7f87e841",
"manifestSha256": "ab257669cd2bc57289d7e86b361064034d6040e85603b65069a93aec8d457b0b",
"filesSha256": "4cd45b0324a77574a0da3a939c2a6faebc785c5a24cb50136d62a78a6ea2e9b1",
"files": 7,
"dir": "model/earth-revolution"
@@ -76,7 +76,7 @@
"id": "earth-rotation",
"version": "1.7",
"build": "ecd52665f9",
"manifestSha256": "caa89497a70b29db87e67d35cd7d3e27a18306646209b2178cfb71b73cfca8ba",
"manifestSha256": "d463d85e08fd7f0525f8e08a5e9ec49c0005b3d8ca97a7f9497e95bdbb0697cb",
"filesSha256": "594b005a6a9f36cd0b5d4e4a7a0b1ab42d53c8032832545b71c3915493d56c8e",
"files": 7,
"dir": "model/earth-rotation"
@@ -85,7 +85,7 @@
"id": "scale-calculator",
"version": "1.6",
"build": "105653737d",
"manifestSha256": "952d2529f3b62f6703456ae9bc6f867edac148b7ec9963444c426d26aa35208d",
"manifestSha256": "2ac714eafb9acb4e4f11567b61848441de0f65ac41eb4260bc2d868c9500f56d",
"filesSha256": "732dd26406e0f1e836970499d7ea644def332ce909d7f8aa0a403bbe7337e604",
"files": 6,
"dir": "model/scale-calculator"
@@ -94,8 +94,8 @@
"signature": {
"alg": "ECDSA-P256-SHA256",
"keyId": "gc-2026-12",
"value": "A/A7GQ2muXgqhtG+HVKkAvs0cAX90TXDgXOtxWCr8VTQW10FPUUroUSdmp4x5FUT7KNnrs1wIoz4/YSJspv9oQ==",
"contentSha256": "84488b35a9f45f44c3b6c21c400f6c0d0a26b5f0f045a696afd889cf5af6f2f1",
"signedAt": "2026-11-18T14:46:36Z"
"value": "U6j86/9PIUe5ZIqLRUlSIFf6EhODc7Dar1KvL7MecYujzNJ+ZnRrUg7aUT1rvktVwz4nyRacf9RYM2JQFb+qKw==",
"contentSha256": "585f22236fa1a50d4e99581c676b8ad694c5e352b12fe1bfed30c342b1f38690",
"signedAt": "2026-11-19T10:21:32Z"
}
}
+29 -29
View File
@@ -1,46 +1,46 @@
{
"schema": 1,
"generated": "2026-11-18T13:05:57Z",
"generated": "2026-11-19T10:20:00Z",
"repository": "https://git.xhmcl.com/Morris/GC",
"branch": "main",
"modelDir": "model",
"launcher": {
"version": "1.1.0",
"version": "1.1.1",
"revision": "",
"packages": {
"win-x64": {
"path": "dist/win-amd64/GCL-1.1.0-win-amd64.zip",
"path": "dist/win-amd64/GCL-1.1.1-win-amd64.zip",
"dir": "dist/win-amd64",
"name": "GCL-1.1.0-win-amd64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-win-amd64.zip",
"sha256": "adfdca03bd84ad1a831da4925795dd4ee5b9f79f654a7a8208abcb6f3dbc4f3b",
"size": 74984771
"name": "GCL-1.1.1-win-amd64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-win-amd64.zip",
"sha256": "a03532606121280a1553ea73e56d6f9e8cc6cd9eefaf49f8c62857733199c10f",
"size": 74993562
},
"win-arm64": {
"path": "dist/win-arm64/GCL-1.1.0-win-arm64.zip",
"path": "dist/win-arm64/GCL-1.1.1-win-arm64.zip",
"dir": "dist/win-arm64",
"name": "GCL-1.1.0-win-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-win-arm64.zip",
"sha256": "2ef3f657a4ff61d9cc62100daed8d399ad0635f120c5f38589a4efd3a8e76d9a",
"size": 72527477
"name": "GCL-1.1.1-win-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-win-arm64.zip",
"sha256": "0cd3e045fbc2415bb170e545bb720841eb4c5ebc01a98e03105618a2b7bace46",
"size": 72535103
},
"osx-arm64": {
"path": "dist/mac-arm64/GCL-1.1.0-mac-arm64.zip",
"path": "dist/mac-arm64/GCL-1.1.1-mac-arm64.zip",
"dir": "dist/mac-arm64",
"name": "GCL-1.1.0-mac-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-mac-arm64.zip"
"name": "GCL-1.1.1-mac-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-mac-arm64.zip"
},
"osx-x64": {
"path": "dist/mac-x64/GCL-1.1.0-mac-x64.zip",
"path": "dist/mac-x64/GCL-1.1.1-mac-x64.zip",
"dir": "dist/mac-x64",
"name": "GCL-1.1.0-mac-x64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-mac-x64.zip"
"name": "GCL-1.1.1-mac-x64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-mac-x64.zip"
},
"linux-arm64": {
"path": "dist/linux-arm64/GCL-1.1.0-linux-arm64.zip",
"path": "dist/linux-arm64/GCL-1.1.1-linux-arm64.zip",
"dir": "dist/linux-arm64",
"name": "GCL-1.1.0-linux-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.0/GCL-1.1.0-linux-arm64.zip"
"name": "GCL-1.1.1-linux-arm64.zip",
"url": "https://git.xhmcl.com/Morris/GC/releases/download/1.1.1/GCL-1.1.1-linux-arm64.zip"
}
}
},
@@ -49,7 +49,7 @@
"id": "contour-map",
"version": "1.1",
"build": "773ab2161d",
"manifestSha256": "f673521f7462324a2a461253ed975c9f89abc4df34b937cad70a2a134623456d",
"manifestSha256": "ac3231d55175757b4c477ad6a3c398c041db9511061f0c650d2c10efca881103",
"filesSha256": "a6bdf9b4273aabee50c3c94ceab4d0abee15f0df1af90c58bdbb796e0d2d5699",
"files": 5,
"dir": "model/contour-map"
@@ -58,7 +58,7 @@
"id": "earth-geography",
"version": "1.9",
"build": "cc68b8863b",
"manifestSha256": "89e3afa8843fb080c81e062967790cddba54665b182e4a0819c8c1fd737d5189",
"manifestSha256": "f69ceb758c643701480af441da26dfa64e190c9e583073deba211bac3e2a6e1a",
"filesSha256": "c018ba481831e23d3183a38ac47251f19754c7464baa5d85b47cea7a49fcfa95",
"files": 11,
"dir": "model/earth-geography"
@@ -67,7 +67,7 @@
"id": "earth-revolution",
"version": "1.7",
"build": "53b7a0fbc3",
"manifestSha256": "31f20837131573957101f7fba9a653c8785f6dbda5fd678862148a9f7f87e841",
"manifestSha256": "ab257669cd2bc57289d7e86b361064034d6040e85603b65069a93aec8d457b0b",
"filesSha256": "4cd45b0324a77574a0da3a939c2a6faebc785c5a24cb50136d62a78a6ea2e9b1",
"files": 7,
"dir": "model/earth-revolution"
@@ -76,7 +76,7 @@
"id": "earth-rotation",
"version": "1.7",
"build": "ecd52665f9",
"manifestSha256": "caa89497a70b29db87e67d35cd7d3e27a18306646209b2178cfb71b73cfca8ba",
"manifestSha256": "d463d85e08fd7f0525f8e08a5e9ec49c0005b3d8ca97a7f9497e95bdbb0697cb",
"filesSha256": "594b005a6a9f36cd0b5d4e4a7a0b1ab42d53c8032832545b71c3915493d56c8e",
"files": 7,
"dir": "model/earth-rotation"
@@ -85,7 +85,7 @@
"id": "scale-calculator",
"version": "1.6",
"build": "105653737d",
"manifestSha256": "952d2529f3b62f6703456ae9bc6f867edac148b7ec9963444c426d26aa35208d",
"manifestSha256": "2ac714eafb9acb4e4f11567b61848441de0f65ac41eb4260bc2d868c9500f56d",
"filesSha256": "732dd26406e0f1e836970499d7ea644def332ce909d7f8aa0a403bbe7337e604",
"files": 6,
"dir": "model/scale-calculator"
@@ -94,8 +94,8 @@
"signature": {
"alg": "ECDSA-P256-SHA256",
"keyId": "gc-2026-12",
"value": "A/A7GQ2muXgqhtG+HVKkAvs0cAX90TXDgXOtxWCr8VTQW10FPUUroUSdmp4x5FUT7KNnrs1wIoz4/YSJspv9oQ==",
"contentSha256": "84488b35a9f45f44c3b6c21c400f6c0d0a26b5f0f045a696afd889cf5af6f2f1",
"signedAt": "2026-11-18T14:46:36Z"
"value": "U6j86/9PIUe5ZIqLRUlSIFf6EhODc7Dar1KvL7MecYujzNJ+ZnRrUg7aUT1rvktVwz4nyRacf9RYM2JQFb+qKw==",
"contentSha256": "585f22236fa1a50d4e99581c676b8ad694c5e352b12fe1bfed30c342b1f38690",
"signedAt": "2026-11-19T10:21:32Z"
}
}