Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b2f263dea | ||
|
|
a18d0ea1a8 | ||
|
|
06eb4875a1 | ||
|
|
2b4ffc7ce5 | ||
|
|
d379902a7a | ||
|
|
056d64a3bc | ||
|
|
fa492bbb19 | ||
|
|
8904230a6f |
No files matched your search
@@ -0,0 +1,397 @@
|
||||
# GC-UI 夜间 alpha 构建(Gitea Actions)
|
||||
#
|
||||
# 触发:每天 21:00(Asia/Shanghai)自动跑一次,产出 Windows 与 macOS 的 Flutter 前端产物,
|
||||
# 发布为一个「预览版(prerelease)」Release —— 不占用 latest。
|
||||
# 手动:Actions 页面点 Run workflow(Gitea 的 workflow_dispatch),用于验证 runner 是否就绪;
|
||||
# 也可以从命令行调 POST /api/v1/repos/{owner}/{repo}/actions/workflows/{file}/dispatches。
|
||||
#
|
||||
# 为什么是 .gitea/workflows/:本仓库是自建 Gitea,不是 GitHub。Gitea Actions 语法与
|
||||
# GitHub Actions 基本一致,但工作流目录是 .gitea/workflows/,API 前缀是 /api/v1,
|
||||
# runner 标签必须与 act_runner 上注册的 label 一致(见 GC-UI/CI.md)。
|
||||
#
|
||||
# 为什么 alpha 不会变成 latest:Gitea 的 /releases/latest 按定义只返回「最近一个既非草稿
|
||||
# 也非 prerelease」的发布,所以 prerelease=true 的版本永远不会被当成 latest。
|
||||
# publish 任务最后还会主动断言一次,确认 latest 没有指向本次 tag。
|
||||
|
||||
name: GC-UI Alpha
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# 每天晚上 21:00,北京时间。
|
||||
# Gitea 1.23 起 Actions 的 cron 默认按 UTC 解释,这里显式带 TZ= 前缀(robfig/cron 支持的
|
||||
# 时区前缀语法),这样不依赖服务器自身时区设置。
|
||||
# 如果所在实例不认 TZ= 前缀,改用等效的 UTC 写法 '0 13 * * *'。
|
||||
- cron: 'TZ=Asia/Shanghai 0 21 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
note:
|
||||
description: '额外写进 Release 说明的备注(可留空)'
|
||||
required: false
|
||||
default: ''
|
||||
|
||||
# 用 github.token 往本仓库建 Release / 传附件,需要 contents 写权限
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
GITEA_API: ${{ github.server_url }}/api/v1
|
||||
REPO: ${{ github.repository }}
|
||||
FRONTEND_DIR: GC-UI/frontend
|
||||
# runner 上没预装 Flutter 时,按这个版本自举(需 >= 3.5.4,与 pubspec.yaml 的 sdk 约束对齐)
|
||||
FLUTTER_VERSION: 3.24.5
|
||||
|
||||
jobs:
|
||||
# ---------------------------------------------------------------- 1. 版本与草稿
|
||||
prepare:
|
||||
name: 计算 alpha 版本并创建预览版草稿
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.meta.outputs.version }}
|
||||
base_version: ${{ steps.meta.outputs.base_version }}
|
||||
tag: ${{ steps.meta.outputs.tag }}
|
||||
build_number: ${{ steps.meta.outputs.build_number }}
|
||||
release_id: ${{ steps.release.outputs.release_id }}
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 计算版本号
|
||||
id: meta
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# 基础版本取自 version.json 的 launcher.version(例如 1.0.7),与启动器保持一致;
|
||||
# alpha 后缀只表示构建通道,写在 tag / Release 标题里。
|
||||
BASE=$(python3 -c "import json;print(json.load(open('version.json'))['launcher']['version'])")
|
||||
if [ -z "${BASE:-}" ]; then
|
||||
echo "::error::无法从 version.json 读取 launcher.version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 北京时间当天日期,让产物名和 tag 与「每晚 9 点」对得上
|
||||
DATE=$(TZ=Asia/Shanghai date +%Y%m%d)
|
||||
# 同一天重跑时用 run_number 区分,tag 不重复
|
||||
VERSION="${BASE}-alpha.${DATE}.${{ github.run_number }}"
|
||||
|
||||
# 传给 flutter 的版本号必须是纯数字分段:
|
||||
# --build-name → macOS CFBundleShortVersionString,只能是 a.b.c
|
||||
# --build-number → CFBundleVersion / 文件版本号,只能是数字
|
||||
# 所以 alpha 的日期与序号放在 build-number 里,不放进 build-name。
|
||||
BUILD_NUMBER="${DATE}$(printf '%02d' "${{ github.run_number }}")"
|
||||
|
||||
{
|
||||
echo "version=$VERSION"
|
||||
echo "base_version=$BASE"
|
||||
echo "tag=v$VERSION"
|
||||
echo "build_number=$BUILD_NUMBER"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
echo "alpha 版本: $VERSION(build-name=$BASE, build-number=$BUILD_NUMBER)"
|
||||
|
||||
- name: 创建预览版草稿
|
||||
id: release
|
||||
env:
|
||||
# 优先用仓库 Secrets 里的 RELEASE_TOKEN;没配就退回 Gitea 自动注入的 github.token。
|
||||
# 某些实例上自动 token 没有 releases 写权限,那时只需在
|
||||
# Settings → Actions → Secrets 加一个 RELEASE_TOKEN,不用改本文件。
|
||||
TOKEN_OVERRIDE: ${{ secrets.RELEASE_TOKEN }}
|
||||
TOKEN_DEFAULT: ${{ github.token }}
|
||||
TAG: ${{ steps.meta.outputs.tag }}
|
||||
VERSION: ${{ steps.meta.outputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TOKEN="${TOKEN_OVERRIDE:-$TOKEN_DEFAULT}"
|
||||
if [ -z "${TOKEN:-}" ]; then
|
||||
echo "::error::拿不到 Gitea token,无法创建 Release"
|
||||
exit 1
|
||||
fi
|
||||
api="$GITEA_API/repos/$REPO"
|
||||
auth=(-H "Authorization: token $TOKEN")
|
||||
|
||||
# 可重跑:同 tag 的旧发布先删掉(只会是同一天重跑留下的)
|
||||
code=$(curl -sS -o /tmp/existing.json -w '%{http_code}' "${auth[@]}" "$api/releases/tags/$TAG")
|
||||
if [ "$code" = "200" ]; then
|
||||
old_id=$(python3 -c "import json;print(json.load(open('/tmp/existing.json'))['id'])")
|
||||
echo "已存在同 tag 发布 id=$old_id,先删除"
|
||||
curl -sS -X DELETE "${auth[@]}" "$api/releases/$old_id" >/dev/null
|
||||
fi
|
||||
|
||||
# draft=true + prerelease=true:
|
||||
# prerelease → 永不成为 latest
|
||||
# draft → 两个平台都构建成功前不对外可见,由 publish 任务翻成 false
|
||||
payload=$(python3 - "$TAG" "$VERSION" "${{ github.sha }}" "${{ github.server_url }}" <<'PY'
|
||||
import json, sys
|
||||
tag, version, sha, server = sys.argv[1:5]
|
||||
short = sha[:7]
|
||||
body = (
|
||||
"GC-UI 夜间 alpha 构建(自动生成,**预览版 / prerelease**)。\n\n"
|
||||
"- 版本:`%s`\n"
|
||||
"- 提交:`%s`\n"
|
||||
"- 构建来源:%s/commit/%s\n"
|
||||
"- 通道:alpha —— 每晚 21:00(Asia/Shanghai)自动构建\n\n"
|
||||
"产物说明:\n\n"
|
||||
"| 文件 | 平台 | 内容 |\n"
|
||||
"|---|---|---|\n"
|
||||
"| `gc-ui-alpha-windows-x64.zip` | Windows x64 | Flutter 前端 release 目录 |\n"
|
||||
"| `gc-ui-alpha-macos-<arch>.zip` | macOS | `gc_ui.app` 应用包 |\n\n"
|
||||
"这是前端产物,运行时需要配合 `GC-UI/backend/GC.UI.Server` 后端(默认 `127.0.0.1:17890`)。\n"
|
||||
"未做代码签名,首次运行系统可能会提示。\n\n"
|
||||
"> 本发布不是 latest:prerelease 的版本不会出现在「最新版本」里。\n"
|
||||
) % (version, short, server, sha)
|
||||
print(json.dumps({
|
||||
"tag_name": tag,
|
||||
"target_commitish": sha,
|
||||
"name": "GC-UI Alpha " + version,
|
||||
"body": body,
|
||||
"draft": True,
|
||||
"prerelease": True,
|
||||
}))
|
||||
PY
|
||||
)
|
||||
|
||||
resp=$(curl -sS -X POST "${auth[@]}" -H 'Content-Type: application/json' -d "$payload" "$api/releases")
|
||||
rid=$(printf '%s' "$resp" | python3 -c "import json,sys;print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
|
||||
if [ -z "$rid" ]; then
|
||||
echo "::error::创建 Release 失败: $resp"
|
||||
exit 1
|
||||
fi
|
||||
echo "release_id=$rid" >> "$GITHUB_OUTPUT"
|
||||
echo "已创建预览版草稿 id=$rid tag=$TAG"
|
||||
|
||||
# ---------------------------------------------------------------- 2. Windows
|
||||
windows:
|
||||
name: 构建 Windows 前端
|
||||
needs: prepare
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 准备 Flutter SDK
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
if (Get-Command flutter -ErrorAction SilentlyContinue) {
|
||||
Write-Host 'runner 已自带 Flutter:'
|
||||
flutter --version
|
||||
} else {
|
||||
Write-Host "runner 上没有 Flutter,按官方 SDK $env:FLUTTER_VERSION 自举"
|
||||
$url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_$env:FLUTTER_VERSION-stable.zip"
|
||||
$zip = Join-Path $env:RUNNER_TEMP 'flutter.zip'
|
||||
curl.exe -sSL --retry 3 -o $zip $url
|
||||
if ($LASTEXITCODE -ne 0) { Write-Error "下载 Flutter SDK 失败: $url"; exit 1 }
|
||||
Expand-Archive -Path $zip -DestinationPath $env:RUNNER_TEMP -Force
|
||||
$flutterBin = Join-Path $env:RUNNER_TEMP 'flutter\bin'
|
||||
$flutterBin | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8
|
||||
$env:PATH = "$flutterBin;$env:PATH"
|
||||
flutter --version
|
||||
}
|
||||
# Windows 桌面构建依赖 VS Build Tools 的「使用 C++ 的桌面开发」工作负载
|
||||
$doctor = flutter doctor -v 2>&1 | Out-String
|
||||
if ($doctor -notmatch 'Visual Studio') {
|
||||
Write-Host '::warning::flutter doctor 没看到 Visual Studio,Windows 构建很可能失败'
|
||||
}
|
||||
Write-Host "PROCESSOR_ARCHITECTURE=$env:PROCESSOR_ARCHITECTURE"
|
||||
|
||||
- name: 构建前端(release)
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ needs.prepare.outputs.base_version }}
|
||||
BUILD_NUMBER: ${{ needs.prepare.outputs.build_number }}
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
flutter config --no-analytics 2>&1 | Out-Null
|
||||
Set-Location $env:FRONTEND_DIR
|
||||
flutter pub get
|
||||
if ($LASTEXITCODE -ne 0) { exit 1 }
|
||||
flutter build windows --release --build-name=$env:VERSION --build-number=$env:BUILD_NUMBER
|
||||
if ($LASTEXITCODE -ne 0) { exit 1 }
|
||||
|
||||
- name: 打包
|
||||
id: pack
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
# x64 / arm64 的产物都在 build\windows\<arch>\runner\Release,直接找实际存在的那个
|
||||
$out = Get-ChildItem "$env:FRONTEND_DIR\build\windows" -Directory -ErrorAction SilentlyContinue |
|
||||
ForEach-Object { Join-Path $_.FullName 'runner\Release' } |
|
||||
Where-Object { Test-Path $_ } |
|
||||
Select-Object -First 1
|
||||
if (-not $out) {
|
||||
Write-Error "没有找到 Windows 产物目录($env:FRONTEND_DIR\build\windows\*\runner\Release)"
|
||||
exit 1
|
||||
}
|
||||
$arch = if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { 'arm64' } else { 'x64' }
|
||||
$name = "gc-ui-alpha-windows-$arch.zip"
|
||||
New-Item -ItemType Directory -Force -Path dist | Out-Null
|
||||
$zip = Join-Path (Get-Location) "dist\$name"
|
||||
Compress-Archive -Path (Join-Path $out '*') -DestinationPath $zip -Force
|
||||
Get-Item $zip | Format-List Name, Length
|
||||
"asset=$zip" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
|
||||
"asset_name=$name" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
|
||||
|
||||
- name: 上传到预览版
|
||||
shell: pwsh
|
||||
env:
|
||||
TOKEN_OVERRIDE: ${{ secrets.RELEASE_TOKEN }}
|
||||
TOKEN_DEFAULT: ${{ github.token }}
|
||||
RELEASE_ID: ${{ needs.prepare.outputs.release_id }}
|
||||
ASSET: ${{ steps.pack.outputs.asset }}
|
||||
ASSET_NAME: ${{ steps.pack.outputs.asset_name }}
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$token = if ($env:TOKEN_OVERRIDE) { $env:TOKEN_OVERRIDE } else { $env:TOKEN_DEFAULT }
|
||||
if (-not $token) { Write-Error '拿不到 Gitea token'; exit 1 }
|
||||
$url = "$env:GITEA_API/repos/$env:REPO/releases/$env:RELEASE_ID/assets?name=$env:ASSET_NAME"
|
||||
curl.exe -sS -X POST -H "Authorization: token $token" -H "Content-Type: application/octet-stream" --data-binary "@$env:ASSET" $url
|
||||
if ($LASTEXITCODE -ne 0) { exit 1 }
|
||||
Write-Host "`n已上传 $env:ASSET_NAME"
|
||||
|
||||
# ---------------------------------------------------------------- 3. macOS
|
||||
macos:
|
||||
name: 构建 macOS 前端
|
||||
needs: prepare
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 准备 Flutter SDK
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if command -v flutter >/dev/null 2>&1; then
|
||||
echo "runner 已自带 Flutter:"
|
||||
flutter --version
|
||||
else
|
||||
echo "runner 上没有 Flutter,按官方 SDK $FLUTTER_VERSION 自举"
|
||||
case "$(uname -m)" in
|
||||
arm64) SUFFIX="macos_arm64" ;;
|
||||
*) SUFFIX="macos" ;;
|
||||
esac
|
||||
URL="https://storage.googleapis.com/flutter_infra_release/releases/stable/${SUFFIX}/flutter_${SUFFIX}_${FLUTTER_VERSION}-stable.zip"
|
||||
ZIP="$RUNNER_TEMP/flutter.zip"
|
||||
curl -sSL --retry 3 -o "$ZIP" "$URL"
|
||||
rm -rf "$RUNNER_TEMP/flutter"
|
||||
unzip -q "$ZIP" -d "$RUNNER_TEMP"
|
||||
echo "$RUNNER_TEMP/flutter/bin" >> "$GITHUB_PATH"
|
||||
export PATH="$RUNNER_TEMP/flutter/bin:$PATH"
|
||||
flutter --version
|
||||
fi
|
||||
xcodebuild -version || echo "::warning::没找到 xcodebuild,macOS 构建很可能失败"
|
||||
|
||||
- name: 构建前端(release)
|
||||
env:
|
||||
VERSION: ${{ needs.prepare.outputs.base_version }}
|
||||
BUILD_NUMBER: ${{ needs.prepare.outputs.build_number }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
flutter config --no-analytics || true
|
||||
cd "$FRONTEND_DIR"
|
||||
flutter pub get
|
||||
flutter build macos --release --build-name="$VERSION" --build-number="$BUILD_NUMBER"
|
||||
|
||||
- name: 打包
|
||||
id: pack
|
||||
run: |
|
||||
set -euo pipefail
|
||||
APP="$FRONTEND_DIR/build/macos/Build/Products/Release/gc_ui.app"
|
||||
if [ ! -d "$APP" ]; then
|
||||
echo "::error::没有找到 macOS 产物: $APP"
|
||||
exit 1
|
||||
fi
|
||||
case "$(uname -m)" in
|
||||
arm64) ARCH=arm64 ;;
|
||||
*) ARCH=x64 ;;
|
||||
esac
|
||||
NAME="gc-ui-alpha-macos-${ARCH}.zip"
|
||||
mkdir -p dist
|
||||
# 用 ditto 才能保真 .app 内的符号链接与权限,zip -r 会破坏 .app 结构
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP" "dist/$NAME"
|
||||
ls -lh "dist/$NAME"
|
||||
{
|
||||
echo "asset=dist/$NAME"
|
||||
echo "asset_name=$NAME"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: 上传到预览版
|
||||
env:
|
||||
TOKEN_OVERRIDE: ${{ secrets.RELEASE_TOKEN }}
|
||||
TOKEN_DEFAULT: ${{ github.token }}
|
||||
RELEASE_ID: ${{ needs.prepare.outputs.release_id }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TOKEN="${TOKEN_OVERRIDE:-$TOKEN_DEFAULT}"
|
||||
if [ -z "${TOKEN:-}" ]; then
|
||||
echo "::error::拿不到 Gitea token"
|
||||
exit 1
|
||||
fi
|
||||
curl -sS -X POST \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary "@${{ steps.pack.outputs.asset }}" \
|
||||
"$GITEA_API/repos/$REPO/releases/$RELEASE_ID/assets?name=${{ steps.pack.outputs.asset_name }}"
|
||||
echo
|
||||
echo "已上传 ${{ steps.pack.outputs.asset_name }}"
|
||||
|
||||
# ---------------------------------------------------------------- 4. 发布预览版
|
||||
publish:
|
||||
name: 发布预览版(保持 prerelease,不占用 latest)
|
||||
needs: [prepare, windows, macos]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 把草稿翻成正式预览版
|
||||
env:
|
||||
TOKEN_OVERRIDE: ${{ secrets.RELEASE_TOKEN }}
|
||||
TOKEN_DEFAULT: ${{ github.token }}
|
||||
RELEASE_ID: ${{ needs.prepare.outputs.release_id }}
|
||||
TAG: ${{ needs.prepare.outputs.tag }}
|
||||
NOTE: ${{ github.event.inputs.note }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TOKEN="${TOKEN_OVERRIDE:-$TOKEN_DEFAULT}"
|
||||
api="$GITEA_API/repos/$REPO"
|
||||
auth=(-H "Authorization: token $TOKEN")
|
||||
|
||||
code=$(curl -sS -o /tmp/rel.json -w '%{http_code}' "${auth[@]}" "$api/releases/$RELEASE_ID")
|
||||
if [ "$code" != "200" ]; then
|
||||
echo "::error::读不到 Release $RELEASE_ID (HTTP $code)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
payload=$(python3 - /tmp/rel.json "${NOTE:-}" <<'PY'
|
||||
import json, sys
|
||||
rel = json.load(open(sys.argv[1]))
|
||||
note = (sys.argv[2] or "").strip()
|
||||
body = rel.get("body") or ""
|
||||
if note:
|
||||
body += "\n---\n\n备注:" + note + "\n"
|
||||
print(json.dumps({
|
||||
"body": body,
|
||||
"draft": False, # 可见
|
||||
"prerelease": True, # 关键:永不成为 latest
|
||||
}))
|
||||
PY
|
||||
)
|
||||
|
||||
patched=$(curl -sS -X PATCH "${auth[@]}" -H 'Content-Type: application/json' -d "$payload" "$api/releases/$RELEASE_ID")
|
||||
printf '%s' "$patched" > /tmp/patched.json
|
||||
python3 - <<'PY'
|
||||
import json
|
||||
d = json.load(open('/tmp/patched.json'))
|
||||
print('发布成功:', d.get('html_url'), '| prerelease =', d.get('prerelease'), '| draft =', d.get('draft'))
|
||||
assert d.get('prerelease') is True, 'Release 没有被标记成 prerelease,会顶掉 latest'
|
||||
assert d.get('draft') is False, 'Release 仍是草稿'
|
||||
PY
|
||||
|
||||
- name: 断言 latest 未被占用
|
||||
env:
|
||||
TAG: ${{ needs.prepare.outputs.tag }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
latest_tag=$(curl -sS "$GITEA_API/repos/$REPO/releases/latest" \
|
||||
| python3 -c "import json,sys;print(json.load(sys.stdin).get('tag_name') or '')" || true)
|
||||
echo "本次 tag: $TAG"
|
||||
echo "latest 指向: ${latest_tag:-(空)}"
|
||||
if [ "$latest_tag" = "$TAG" ]; then
|
||||
echo "::error::本次 alpha 成了 latest,prerelease 标记失效"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK:alpha 未占用 latest"
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
|
||||
- name: 保存构建产物(便于排查)
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nightly-build
|
||||
path: dist/*.zip
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<AvaloniaVersion>11.3.9</AvaloniaVersion>
|
||||
<MvvmVersion>8.2.2</MvvmVersion>
|
||||
<Version>1.0.7</Version>
|
||||
<Company>NeoRF</Company>
|
||||
<Company>Morris</Company>
|
||||
<Product>GC</Product>
|
||||
<NeutralLanguage>zh-Hans</NeutralLanguage>
|
||||
</PropertyGroup>
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
# GC-UI 持续集成
|
||||
|
||||
夜间 alpha 构建的工作流在 [`.gitea/workflows/gc-ui-alpha.yml`](../.gitea/workflows/gc-ui-alpha.yml)。
|
||||
本仓库是自建 Gitea(不是 GitHub),所以目录是 `.gitea/workflows/`,语法与 GitHub Actions 基本一致,
|
||||
差异集中在 **runner 标签** 和 **API 前缀** 两处。
|
||||
|
||||
## 它做什么
|
||||
|
||||
| 任务 | 运行环境 | 产出 |
|
||||
|---|---|---|
|
||||
| `prepare` | `ubuntu-latest` | 算版本号,建一个 **草稿 + prerelease** 的 Release |
|
||||
| `windows` | `windows-latest` | `gc-ui-alpha-windows-x64.zip`(Flutter release 目录) |
|
||||
| `macos` | `macos-latest` | `gc-ui-alpha-macos-<arch>.zip`(`gc_ui.app`,用 `ditto` 打包保真) |
|
||||
| `publish` | `ubuntu-latest` | 两个平台都成功后才把草稿翻成可见,并断言 latest 没被占用 |
|
||||
|
||||
- **定时**:每天 **21:00(Asia/Shanghai)**,cron 写作 `TZ=Asia/Shanghai 0 21 * * *`。
|
||||
Gitea 1.23 起 Actions 的 cron 默认按 **UTC** 解释,所以这里显式带时区前缀;
|
||||
若你的实例不认 `TZ=`,改成等效的 UTC 写法 `0 13 * * *`。
|
||||
- **alpha 不占用 latest**:Gitea 的 `/releases/latest` 只返回「最近一个既非草稿、也非 prerelease」
|
||||
的发布,所以 `prerelease: true` 的夜间版本永远不会成为 latest。`publish` 任务最后会再查一次
|
||||
`/releases/latest`,一旦指向本次 tag 就 fail。
|
||||
- **手动触发**:Actions 页面 Run workflow;或
|
||||
|
||||
```bash
|
||||
curl -X POST -u "USER:TOKEN" \
|
||||
"https://git.xhmcl.com/api/v1/repos/Morris/GC/actions/workflows/gc-ui-alpha.yml/dispatches" \
|
||||
-H 'Content-Type: application/json' -d '{"ref":"gc-ui","inputs":{"note":"手动验证"}}'
|
||||
```
|
||||
|
||||
## 前置条件(缺一不可)
|
||||
|
||||
### 1. 必须有 act_runner,并且带这三个标签
|
||||
|
||||
```bash
|
||||
# 在准备当构建机的机器上(Windows / macOS 各一台,或一台 Linux 只跑 prepare/publish)
|
||||
docker run -d --name gitea-runner \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /path/to/runner-data:/data \
|
||||
-e GITEA_INSTANCE_URL=https://git.xhmcl.com \
|
||||
-e GITEA_RUNNER_REGISTRATION_TOKEN=<在 站点管理 → Actions → Runners 里拿> \
|
||||
-e GITEA_RUNNER_LABELS=ubuntu-latest:docker://gitea/runner-images:ubuntu-latest,windows-latest:docker://<你的 windows 镜像>,macos-latest:docker://<你的 macos 镜像> \
|
||||
gitea/act_runner:latest
|
||||
```
|
||||
|
||||
关键点:**`runs-on` 的值必须和 runner 上注册的 label 完全一致**,否则任务永远排队。
|
||||
Windows / macOS 的构建**不能**跑在 Linux docker 容器里(一个要 MSVC,一个要 Xcode),
|
||||
所以那两个 label 需要指向真实的 Windows / macOS 机器(自托管 runner)。
|
||||
|
||||
### 2. Flutter SDK
|
||||
|
||||
工作流里有一条「准备 Flutter SDK」:机器上已有 `flutter` 就直接用;没有就按
|
||||
`FLUTTER_VERSION`(默认 3.24.5,需 >= 3.5.4 以匹配 `pubspec.yaml` 的 `sdk: ^3.5.4`)从
|
||||
`storage.googleapis.com` 下载官方 SDK 并写进 `PATH`。所以机器只要能上外网就够,不必预装。
|
||||
网络受限时请预装 Flutter 并确保 `flutter` 在 `PATH` 里。
|
||||
|
||||
Windows 还需要 **VS Build Tools 的「使用 C++ 的桌面开发」工作负载**;macOS 需要 **Xcode**。
|
||||
|
||||
### 3. Token
|
||||
|
||||
优先用仓库 Secrets 里的 `RELEASE_TOKEN`(Gitea 设置 → Actions → Secrets,需 `repo` 权限的个人访问令牌);
|
||||
没配就退回 Gitea 自动注入的 `github.token`。若自动 token 没有 release 权限,
|
||||
创建 Release 那步会报 401/403 —— 这时配一个 `RELEASE_TOKEN` 即可,不用改工作流文件。
|
||||
|
||||
## 本地构建(不经 CI)
|
||||
|
||||
```bash
|
||||
# macOS
|
||||
./GC-UI/build-ui.sh macos
|
||||
|
||||
# Windows
|
||||
GC-UI\build-ui.cmd
|
||||
```
|
||||
@@ -124,6 +124,7 @@ class I18n {
|
||||
'common.error': '出错了',
|
||||
'common.refresh': '刷新',
|
||||
'about.developers': '开发者',
|
||||
'about.contributorsHint': '来自仓库提交记录',
|
||||
'about.repository': '仓库',
|
||||
'about.openRepository': '打开仓库',
|
||||
'about.contributions': '{0} 次提交',
|
||||
@@ -248,6 +249,7 @@ class I18n {
|
||||
'common.error': 'Something went wrong',
|
||||
'common.refresh': 'Refresh',
|
||||
'about.developers': 'Developers',
|
||||
'about.contributorsHint': 'From repository commits',
|
||||
'about.repository': 'Repository',
|
||||
'about.openRepository': 'Open repository',
|
||||
'about.contributions': '{0} commits',
|
||||
|
||||
@@ -1786,7 +1786,10 @@ class _AboutPageViewState extends State<AboutPageView> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
GcSectionTitle(T('about.developers')),
|
||||
GcSectionTitle(
|
||||
T('about.developers'),
|
||||
trailing: GcHint(T('about.contributorsHint')),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
if ((_about?.contributors ?? const <ContributorInfo>[]).isEmpty)
|
||||
GcHint(T('about.noContributors'))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
@@ -7,25 +8,22 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace GC.Services;
|
||||
|
||||
/// <summary>GitCode 仓库的一位贡献者。</summary>
|
||||
/// <summary>仓库的一位贡献者(按人归并后的结果)。</summary>
|
||||
public sealed class Contributor
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
public string? Email { get; set; }
|
||||
/// <summary>提交次数(API 里的 contributions)。</summary>
|
||||
/// <summary>提交次数。</summary>
|
||||
public int Contributions { get; set; }
|
||||
|
||||
/// <summary>接口直接返回的头像地址(Gitea 的 avatar_url);为空时按邮箱哈希生成。</summary>
|
||||
public string? Avatar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 登录名 -> 展示名。GitCode 的 contributors 接口只返回账号登录名,
|
||||
/// 不返回真实姓名,这里做一层映射,让关于页显示作者想展示的名字。
|
||||
/// </summary>
|
||||
private static readonly Dictionary<string, string> DisplayNames = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["Morris_1"] = "Morris"
|
||||
};
|
||||
/// <summary>最近一次提交时间,用于贡献数相同时排序。</summary>
|
||||
public DateTimeOffset? LastCommit { get; set; }
|
||||
|
||||
/// <summary>关于页展示的名字。</summary>
|
||||
public string DisplayName => string.IsNullOrWhiteSpace(Name) ? "匿名" : Name;
|
||||
|
||||
/// <summary>头像地址:优先用接口返回的头像,否则按邮箱哈希拼 GitCode 头像。</summary>
|
||||
public string? AvatarUrl =>
|
||||
@@ -37,25 +35,43 @@ public sealed class Contributor
|
||||
System.Security.Cryptography.MD5.HashData(
|
||||
System.Text.Encoding.UTF8.GetBytes(Email!.Trim().ToLowerInvariant())))
|
||||
.ToLowerInvariant()}";
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Name)) return "匿名";
|
||||
return DisplayNames.TryGetValue(Name.Trim(), out var mapped) ? mapped : Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取 GitCode 仓库的贡献者列表(用于「关于」页面展示开发者)。
|
||||
/// 失败时静默返回空列表,不影响关于页其它内容。
|
||||
/// 读取仓库的真实贡献者:翻页拉提交记录,按作者归并统计。
|
||||
///
|
||||
/// 为什么不用 /collaborators:Gitea 的协同者列表要求登录,且只包含被显式
|
||||
/// 添加的协作者,和「谁真的写了代码」是两回事。这里直接读 /commits,
|
||||
/// 统计每个人真实的提交数,失败时静默返回空列表,不影响关于页其它内容。
|
||||
/// </summary>
|
||||
public static class ContributorsService
|
||||
{
|
||||
private const int PageSize = 50;
|
||||
private const int MaxPages = 12;
|
||||
private const int MaxShown = 8;
|
||||
private static readonly TimeSpan CacheTtl = TimeSpan.FromMinutes(10);
|
||||
|
||||
private static readonly HttpClient Http = CreateHttp();
|
||||
|
||||
/// <summary>同一作者的多个 git 身份 -> 统一展示名。</summary>
|
||||
private static readonly Dictionary<string, string> Aliases = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["morris"] = "Morris",
|
||||
["morris_1"] = "Morris",
|
||||
["2509_92447106"] = "Morris",
|
||||
["chenmoyuan1214@qq.com"] = "Morris",
|
||||
["morris@xhmcl.com"] = "Morris",
|
||||
};
|
||||
|
||||
/// <summary>自动化提交(CI / 助手账号),不计入开发者。</summary>
|
||||
private static readonly HashSet<string> IgnoredEmails = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
"agent@teamily.ai",
|
||||
};
|
||||
|
||||
private static readonly object Gate = new();
|
||||
private static (DateTimeOffset At, string Key, List<Contributor> Items)? _cache;
|
||||
|
||||
private static HttpClient CreateHttp()
|
||||
{
|
||||
var c = new HttpClient { Timeout = TimeSpan.FromSeconds(10) };
|
||||
@@ -64,74 +80,172 @@ public static class ContributorsService
|
||||
return c;
|
||||
}
|
||||
|
||||
/// <summary>按仓库地址推导贡献者接口:Xhmcl(Gitea) 与 GitCode 结构不同。</summary>
|
||||
/// <summary>按仓库地址推导接口:Xhmcl(Gitea) 与 GitCode 结构不同。</summary>
|
||||
public static string BuildUrl(string repository)
|
||||
{
|
||||
var raw = string.IsNullOrWhiteSpace(repository)
|
||||
? SourcePreset.Xhmcl.HomeUrl : repository.Trim();
|
||||
if (!Uri.TryCreate(raw, UriKind.Absolute, out var uri))
|
||||
return "https://git.xhmcl.com/api/v1/repos/Morris/GC/collaborators";
|
||||
return "https://git.xhmcl.com/api/v1/repos/Morris/GC/commits";
|
||||
|
||||
var parts = uri.AbsolutePath.Trim('/').Split('/', StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parts.Length < 2)
|
||||
return "https://git.xhmcl.com/api/v1/repos/Morris/GC/collaborators";
|
||||
return "https://git.xhmcl.com/api/v1/repos/Morris/GC/commits";
|
||||
|
||||
var repo = parts[1].EndsWith(".git", StringComparison.OrdinalIgnoreCase)
|
||||
? parts[1][..^4] : parts[1];
|
||||
|
||||
// GitCode 代码保留,仅在仓库确实指向 GitCode 时才走它。
|
||||
// GitCode 的实现在仓库仍指向 gitcode.com 时才走它。
|
||||
if (uri.Host.Contains("gitcode.com", StringComparison.OrdinalIgnoreCase))
|
||||
return $"https://api.gitcode.com/api/v5/repos/{parts[0]}/{repo}/contributors";
|
||||
|
||||
return $"https://{uri.Host}/api/v1/repos/{parts[0]}/{repo}/collaborators";
|
||||
return $"https://{uri.Host}/api/v1/repos/{parts[0]}/{repo}/commits";
|
||||
}
|
||||
|
||||
public static async Task<List<Contributor>> FetchAsync(string repository, CancellationToken ct = default)
|
||||
{
|
||||
var url = BuildUrl(repository);
|
||||
lock (Gate)
|
||||
{
|
||||
if (_cache is { } hit && hit.Key == url && DateTimeOffset.UtcNow - hit.At < CacheTtl)
|
||||
return hit.Items;
|
||||
}
|
||||
|
||||
List<Contributor> list;
|
||||
try
|
||||
{
|
||||
using var timeout = CancellationTokenSource.CreateLinkedTokenSource(ct);
|
||||
timeout.CancelAfter(TimeSpan.FromSeconds(10));
|
||||
timeout.CancelAfter(TimeSpan.FromSeconds(15));
|
||||
|
||||
var text = await Http.GetStringAsync(url, timeout.Token);
|
||||
var trimmed = text.TrimStart();
|
||||
if (trimmed.Length == 0 || trimmed[0] != '[') return new List<Contributor>();
|
||||
|
||||
using var doc = JsonDocument.Parse(text);
|
||||
var list = new List<Contributor>();
|
||||
foreach (var item in doc.RootElement.EnumerateArray())
|
||||
{
|
||||
// Gitea: login / avatar_url;GitCode: name / email / contributions。
|
||||
if (item.TryGetProperty("login", out var login))
|
||||
{
|
||||
list.Add(new Contributor
|
||||
{
|
||||
Name = login.GetString() ?? "",
|
||||
Avatar = item.TryGetProperty("avatar_url", out var avatar)
|
||||
? avatar.GetString() : null
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
list.Add(new Contributor
|
||||
{
|
||||
Name = item.TryGetProperty("name", out var name)
|
||||
? name.GetString() ?? "" : "",
|
||||
Email = item.TryGetProperty("email", out var email)
|
||||
? email.GetString() : null,
|
||||
Contributions = item.TryGetProperty("contributions", out var c) &&
|
||||
c.TryGetInt32(out var count) ? count : 0
|
||||
});
|
||||
}
|
||||
|
||||
list.Sort((a, b) => b.Contributions.CompareTo(a.Contributions));
|
||||
return list;
|
||||
list = url.Contains("api.gitcode.com", StringComparison.OrdinalIgnoreCase)
|
||||
? await FetchFromGitCodeAsync(url, timeout.Token)
|
||||
: await FetchFromCommitsAsync(url, timeout.Token);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.Error.WriteLine($"读取贡献者失败: {ex.Message}");
|
||||
return new List<Contributor>();
|
||||
}
|
||||
|
||||
lock (Gate) _cache = (DateTimeOffset.UtcNow, url, list);
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>Gitea:翻页读提交记录并归并作者。</summary>
|
||||
private static async Task<List<Contributor>> FetchFromCommitsAsync(string commitUrl, CancellationToken ct)
|
||||
{
|
||||
var byKey = new Dictionary<string, Contributor>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
for (var page = 1; page <= MaxPages; page++)
|
||||
{
|
||||
var url = $"{commitUrl}?limit={PageSize}&page={page}&stat=false";
|
||||
var text = await Http.GetStringAsync(url, ct);
|
||||
using var doc = JsonDocument.Parse(text);
|
||||
if (doc.RootElement.ValueKind != JsonValueKind.Array) break;
|
||||
|
||||
var seen = 0;
|
||||
foreach (var item in doc.RootElement.EnumerateArray())
|
||||
{
|
||||
seen++;
|
||||
|
||||
string? login = null, name = null, email = null, avatar = null;
|
||||
DateTimeOffset? date = null;
|
||||
|
||||
if (item.TryGetProperty("author", out var author) &&
|
||||
author.ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
login = author.TryGetProperty("login", out var l) ? l.GetString() : null;
|
||||
avatar = author.TryGetProperty("avatar_url", out var a) ? a.GetString() : null;
|
||||
}
|
||||
|
||||
if (item.TryGetProperty("commit", out var commit) &&
|
||||
commit.TryGetProperty("author", out var ca) &&
|
||||
ca.ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
name = ca.TryGetProperty("name", out var n) ? n.GetString() : null;
|
||||
email = ca.TryGetProperty("email", out var e) ? e.GetString() : email;
|
||||
if (ca.TryGetProperty("date", out var d) &&
|
||||
DateTimeOffset.TryParse(d.GetString(), out var parsed))
|
||||
date = parsed;
|
||||
}
|
||||
|
||||
Add(byKey, login, name, email, avatar, date);
|
||||
}
|
||||
|
||||
if (seen < PageSize) break;
|
||||
}
|
||||
|
||||
return Sort(byKey.Values);
|
||||
}
|
||||
|
||||
/// <summary>GitCode:contributors 接口直接返回贡献数与邮箱。</summary>
|
||||
private static async Task<List<Contributor>> FetchFromGitCodeAsync(string url, CancellationToken ct)
|
||||
{
|
||||
var text = await Http.GetStringAsync(url, ct);
|
||||
if (text.TrimStart().Length == 0 || text.TrimStart()[0] != '[')
|
||||
return new List<Contributor>();
|
||||
|
||||
var byKey = new Dictionary<string, Contributor>(StringComparer.OrdinalIgnoreCase);
|
||||
using var doc = JsonDocument.Parse(text);
|
||||
foreach (var item in doc.RootElement.EnumerateArray())
|
||||
{
|
||||
var name = item.TryGetProperty("name", out var n) ? n.GetString() : null;
|
||||
var email = item.TryGetProperty("email", out var e) ? e.GetString() : null;
|
||||
var count = item.TryGetProperty("contributions", out var c) && c.TryGetInt32(out var v) ? v : 1;
|
||||
var contributor = Add(byKey, null, name, email, null, null, count);
|
||||
if (contributor != null) contributor.Contributions = Math.Max(contributor.Contributions, count);
|
||||
}
|
||||
|
||||
return Sort(byKey.Values);
|
||||
}
|
||||
|
||||
private static Contributor? Add(
|
||||
Dictionary<string, Contributor> byKey,
|
||||
string? login, string? name, string? email, string? avatar, DateTimeOffset? date,
|
||||
int weight = 1)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(email) && IgnoredEmails.Contains(email.Trim()))
|
||||
return null;
|
||||
|
||||
var (key, display) = Resolve(login, name, email);
|
||||
if (!byKey.TryGetValue(key, out var contributor))
|
||||
{
|
||||
contributor = new Contributor { Name = display };
|
||||
byKey[key] = contributor;
|
||||
}
|
||||
|
||||
contributor.Contributions += weight;
|
||||
if (string.IsNullOrWhiteSpace(contributor.Email) && !string.IsNullOrWhiteSpace(email))
|
||||
contributor.Email = email;
|
||||
if (string.IsNullOrWhiteSpace(contributor.Avatar) && !string.IsNullOrWhiteSpace(avatar))
|
||||
contributor.Avatar = avatar;
|
||||
if (date.HasValue && (contributor.LastCommit == null || date > contributor.LastCommit))
|
||||
contributor.LastCommit = date;
|
||||
|
||||
return contributor;
|
||||
}
|
||||
|
||||
/// <summary>把同一个人在不同时期的 git 身份归并到同一个展示名。</summary>
|
||||
private static (string Key, string Display) Resolve(string? login, string? name, string? email)
|
||||
{
|
||||
foreach (var raw in new[] { login, name, email })
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(raw)) continue;
|
||||
if (Aliases.TryGetValue(raw.Trim(), out var display))
|
||||
return ("#" + display.ToLowerInvariant(), display);
|
||||
}
|
||||
|
||||
var label = !string.IsNullOrWhiteSpace(login) ? login!
|
||||
: !string.IsNullOrWhiteSpace(name) ? name!
|
||||
: email!;
|
||||
return (label.Trim().ToLowerInvariant(), label.Trim());
|
||||
}
|
||||
|
||||
private static List<Contributor> Sort(IEnumerable<Contributor> items) =>
|
||||
items
|
||||
.OrderByDescending(c => c.Contributions)
|
||||
.ThenByDescending(c => c.LastCommit ?? DateTimeOffset.MinValue)
|
||||
.ThenBy(c => c.Name, StringComparer.OrdinalIgnoreCase)
|
||||
.Take(MaxShown)
|
||||
.ToList();
|
||||
}
|
||||
@@ -275,7 +275,7 @@ function New-MacAppBundle {
|
||||
<plist version="1.0"><dict>
|
||||
<key>CFBundleName</key><string>GC</string>
|
||||
<key>CFBundleDisplayName</key><string>GC</string>
|
||||
<key>CFBundleIdentifier</key><string>cn.neorf.GC</string>
|
||||
<key>CFBundleIdentifier</key><string>com.xhmcl.GC</string>
|
||||
<key>CFBundleVersion</key><string>$script:BuildVersion</string>
|
||||
<key>CFBundleShortVersionString</key><string>$script:BuildVersion</string>
|
||||
<key>CFBundlePackageType</key><string>APPL</string>
|
||||
|
||||
@@ -284,7 +284,7 @@ package_mac_app() {
|
||||
<dict>
|
||||
<key>CFBundleName</key><string>GC</string>
|
||||
<key>CFBundleDisplayName</key><string>GC</string>
|
||||
<key>CFBundleIdentifier</key><string>cn.neorf.GC</string>
|
||||
<key>CFBundleIdentifier</key><string>com.xhmcl.GC</string>
|
||||
<key>CFBundleVersion</key><string>${VERSION}</string>
|
||||
<key>CFBundleShortVersionString</key><string>${VERSION}</string>
|
||||
<key>CFBundlePackageType</key><string>APPL</string>
|
||||
|
||||
+2
-2
@@ -74,10 +74,10 @@ dll / json 的哈希 —— 本地文件被替换会直接拒绝加载。
|
||||
"descriptionI18n": { "zh-CN": "……", "en": "……" },
|
||||
"version": "1.6",
|
||||
"updatedAt": "2026-11-14T08:00:00Z",
|
||||
"author": "NeoRF",
|
||||
"author": "Morris",
|
||||
"tags": ["astronomy", "geography"],
|
||||
"assembly": "EarthRotationModel.dll",
|
||||
"type": "NeoRF.EarthModels.RotationModelFactory",
|
||||
"type": "GC.EarthModels.RotationModelFactory",
|
||||
"preview": "preview.png",
|
||||
"apiVersion": 1,
|
||||
"minAppVersion": "1.0.7"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<RootNamespace>NeoRF.EarthModels</RootNamespace>
|
||||
<RootNamespace>GC.EarthModels</RootNamespace>
|
||||
<AssemblyName>EarthModelPreview</AssemblyName>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -10,9 +10,9 @@ using Avalonia.Headless;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Platform;
|
||||
using GC.ModelSdk;
|
||||
using NeoRF.EarthModels;
|
||||
using GC.EarthModels;
|
||||
|
||||
namespace NeoRF.EarthModels.Preview;
|
||||
namespace GC.EarthModels.Preview;
|
||||
|
||||
/// <summary>
|
||||
/// 封面生成工具:给每个模型画一张 preview.png。
|
||||
|
||||
@@ -12,7 +12,7 @@ using Avalonia.Media.Imaging;
|
||||
using Avalonia.Platform;
|
||||
using Avalonia.Threading;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
public enum SceneView
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ using Avalonia.Media;
|
||||
using Avalonia.Threading;
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>
|
||||
/// 模型自己的界面:画布 + 触控友好工具栏 + 课堂演示卡 + 节气定格与步进。
|
||||
|
||||
@@ -2,7 +2,7 @@ using System;
|
||||
using Avalonia.Controls;
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>
|
||||
/// 地球模型共享运行时:读自己目录下的 scene.json / land.json / i18n,
|
||||
|
||||
@@ -2,7 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>
|
||||
/// 地理模型的球面几何工具:经纬度 ↔ 单位球坐标、正交投影到屏幕、
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary><id>.model/land.json —— 简化的大陆轮廓(经纬度多边形)。</summary>
|
||||
public sealed class LandData
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>模型自己的 JSON 读写(不依赖启动器)。</summary>
|
||||
public static class ModelJson
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>
|
||||
/// 模型自己的一份文案。优先读模型数据目录里的 <c>i18n/<language>.json</c>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary><id>.model/scene.json —— 模型数据(可视化场景描述)。</summary>
|
||||
public sealed class SceneDefinition
|
||||
|
||||
@@ -2,7 +2,7 @@ using System;
|
||||
using System.IO;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>
|
||||
/// 模型自己的场景运行时:场景描述 + 预烘焙地表纹理 + 调色板。
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>
|
||||
/// 预烘焙的等经纬度地表贴图:反照率 + 高度 + 冰盖 + 云层 + 夜间灯光。
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Numerics;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Media.Imaging;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>
|
||||
/// 球体像素级渲染:正交投影 + 预烘焙地表纹理 + 地形光照 + 云层 + 夜灯 + 大气边缘光。
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"terrain"
|
||||
],
|
||||
"assembly": "ContourMapModel.dll",
|
||||
"type": "NeoRF.ContourMap.ContourMapFactory",
|
||||
"type": "GC.ContourMap.ContourMapFactory",
|
||||
"version": "1.0",
|
||||
"chrome": {
|
||||
"titleBar": "#0C1828",
|
||||
@@ -25,6 +25,6 @@
|
||||
"button": "#9FB4D4",
|
||||
"frame": "#0A1524"
|
||||
},
|
||||
"build": "e4b3f2b87e",
|
||||
"updatedAt": "2026-11-14T11:34:35Z"
|
||||
"build": "43dcb6dc63",
|
||||
"updatedAt": "2026-11-17T22:53:52Z"
|
||||
}
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<RootNamespace>NeoRF.ContourMap</RootNamespace>
|
||||
<RootNamespace>GC.ContourMap</RootNamespace>
|
||||
<AssemblyName>ContourMapModel</AssemblyName>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
@@ -6,7 +6,7 @@ using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.ContourMap;
|
||||
namespace GC.ContourMap;
|
||||
|
||||
/// <summary>等高线模型入口(清单里的 type 指向这里)。</summary>
|
||||
public sealed class ContourMapFactory : IModelFactory
|
||||
|
||||
@@ -5,7 +5,7 @@ using Avalonia.Controls;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace NeoRF.ContourMap;
|
||||
namespace GC.ContourMap;
|
||||
|
||||
/// <summary>等高线模型的界面:顶部标题、中间双图联动、右侧判读要点、底部实时读数。</summary>
|
||||
public sealed class ContourPage
|
||||
|
||||
@@ -6,7 +6,7 @@ using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace NeoRF.ContourMap;
|
||||
namespace GC.ContourMap;
|
||||
|
||||
/// <summary>
|
||||
/// 等高线教学画布,左右两块:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NeoRF.ContourMap;
|
||||
namespace GC.ContourMap;
|
||||
|
||||
/// <summary>内置全量文案兜底:没有语言包也能完整显示。</summary>
|
||||
internal static class DefaultTexts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NeoRF.ContourMap;
|
||||
namespace GC.ContourMap;
|
||||
|
||||
/// <summary>地形部位识别结果:课本要求学生能在等高线图上认出这五种部位。</summary>
|
||||
public enum TerrainFeature
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NeoRF.ContourMap;
|
||||
namespace GC.ContourMap;
|
||||
|
||||
/// <summary>五种基本地形类型(教科书分类)。</summary>
|
||||
public enum TerrainKind
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"en": "Climate zones, continent/ocean outlines, plates and borders — clean line art."
|
||||
},
|
||||
"assembly": "EarthGeographyModel.dll",
|
||||
"type": "NeoRF.EarthModels.GeographyModelFactory",
|
||||
"type": "GC.EarthModels.GeographyModelFactory",
|
||||
"author": "Morris GC",
|
||||
"tags": [
|
||||
"geography",
|
||||
@@ -25,6 +25,6 @@
|
||||
"button": "#9FB4D4",
|
||||
"frame": "#0A1524"
|
||||
},
|
||||
"build": "3b645c45c2",
|
||||
"updatedAt": "2026-11-14T11:34:35Z"
|
||||
"build": "16eaf4110f",
|
||||
"updatedAt": "2026-11-17T22:53:52Z"
|
||||
}
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<RootNamespace>NeoRF.EarthModels</RootNamespace>
|
||||
<RootNamespace>GC.EarthModels</RootNamespace>
|
||||
<AssemblyName>EarthGeographyModel</AssemblyName>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>地球地理模型的数据文件:全部是经纬度折线,只有轮廓没有填色。</summary>
|
||||
public sealed class GeoData
|
||||
|
||||
@@ -7,7 +7,7 @@ using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>
|
||||
/// 地球地理模型:五带划分 + 七大洲四大洋轮廓 + 六大板块与洲界,纯线稿。
|
||||
|
||||
@@ -8,7 +8,7 @@ using Avalonia.Input;
|
||||
using Avalonia.Media;
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
public enum GeoMode { Sphere3D, Flat2D }
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"zh-CN": "地球公转",
|
||||
"en": "Earth Revolution"
|
||||
},
|
||||
"author": "NeoRF",
|
||||
"author": "Morris",
|
||||
"description": "四季更替、黄赤交角与二分二至",
|
||||
"descriptionI18n": {
|
||||
"zh-CN": "地球绕太阳公转一年:地轴指向不变,太阳直射点南北往返,形成四季。",
|
||||
@@ -20,7 +20,7 @@
|
||||
"entry": "scene.json",
|
||||
"license": "MIT",
|
||||
"assembly": "EarthRevolutionModel.dll",
|
||||
"type": "NeoRF.EarthModels.RevolutionModelFactory",
|
||||
"type": "GC.EarthModels.RevolutionModelFactory",
|
||||
"preview": "preview.png",
|
||||
"apiVersion": 1,
|
||||
"version": "1.6",
|
||||
@@ -31,6 +31,6 @@
|
||||
"button": "#9FB4D4",
|
||||
"frame": "#0A1524"
|
||||
},
|
||||
"build": "947efa36bb",
|
||||
"updatedAt": "2026-11-14T11:34:35Z"
|
||||
"build": "bd57e6ed67",
|
||||
"updatedAt": "2026-11-17T22:53:52Z"
|
||||
}
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<RootNamespace>NeoRF.EarthModels</RootNamespace>
|
||||
<RootNamespace>GC.EarthModels</RootNamespace>
|
||||
<AssemblyName>EarthRevolutionModel</AssemblyName>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>地球公转模型入口(清单里的 type 指向这里)。</summary>
|
||||
public sealed class RevolutionModelFactory : IModelFactory
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"zh-CN": "地球自转",
|
||||
"en": "Earth Rotation"
|
||||
},
|
||||
"author": "NeoRF",
|
||||
"author": "Morris",
|
||||
"description": "昼夜交替、晨昏线与太阳直射点",
|
||||
"descriptionI18n": {
|
||||
"zh-CN": "观察自转中的地球:昼夜半球、晨昏线与太阳直射点位置。",
|
||||
@@ -20,7 +20,7 @@
|
||||
"entry": "scene.json",
|
||||
"license": "MIT",
|
||||
"assembly": "EarthRotationModel.dll",
|
||||
"type": "NeoRF.EarthModels.RotationModelFactory",
|
||||
"type": "GC.EarthModels.RotationModelFactory",
|
||||
"preview": "preview.png",
|
||||
"apiVersion": 1,
|
||||
"version": "1.6",
|
||||
@@ -31,6 +31,6 @@
|
||||
"button": "#9FB4D4",
|
||||
"frame": "#0A1524"
|
||||
},
|
||||
"build": "a803d9c020",
|
||||
"updatedAt": "2026-11-14T11:34:35Z"
|
||||
"build": "a79f660ec2",
|
||||
"updatedAt": "2026-11-17T22:53:52Z"
|
||||
}
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<RootNamespace>NeoRF.EarthModels</RootNamespace>
|
||||
<RootNamespace>GC.EarthModels</RootNamespace>
|
||||
<AssemblyName>EarthRotationModel</AssemblyName>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.EarthModels;
|
||||
namespace GC.EarthModels;
|
||||
|
||||
/// <summary>地球自转模型入口(清单里的 type 指向这里)。</summary>
|
||||
public sealed class RotationModelFactory : IModelFactory
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"entry": "scales.json",
|
||||
"license": "MIT",
|
||||
"assembly": "ScaleCalculatorModel.dll",
|
||||
"type": "NeoRF.ScaleCalculator.ScaleCalculatorFactory",
|
||||
"type": "GC.ScaleCalculator.ScaleCalculatorFactory",
|
||||
"preview": "preview.png",
|
||||
"apiVersion": 1,
|
||||
"version": "1.5",
|
||||
@@ -32,6 +32,6 @@
|
||||
"button": "#5B6A86",
|
||||
"frame": "#F4F6FB"
|
||||
},
|
||||
"build": "02a555272a",
|
||||
"updatedAt": "2026-11-14T11:34:35Z"
|
||||
"build": "ec6119e3f4",
|
||||
"updatedAt": "2026-11-17T22:53:52Z"
|
||||
}
|
||||
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
/// <summary>内置全量文案兜底:即使模型包里没有语言包也能完整显示。</summary>
|
||||
internal static class DefaultTexts
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
/// <summary>比例尺计算器模型入口(清单里的 type 指向这里)。</summary>
|
||||
public sealed class ScaleCalculatorFactory : IModelFactory
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<RootNamespace>NeoRF.ScaleCalculator</RootNamespace>
|
||||
<RootNamespace>GC.ScaleCalculator</RootNamespace>
|
||||
<AssemblyName>ScaleCalculatorModel</AssemblyName>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text.Json;
|
||||
using Avalonia.Controls;
|
||||
using GC.ModelSdk;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
/// <summary>
|
||||
/// 比例尺计算器运行时。Prepare 在后台线程读数据/语言包,CreateView 在 UI 线程构建界面。
|
||||
|
||||
@@ -5,7 +5,7 @@ using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
public sealed partial class ScaleCalculatorView
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
public sealed partial class ScaleCalculatorView
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using Avalonia.Input;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
/// <summary>
|
||||
/// 比例尺计算器主界面。三栏(已知量 / 可视化标尺 / 三种写法与判读)+ 底部实地尺与练习。
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
public sealed class PresetItem
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
/// <summary>三种求解模式:待求的量。</summary>
|
||||
public enum SolveMode
|
||||
|
||||
@@ -4,7 +4,7 @@ using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace NeoRF.ScaleCalculator;
|
||||
namespace GC.ScaleCalculator;
|
||||
|
||||
/// <summary>
|
||||
/// 自绘可视化标尺:上条「图上距离」按真实厘米画,下条「实地距离」按同一比例尺压缩,
|
||||
|
||||
+17
-24
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"generated": "2026-11-14T11:34:35Z",
|
||||
"generated": "2026-11-17T22:53:52Z",
|
||||
"repository": "https://gitcode.com/Morris_1/GC",
|
||||
"branch": "main",
|
||||
"modelDir": "model",
|
||||
@@ -50,54 +50,47 @@
|
||||
{
|
||||
"id": "contour-map",
|
||||
"version": "1.0",
|
||||
"build": "e4b3f2b87e",
|
||||
"manifestSha256": "ee0897d46ee85126fbfd0d07f5ca3111950d0c36f9b8a80e4eb6ae85d226da4f",
|
||||
"filesSha256": "b1f323fb41dec4f45992a30ff8726f3307f83b564127aff99bcb3d044c79d2bd",
|
||||
"build": "43dcb6dc63",
|
||||
"manifestSha256": "f7896a85d5f9e9f10e021c07931dee51f0ef86151a6a89e2ed39e37cb7f996a6",
|
||||
"filesSha256": "a6bdf9b4273aabee50c3c94ceab4d0abee15f0df1af90c58bdbb796e0d2d5699",
|
||||
"files": 5,
|
||||
"dir": "model/contour-map"
|
||||
},
|
||||
{
|
||||
"id": "earth-geography",
|
||||
"version": "1.8",
|
||||
"build": "3b645c45c2",
|
||||
"manifestSha256": "a9f30fd4a1dd0aeccb88c892579c93bf32a92379d7b3f545b28f6cac612f9871",
|
||||
"filesSha256": "0e55d2f9bacc3e0ff42f5c45d9e7c265864df9784b1609c09dcb32d21b4addfc",
|
||||
"build": "16eaf4110f",
|
||||
"manifestSha256": "0b8dd41e8535284576873956ed1db8755097649fe801d887b65ca5ac369f267c",
|
||||
"filesSha256": "c018ba481831e23d3183a38ac47251f19754c7464baa5d85b47cea7a49fcfa95",
|
||||
"files": 11,
|
||||
"dir": "model/earth-geography"
|
||||
},
|
||||
{
|
||||
"id": "earth-revolution",
|
||||
"version": "1.6",
|
||||
"build": "947efa36bb",
|
||||
"manifestSha256": "feb715cde8ad5da9ecfb48785a95e6fc82930cc92c668514b328915366c2f57a",
|
||||
"filesSha256": "a37e0b493c78bb0a04a276512b612be3f8e7a178ed1a7fc72acb5353aa57f7c5",
|
||||
"build": "bd57e6ed67",
|
||||
"manifestSha256": "2d05234ea0d4de5ac55b7a076085ccfbb94ed107cce2b2d40e56d45bc3b37f3e",
|
||||
"filesSha256": "4cd45b0324a77574a0da3a939c2a6faebc785c5a24cb50136d62a78a6ea2e9b1",
|
||||
"files": 7,
|
||||
"dir": "model/earth-revolution"
|
||||
},
|
||||
{
|
||||
"id": "earth-rotation",
|
||||
"version": "1.6",
|
||||
"build": "a803d9c020",
|
||||
"manifestSha256": "56ed397cbc008bd9ec8bea0ee34a94a28ab29ce39a8b096b0629e529883b4dff",
|
||||
"filesSha256": "4e4428812d18d15a99105e73c027b99f3197033f0138d643ba69c15fabc9d8f6",
|
||||
"build": "a79f660ec2",
|
||||
"manifestSha256": "cb4ec5f310e7f05235042180dfdb1d8904c37b2d67b06a174f55589eed1652b9",
|
||||
"filesSha256": "594b005a6a9f36cd0b5d4e4a7a0b1ab42d53c8032832545b71c3915493d56c8e",
|
||||
"files": 7,
|
||||
"dir": "model/earth-rotation"
|
||||
},
|
||||
{
|
||||
"id": "scale-calculator",
|
||||
"version": "1.5",
|
||||
"build": "02a555272a",
|
||||
"manifestSha256": "d00034888d9b9da03338b7f394d1bdf33f73b1fbdd7e8f154d85b9080318ab13",
|
||||
"filesSha256": "4a5fbf898df1d98eddf68b5d3929ae7b25cd7bcdfdfa36b5ad0ed72d9941d049",
|
||||
"build": "ec6119e3f4",
|
||||
"manifestSha256": "54cf496553d11b704abfa06588ffccfed3f881a3b919d0e2304c18e157fd1f0a",
|
||||
"filesSha256": "732dd26406e0f1e836970499d7ea644def332ce909d7f8aa0a403bbe7337e604",
|
||||
"files": 6,
|
||||
"dir": "model/scale-calculator"
|
||||
}
|
||||
],
|
||||
"signature": {
|
||||
"alg": "ECDSA-P256-SHA256",
|
||||
"keyId": "gc-2026-11",
|
||||
"value": "LHaF2bw+IZeWUw2qLQM1IQHoNXsHNko38dyjP45Jy41KtlyhvJhhFaNh+THKhAU+6jSzV1eFHgbwasboYBOa5w==",
|
||||
"contentSha256": "749055593bf9839837428d900d523b3363486556970cbf4e2daa25001ab174c8",
|
||||
"signedAt": "2026-11-14T11:36:03Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
+17
-24
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"generated": "2026-11-14T11:34:35Z",
|
||||
"generated": "2026-11-17T22:53:52Z",
|
||||
"repository": "https://gitcode.com/Morris_1/GC",
|
||||
"branch": "main",
|
||||
"modelDir": "model",
|
||||
@@ -50,54 +50,47 @@
|
||||
{
|
||||
"id": "contour-map",
|
||||
"version": "1.0",
|
||||
"build": "e4b3f2b87e",
|
||||
"manifestSha256": "ee0897d46ee85126fbfd0d07f5ca3111950d0c36f9b8a80e4eb6ae85d226da4f",
|
||||
"filesSha256": "b1f323fb41dec4f45992a30ff8726f3307f83b564127aff99bcb3d044c79d2bd",
|
||||
"build": "43dcb6dc63",
|
||||
"manifestSha256": "f7896a85d5f9e9f10e021c07931dee51f0ef86151a6a89e2ed39e37cb7f996a6",
|
||||
"filesSha256": "a6bdf9b4273aabee50c3c94ceab4d0abee15f0df1af90c58bdbb796e0d2d5699",
|
||||
"files": 5,
|
||||
"dir": "model/contour-map"
|
||||
},
|
||||
{
|
||||
"id": "earth-geography",
|
||||
"version": "1.8",
|
||||
"build": "3b645c45c2",
|
||||
"manifestSha256": "a9f30fd4a1dd0aeccb88c892579c93bf32a92379d7b3f545b28f6cac612f9871",
|
||||
"filesSha256": "0e55d2f9bacc3e0ff42f5c45d9e7c265864df9784b1609c09dcb32d21b4addfc",
|
||||
"build": "16eaf4110f",
|
||||
"manifestSha256": "0b8dd41e8535284576873956ed1db8755097649fe801d887b65ca5ac369f267c",
|
||||
"filesSha256": "c018ba481831e23d3183a38ac47251f19754c7464baa5d85b47cea7a49fcfa95",
|
||||
"files": 11,
|
||||
"dir": "model/earth-geography"
|
||||
},
|
||||
{
|
||||
"id": "earth-revolution",
|
||||
"version": "1.6",
|
||||
"build": "947efa36bb",
|
||||
"manifestSha256": "feb715cde8ad5da9ecfb48785a95e6fc82930cc92c668514b328915366c2f57a",
|
||||
"filesSha256": "a37e0b493c78bb0a04a276512b612be3f8e7a178ed1a7fc72acb5353aa57f7c5",
|
||||
"build": "bd57e6ed67",
|
||||
"manifestSha256": "2d05234ea0d4de5ac55b7a076085ccfbb94ed107cce2b2d40e56d45bc3b37f3e",
|
||||
"filesSha256": "4cd45b0324a77574a0da3a939c2a6faebc785c5a24cb50136d62a78a6ea2e9b1",
|
||||
"files": 7,
|
||||
"dir": "model/earth-revolution"
|
||||
},
|
||||
{
|
||||
"id": "earth-rotation",
|
||||
"version": "1.6",
|
||||
"build": "a803d9c020",
|
||||
"manifestSha256": "56ed397cbc008bd9ec8bea0ee34a94a28ab29ce39a8b096b0629e529883b4dff",
|
||||
"filesSha256": "4e4428812d18d15a99105e73c027b99f3197033f0138d643ba69c15fabc9d8f6",
|
||||
"build": "a79f660ec2",
|
||||
"manifestSha256": "cb4ec5f310e7f05235042180dfdb1d8904c37b2d67b06a174f55589eed1652b9",
|
||||
"filesSha256": "594b005a6a9f36cd0b5d4e4a7a0b1ab42d53c8032832545b71c3915493d56c8e",
|
||||
"files": 7,
|
||||
"dir": "model/earth-rotation"
|
||||
},
|
||||
{
|
||||
"id": "scale-calculator",
|
||||
"version": "1.5",
|
||||
"build": "02a555272a",
|
||||
"manifestSha256": "d00034888d9b9da03338b7f394d1bdf33f73b1fbdd7e8f154d85b9080318ab13",
|
||||
"filesSha256": "4a5fbf898df1d98eddf68b5d3929ae7b25cd7bcdfdfa36b5ad0ed72d9941d049",
|
||||
"build": "ec6119e3f4",
|
||||
"manifestSha256": "54cf496553d11b704abfa06588ffccfed3f881a3b919d0e2304c18e157fd1f0a",
|
||||
"filesSha256": "732dd26406e0f1e836970499d7ea644def332ce909d7f8aa0a403bbe7337e604",
|
||||
"files": 6,
|
||||
"dir": "model/scale-calculator"
|
||||
}
|
||||
],
|
||||
"signature": {
|
||||
"alg": "ECDSA-P256-SHA256",
|
||||
"keyId": "gc-2026-11",
|
||||
"value": "LHaF2bw+IZeWUw2qLQM1IQHoNXsHNko38dyjP45Jy41KtlyhvJhhFaNh+THKhAU+6jSzV1eFHgbwasboYBOa5w==",
|
||||
"contentSha256": "749055593bf9839837428d900d523b3363486556970cbf4e2daa25001ab174c8",
|
||||
"signedAt": "2026-11-14T11:36:03Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user