mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-25 19:24:28 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
daf294f21e | ||
|
|
e8254e5048 | ||
|
|
f7926a287f | ||
|
|
de2ab54732 | ||
|
|
6ef96168c1 | ||
|
|
c534f06532 | ||
|
|
228819db01 |
43
.github/workflows/build.yml
vendored
43
.github/workflows/build.yml
vendored
@@ -11,6 +11,8 @@ env:
|
|||||||
DOTNET_VERSION: '10.0.x'
|
DOTNET_VERSION: '10.0.x'
|
||||||
Solution_Name: LanMountainDesktop.slnx
|
Solution_Name: LanMountainDesktop.slnx
|
||||||
DOTNET_gcServer: 1
|
DOTNET_gcServer: 1
|
||||||
|
# Use system default NuGet cache to avoid path issues
|
||||||
|
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
@@ -34,11 +36,22 @@ jobs:
|
|||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
dotnet-quality: 'preview'
|
dotnet-quality: 'preview'
|
||||||
|
|
||||||
|
- name: Cache NuGet packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/.nuget/packages
|
||||||
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nuget-
|
||||||
|
|
||||||
- name: Restore
|
- name: Restore
|
||||||
run: dotnet restore ${{ env.Solution_Name }}
|
run: dotnet restore ${{ env.Solution_Name }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build ${{ env.Solution_Name }} --no-restore -c ${{ matrix.configuration }} -v minimal
|
run: dotnet build ${{ env.Solution_Name }} --no-restore -c ${{ matrix.configuration }} -v minimal
|
||||||
|
env:
|
||||||
|
# Skip AirAppHost build to avoid recursive build issues
|
||||||
|
SkipAirAppHostBuild: true
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
@@ -82,11 +95,22 @@ jobs:
|
|||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
dotnet-quality: 'preview'
|
dotnet-quality: 'preview'
|
||||||
|
|
||||||
|
- name: Cache NuGet packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/.nuget/packages
|
||||||
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nuget-
|
||||||
|
|
||||||
- name: Restore
|
- name: Restore
|
||||||
run: dotnet restore ${{ env.Solution_Name }}
|
run: dotnet restore ${{ env.Solution_Name }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build ${{ env.Solution_Name }} --no-restore -c Release -v minimal
|
run: dotnet build ${{ env.Solution_Name }} --no-restore -c Release -v minimal
|
||||||
|
env:
|
||||||
|
# Skip AirAppHost build to avoid recursive build issues
|
||||||
|
SkipAirAppHostBuild: true
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
@@ -116,11 +140,22 @@ jobs:
|
|||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
dotnet-quality: 'preview'
|
dotnet-quality: 'preview'
|
||||||
|
|
||||||
|
- name: Cache NuGet packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/.nuget/packages
|
||||||
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nuget-
|
||||||
|
|
||||||
- name: Restore
|
- name: Restore
|
||||||
run: dotnet restore ${{ env.Solution_Name }}
|
run: dotnet restore ${{ env.Solution_Name }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build ${{ env.Solution_Name }} --no-restore -c Release -v minimal
|
run: dotnet build ${{ env.Solution_Name }} --no-restore -c Release -v minimal
|
||||||
|
env:
|
||||||
|
# Skip AirAppHost build to avoid recursive build issues
|
||||||
|
SkipAirAppHostBuild: true
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
@@ -147,6 +182,14 @@ jobs:
|
|||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
dotnet-quality: 'preview'
|
dotnet-quality: 'preview'
|
||||||
|
|
||||||
|
- name: Cache NuGet packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/.nuget/packages
|
||||||
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nuget-
|
||||||
|
|
||||||
- name: Pack SDK and template packages
|
- name: Pack SDK and template packages
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: .\scripts\Pack-PluginPackages.ps1 -Configuration Release -OutputPath .\artifacts\nuget
|
run: .\scripts\Pack-PluginPackages.ps1 -Configuration Release -OutputPath .\artifacts\nuget
|
||||||
|
|||||||
274
.github/workflows/release.yml
vendored
274
.github/workflows/release.yml
vendored
@@ -20,6 +20,8 @@ env:
|
|||||||
DOTNET_VERSION: '10.0.x'
|
DOTNET_VERSION: '10.0.x'
|
||||||
Solution_Name: LanMountainDesktop.slnx
|
Solution_Name: LanMountainDesktop.slnx
|
||||||
DOTNET_gcServer: 1
|
DOTNET_gcServer: 1
|
||||||
|
# Use absolute path for NuGet cache to avoid path resolution issues
|
||||||
|
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
@@ -437,6 +439,14 @@ jobs:
|
|||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
dotnet-quality: 'preview'
|
dotnet-quality: 'preview'
|
||||||
|
|
||||||
|
- name: Cache NuGet packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/.nuget/packages
|
||||||
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nuget-
|
||||||
|
|
||||||
- name: Stamp release version metadata
|
- name: Stamp release version metadata
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
@@ -528,8 +538,37 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$runtimeDir" ]; then
|
if [ -d "$runtimeDir" ]; then
|
||||||
cp -r "$runtimeDir"/* "$publishDir/"
|
# Move the DLL to the publish directory
|
||||||
chmod +x "$publishDir/LanMountainDesktop.AirAppRuntime" 2>/dev/null || true
|
cp "$runtimeDir/LanMountainDesktop.AirAppRuntime.dll" "$publishDir/"
|
||||||
|
|
||||||
|
# Create a wrapper script that uses the shared .NET runtime from the main app
|
||||||
|
printf '%s\n' '#!/bin/sh' > "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '# LanMountainDesktop AirAppRuntime wrapper script' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '# This script sets DOTNET_ROOT to use the shared .NET runtime from the main app' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '# Find the main app directory (contains the .NET runtime)' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'APP_DIR=""' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'for dir in "$SCRIPT_DIR"/app-*; do' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' ' if [ -d "$dir" ] && [ -f "$dir/LanMountainDesktop.dll" ]; then' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' ' APP_DIR="$dir"' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' ' break' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' ' fi' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'done' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'if [ -z "$APP_DIR" ]; then' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' ' echo "Error: Could not find main application directory with .NET runtime"' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' ' exit 1' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'fi' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '# Set DOTNET_ROOT to use the shared runtime' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'export DOTNET_ROOT="$APP_DIR"' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'export PATH="$DOTNET_ROOT:$PATH"' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' '# Run the AirAppRuntime using the shared runtime' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
printf '%s\n' 'exec dotnet "$SCRIPT_DIR/LanMountainDesktop.AirAppRuntime.dll" "$@"' >> "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
|
chmod +x "$publishDir/LanMountainDesktop.AirAppRuntime"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch "$publishDir/$appDir/.current"
|
touch "$publishDir/$appDir/.current"
|
||||||
@@ -589,6 +628,234 @@ jobs:
|
|||||||
|
|
||||||
dpkg-deb --build "build-deb" "${package_name}_${package_version}_${arch}.deb"
|
dpkg-deb --build "build-deb" "${package_name}_${package_version}_${arch}.deb"
|
||||||
|
|
||||||
|
- name: Install Linglong build tools
|
||||||
|
run: |
|
||||||
|
# Install Linglong builder tools
|
||||||
|
curl -fsSL https://deepin-community.github.io/linglong-tools/install.sh | bash || {
|
||||||
|
echo "Warning: Failed to install Linglong tools, skipping Linglong build"
|
||||||
|
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
||||||
|
}
|
||||||
|
|
||||||
|
# Verify installation
|
||||||
|
if command -v ll-builder &> /dev/null; then
|
||||||
|
ll-builder --version
|
||||||
|
echo "LINGLONG_AVAILABLE=true" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build Linglong package
|
||||||
|
if: env.LINGLONG_AVAILABLE == 'true'
|
||||||
|
run: |
|
||||||
|
version="${{ needs.prepare.outputs.version }}"
|
||||||
|
publishDir="publish/linux-x64"
|
||||||
|
linglongDir="build-linglong"
|
||||||
|
release_dir="$PWD/release-assets"
|
||||||
|
|
||||||
|
mkdir -p "$linglongDir" "$release_dir"
|
||||||
|
|
||||||
|
# Copy linglong.yaml and update version
|
||||||
|
cp packaging/linglong/linglong.yaml "$linglongDir/"
|
||||||
|
sed -i "s/version: .*/version: ${version}/" "$linglongDir/linglong.yaml"
|
||||||
|
|
||||||
|
# Create project structure for Linglong build
|
||||||
|
# ll-builder expects the project files in /project inside the container
|
||||||
|
mkdir -p "$linglongDir/publish"
|
||||||
|
cp -r "$publishDir"/* "$linglongDir/publish/"
|
||||||
|
cp -r LanMountainDesktop "$linglongDir/LanMountainDesktop"
|
||||||
|
|
||||||
|
# Copy linglong.yaml to the build directory
|
||||||
|
cp "$linglongDir/linglong.yaml" "$linglongDir/"
|
||||||
|
|
||||||
|
# Build using ll-builder
|
||||||
|
cd "$linglongDir"
|
||||||
|
ll-builder build || {
|
||||||
|
echo "::warning::Linglong build failed"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# List available refs
|
||||||
|
ll-builder list
|
||||||
|
|
||||||
|
# Export the layer
|
||||||
|
# Get the first available ref
|
||||||
|
REF=$(ll-builder list | head -1 | awk '{print $1}')
|
||||||
|
if [ -n "$REF" ]; then
|
||||||
|
ll-builder export --ref "$REF" || {
|
||||||
|
echo "::warning::Linglong export failed"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Find and copy the generated layer file
|
||||||
|
LINGLONG_PKG=$(find . -name "*.layer" 2>/dev/null | head -1)
|
||||||
|
if [ -n "$LINGLONG_PKG" ]; then
|
||||||
|
cp "$LINGLONG_PKG" "$release_dir/LanMountainDesktop-${version}-linux-x64.layer"
|
||||||
|
echo "✓ Linglong package created: LanMountainDesktop-${version}-linux-x64.layer"
|
||||||
|
else
|
||||||
|
echo "::warning::Linglong layer file not found after export"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "::warning::No refs available for export"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build AppImage
|
||||||
|
run: |
|
||||||
|
version="${{ needs.prepare.outputs.version }}"
|
||||||
|
publishDir="publish/linux-x64"
|
||||||
|
appimageDir="build-appimage"
|
||||||
|
release_dir="$PWD/release-assets"
|
||||||
|
|
||||||
|
mkdir -p "$appimageDir" "$release_dir"
|
||||||
|
|
||||||
|
# Download linuxdeploy
|
||||||
|
wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" -O linuxdeploy
|
||||||
|
chmod +x linuxdeploy
|
||||||
|
|
||||||
|
# Prepare AppDir structure
|
||||||
|
mkdir -p "$appimageDir/AppDir/usr/bin"
|
||||||
|
mkdir -p "$appimageDir/AppDir/usr/share/applications"
|
||||||
|
mkdir -p "$appimageDir/AppDir/usr/share/icons/hicolor/256x256/apps"
|
||||||
|
|
||||||
|
# Copy application files
|
||||||
|
cp -r "$publishDir"/* "$appimageDir/AppDir/usr/bin/"
|
||||||
|
|
||||||
|
# Create desktop file
|
||||||
|
cat > "$appimageDir/AppDir/LanMountainDesktop.desktop" << EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Version=1.0
|
||||||
|
Name=LanMountainDesktop
|
||||||
|
Comment=LanMountainDesktop desktop shell
|
||||||
|
Exec=LanMountainDesktop.Launcher %U
|
||||||
|
Icon=lanmountaindesktop
|
||||||
|
Terminal=false
|
||||||
|
Categories=Utility;Education;
|
||||||
|
StartupWMClass=LanMountainDesktop
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Copy icon
|
||||||
|
cp LanMountainDesktop/packaging/linux/lanmountaindesktop.png "$appimageDir/AppDir/"
|
||||||
|
cp LanMountainDesktop/packaging/linux/lanmountaindesktop.png \
|
||||||
|
"$appimageDir/AppDir/usr/share/icons/hicolor/256x256/apps/"
|
||||||
|
|
||||||
|
# Create AppRun script
|
||||||
|
cat > "$appimageDir/AppDir/AppRun" << 'APPRUN'
|
||||||
|
#!/bin/bash
|
||||||
|
SELF=$(readlink -f "$0")
|
||||||
|
HERE="${SELF%/*}"
|
||||||
|
|
||||||
|
# Find the app directory with .NET runtime
|
||||||
|
APP_DIR=""
|
||||||
|
for dir in "$HERE/usr/bin"/app-*; do
|
||||||
|
if [ -d "$dir" ] && [ -f "$dir/LanMountainDesktop.dll" ]; then
|
||||||
|
APP_DIR="$dir"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$APP_DIR" ]; then
|
||||||
|
export DOTNET_ROOT="$APP_DIR"
|
||||||
|
export PATH="$DOTNET_ROOT:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$HERE/usr/bin/LanMountainDesktop.Launcher" "$@"
|
||||||
|
APPRUN
|
||||||
|
chmod +x "$appimageDir/AppDir/AppRun"
|
||||||
|
|
||||||
|
# Build AppImage
|
||||||
|
cd "$appimageDir"
|
||||||
|
../linuxdeploy --appdir AppDir --output appimage || {
|
||||||
|
echo "Warning: AppImage build failed"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Move to release assets
|
||||||
|
mv LanMountainDesktop-*.AppImage "$release_dir/" 2>/dev/null || \
|
||||||
|
echo "Warning: AppImage not found after build"
|
||||||
|
|
||||||
|
- name: Build Flatpak
|
||||||
|
run: |
|
||||||
|
version="${{ needs.prepare.outputs.version }}"
|
||||||
|
publishDir="publish/linux-x64"
|
||||||
|
flatpakDir="build-flatpak"
|
||||||
|
release_dir="$PWD/release-assets"
|
||||||
|
|
||||||
|
mkdir -p "$flatpakDir" "$release_dir"
|
||||||
|
|
||||||
|
# Install Flatpak tools
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y flatpak flatpak-builder
|
||||||
|
|
||||||
|
# Add Flathub repository
|
||||||
|
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo || true
|
||||||
|
|
||||||
|
# Create Flatpak manifest
|
||||||
|
cat > "$flatpakDir/com.lanmountain.desktop.yml" << EOF
|
||||||
|
app-id: com.lanmountain.desktop
|
||||||
|
runtime: org.freedesktop.Platform
|
||||||
|
runtime-version: '23.08'
|
||||||
|
sdk: org.freedesktop.Sdk
|
||||||
|
command: LanMountainDesktop.Launcher
|
||||||
|
|
||||||
|
finish-args:
|
||||||
|
- --share=ipc
|
||||||
|
- --socket=x11
|
||||||
|
- --socket=wayland
|
||||||
|
- --socket=pulseaudio
|
||||||
|
- --share=network
|
||||||
|
- --device=dri
|
||||||
|
- --filesystem=home
|
||||||
|
|
||||||
|
modules:
|
||||||
|
- name: LanMountainDesktop
|
||||||
|
buildsystem: simple
|
||||||
|
build-commands:
|
||||||
|
- mkdir -p /app/bin
|
||||||
|
- cp -r * /app/bin/
|
||||||
|
- install -Dm755 LanMountainDesktop.Launcher /app/bin/LanMountainDesktop.Launcher
|
||||||
|
- install -Dm644 LanMountainDesktop.desktop /app/share/applications/com.lanmountain.desktop.desktop
|
||||||
|
- install -Dm644 lanmountaindesktop.png /app/share/icons/hicolor/256x256/apps/com.lanmountain.desktop.png
|
||||||
|
sources:
|
||||||
|
- type: dir
|
||||||
|
path: .
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Prepare source directory
|
||||||
|
mkdir -p "$flatpakDir/source"
|
||||||
|
cp -r "$publishDir"/* "$flatpakDir/source/"
|
||||||
|
|
||||||
|
# Create desktop file
|
||||||
|
cat > "$flatpakDir/source/LanMountainDesktop.desktop" << EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Version=1.0
|
||||||
|
Name=LanMountainDesktop
|
||||||
|
Comment=LanMountainDesktop desktop shell
|
||||||
|
Exec=LanMountainDesktop.Launcher %U
|
||||||
|
Icon=com.lanmountain.desktop
|
||||||
|
Terminal=false
|
||||||
|
Categories=Utility;Education;
|
||||||
|
StartupWMClass=LanMountainDesktop
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Copy icon
|
||||||
|
cp LanMountainDesktop/packaging/linux/lanmountaindesktop.png \
|
||||||
|
"$flatpakDir/source/"
|
||||||
|
|
||||||
|
# Build Flatpak
|
||||||
|
cd "$flatpakDir"
|
||||||
|
flatpak-builder --force-clean --repo=repo build com.lanmountain.desktop.yml || {
|
||||||
|
echo "Warning: Flatpak build failed"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create Flatpak bundle
|
||||||
|
flatpak build-bundle repo "$release_dir/LanMountainDesktop-${version}-linux-x64.flatpak" \
|
||||||
|
com.lanmountain.desktop || {
|
||||||
|
echo "Warning: Flatpak bundle creation failed"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
- name: Package Payload Zip
|
- name: Package Payload Zip
|
||||||
run: |
|
run: |
|
||||||
version="${{ needs.prepare.outputs.version }}"
|
version="${{ needs.prepare.outputs.version }}"
|
||||||
@@ -620,6 +887,9 @@ jobs:
|
|||||||
name: release-linux-x64
|
name: release-linux-x64
|
||||||
path: |
|
path: |
|
||||||
release-assets/files-linux-x64.zip
|
release-assets/files-linux-x64.zip
|
||||||
|
release-assets/*.layer
|
||||||
|
release-assets/*.AppImage
|
||||||
|
release-assets/*.flatpak
|
||||||
*.deb
|
*.deb
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|||||||
@@ -507,6 +507,7 @@ public sealed class PlondsClientServiceTests : IDisposable
|
|||||||
private static PlondsClientDownloads CreateDownloads(string? changedUrl, string? filesUrl)
|
private static PlondsClientDownloads CreateDownloads(string? changedUrl, string? filesUrl)
|
||||||
{
|
{
|
||||||
return new PlondsClientDownloads(
|
return new PlondsClientDownloads(
|
||||||
|
ReleaseTag: "v1.4.0",
|
||||||
GitHub: null,
|
GitHub: null,
|
||||||
S3: new PlondsS3Downloads(
|
S3: new PlondsS3Downloads(
|
||||||
Bucket: "bucket",
|
Bucket: "bucket",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace LanMountainDesktop.Services.Plonds;
|
namespace LanMountainDesktop.Services.Plonds;
|
||||||
|
|
||||||
internal sealed record PlondsClientDownloads(
|
internal sealed record PlondsClientDownloads(
|
||||||
|
string? ReleaseTag,
|
||||||
PlondsGitHubDownloads? GitHub,
|
PlondsGitHubDownloads? GitHub,
|
||||||
PlondsS3Downloads? S3);
|
PlondsS3Downloads? S3);
|
||||||
|
|
||||||
|
|||||||
80
packaging/linglong/linglong.yaml
Normal file
80
packaging/linglong/linglong.yaml
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
version: "1"
|
||||||
|
|
||||||
|
package:
|
||||||
|
id: com.lanmountain.desktop
|
||||||
|
name: LanMountainDesktop
|
||||||
|
version: 0.8.8.4
|
||||||
|
kind: app
|
||||||
|
description: |
|
||||||
|
LanMountainDesktop - A modern desktop shell for education.
|
||||||
|
Features include schedule management, notifications, plugins, and more.
|
||||||
|
|
||||||
|
command:
|
||||||
|
- /opt/apps/com.lanmountain.desktop/files/bin/LanMountainDesktop.Launcher
|
||||||
|
|
||||||
|
base: org.deepin.foundation/23.0.0
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- kind: local
|
||||||
|
name: "LanMountainDesktop"
|
||||||
|
|
||||||
|
build: |
|
||||||
|
# Create directory structure following Linglong conventions
|
||||||
|
mkdir -p $PREFIX/bin
|
||||||
|
mkdir -p $PREFIX/lib
|
||||||
|
mkdir -p $PREFIX/share/applications
|
||||||
|
mkdir -p $PREFIX/share/icons/hicolor/128x128/apps
|
||||||
|
mkdir -p $PREFIX/share/icons/hicolor/256x256/apps
|
||||||
|
mkdir -p $PREFIX/share/icons/hicolor/scalable/apps
|
||||||
|
|
||||||
|
# Copy the pre-built application files
|
||||||
|
# The build artifacts should be in /project/publish/linux-x64
|
||||||
|
if [ -d "/project/publish/linux-x64" ]; then
|
||||||
|
# Copy main application (includes .NET runtime)
|
||||||
|
cp -r /project/publish/linux-x64/app-*/* $PREFIX/lib/
|
||||||
|
|
||||||
|
# Copy Launcher (AOT compiled, independent)
|
||||||
|
cp /project/publish/linux-x64/LanMountainDesktop.Launcher $PREFIX/bin/
|
||||||
|
chmod +x $PREFIX/bin/LanMountainDesktop.Launcher
|
||||||
|
|
||||||
|
# Copy AirAppRuntime wrapper and DLL
|
||||||
|
cp /project/publish/linux-x64/LanMountainDesktop.AirAppRuntime $PREFIX/bin/
|
||||||
|
cp /project/publish/linux-x64/LanMountainDesktop.AirAppRuntime.dll $PREFIX/lib/
|
||||||
|
chmod +x $PREFIX/bin/LanMountainDesktop.AirAppRuntime
|
||||||
|
|
||||||
|
# Copy AirAppHost
|
||||||
|
if [ -d "/project/publish/linux-x64/AirAppHost" ]; then
|
||||||
|
cp -r /project/publish/linux-x64/AirAppHost $PREFIX/lib/
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Error: Build artifacts not found at /project/publish/linux-x64"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create desktop file
|
||||||
|
cat > $PREFIX/share/applications/com.lanmountain.desktop.desktop << EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Version=1.0
|
||||||
|
Name=LanMountainDesktop
|
||||||
|
Comment=LanMountainDesktop desktop shell
|
||||||
|
Exec=/opt/apps/com.lanmountain.desktop/files/bin/LanMountainDesktop.Launcher %U
|
||||||
|
Icon=lanmountaindesktop
|
||||||
|
Terminal=false
|
||||||
|
Categories=Utility;Education;
|
||||||
|
StartupWMClass=LanMountainDesktop
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Copy icon files
|
||||||
|
if [ -f "/project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png" ]; then
|
||||||
|
cp /project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png \
|
||||||
|
$PREFIX/share/icons/hicolor/256x256/apps/
|
||||||
|
cp /project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png \
|
||||||
|
$PREFIX/share/icons/hicolor/128x128/apps/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set executable permissions
|
||||||
|
chmod +x $PREFIX/bin/*
|
||||||
|
chmod +x $PREFIX/lib/LanMountainDesktop.AirAppRuntime 2>/dev/null || true
|
||||||
|
|
||||||
|
echo "Linglong build completed successfully"
|
||||||
22
packaging/linux/AppImage/AppRun
Normal file
22
packaging/linux/AppImage/AppRun
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# AppImage entry point for LanMountainDesktop
|
||||||
|
|
||||||
|
SELF=$(readlink -f "$0")
|
||||||
|
HERE="${SELF%/*}"
|
||||||
|
|
||||||
|
# Find the app directory with .NET runtime
|
||||||
|
APP_DIR=""
|
||||||
|
for dir in "$HERE/usr/bin"/app-*; do
|
||||||
|
if [ -d "$dir" ] && [ -f "$dir/LanMountainDesktop.dll" ]; then
|
||||||
|
APP_DIR="$dir"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$APP_DIR" ]; then
|
||||||
|
export DOTNET_ROOT="$APP_DIR"
|
||||||
|
export PATH="$DOTNET_ROOT:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Launch the application
|
||||||
|
exec "$HERE/usr/bin/LanMountainDesktop.Launcher" "$@"
|
||||||
10
packaging/linux/Flatpak/com.lanmountain.desktop.desktop
Normal file
10
packaging/linux/Flatpak/com.lanmountain.desktop.desktop
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Version=1.0
|
||||||
|
Name=LanMountainDesktop
|
||||||
|
Comment=LanMountainDesktop desktop shell
|
||||||
|
Exec=LanMountainDesktop.Launcher %U
|
||||||
|
Icon=com.lanmountain.desktop
|
||||||
|
Terminal=false
|
||||||
|
Categories=Utility;Education;
|
||||||
|
StartupWMClass=LanMountainDesktop
|
||||||
54
packaging/linux/Flatpak/com.lanmountain.desktop.yml
Normal file
54
packaging/linux/Flatpak/com.lanmountain.desktop.yml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
app-id: com.lanmountain.desktop
|
||||||
|
runtime: org.freedesktop.Platform
|
||||||
|
runtime-version: '23.08'
|
||||||
|
sdk: org.freedesktop.Sdk
|
||||||
|
command: LanMountainDesktop.Launcher
|
||||||
|
|
||||||
|
finish-args:
|
||||||
|
# X11 + XShm access
|
||||||
|
- --share=ipc
|
||||||
|
- --socket=x11
|
||||||
|
# Wayland access
|
||||||
|
- --socket=wayland
|
||||||
|
# GPU acceleration
|
||||||
|
- --device=dri
|
||||||
|
# Audio access
|
||||||
|
- --socket=pulseaudio
|
||||||
|
# Network access
|
||||||
|
- --share=network
|
||||||
|
# Home directory access
|
||||||
|
- --filesystem=home
|
||||||
|
# D-Bus access for desktop integration
|
||||||
|
- --talk-name=org.freedesktop.Notifications
|
||||||
|
- --talk-name=org.kde.StatusNotifierWatcher
|
||||||
|
|
||||||
|
modules:
|
||||||
|
- name: LanMountainDesktop
|
||||||
|
buildsystem: simple
|
||||||
|
build-commands:
|
||||||
|
# Create directory structure
|
||||||
|
- mkdir -p /app/bin
|
||||||
|
- mkdir -p /app/lib
|
||||||
|
- mkdir -p /app/share/applications
|
||||||
|
- mkdir -p /app/share/icons/hicolor/256x256/apps
|
||||||
|
|
||||||
|
# Copy application files
|
||||||
|
- cp -r publish/linux-x64/app-*/* /app/lib/
|
||||||
|
- cp publish/linux-x64/LanMountainDesktop.Launcher /app/bin/
|
||||||
|
- cp publish/linux-x64/LanMountainDesktop.AirAppRuntime /app/bin/
|
||||||
|
- cp publish/linux-x64/LanMountainDesktop.AirAppRuntime.dll /app/lib/
|
||||||
|
|
||||||
|
# Copy AirAppHost if exists
|
||||||
|
- if [ -d "publish/linux-x64/AirAppHost" ]; then cp -r publish/linux-x64/AirAppHost /app/lib/; fi
|
||||||
|
|
||||||
|
# Set permissions
|
||||||
|
- chmod +x /app/bin/*
|
||||||
|
|
||||||
|
# Install desktop file
|
||||||
|
- install -Dm644 packaging/linux/Flatpak/com.lanmountain.desktop.desktop /app/share/applications/com.lanmountain.desktop.desktop
|
||||||
|
|
||||||
|
# Install icon
|
||||||
|
- install -Dm644 packaging/linux/lanmountaindesktop.png /app/share/icons/hicolor/256x256/apps/com.lanmountain.desktop.png
|
||||||
|
sources:
|
||||||
|
- type: dir
|
||||||
|
path: ../../..
|
||||||
Reference in New Issue
Block a user