Files
GC-XH/GC-BOOT/Program.cs
T
Morris cd44c7ecff feat(ui): 启动器接入 Flutter 前端 · 公司名统一 Morris · 模型版本 +1
- GC-BOOT 新增 FlutterShell:随包带 GC.UI.Server 与 GC-UI 时,拉起「本地后端 + Flutter 窗口」,界面退出后一起收尾;缺任一产物则回退内置 Avalonia 界面
- 构建脚本新增 publish_backend(三平台发布 UI 后端)与 build_flutter_ui(宿主平台构建 Flutter 桌面产物)
- Windows 打包由「单文件 exe」改为整目录,包含启动器、GC-SAVEDOG、UI 后端与可选 Flutter 产物
- Flutter 工程:Windows BINARY_NAME 与 macOS PRODUCT_NAME 改为 GC-UI,窗口标题 Morris GC
- 公司信息:Windows CompanyName/LegalCopyright、macOS PRODUCT_COPYRIGHT 统一为 Morris
- 模型版本末位 +1:contour-map 1.1 / earth-geography 1.9 / earth-revolution 1.7 / earth-rotation 1.7 / scale-calculator 1.6,并重算清单哈希
2026-11-18 12:36:21 +08:00

32 lines
934 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using Avalonia;
using GC.Services;
using GC.Download;
namespace GC;
internal static class Program
{
[STAThread]
public static void Main(string[] args)
{
DownloadModuleHost.Factory = new DownloadModuleFactory();
// 运行目录:可执行文件旁 .GC/(settings.json + model/ + cache/ + update/)
var paths = AppPaths.Discover();
paths.EnsureCreated();
// 上次下载的启动器新版,到这次启动才应用
if (DownloadModuleHost.Factory.TryApplyPending(paths)) return;
// 发布包带 Flutter 前端时,界面交给它;没带则回退到内置 Avalonia 界面。
if (FlutterShell.TryRun(args)) return;
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace();
}