0.3.5
10
.github/About_action..md
vendored
@@ -1,6 +1,6 @@
|
|||||||
# LanMontainDesktop GitHub Actions CI/CD
|
# LanMountainDesktop GitHub Actions CI/CD
|
||||||
|
|
||||||
参考 ClassIsland 项目最佳实践,为 LanMontainDesktop 配置的 GitHub Actions 工作流。
|
参考 ClassIsland 项目最佳实践,为 LanMountainDesktop 配置的 GitHub Actions 工作流。
|
||||||
|
|
||||||
## 📋 工作流说明
|
## 📋 工作流说明
|
||||||
|
|
||||||
@@ -98,11 +98,11 @@ git push origin v1.0.0
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 使用现有脚本
|
# 使用现有脚本
|
||||||
.\LanMontainDesktop\scripts\package.ps1 -RuntimeIdentifier win-x64
|
.\LanMountainDesktop\scripts\package.ps1 -RuntimeIdentifier win-x64
|
||||||
|
|
||||||
# 或用 dotnet 直接构建
|
# 或用 dotnet 直接构建
|
||||||
dotnet build -c Release
|
dotnet build -c Release
|
||||||
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj `
|
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj `
|
||||||
-c Release -r win-x64 -o ./publish/win-x64 `
|
-c Release -r win-x64 -o ./publish/win-x64 `
|
||||||
--self-contained -p:PublishSingleFile=true
|
--self-contained -p:PublishSingleFile=true
|
||||||
```
|
```
|
||||||
@@ -118,7 +118,7 @@ chmod +x scripts/build.sh
|
|||||||
|
|
||||||
# 或用 dotnet 直接构建
|
# 或用 dotnet 直接构建
|
||||||
dotnet build -c Release
|
dotnet build -c Release
|
||||||
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj \
|
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj \
|
||||||
-c Release -r linux-x64 -o ./publish/linux-x64 \
|
-c Release -r linux-x64 -o ./publish/linux-x64 \
|
||||||
--self-contained -p:PublishSingleFile=true
|
--self-contained -p:PublishSingleFile=true
|
||||||
```
|
```
|
||||||
|
|||||||
18
.github/CODEOWNERS
vendored
@@ -1,18 +1,18 @@
|
|||||||
# CODEOWNERS for LanMontainDesktop
|
# CODEOWNERS for LanMountainDesktop
|
||||||
|
|
||||||
# Default owners for everything
|
# Default owners for everything
|
||||||
* @
|
* @
|
||||||
|
|
||||||
# Desktop UI & Components
|
# Desktop UI & Components
|
||||||
/LanMontainDesktop/Views/ @
|
/LanMountainDesktop/Views/ @
|
||||||
/LanMontainDesktop/ViewModels/ @
|
/LanMountainDesktop/ViewModels/ @
|
||||||
/LanMontainDesktop/ComponentSystem/ @
|
/LanMountainDesktop/ComponentSystem/ @
|
||||||
/LanMontainDesktop/Styles/ @
|
/LanMountainDesktop/Styles/ @
|
||||||
/LanMontainDesktop/Controls/ @
|
/LanMountainDesktop/Controls/ @
|
||||||
|
|
||||||
# Backend Services
|
# Backend Services
|
||||||
/LanMontainDesktop/Services/ @
|
/LanMountainDesktop/Services/ @
|
||||||
/LanMontainDesktop.RecommendationBackend/ @
|
/LanMountainDesktop.RecommendationBackend/ @
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
/docs/ @
|
/docs/ @
|
||||||
@@ -21,4 +21,4 @@
|
|||||||
# Build & CI/CD
|
# Build & CI/CD
|
||||||
/.github/ @
|
/.github/ @
|
||||||
/scripts/ @
|
/scripts/ @
|
||||||
/LanMontainDesktop/LanMontainDesktop.csproj @
|
/LanMountainDesktop/LanMountainDesktop.csproj @
|
||||||
|
|||||||
20
.github/FIX_REPORT.md
vendored
@@ -1,4 +1,4 @@
|
|||||||
# 修复报告:GitHub Actions CI/CD
|
# 修复报告:GitHub Actions CI/CD
|
||||||
|
|
||||||
## ✅ 问题已解决
|
## ✅ 问题已解决
|
||||||
|
|
||||||
@@ -8,16 +8,16 @@ MSBUILD : error MSB1003: Specify a project or solution file.
|
|||||||
The current working directory does not contain a project or solution file.
|
The current working directory does not contain a project or solution file.
|
||||||
```
|
```
|
||||||
|
|
||||||
**原因**: 项目中缺少 `LanMontainDesktop.sln` 解决方案文件,但工作流尝试执行 `dotnet restore` 而没有指定项目。
|
**原因**: 项目中缺少 `LanMountainDesktop.sln` 解决方案文件,但工作流尝试执行 `dotnet restore` 而没有指定项目。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🔧 已采取的修复
|
## 🔧 已采取的修复
|
||||||
|
|
||||||
### 1. 创建解决方案文件
|
### 1. 创建解决方案文件
|
||||||
✅ 创建了标准的 `LanMontainDesktop.sln` 文件,包含:
|
✅ 创建了标准的 `LanMountainDesktop.sln` 文件,包含:
|
||||||
- `LanMontainDesktop/LanMontainDesktop.csproj`
|
- `LanMountainDesktop/LanMountainDesktop.csproj`
|
||||||
- `LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj`
|
- `LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj`
|
||||||
|
|
||||||
### 2. 验证本地构建工作
|
### 2. 验证本地构建工作
|
||||||
✅ 本地测试通过:
|
✅ 本地测试通过:
|
||||||
@@ -39,9 +39,9 @@ The current working directory does not contain a project or solution file.
|
|||||||
包含两个项目的标准 Visual Studio 解决方案格式:
|
包含两个项目的标准 Visual Studio 解决方案格式:
|
||||||
|
|
||||||
```
|
```
|
||||||
LanMontainDesktop.sln
|
LanMountainDesktop.sln
|
||||||
├── LanMontainDesktop (Desktop UI - Avalonia)
|
├── LanMountainDesktop (Desktop UI - Avalonia)
|
||||||
└── LanMontainDesktop.RecommendationBackend (Web API - ASP.NET Core)
|
└── LanMountainDesktop.RecommendationBackend (Web API - ASP.NET Core)
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -52,7 +52,7 @@ LanMontainDesktop.sln
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. 添加新创建的解决方案文件
|
# 1. 添加新创建的解决方案文件
|
||||||
git add LanMontainDesktop.sln
|
git add LanMountainDesktop.sln
|
||||||
|
|
||||||
# 2. 提交
|
# 2. 提交
|
||||||
git commit -m "Add solution file for multi-project structure"
|
git commit -m "Add solution file for multi-project structure"
|
||||||
@@ -94,7 +94,7 @@ git push origin v1.0.1
|
|||||||
| `.github/workflows/code-quality.yml` | 代码质量检查 | ✅ 可用 |
|
| `.github/workflows/code-quality.yml` | 代码质量检查 | ✅ 可用 |
|
||||||
| `.github/workflows/release.yml` | 多平台发布 | ✅ 可用 |
|
| `.github/workflows/release.yml` | 多平台发布 | ✅ 可用 |
|
||||||
| `.github/workflows/issue-management.yml` | Issue自动管理 | ✅ 可用 |
|
| `.github/workflows/issue-management.yml` | Issue自动管理 | ✅ 可用 |
|
||||||
| `LanMontainDesktop.sln` | 解决方案文件 | ✅ 已修复 |
|
| `LanMountainDesktop.sln` | 解决方案文件 | ✅ 已修复 |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
26
.github/MULTIPLATFORM_BUILD.md
vendored
@@ -1,10 +1,10 @@
|
|||||||
# Multi-Platform Build Guide
|
# Multi-Platform Build Guide
|
||||||
|
|
||||||
This document explains how to build LanMontainDesktop for Windows, Linux, and macOS.
|
This document explains how to build LanMountainDesktop for Windows, Linux, and macOS.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
LanMontainDesktop supports self-contained builds for:
|
LanMountainDesktop supports self-contained builds for:
|
||||||
- **Windows**: x64 (64-bit) and x86 (32-bit)
|
- **Windows**: x64 (64-bit) and x86 (32-bit)
|
||||||
- **Linux**: x64 only (AppImage/snap support planned)
|
- **Linux**: x64 only (AppImage/snap support planned)
|
||||||
- **macOS**: x64 (Intel) and arm64 (Apple Silicon M1/M2/M3)
|
- **macOS**: x64 (Intel) and arm64 (Apple Silicon M1/M2/M3)
|
||||||
@@ -67,19 +67,19 @@ brew install dotnet
|
|||||||
**Windows (x64):**
|
**Windows (x64):**
|
||||||
```powershell
|
```powershell
|
||||||
# Using the PowerShell script
|
# Using the PowerShell script
|
||||||
.\LanMontainDesktop\scripts\package.ps1 `
|
.\LanMountainDesktop\scripts\package.ps1 `
|
||||||
-RuntimeIdentifier win-x64 `
|
-RuntimeIdentifier win-x64 `
|
||||||
-Version 1.0.0
|
-Version 1.0.0
|
||||||
|
|
||||||
# Or with dotnet directly
|
# Or with dotnet directly
|
||||||
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj `
|
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj `
|
||||||
-c Release -r win-x64 -o ./publish/win-x64 `
|
-c Release -r win-x64 -o ./publish/win-x64 `
|
||||||
--self-contained -p:PublishSingleFile=true
|
--self-contained -p:PublishSingleFile=true
|
||||||
```
|
```
|
||||||
|
|
||||||
**Windows (x86):**
|
**Windows (x86):**
|
||||||
```powershell
|
```powershell
|
||||||
.\LanMontainDesktop\scripts\package.ps1 `
|
.\LanMountainDesktop\scripts\package.ps1 `
|
||||||
-RuntimeIdentifier win-x86 `
|
-RuntimeIdentifier win-x86 `
|
||||||
-Version 1.0.0
|
-Version 1.0.0
|
||||||
```
|
```
|
||||||
@@ -119,8 +119,8 @@ After building, you'll have a self-contained directory with:
|
|||||||
|
|
||||||
```
|
```
|
||||||
publish/[rid]/
|
publish/[rid]/
|
||||||
├── LanMontainDesktop.exe (Windows)
|
├── LanMountainDesktop.exe (Windows)
|
||||||
├── LanMontainDesktop (Linux/macOS - executable)
|
├── LanMountainDesktop (Linux/macOS - executable)
|
||||||
├── libvlc/ (Windows/macOS only)
|
├── libvlc/ (Windows/macOS only)
|
||||||
├── Localization/ (i18n files)
|
├── Localization/ (i18n files)
|
||||||
├── Extensions/ (Component extension manifests)
|
├── Extensions/ (Component extension manifests)
|
||||||
@@ -134,7 +134,7 @@ publish/[rid]/
|
|||||||
# Create zip package
|
# Create zip package
|
||||||
$rid = "win-x64"
|
$rid = "win-x64"
|
||||||
$version = "1.0.0"
|
$version = "1.0.0"
|
||||||
$dir = "LanMontainDesktop-$version-$rid"
|
$dir = "LanMountainDesktop-$version-$rid"
|
||||||
Copy-Item -Path "./publish/$rid" -Destination $dir -Recurse
|
Copy-Item -Path "./publish/$rid" -Destination $dir -Recurse
|
||||||
Compress-Archive -Path $dir -DestinationPath "$dir.zip"
|
Compress-Archive -Path $dir -DestinationPath "$dir.zip"
|
||||||
```
|
```
|
||||||
@@ -144,7 +144,7 @@ Compress-Archive -Path $dir -DestinationPath "$dir.zip"
|
|||||||
# Create tar.gz package
|
# Create tar.gz package
|
||||||
rid=linux-x64
|
rid=linux-x64
|
||||||
version=1.0.0
|
version=1.0.0
|
||||||
dir="LanMontainDesktop-$version-$rid"
|
dir="LanMountainDesktop-$version-$rid"
|
||||||
mkdir -p $dir
|
mkdir -p $dir
|
||||||
cp -r ./publish/$rid/* $dir/
|
cp -r ./publish/$rid/* $dir/
|
||||||
tar -czf "$dir.tar.gz" $dir
|
tar -czf "$dir.tar.gz" $dir
|
||||||
@@ -218,16 +218,16 @@ tar -czf "$dir.tar.gz" $dir
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clean and retry
|
# Clean and retry
|
||||||
dotnet clean LanMontainDesktop/LanMontainDesktop.csproj
|
dotnet clean LanMountainDesktop/LanMountainDesktop.csproj
|
||||||
dotnet restore
|
dotnet restore
|
||||||
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj -c Release -r win-x64 --self-contained
|
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj -c Release -r win-x64 --self-contained
|
||||||
```
|
```
|
||||||
|
|
||||||
### Linux Build Fails
|
### Linux Build Fails
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check dependencies are installed
|
# Check dependencies are installed
|
||||||
ldd ./publish/linux-x64/LanMontainDesktop | grep "not found"
|
ldd ./publish/linux-x64/LanMountainDesktop | grep "not found"
|
||||||
|
|
||||||
# Install missing libraries
|
# Install missing libraries
|
||||||
sudo apt-get install -y lib[missing-name]
|
sudo apt-get install -y lib[missing-name]
|
||||||
|
|||||||
14
.github/README.md
vendored
@@ -1,8 +1,8 @@
|
|||||||
# LanMontainDesktop
|
# LanMountainDesktop
|
||||||
|
|
||||||
> 你的桌面,不止一面。
|
> 你的桌面,不止一面。
|
||||||
|
|
||||||
`LanMontainDesktop` 是一个基于 Avalonia 的桌面壳层项目,目标不是“做一个启动器”,而是把桌面变成可编排的信息与交互空间。
|
`LanMountainDesktop` 是一个基于 Avalonia 的桌面壳层项目,目标不是“做一个启动器”,而是把桌面变成可编排的信息与交互空间。
|
||||||
|
|
||||||
## 项目定位
|
## 项目定位
|
||||||
- 以网格化布局组织桌面组件,支持多页桌面与组件自由摆放。
|
- 以网格化布局组织桌面组件,支持多页桌面与组件自由摆放。
|
||||||
@@ -18,10 +18,10 @@
|
|||||||
- 本地化:内置 `zh-CN` 与 `en-US` 资源。
|
- 本地化:内置 `zh-CN` 与 `en-US` 资源。
|
||||||
|
|
||||||
## 工程结构
|
## 工程结构
|
||||||
- `LanMontainDesktop/`:桌面端主程序(Avalonia)。
|
- `LanMountainDesktop/`:桌面端主程序(Avalonia)。
|
||||||
- `LanMontainDesktop.RecommendationBackend/`:推荐内容后端服务(ASP.NET Core Minimal API)。
|
- `LanMountainDesktop.RecommendationBackend/`:推荐内容后端服务(ASP.NET Core Minimal API)。
|
||||||
- `docs/`:视觉与圆角等规范文档。
|
- `docs/`:视觉与圆角等规范文档。
|
||||||
- `LanMontainDesktop/ComponentSystem/`:组件定义、注册、放置规则与扩展入口。
|
- `LanMountainDesktop/ComponentSystem/`:组件定义、注册、放置规则与扩展入口。
|
||||||
|
|
||||||
## 技术栈
|
## 技术栈
|
||||||
- .NET 10(`net10.0`)
|
- .NET 10(`net10.0`)
|
||||||
@@ -33,11 +33,11 @@
|
|||||||
## 扩展机制(摘要)
|
## 扩展机制(摘要)
|
||||||
- 组件系统通过 `ComponentRegistry` 合并内置组件与扩展组件。
|
- 组件系统通过 `ComponentRegistry` 合并内置组件与扩展组件。
|
||||||
- 运行时会扫描 `Extensions/Components/*.json`(相对应用输出目录)加载第三方组件清单。
|
- 运行时会扫描 `Extensions/Components/*.json`(相对应用输出目录)加载第三方组件清单。
|
||||||
- 扩展契约与字段说明见组件系统文档:`LanMontainDesktop/ComponentSystem/README.md`。
|
- 扩展契约与字段说明见组件系统文档:`LanMountainDesktop/ComponentSystem/README.md`。
|
||||||
|
|
||||||
## 当前状态
|
## 当前状态
|
||||||
- 项目包含桌面端与推荐后端两个子项目,并在同一 solution 中维护。
|
- 项目包含桌面端与推荐后端两个子项目,并在同一 solution 中维护。
|
||||||
- 配置默认写入本地:`%LOCALAPPDATA%\LanMontainDesktop\settings.json`。
|
- 配置默认写入本地:`%LOCALAPPDATA%\LanMountainDesktop\settings.json`。
|
||||||
- 当前体验以 Windows 为主要目标平台。
|
- 当前体验以 Windows 为主要目标平台。
|
||||||
|
|
||||||
## 运行说明
|
## 运行说明
|
||||||
|
|||||||
8
.github/VERSION_SYNC_INFO.md
vendored
@@ -1,4 +1,4 @@
|
|||||||
# 版本号自动同步说明
|
# 版本号自动同步说明
|
||||||
|
|
||||||
## 📋 概述
|
## 📋 概述
|
||||||
|
|
||||||
@@ -48,15 +48,15 @@ sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" file.csproj
|
|||||||
### 3. 构建和发布
|
### 3. 构建和发布
|
||||||
更新后的版本号被用于:
|
更新后的版本号被用于:
|
||||||
- 程序集版本 (`AssemblyVersion`)
|
- 程序集版本 (`AssemblyVersion`)
|
||||||
- 包文件名 (`LanMontainDesktop-1.0.1-win-x64.zip`)
|
- 包文件名 (`LanMountainDesktop-1.0.1-win-x64.zip`)
|
||||||
- 应用内显示 (About 页面)
|
- 应用内显示 (About 页面)
|
||||||
- GitHub Release 标题
|
- GitHub Release 标题
|
||||||
|
|
||||||
## 📍 涉及的文件
|
## 📍 涉及的文件
|
||||||
|
|
||||||
自动更新的文件:
|
自动更新的文件:
|
||||||
1. `LanMontainDesktop/LanMontainDesktop.csproj`
|
1. `LanMountainDesktop/LanMountainDesktop.csproj`
|
||||||
2. `LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj`
|
2. `LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj`
|
||||||
|
|
||||||
## ✅ 使用流程
|
## ✅ 使用流程
|
||||||
|
|
||||||
|
|||||||
24
.github/WORKFLOWS_GUIDE.md
vendored
@@ -1,8 +1,8 @@
|
|||||||
# GitHub CI/CD Workflow Setup Guide
|
# GitHub CI/CD Workflow Setup Guide
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This document describes the CI/CD workflows configured for LanMontainDesktop. These workflows are designed to maintain code quality, automate testing, and streamline the release process.
|
This document describes the CI/CD workflows configured for LanMountainDesktop. These workflows are designed to maintain code quality, automate testing, and streamline the release process.
|
||||||
|
|
||||||
## Workflows
|
## Workflows
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ This document describes the CI/CD workflows configured for LanMontainDesktop. Th
|
|||||||
**Trigger:** Every push/PR to main branches, or manual dispatch
|
**Trigger:** Every push/PR to main branches, or manual dispatch
|
||||||
|
|
||||||
**What it does:**
|
**What it does:**
|
||||||
- Builds both LanMontainDesktop and RecommendationBackend in Debug and Release modes
|
- Builds both LanMountainDesktop and RecommendationBackend in Debug and Release modes
|
||||||
- Runs unit tests (if available)
|
- Runs unit tests (if available)
|
||||||
- Uploads build artifacts for inspection
|
- Uploads build artifacts for inspection
|
||||||
- Runs on Windows (windows-latest)
|
- Runs on Windows (windows-latest)
|
||||||
@@ -54,7 +54,7 @@ QODANA_ENDPOINT=https://qodana.cloud
|
|||||||
| macOS | x64, arm64 (Apple Silicon) | .tar.gz | ✅ Full support |
|
| macOS | x64, arm64 (Apple Silicon) | .tar.gz | ✅ Full support |
|
||||||
|
|
||||||
**Build Scripts:**
|
**Build Scripts:**
|
||||||
- Windows: Uses PowerShell (`LanMontainDesktop\scripts\package.ps1`)
|
- Windows: Uses PowerShell (`LanMountainDesktop\scripts\package.ps1`)
|
||||||
- Linux/macOS: Uses Bash (`scripts/build.sh`)
|
- Linux/macOS: Uses Bash (`scripts/build.sh`)
|
||||||
|
|
||||||
**Usage:**
|
**Usage:**
|
||||||
@@ -109,22 +109,22 @@ To align with CI workflows, set up your local environment:
|
|||||||
dotnet restore
|
dotnet restore
|
||||||
|
|
||||||
# Build (like CI does)
|
# Build (like CI does)
|
||||||
dotnet build LanMontainDesktop/LanMontainDesktop.csproj
|
dotnet build LanMountainDesktop/LanMountainDesktop.csproj
|
||||||
dotnet build LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
|
dotnet build LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
|
||||||
|
|
||||||
# Format code locally (required by CI)
|
# Format code locally (required by CI)
|
||||||
dotnet format
|
dotnet format
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
dotnet test LanMontainDesktop/LanMontainDesktop.csproj
|
dotnet test LanMountainDesktop/LanMountainDesktop.csproj
|
||||||
dotnet test LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
|
dotnet test LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
|
||||||
|
|
||||||
# Alternative: Use local build scripts (Linux/macOS)
|
# Alternative: Use local build scripts (Linux/macOS)
|
||||||
./scripts/build.sh --rid linux-x64 --version 1.0.0
|
./scripts/build.sh --rid linux-x64 --version 1.0.0
|
||||||
./scripts/build.sh --rid osx-x64 --version 1.0.0
|
./scripts/build.sh --rid osx-x64 --version 1.0.0
|
||||||
|
|
||||||
# Or on Windows with the PowerShell script
|
# Or on Windows with the PowerShell script
|
||||||
./LanMontainDesktop/scripts/package.ps1 -RuntimeIdentifier win-x64 -Version 1.0.0
|
./LanMountainDesktop/scripts/package.ps1 -RuntimeIdentifier win-x64 -Version 1.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Cross-Platform Build Scripts
|
### Cross-Platform Build Scripts
|
||||||
@@ -150,10 +150,10 @@ chmod +x scripts/build.sh
|
|||||||
**Windows:**
|
**Windows:**
|
||||||
```powershell
|
```powershell
|
||||||
# Using PowerShell script
|
# Using PowerShell script
|
||||||
.\LanMontainDesktop\scripts\package.ps1 -RuntimeIdentifier win-x64 -Version 1.0.0
|
.\LanMountainDesktop\scripts\package.ps1 -RuntimeIdentifier win-x64 -Version 1.0.0
|
||||||
|
|
||||||
# Or use dotnet directly
|
# Or use dotnet directly
|
||||||
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj `
|
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj `
|
||||||
-c Release -r win-x64 -o ./publish/win-x64 `
|
-c Release -r win-x64 -o ./publish/win-x64 `
|
||||||
-p:PublishSingleFile=true --self-contained
|
-p:PublishSingleFile=true --self-contained
|
||||||
```
|
```
|
||||||
@@ -210,7 +210,7 @@ git push origin v1.0.0
|
|||||||
### Status Badge
|
### Status Badge
|
||||||
Add to your README.md:
|
Add to your README.md:
|
||||||
```markdown
|
```markdown
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
### Check Workflow Status
|
### Check Workflow Status
|
||||||
|
|||||||
16
.github/workflows/build.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_VERSION: '10.0.x'
|
DOTNET_VERSION: '10.0.x'
|
||||||
Solution_Name: LanMontainDesktop.sln
|
Solution_Name: LanMountainDesktop.sln
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
@@ -41,8 +41,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: build-windows-${{ matrix.configuration }}
|
name: build-windows-${{ matrix.configuration }}
|
||||||
path: |
|
path: |
|
||||||
LanMontainDesktop/bin/${{ matrix.configuration }}/
|
LanMountainDesktop/bin/${{ matrix.configuration }}/
|
||||||
LanMontainDesktop.RecommendationBackend/bin/${{ matrix.configuration }}/
|
LanMountainDesktop.RecommendationBackend/bin/${{ matrix.configuration }}/
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
@@ -80,8 +80,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: build-linux
|
name: build-linux
|
||||||
path: |
|
path: |
|
||||||
LanMontainDesktop/bin/Release/
|
LanMountainDesktop/bin/Release/
|
||||||
LanMontainDesktop.RecommendationBackend/bin/Release/
|
LanMountainDesktop.RecommendationBackend/bin/Release/
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
@@ -111,6 +111,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: build-macos
|
name: build-macos
|
||||||
path: |
|
path: |
|
||||||
LanMontainDesktop/bin/Release/
|
LanMountainDesktop/bin/Release/
|
||||||
LanMontainDesktop.RecommendationBackend/bin/Release/
|
LanMountainDesktop.RecommendationBackend/bin/Release/
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|||||||
4
.github/workflows/code-quality.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Quality Check
|
name: Quality Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -8,7 +8,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_VERSION: '10.0.x'
|
DOTNET_VERSION: '10.0.x'
|
||||||
Solution_Name: LanMontainDesktop.sln
|
Solution_Name: LanMountainDesktop.sln
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
|
|||||||
42
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -18,7 +18,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_VERSION: '10.0.x'
|
DOTNET_VERSION: '10.0.x'
|
||||||
Solution_Name: LanMontainDesktop.sln
|
Solution_Name: LanMountainDesktop.sln
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
@@ -65,8 +65,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$VERSION = "${{ needs.prepare.outputs.version }}"
|
$VERSION = "${{ needs.prepare.outputs.version }}"
|
||||||
$csprojFiles = @(
|
$csprojFiles = @(
|
||||||
"LanMontainDesktop/LanMontainDesktop.csproj",
|
"LanMountainDesktop/LanMountainDesktop.csproj",
|
||||||
"LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj"
|
"LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj"
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach ($csprojPath in $csprojFiles) {
|
foreach ($csprojPath in $csprojFiles) {
|
||||||
@@ -85,7 +85,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj `
|
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj `
|
||||||
-c Release `
|
-c Release `
|
||||||
-o ./publish/windows-${{ matrix.arch }} `
|
-o ./publish/windows-${{ matrix.arch }} `
|
||||||
--self-contained `
|
--self-contained `
|
||||||
@@ -99,7 +99,7 @@ jobs:
|
|||||||
$version = "${{ needs.prepare.outputs.version }}"
|
$version = "${{ needs.prepare.outputs.version }}"
|
||||||
$arch = "${{ matrix.arch }}"
|
$arch = "${{ matrix.arch }}"
|
||||||
$source = "publish/windows-$arch"
|
$source = "publish/windows-$arch"
|
||||||
$package = "LanMontainDesktop-$version-win-$arch"
|
$package = "LanMountainDesktop-$version-win-$arch"
|
||||||
|
|
||||||
New-Item -ItemType Directory -Path "$package" -Force | Out-Null
|
New-Item -ItemType Directory -Path "$package" -Force | Out-Null
|
||||||
Copy-Item -Path "$source/*" -Destination "$package" -Recurse -Force
|
Copy-Item -Path "$source/*" -Destination "$package" -Recurse -Force
|
||||||
@@ -112,7 +112,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: release-windows-${{ matrix.arch }}
|
name: release-windows-${{ matrix.arch }}
|
||||||
path: LanMontainDesktop-*.zip
|
path: LanMountainDesktop-*.zip
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
@@ -145,11 +145,11 @@ jobs:
|
|||||||
- name: Update version in .csproj
|
- name: Update version in .csproj
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ needs.prepare.outputs.version }}"
|
VERSION="${{ needs.prepare.outputs.version }}"
|
||||||
echo "Updating version in LanMontainDesktop.csproj to $VERSION"
|
echo "Updating version in LanMountainDesktop.csproj to $VERSION"
|
||||||
sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMontainDesktop/LanMontainDesktop.csproj
|
sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMountainDesktop/LanMountainDesktop.csproj
|
||||||
|
|
||||||
echo "Updating version in LanMontainDesktop.RecommendationBackend.csproj to $VERSION"
|
echo "Updating version in LanMountainDesktop.RecommendationBackend.csproj to $VERSION"
|
||||||
sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
|
sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
|
||||||
|
|
||||||
- name: Restore
|
- name: Restore
|
||||||
run: dotnet restore ${{ env.Solution_Name }}
|
run: dotnet restore ${{ env.Solution_Name }}
|
||||||
@@ -159,7 +159,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj \
|
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj \
|
||||||
-c Release \
|
-c Release \
|
||||||
-o ./publish/linux-x64 \
|
-o ./publish/linux-x64 \
|
||||||
--self-contained \
|
--self-contained \
|
||||||
@@ -171,7 +171,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
version="${{ needs.prepare.outputs.version }}"
|
version="${{ needs.prepare.outputs.version }}"
|
||||||
source="publish/linux-x64"
|
source="publish/linux-x64"
|
||||||
package_name="lanmontaindesktop"
|
package_name="LanMountainDesktop"
|
||||||
package_version="${version}"
|
package_version="${version}"
|
||||||
arch="amd64"
|
arch="amd64"
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Set proper permissions
|
# Set proper permissions
|
||||||
chmod 755 "build-deb/usr/local/bin/LanMontainDesktop"
|
chmod 755 "build-deb/usr/local/bin/LanMountainDesktop"
|
||||||
|
|
||||||
# Create DEB file
|
# Create DEB file
|
||||||
dpkg-deb --build "build-deb" "${package_name}_${package_version}_${arch}.deb"
|
dpkg-deb --build "build-deb" "${package_name}_${package_version}_${arch}.deb"
|
||||||
@@ -233,11 +233,11 @@ jobs:
|
|||||||
- name: Update version in .csproj
|
- name: Update version in .csproj
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ needs.prepare.outputs.version }}"
|
VERSION="${{ needs.prepare.outputs.version }}"
|
||||||
echo "Updating version in LanMontainDesktop.csproj to $VERSION"
|
echo "Updating version in LanMountainDesktop.csproj to $VERSION"
|
||||||
sed -i '' "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMontainDesktop/LanMontainDesktop.csproj
|
sed -i '' "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMountainDesktop/LanMountainDesktop.csproj
|
||||||
|
|
||||||
echo "Updating version in LanMontainDesktop.RecommendationBackend.csproj to $VERSION"
|
echo "Updating version in LanMountainDesktop.RecommendationBackend.csproj to $VERSION"
|
||||||
sed -i '' "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
|
sed -i '' "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
|
||||||
|
|
||||||
- name: Restore
|
- name: Restore
|
||||||
run: dotnet restore ${{ env.Solution_Name }}
|
run: dotnet restore ${{ env.Solution_Name }}
|
||||||
@@ -247,7 +247,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj \
|
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj \
|
||||||
-c Release \
|
-c Release \
|
||||||
-o ./publish/macos-${{ matrix.arch }} \
|
-o ./publish/macos-${{ matrix.arch }} \
|
||||||
--self-contained \
|
--self-contained \
|
||||||
@@ -260,7 +260,7 @@ jobs:
|
|||||||
version="${{ needs.prepare.outputs.version }}"
|
version="${{ needs.prepare.outputs.version }}"
|
||||||
arch="${{ matrix.arch }}"
|
arch="${{ matrix.arch }}"
|
||||||
source="publish/macos-$arch"
|
source="publish/macos-$arch"
|
||||||
app_name="LanMontainDesktop"
|
app_name="LanMountainDesktop"
|
||||||
package_name="${app_name}-${version}-macos-${arch}"
|
package_name="${app_name}-${version}-macos-${arch}"
|
||||||
|
|
||||||
# Create app bundle structure
|
# Create app bundle structure
|
||||||
@@ -277,7 +277,7 @@ jobs:
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>LanMontainDesktop</string>
|
<string>LanMountainDesktop</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>LanMountain Desktop</string>
|
<string>LanMountain Desktop</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace LanMontainDesktop.RecommendationBackend.Models;
|
namespace LanMountainDesktop.RecommendationBackend.Models;
|
||||||
|
|
||||||
public sealed record DailyQuoteSnapshot(
|
public sealed record DailyQuoteSnapshot(
|
||||||
string Provider,
|
string Provider,
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using LanMontainDesktop.RecommendationBackend.Services;
|
using LanMountainDesktop.RecommendationBackend.Services;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ var app = builder.Build();
|
|||||||
|
|
||||||
app.MapGet("/health", () => Results.Ok(new
|
app.MapGet("/health", () => Results.Ok(new
|
||||||
{
|
{
|
||||||
service = "LanMontainDesktop.RecommendationBackend",
|
service = "LanMountainDesktop.RecommendationBackend",
|
||||||
status = "ok",
|
status = "ok",
|
||||||
timestamp = DateTimeOffset.UtcNow
|
timestamp = DateTimeOffset.UtcNow
|
||||||
}));
|
}));
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# LanMontainDesktop Recommendation Backend
|
# LanMountainDesktop Recommendation Backend
|
||||||
|
|
||||||
信息推荐后端,提供统一抓取与聚合接口,当前覆盖:
|
信息推荐后端,提供统一抓取与聚合接口,当前覆盖:
|
||||||
- 每日一言
|
- 每日一言
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
## 启动
|
## 启动
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet run --project LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
|
dotnet run --project LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
|
||||||
```
|
```
|
||||||
|
|
||||||
默认监听地址以 `dotnet` 输出为准(通常是 `http://localhost:5xxx` 或 `https://localhost:7xxx`)。
|
默认监听地址以 `dotnet` 输出为准(通常是 `http://localhost:5xxx` 或 `https://localhost:7xxx`)。
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using LanMontainDesktop.RecommendationBackend.Models;
|
using LanMountainDesktop.RecommendationBackend.Models;
|
||||||
|
|
||||||
namespace LanMontainDesktop.RecommendationBackend.Services;
|
namespace LanMountainDesktop.RecommendationBackend.Services;
|
||||||
|
|
||||||
public sealed record DailyQuoteQuery(
|
public sealed record DailyQuoteQuery(
|
||||||
string? Locale = null,
|
string? Locale = null,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -8,9 +8,9 @@ using System.Text.Json;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using LanMontainDesktop.RecommendationBackend.Models;
|
using LanMountainDesktop.RecommendationBackend.Models;
|
||||||
|
|
||||||
namespace LanMontainDesktop.RecommendationBackend.Services;
|
namespace LanMountainDesktop.RecommendationBackend.Services;
|
||||||
|
|
||||||
public sealed record RecommendationApiOptions
|
public sealed record RecommendationApiOptions
|
||||||
{
|
{
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.0.31903.59
|
VisualStudioVersion = 17.0.31903.59
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanMontainDesktop", "LanMontainDesktop\LanMontainDesktop.csproj", "{00000001-0000-0000-0000-000000000001}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanMountainDesktop", "LanMountainDesktop\LanMountainDesktop.csproj", "{00000001-0000-0000-0000-000000000001}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanMontainDesktop.RecommendationBackend", "LanMontainDesktop.RecommendationBackend\LanMontainDesktop.RecommendationBackend.csproj", "{00000002-0000-0000-0000-000000000002}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanMountainDesktop.RecommendationBackend", "LanMountainDesktop.RecommendationBackend\LanMountainDesktop.RecommendationBackend.csproj", "{00000002-0000-0000-0000-000000000002}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Desktop CI
|
name: Desktop CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -20,7 +20,7 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_VERSION: "10.0.x"
|
DOTNET_VERSION: "10.0.x"
|
||||||
PROJECT_PATH: "LanMontainDesktop.csproj"
|
PROJECT_PATH: "LanMountainDesktop.csproj"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
validate:
|
||||||
@@ -114,17 +114,17 @@ jobs:
|
|||||||
- name: Windows
|
- name: Windows
|
||||||
runner: windows-latest
|
runner: windows-latest
|
||||||
rid: win-x64
|
rid: win-x64
|
||||||
artifact_name: LanMontainDesktop-Setup
|
artifact_name: LanMountainDesktop-Setup
|
||||||
artifact_path: artifacts/installer/*.exe
|
artifact_path: artifacts/installer/*.exe
|
||||||
- name: Linux
|
- name: Linux
|
||||||
runner: ubuntu-latest
|
runner: ubuntu-latest
|
||||||
rid: linux-x64
|
rid: linux-x64
|
||||||
artifact_name: LanMontainDesktop-linux-x64
|
artifact_name: LanMountainDesktop-linux-x64
|
||||||
artifact_path: artifacts/packages/*linux-x64*.zip
|
artifact_path: artifacts/packages/*linux-x64*.zip
|
||||||
- name: macOS
|
- name: macOS
|
||||||
runner: macos-latest
|
runner: macos-latest
|
||||||
rid: osx-x64
|
rid: osx-x64
|
||||||
artifact_name: LanMontainDesktop-osx-x64
|
artifact_name: LanMountainDesktop-osx-x64
|
||||||
artifact_path: artifacts/packages/*osx-x64*.zip
|
artifact_path: artifacts/packages/*osx-x64*.zip
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -176,7 +176,7 @@ jobs:
|
|||||||
if: matrix.rid == 'win-x64'
|
if: matrix.rid == 'win-x64'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: LanMontainDesktop-Publish-win-x64-${{ needs.resolve_version.outputs.value }}
|
name: LanMountainDesktop-Publish-win-x64-${{ needs.resolve_version.outputs.value }}
|
||||||
path: artifacts/publish/win-x64/**
|
path: artifacts/publish/win-x64/**
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
@@ -193,19 +193,19 @@ jobs:
|
|||||||
- name: Download Windows Installer Artifact
|
- name: Download Windows Installer Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: LanMontainDesktop-Setup-${{ needs.resolve_version.outputs.value }}
|
name: LanMountainDesktop-Setup-${{ needs.resolve_version.outputs.value }}
|
||||||
path: release-assets/windows
|
path: release-assets/windows
|
||||||
|
|
||||||
- name: Download Linux Package Artifact
|
- name: Download Linux Package Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: LanMontainDesktop-linux-x64-${{ needs.resolve_version.outputs.value }}
|
name: LanMountainDesktop-linux-x64-${{ needs.resolve_version.outputs.value }}
|
||||||
path: release-assets/linux
|
path: release-assets/linux
|
||||||
|
|
||||||
- name: Download macOS Package Artifact
|
- name: Download macOS Package Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: LanMontainDesktop-osx-x64-${{ needs.resolve_version.outputs.value }}
|
name: LanMountainDesktop-osx-x64-${{ needs.resolve_version.outputs.value }}
|
||||||
path: release-assets/macos
|
path: release-assets/macos
|
||||||
|
|
||||||
- name: Attach Artifacts
|
- name: Attach Artifacts
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
<Application xmlns="https://github.com/avaloniaui"
|
<Application xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:sty="using:FluentAvalonia.Styling"
|
xmlns:sty="using:FluentAvalonia.Styling"
|
||||||
xmlns:fi="using:FluentIcons.Avalonia"
|
xmlns:fi="using:FluentIcons.Avalonia"
|
||||||
x:Class="LanMontainDesktop.App"
|
x:Class="LanMountainDesktop.App"
|
||||||
xmlns:local="using:LanMontainDesktop"
|
xmlns:local="using:LanMountainDesktop"
|
||||||
RequestedThemeVariant="Default">
|
RequestedThemeVariant="Default">
|
||||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||||
|
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<FontFamily x:Key="AppFontFamily">avares://LanMontainDesktop/Assets/Fonts#MiSans</FontFamily>
|
<FontFamily x:Key="AppFontFamily">avares://LanMountainDesktop/Assets/Fonts#MiSans</FontFamily>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
|
|
||||||
<Application.DataTemplates>
|
<Application.DataTemplates>
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<sty:FluentAvaloniaTheme />
|
<sty:FluentAvaloniaTheme />
|
||||||
<StyleInclude Source="avares://LanMontainDesktop/Styles/GlassModule.axaml" />
|
<StyleInclude Source="avares://LanMountainDesktop/Styles/GlassModule.axaml" />
|
||||||
<StyleInclude Source="avares://LanMontainDesktop/Styles/SettingsAnimations.axaml" />
|
<StyleInclude Source="avares://LanMountainDesktop/Styles/SettingsAnimations.axaml" />
|
||||||
|
|
||||||
<Style Selector="Window">
|
<Style Selector="Window">
|
||||||
<Setter Property="FontFamily" Value="{DynamicResource AppFontFamily}" />
|
<Setter Property="FontFamily" Value="{DynamicResource AppFontFamily}" />
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using Avalonia.Data.Core;
|
using Avalonia.Data.Core;
|
||||||
using Avalonia.Data.Core.Plugins;
|
using Avalonia.Data.Core.Plugins;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using LanMontainDesktop.ViewModels;
|
using LanMountainDesktop.ViewModels;
|
||||||
using LanMontainDesktop.Views;
|
using LanMountainDesktop.Views;
|
||||||
using AvaloniaWebView;
|
using AvaloniaWebView;
|
||||||
|
|
||||||
namespace LanMontainDesktop;
|
namespace LanMountainDesktop;
|
||||||
|
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 422 B |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 734 B |
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 618 B |
|
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 656 B |
|
Before Width: | Height: | Size: 660 B After Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
|
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
@@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Behaviors;
|
namespace LanMountainDesktop.Behaviors;
|
||||||
|
|
||||||
public class PanelIntroAnimationBehavior
|
public class PanelIntroAnimationBehavior
|
||||||
{
|
{
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Animation.Easings;
|
using Avalonia.Animation.Easings;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.Primitives;
|
using Avalonia.Controls.Primitives;
|
||||||
using Avalonia.Rendering.Composition;
|
using Avalonia.Rendering.Composition;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Behaviors;
|
namespace LanMountainDesktop.Behaviors;
|
||||||
|
|
||||||
public class PopupIntroAnimationBehavior
|
public class PopupIntroAnimationBehavior
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.ComponentSystem;
|
namespace LanMountainDesktop.ComponentSystem;
|
||||||
|
|
||||||
public static class BuiltInComponentIds
|
public static class BuiltInComponentIds
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace LanMontainDesktop.ComponentSystem;
|
namespace LanMountainDesktop.ComponentSystem;
|
||||||
|
|
||||||
public static class ComponentPlacementRules
|
public static class ComponentPlacementRules
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using LanMontainDesktop.ComponentSystem.Extensions;
|
using LanMountainDesktop.ComponentSystem.Extensions;
|
||||||
|
|
||||||
namespace LanMontainDesktop.ComponentSystem;
|
namespace LanMountainDesktop.ComponentSystem;
|
||||||
|
|
||||||
public sealed class ComponentRegistry
|
public sealed class ComponentRegistry
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.ComponentSystem;
|
namespace LanMountainDesktop.ComponentSystem;
|
||||||
|
|
||||||
public sealed record DesktopComponentDefinition(
|
public sealed record DesktopComponentDefinition(
|
||||||
string Id,
|
string Id,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.ComponentSystem;
|
namespace LanMountainDesktop.ComponentSystem;
|
||||||
|
|
||||||
public enum DesktopComponentResizeMode
|
public enum DesktopComponentResizeMode
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace LanMontainDesktop.ComponentSystem.Extensions;
|
namespace LanMountainDesktop.ComponentSystem.Extensions;
|
||||||
|
|
||||||
public interface IComponentExtensionProvider
|
public interface IComponentExtensionProvider
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace LanMontainDesktop.ComponentSystem.Extensions;
|
namespace LanMountainDesktop.ComponentSystem.Extensions;
|
||||||
|
|
||||||
public sealed class JsonComponentExtensionProvider : IComponentExtensionProvider
|
public sealed class JsonComponentExtensionProvider : IComponentExtensionProvider
|
||||||
{
|
{
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"app.title": "LanMontainDesktop",
|
"app.title": "LanMountainDesktop",
|
||||||
"button.back_to_windows": "Back to Windows",
|
"button.back_to_windows": "Back to Windows",
|
||||||
"tooltip.back_to_windows": "Back to Windows",
|
"tooltip.back_to_windows": "Back to Windows",
|
||||||
"tooltip.open_settings": "Settings",
|
"tooltip.open_settings": "Settings",
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
"settings.about.version_format": "Version: {0}",
|
"settings.about.version_format": "Version: {0}",
|
||||||
"settings.about.codename_format": "Code Name: {0}",
|
"settings.about.codename_format": "Code Name: {0}",
|
||||||
"settings.about.font_format": "Font: {0}",
|
"settings.about.font_format": "Font: {0}",
|
||||||
"settings.footer": "LanMontainDesktop Settings",
|
"settings.footer": "LanMountainDesktop Settings",
|
||||||
"filepicker.title": "Select wallpaper",
|
"filepicker.title": "Select wallpaper",
|
||||||
"filepicker.image_files": "Image files",
|
"filepicker.image_files": "Image files",
|
||||||
"filepicker.video_files": "Video files",
|
"filepicker.video_files": "Video files",
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"app.title": "LanMontainDesktop",
|
"app.title": "LanMountainDesktop",
|
||||||
"button.back_to_windows": "回到Windows",
|
"button.back_to_windows": "回到Windows",
|
||||||
"tooltip.back_to_windows": "回到Windows",
|
"tooltip.back_to_windows": "回到Windows",
|
||||||
"tooltip.open_settings": "设置",
|
"tooltip.open_settings": "设置",
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
"settings.about.version_format": "版本号: {0}",
|
"settings.about.version_format": "版本号: {0}",
|
||||||
"settings.about.codename_format": "版本代号: {0}",
|
"settings.about.codename_format": "版本代号: {0}",
|
||||||
"settings.about.font_format": "字体: {0}",
|
"settings.about.font_format": "字体: {0}",
|
||||||
"settings.footer": "LanMontainDesktop 设置",
|
"settings.footer": "LanMountainDesktop 设置",
|
||||||
"filepicker.title": "选择壁纸",
|
"filepicker.title": "选择壁纸",
|
||||||
"filepicker.image_files": "图片文件",
|
"filepicker.image_files": "图片文件",
|
||||||
"filepicker.video_files": "视频文件",
|
"filepicker.video_files": "视频文件",
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed class AppSettingsSnapshot
|
public sealed class AppSettingsSnapshot
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed record ClassIslandScheduleReadResult(
|
public sealed record ClassIslandScheduleReadResult(
|
||||||
bool Success,
|
bool Success,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed class DesktopComponentPlacementSnapshot
|
public sealed class DesktopComponentPlacementSnapshot
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed class ImportedClassScheduleSnapshot
|
public sealed class ImportedClassScheduleSnapshot
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed record MonetPalette(
|
public sealed record MonetPalette(
|
||||||
IReadOnlyList<Color> RecommendedColors,
|
IReadOnlyList<Color> RecommendedColors,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed record DailyArtworkSnapshot(
|
public sealed record DailyArtworkSnapshot(
|
||||||
string Provider,
|
string Provider,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed class StartMenuAppEntry
|
public sealed class StartMenuAppEntry
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed class StartMenuFolderNode
|
public sealed class StartMenuFolderNode
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public enum StudyAnalyticsRuntimeState
|
public enum StudyAnalyticsRuntimeState
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public enum TaskbarActionId
|
public enum TaskbarActionId
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed record TaskbarActionItem(
|
public sealed record TaskbarActionItem(
|
||||||
TaskbarActionId Id,
|
TaskbarActionId Id,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public enum TaskbarContext
|
public enum TaskbarContext
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Models;
|
namespace LanMountainDesktop.Models;
|
||||||
|
|
||||||
public sealed record WeatherLocation(
|
public sealed record WeatherLocation(
|
||||||
string Name,
|
string Name,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Desktop Packaging Guide
|
# Desktop Packaging Guide
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
- Install `.NET SDK 10`
|
- Install `.NET SDK 10`
|
||||||
@@ -23,7 +23,7 @@ pwsh ./scripts/package.ps1 -RuntimeIdentifier linux-x64 -Version 1.0.1
|
|||||||
|
|
||||||
Output:
|
Output:
|
||||||
- Published files: `artifacts/publish/linux-x64`
|
- Published files: `artifacts/publish/linux-x64`
|
||||||
- Zip package: `artifacts/packages/LanMontainDesktop-1.0.1-linux-x64.zip`
|
- Zip package: `artifacts/packages/LanMountainDesktop-1.0.1-linux-x64.zip`
|
||||||
|
|
||||||
### macOS package (`osx-x64`)
|
### macOS package (`osx-x64`)
|
||||||
```powershell
|
```powershell
|
||||||
@@ -32,7 +32,7 @@ pwsh ./scripts/package.ps1 -RuntimeIdentifier osx-x64 -Version 1.0.1
|
|||||||
|
|
||||||
Output:
|
Output:
|
||||||
- Published files: `artifacts/publish/osx-x64`
|
- Published files: `artifacts/publish/osx-x64`
|
||||||
- Zip package: `artifacts/packages/LanMontainDesktop-1.0.1-osx-x64.zip`
|
- Zip package: `artifacts/packages/LanMountainDesktop-1.0.1-osx-x64.zip`
|
||||||
|
|
||||||
## Optional script flags
|
## Optional script flags
|
||||||
```powershell
|
```powershell
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.WebView.Desktop;
|
using Avalonia.WebView.Desktop;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace LanMontainDesktop;
|
namespace LanMountainDesktop;
|
||||||
|
|
||||||
sealed class Program
|
sealed class Program
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using LanMontainDesktop.Models;
|
using LanMountainDesktop.Models;
|
||||||
|
|
||||||
namespace LanMontainDesktop.Services;
|
namespace LanMountainDesktop.Services;
|
||||||
|
|
||||||
public sealed class AppSettingsService
|
public sealed class AppSettingsService
|
||||||
{
|
{
|
||||||
@@ -17,7 +17,7 @@ public sealed class AppSettingsService
|
|||||||
public AppSettingsService()
|
public AppSettingsService()
|
||||||
{
|
{
|
||||||
var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||||
var settingsDirectory = Path.Combine(appData, "LanMontainDesktop");
|
var settingsDirectory = Path.Combine(appData, "LanMountainDesktop");
|
||||||
_settingsPath = Path.Combine(settingsDirectory, "settings.json");
|
_settingsPath = Path.Combine(settingsDirectory, "settings.json");
|
||||||
}
|
}
|
||||||
|
|
||||||