lincube 0b603384b4 Launcher fix (#6)
* fix.hy3试图修复中

* Resolve dev paths and fix splash UI thread

Compute a solutionRoot and expand development search paths (LanMountainDesktop and dev-test) in DeploymentLocator, add logging when scanning/finding hosts, and return distinct full paths. Ensure backward-compatible path checks. Fix cross-thread UI calls: invoke splashWindow.DismissAsync on the UI thread in LauncherFlowCoordinator, and make SplashWindow.DismissAsync ensure it runs on the UI thread before closing (simplified Close call). These changes improve development host discovery and prevent UI-thread access issues during shutdown.

* Add configurable data location (portable/system)

Introduce support for choosing and resolving the application's data root (system user dir vs. portable app folder). Adds DataLocationConfig model, DataLocationResolver (load/save/resolve/migrate), a UI prompt (DataLocationPromptWindow) and an OOBE step (DataLocationOobeStep) to let users pick and optionally migrate existing data. Wire the chosen data root into the launcher flow and host launch plan (forwarded via --data-root and LMD_DATA_ROOT), and add AppDataPathProvider to let runtime services read the effective data root (initialized in Program.Main). Update various services (logging, settings, DB, plugin/market, startup registry, etc.) to use the new provider/resolver and register the config type in the JSON context. This enables portable installs, safe migration, and runtime overrides via CLI or environment variable.

* Add dev/debug startup flow and launch profiles

Handle design-time initialization and add a developer debug startup path: App now skips normal startup when in design mode and shows a DevDebugWindow when running in debug (unless a preview or apply-update command). CommandContext.IsDebugMode is extended to include DOTNET_ENVIRONMENT=Development via a new IsDevelopmentEnvironment helper. Program.Main and BuildAvaloniaApp are made public to aid tooling. Added multiple launchSettings profiles for debug and preview commands that set DOTNET_ENVIRONMENT=Development to simplify IDE debugging and UI previewing.

* Simplify splash to fade; add themed about banners

Simplify splash startup visuals by removing the multi-mode/slide behavior and always using a fade animation. Update App to create SplashWindow without a StartupVisualMode parameter and remove related fields, layout configuration, slide animation, and easing helpers from SplashWindow. Clean up unused using. Replace the single about_banner asset with theme-aware variants (about_banner_dark.png and about_banner_light.png), delete the old about_banner.png, and update AboutSettingsPage to use a DynamicResource ImageBrush (AboutBannerBrush) that selects the appropriate banner per theme.

* Use AppJsonContext for startup state serialization

Switch serialization to the source-generated System.Text.Json context: add JsonSerializable(typeof(StartupAttemptRecord)) to AppJsonContext and replace the previous JsonSerializerOptions-based Serialize/Deserialize calls with AppJsonContext.Default.StartupAttemptRecord. Also remove the now-unused SerializerOptions field. Additionally, update .gitignore to exclude /test-aot-publish.

* Add OOBE redesign, theme & data location support

Introduce a redesigned OOBE flow and data-location/theme support across the launcher. Adds a new ThemeService for applying light/dark and accent colors; integrates FluentIcons.Avalonia package for icons. Overhauls OobeWindow (UX animations, typing effect, multi-step theme and data-location pages, Monet options, and final welcome step) and its code-behind to handle step navigation, accent selection, and data-location resolution. Adds DataLocation UI and handlers (DataLocationPromptWindow changes, DataLocation resolver usage) and wires a DevDebug UI for toggling/opening the data-location page. UpdateEngineService now resolves the launcher root via DataLocationResolver. Misc: update various view models, localization entries and remove TrimmerRoots.xml.

* Refactor data location paths and add background service

Refactor DataLocationResolver to centralize data path resolution (ResolveLauncherDataPath, ResolveDesktopDataPath, ResolveConfigPath, ResolveLauncherLogsPath, ResolveLauncherStatePath) and replace usages of the previous ".launcher" layout with a "Launcher" folder. Update API: LoadConfig/SaveConfig reorganized and ApplyLocationChoice now accepts an optional custom path and migration flag; migration logic updated accordingly. Update dependent services and views (Logger, DeploymentLocator, UpdateEngineService, OobeStateService, StartupAttemptRegistry, LauncherDebugSettingsStore, OobeWindow) to use the new resolver APIs and paths. Add LauncherBackgroundService to load/validate/cache a custom splash background image and wire it into SplashWindow (AXAML/Axaml.cs) with UI placeholders and overlay. Misc: minor cleanup of Oobe/Splash XAML and related code adjustments and logging improvements.
2026-04-25 18:41:26 +08:00
2026-02-28 03:00:25 +08:00
2026-03-19 00:17:21 +08:00
2026-04-25 18:41:26 +08:00
2026-04-25 18:41:26 +08:00
2026-03-19 00:17:21 +08:00
2026-04-21 20:59:52 +08:00
2026-03-04 02:02:34 +08:00
2026-04-25 18:41:26 +08:00
2026-04-08 00:55:10 +08:00
2026-04-21 20:59:52 +08:00
2026-03-11 17:43:31 +08:00
2026-03-31 18:03:15 +08:00
2026-03-10 12:14:49 +08:00
2026-04-21 20:59:52 +08:00
2026-04-21 20:59:52 +08:00
2026-03-08 14:00:13 +08:00
2026-03-08 14:00:13 +08:00
2026-03-08 14:00:13 +08:00
2026-04-21 20:59:52 +08:00
2026-04-01 00:34:07 +08:00
2026-04-21 20:59:52 +08:00

阑山桌面LanMountainDesktop

你的桌面,不止一面

.NET 10 Avalonia UI License

Important

温馨提示:本项目有部分成分由氛围编程 (Vibe Coding) 方式编写。

如果您对此类项目有固有的排斥感,请无视此项目,谢谢。

简介

阑山桌面是一个跨平台桌面环境增强工具,面向需要高频查看信息、追求桌面效率与个性化体验的用户。

基于 Avalonia UI 和 .NET 10 构建,支持 Windows、Linux、macOS 三大平台。

Platform Platform Platform

核心特性

📊 信息聚合

  • 课程表、日历、天气、新闻、热搜
  • 所有信息一目了然,无需频繁切换窗口

🎯 效率工具

  • 自习环境监测、计时器、知识卡片
  • 最近文档、浏览器快捷入口
  • 常用工具组件一键触达

🎨 个性化桌面

  • 自由布局,随心所欲摆放组件
  • 多页桌面,工作学习场景分离
  • 主题切换、玻璃效果、圆角风格

🔌 插件生态

  • 通过 .laapp 插件扩展功能
  • 官方 Plugin SDK 支持自定义组件
  • 设置页、组件、集成功能一站式接入

为谁而设计

用户类型 典型场景
🎓 学生用户 课程表、自习监测、计时、天气和日常信息聚合
💼 办公用户 日历、资讯、最近文档、常用工具入口
🎨 效率爱好者 自由布局、主题切换、插件扩展
🇨🇳 中文用户 本地化界面、农历和节假日等本地语境支持

快速开始

环境要求

  • .NET SDK 10

构建与运行

开发模式 (推荐):

# 还原依赖
dotnet restore

# 构建项目
dotnet build LanMountainDesktop.slnx -c Debug

# 直接运行主程序 (跳过 Launcher,快速开发)
dotnet run --project LanMountainDesktop/LanMountainDesktop.csproj

生产模式 (完整流程):

# 通过 Launcher 启动 (包含 OOBE、Splash、版本管理)
dotnet run --project LanMountainDesktop.Launcher/LanMountainDesktop.Launcher.csproj -- launch

详细说明请参考 开发文档

运行测试

dotnet test LanMountainDesktop.slnx -c Debug

插件开发

阑山桌面支持通过 Plugin SDK 开发自定义插件:

# 安装插件模板
dotnet new install LanMountainDesktop.PluginTemplate

# 创建新插件
dotnet new lmd-plugin -n MyPlugin
  • Plugin SDK: LanMountainDesktop.PluginSdk (API 4.0.1)
  • 共享契约: LanMountainDesktop.Shared.Contracts
  • 迁移指南: PLUGIN_SDK_V4_MIGRATION.md

项目结构

LanMountainDesktop/
├── LanMountainDesktop/              # 桌面宿主应用
├── LanMountainDesktop.Launcher/     # 启动器 (OOBE、Splash、版本管理、更新)
├── LanMountainDesktop.PluginSdk/    # 官方插件 SDK
├── LanMountainDesktop.Shared.Contracts/  # 宿主与插件共享契约
├── LanMountainDesktop.Appearance/   # 主题与外观基础设施
├── LanMountainDesktop.Settings.Core/# 设置持久化基础设施
└── LanMountainDesktop.Tests/        # 测试项目

生态边界

项目 职责
本仓库 桌面宿主、插件运行时、Plugin SDK、共享契约
LanAirApp 插件市场元数据、开发者生态材料
LanMountainDesktop.SamplePlugin 官方示例插件

文档索引

技术栈

许可证

MIT

Description
No description provided
Readme 105 MiB
Languages
C# 95%
PowerShell 2.2%
Python 1.3%
Inno Setup 0.8%
HTML 0.6%
Other 0.1%