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
|
||||
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"
|
||||
# Add Linglong repository for Ubuntu 24.04
|
||||
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
|
||||
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
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Verify installation
|
||||
if command -v ll-builder &> /dev/null; then
|
||||
ll-builder --version
|
||||
ll-cli --version
|
||||
echo "LINGLONG_AVAILABLE=true" >> $GITHUB_ENV
|
||||
else
|
||||
echo "::warning::ll-builder not found after installation"
|
||||
echo "LINGLONG_AVAILABLE=false" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
@@ -655,32 +662,32 @@ jobs:
|
||||
mkdir -p "$linglongDir" "$release_dir"
|
||||
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
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 "=== Starting ll-builder build ==="
|
||||
ll-builder build --skip-output-check || {
|
||||
echo "::warning::Linglong build failed"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# List available refs
|
||||
ll-builder list
|
||||
echo "=== Listing available refs ==="
|
||||
ll-builder list || true
|
||||
|
||||
# Export the layer
|
||||
echo "=== Exporting layer ==="
|
||||
# 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
|
||||
echo "Exporting ref: $REF"
|
||||
ll-builder export --ref "$REF" || {
|
||||
echo "::warning::Linglong export failed"
|
||||
exit 0
|
||||
@@ -693,6 +700,8 @@ jobs:
|
||||
echo "✓ Linglong package created: LanMountainDesktop-${version}-linux-x64.layer"
|
||||
else
|
||||
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
|
||||
else
|
||||
echo "::warning::No refs available for export"
|
||||
|
||||
@@ -25,7 +25,6 @@ build: |
|
||||
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
|
||||
@@ -51,19 +50,17 @@ build: |
|
||||
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
|
||||
# Create desktop file using printf to avoid heredoc issues in YAML
|
||||
printf '%s\n' '[Desktop Entry]' > $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'Type=Application' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'Version=1.0' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'Name=LanMountainDesktop' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'Comment=LanMountainDesktop desktop shell' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'Exec=/opt/apps/com.lanmountain.desktop/files/bin/LanMountainDesktop.Launcher %U' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'Icon=lanmountaindesktop' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'Terminal=false' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'Categories=Utility;Education;' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
printf '%s\n' 'StartupWMClass=LanMountainDesktop' >> $PREFIX/share/applications/com.lanmountain.desktop.desktop
|
||||
|
||||
# Copy icon files
|
||||
if [ -f "/project/LanMountainDesktop/packaging/linux/lanmountaindesktop.png" ]; then
|
||||
@@ -75,6 +72,5 @@ build: |
|
||||
|
||||
# Set executable permissions
|
||||
chmod +x $PREFIX/bin/*
|
||||
chmod +x $PREFIX/lib/LanMountainDesktop.AirAppRuntime 2>/dev/null || true
|
||||
|
||||
echo "Linglong build completed successfully"
|
||||
|
||||
Reference in New Issue
Block a user