mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-27 12:54:25 +08:00
fix.深度这个玲珑怎么这么麻烦
This commit is contained in:
33
.github/workflows/release.yml
vendored
33
.github/workflows/release.yml
vendored
@@ -630,17 +630,24 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Linglong build tools
|
- name: Install Linglong build tools
|
||||||
run: |
|
run: |
|
||||||
# Install Linglong builder tools
|
# Add Linglong repository for Ubuntu 24.04
|
||||||
curl -fsSL https://deepin-community.github.io/linglong-tools/install.sh | bash || {
|
echo "deb [trusted=yes] https://ci.deepin.com/repo/obs/linglong:/CI:/release/xUbuntu_24.04/ ./" | sudo tee /etc/apt/sources.list.d/linglong.list
|
||||||
echo "Warning: Failed to install Linglong tools, skipping Linglong build"
|
sudo apt-get update
|
||||||
|
|
||||||
|
# Install Linglong builder and CLI
|
||||||
|
sudo apt-get install -y linglong-bin linglong-builder || {
|
||||||
|
echo "::warning::Failed to install Linglong tools, skipping Linglong build"
|
||||||
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
||||||
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Verify installation
|
# Verify installation
|
||||||
if command -v ll-builder &> /dev/null; then
|
if command -v ll-builder &> /dev/null; then
|
||||||
ll-builder --version
|
ll-builder --version
|
||||||
|
ll-cli --version
|
||||||
echo "LINGLONG_AVAILABLE=true" >> $GITHUB_ENV
|
echo "LINGLONG_AVAILABLE=true" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
|
echo "::warning::ll-builder not found after installation"
|
||||||
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -655,32 +662,32 @@ jobs:
|
|||||||
mkdir -p "$linglongDir" "$release_dir"
|
mkdir -p "$linglongDir" "$release_dir"
|
||||||
|
|
||||||
# Copy linglong.yaml and update version
|
# Copy linglong.yaml and update version
|
||||||
cp packaging/linglong/linglong.yaml "$linglongDir/"
|
cp packaging/linglong/linglong.yaml "$linglongDir/linglong.yaml"
|
||||||
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
|
||||||
# ll-builder expects the project files in /project inside the container
|
# ll-builder mounts the project directory to /project inside the container
|
||||||
mkdir -p "$linglongDir/publish"
|
mkdir -p "$linglongDir/publish"
|
||||||
cp -r "$publishDir"/* "$linglongDir/publish/"
|
cp -r "$publishDir"/* "$linglongDir/publish/"
|
||||||
cp -r LanMountainDesktop "$linglongDir/LanMountainDesktop"
|
cp -r LanMountainDesktop "$linglongDir/LanMountainDesktop"
|
||||||
|
|
||||||
# Copy linglong.yaml to the build directory
|
|
||||||
cp "$linglongDir/linglong.yaml" "$linglongDir/"
|
|
||||||
|
|
||||||
# Build using ll-builder
|
# Build using ll-builder
|
||||||
cd "$linglongDir"
|
cd "$linglongDir"
|
||||||
ll-builder build || {
|
echo "=== Starting ll-builder build ==="
|
||||||
|
ll-builder build --skip-output-check || {
|
||||||
echo "::warning::Linglong build failed"
|
echo "::warning::Linglong build failed"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# List available refs
|
echo "=== Listing available refs ==="
|
||||||
ll-builder list
|
ll-builder list || true
|
||||||
|
|
||||||
# Export the layer
|
# Export the layer
|
||||||
|
echo "=== Exporting layer ==="
|
||||||
# Get the first available ref
|
# Get the first available ref
|
||||||
REF=$(ll-builder list | head -1 | awk '{print $1}')
|
REF=$(ll-builder list 2>/dev/null | grep -E "^com\." | head -1 | awk '{print $1}')
|
||||||
if [ -n "$REF" ]; then
|
if [ -n "$REF" ]; then
|
||||||
|
echo "Exporting ref: $REF"
|
||||||
ll-builder export --ref "$REF" || {
|
ll-builder export --ref "$REF" || {
|
||||||
echo "::warning::Linglong export failed"
|
echo "::warning::Linglong export failed"
|
||||||
exit 0
|
exit 0
|
||||||
@@ -693,6 +700,8 @@ jobs:
|
|||||||
echo "✓ Linglong package created: LanMountainDesktop-${version}-linux-x64.layer"
|
echo "✓ Linglong package created: LanMountainDesktop-${version}-linux-x64.layer"
|
||||||
else
|
else
|
||||||
echo "::warning::Linglong layer file not found after export"
|
echo "::warning::Linglong layer file not found after export"
|
||||||
|
# List files for debugging
|
||||||
|
find . -type f -name "*.layer" -o -name "*.uab" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "::warning::No refs available for export"
|
echo "::warning::No refs available for export"
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ build: |
|
|||||||
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
|
|
||||||
|
|
||||||
# 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
|
||||||
@@ -51,19 +50,17 @@ build: |
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create desktop file
|
# Create desktop file using printf to avoid heredoc issues in YAML
|
||||||
cat > $PREFIX/share/applications/com.lanmountain.desktop.desktop << EOF
|
printf '%s\n' '[Desktop Entry]' > $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
[Desktop Entry]
|
printf '%s\n' 'Type=Application' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
Type=Application
|
printf '%s\n' 'Version=1.0' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
Version=1.0
|
printf '%s\n' 'Name=LanMountainDesktop' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
Name=LanMountainDesktop
|
printf '%s\n' 'Comment=LanMountainDesktop desktop shell' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
Comment=LanMountainDesktop desktop shell
|
printf '%s\n' 'Exec=/opt/apps/com.lanmountain.desktop/files/bin/LanMountainDesktop.Launcher %U' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
Exec=/opt/apps/com.lanmountain.desktop/files/bin/LanMountainDesktop.Launcher %U
|
printf '%s\n' 'Icon=lanmountaindesktop' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
Icon=lanmountaindesktop
|
printf '%s\n' 'Terminal=false' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
Terminal=false
|
printf '%s\n' 'Categories=Utility;Education;' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
Categories=Utility;Education;
|
printf '%s\n' 'StartupWMClass=LanMountainDesktop' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||||
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
|
||||||
@@ -75,6 +72,5 @@ build: |
|
|||||||
|
|
||||||
# Set executable permissions
|
# Set executable permissions
|
||||||
chmod +x $PREFIX/bin/*
|
chmod +x $PREFIX/bin/*
|
||||||
chmod +x $PREFIX/lib/LanMountainDesktop.AirAppRuntime 2>/dev/null || true
|
|
||||||
|
|
||||||
echo "Linglong build completed successfully"
|
echo "Linglong build completed successfully"
|
||||||
|
|||||||
Reference in New Issue
Block a user