mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-26 20:24:26 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
daf294f21e | ||
|
|
e8254e5048 | ||
|
|
f7926a287f |
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
|
||||||
|
|||||||
220
.github/workflows/release.yml
vendored
220
.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: |
|
||||||
@@ -634,42 +644,218 @@ jobs:
|
|||||||
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Package as Linglong
|
- name: Build Linglong package
|
||||||
if: env.LINGLONG_AVAILABLE == 'true'
|
if: env.LINGLONG_AVAILABLE == 'true'
|
||||||
run: |
|
run: |
|
||||||
version="${{ needs.prepare.outputs.version }}"
|
version="${{ needs.prepare.outputs.version }}"
|
||||||
publishDir="publish/linux-x64"
|
publishDir="publish/linux-x64"
|
||||||
linglongDir="build-linglong"
|
linglongDir="build-linglong"
|
||||||
|
release_dir="$PWD/release-assets"
|
||||||
|
|
||||||
# Create Linglong build directory
|
mkdir -p "$linglongDir" "$release_dir"
|
||||||
mkdir -p "$linglongDir"
|
|
||||||
|
|
||||||
# Copy linglong.yaml and update version
|
# Copy linglong.yaml and update version
|
||||||
cp packaging/linglong/linglong.yaml "$linglongDir/"
|
cp packaging/linglong/linglong.yaml "$linglongDir/"
|
||||||
sed -i "s/version: .*/version: ${version}/" "$linglongDir/linglong.yaml"
|
sed -i "s/version: .*/version: ${version}/" "$linglongDir/linglong.yaml"
|
||||||
|
|
||||||
# Create project structure for Linglong build
|
# Create project structure for Linglong build
|
||||||
mkdir -p "$linglongDir/project"
|
# ll-builder expects the project files in /project inside the container
|
||||||
cp -r "$publishDir" "$linglongDir/project/"
|
mkdir -p "$linglongDir/publish"
|
||||||
cp -r LanMountainDesktop/packaging "$linglongDir/project/LanMountainDesktop/"
|
cp -r "$publishDir"/* "$linglongDir/publish/"
|
||||||
|
cp -r LanMountainDesktop "$linglongDir/LanMountainDesktop"
|
||||||
|
|
||||||
# Build Linglong package
|
# Copy linglong.yaml to the build directory
|
||||||
|
cp "$linglongDir/linglong.yaml" "$linglongDir/"
|
||||||
|
|
||||||
|
# Build using ll-builder
|
||||||
cd "$linglongDir"
|
cd "$linglongDir"
|
||||||
ll-builder build || {
|
ll-builder build || {
|
||||||
echo "Warning: Linglong build failed"
|
echo "::warning::Linglong build failed"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find and copy the generated package
|
# List available refs
|
||||||
LINGLONG_PKG=$(find . -name "*.uab" -o -name "*.linglong" 2>/dev/null | head -1)
|
ll-builder list
|
||||||
if [ -n "$LINGLONG_PKG" ]; then
|
|
||||||
mkdir -p "$PWD/../release-assets"
|
# Export the layer
|
||||||
cp "$LINGLONG_PKG" "$PWD/../release-assets/LanMountainDesktop-${version}-linux-x64.linglong"
|
# Get the first available ref
|
||||||
echo "Linglong package created successfully"
|
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
|
else
|
||||||
echo "Warning: Linglong package not found after build"
|
echo "::warning::No refs available for export"
|
||||||
fi
|
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 }}"
|
||||||
@@ -701,7 +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/*.linglong
|
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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '1'
|
version: "1"
|
||||||
|
|
||||||
package:
|
package:
|
||||||
id: com.lanmountain.desktop
|
id: com.lanmountain.desktop
|
||||||
@@ -20,59 +20,61 @@ sources:
|
|||||||
|
|
||||||
build: |
|
build: |
|
||||||
# Create directory structure following Linglong conventions
|
# Create directory structure following Linglong conventions
|
||||||
mkdir -p ${PREFIX}/bin
|
mkdir -p $PREFIX/bin
|
||||||
mkdir -p ${PREFIX}/lib
|
mkdir -p $PREFIX/lib
|
||||||
mkdir -p ${PREFIX}/share/applications
|
mkdir -p $PREFIX/share/applications
|
||||||
mkdir -p ${PREFIX}/share/icons/hicolor/128x128/apps
|
mkdir -p $PREFIX/share/icons/hicolor/128x128/apps
|
||||||
mkdir -p ${PREFIX}/share/icons/hicolor/256x256/apps
|
mkdir -p $PREFIX/share/icons/hicolor/256x256/apps
|
||||||
mkdir -p ${PREFIX}/share/icons/hicolor/scalable/apps
|
mkdir -p $PREFIX/share/icons/hicolor/scalable/apps
|
||||||
|
|
||||||
# Copy the pre-built application files
|
# Copy the pre-built application files
|
||||||
# The build artifacts should be in /project/publish/linux-x64
|
# The build artifacts should be in /project/publish/linux-x64
|
||||||
if [ -d "/project/publish/linux-x64" ]; then
|
if [ -d "/project/publish/linux-x64" ]; then
|
||||||
# Copy main application (includes .NET runtime)
|
# Copy main application (includes .NET runtime)
|
||||||
cp -r /project/publish/linux-x64/app-*/* ${PREFIX}/lib/
|
cp -r /project/publish/linux-x64/app-*/* $PREFIX/lib/
|
||||||
|
|
||||||
# Copy Launcher (AOT compiled, independent)
|
# Copy Launcher (AOT compiled, independent)
|
||||||
cp /project/publish/linux-x64/LanMountainDesktop.Launcher ${PREFIX}/bin/
|
cp /project/publish/linux-x64/LanMountainDesktop.Launcher $PREFIX/bin/
|
||||||
chmod +x ${PREFIX}/bin/LanMountainDesktop.Launcher
|
chmod +x $PREFIX/bin/LanMountainDesktop.Launcher
|
||||||
|
|
||||||
# Copy AirAppRuntime wrapper and DLL
|
# Copy AirAppRuntime wrapper and DLL
|
||||||
cp /project/publish/linux-x64/LanMountainDesktop.AirAppRuntime ${PREFIX}/bin/
|
cp /project/publish/linux-x64/LanMountainDesktop.AirAppRuntime $PREFIX/bin/
|
||||||
cp /project/publish/linux-x64/LanMountainDesktop.AirAppRuntime.dll ${PREFIX}/lib/
|
cp /project/publish/linux-x64/LanMountainDesktop.AirAppRuntime.dll $PREFIX/lib/
|
||||||
chmod +x ${PREFIX}/bin/LanMountainDesktop.AirAppRuntime
|
chmod +x $PREFIX/bin/LanMountainDesktop.AirAppRuntime
|
||||||
|
|
||||||
# Copy AirAppHost
|
# Copy AirAppHost
|
||||||
if [ -d "/project/publish/linux-x64/AirAppHost" ]; then
|
if [ -d "/project/publish/linux-x64/AirAppHost" ]; then
|
||||||
cp -r /project/publish/linux-x64/AirAppHost ${PREFIX}/lib/
|
cp -r /project/publish/linux-x64/AirAppHost $PREFIX/lib/
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Error: Build artifacts not found at /project/publish/linux-x64"
|
echo "Error: Build artifacts not found at /project/publish/linux-x64"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create desktop file using printf to avoid heredoc issues
|
# Create desktop file
|
||||||
printf '%s\n' '[Desktop Entry]' > ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
cat > $PREFIX/share/applications/com.lanmountain.desktop.desktop << EOF
|
||||||
printf '%s\n' 'Type=Application' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
[Desktop Entry]
|
||||||
printf '%s\n' 'Version=1.0' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
Type=Application
|
||||||
printf '%s\n' 'Name=LanMountainDesktop' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
Version=1.0
|
||||||
printf '%s\n' 'Comment=LanMountainDesktop desktop shell' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
Name=LanMountainDesktop
|
||||||
printf '%s\n' 'Exec=/opt/apps/com.lanmountain.desktop/files/bin/LanMountainDesktop.Launcher %U' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
Comment=LanMountainDesktop desktop shell
|
||||||
printf '%s\n' 'Icon=lanmountaindesktop' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
Exec=/opt/apps/com.lanmountain.desktop/files/bin/LanMountainDesktop.Launcher %U
|
||||||
printf '%s\n' 'Terminal=false' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
Icon=lanmountaindesktop
|
||||||
printf '%s\n' 'Categories=Utility;Education;' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
Terminal=false
|
||||||
printf '%s\n' 'StartupWMClass=LanMountainDesktop' >> ${PREFIX}/share/applications/com.lanmountain.desktop.desktop
|
Categories=Utility;Education;
|
||||||
|
StartupWMClass=LanMountainDesktop
|
||||||
|
EOF
|
||||||
|
|
||||||
# Copy icon files
|
# Copy icon files
|
||||||
if [ -f "/project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png" ]; then
|
if [ -f "/project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png" ]; then
|
||||||
cp /project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png \
|
cp /project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png \
|
||||||
${PREFIX}/share/icons/hicolor/256x256/apps/
|
$PREFIX/share/icons/hicolor/256x256/apps/
|
||||||
cp /project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png \
|
cp /project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png \
|
||||||
${PREFIX}/share/icons/hicolor/128x128/apps/
|
$PREFIX/share/icons/hicolor/128x128/apps/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set executable permissions
|
# Set executable permissions
|
||||||
chmod +x ${PREFIX}/bin/*
|
chmod +x $PREFIX/bin/*
|
||||||
chmod +x ${PREFIX}/lib/LanMountainDesktop.AirAppRuntime 2>/dev/null || true
|
chmod +x $PREFIX/lib/LanMountainDesktop.AirAppRuntime 2>/dev/null || true
|
||||||
|
|
||||||
echo "Linglong build completed successfully"
|
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