v5.7-patch1-build4
This commit is contained in:
+64
-39
@@ -236,17 +236,22 @@ jobs:
|
||||
- name: Build application
|
||||
run: wails build -platform linux/amd64
|
||||
|
||||
- name: Download linuxdeploy and appimagetool
|
||||
- name: Download appimagetool
|
||||
run: |
|
||||
wget -O linuxdeploy https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
chmod +x linuxdeploy
|
||||
wget -O appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x appimagetool
|
||||
|
||||
- name: Create AppImage
|
||||
run: |
|
||||
mkdir -p AppDir
|
||||
mkdir -p AppDir/usr/bin
|
||||
mkdir -p AppDir/usr/share/applications
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
||||
|
||||
# Create desktop file (Exec must match binary name)
|
||||
cat > spotiflac.desktop << 'EOF'
|
||||
# Copy binary
|
||||
cp build/bin/SpotiFLAC AppDir/usr/bin/
|
||||
|
||||
# Create desktop file
|
||||
cat > AppDir/spotiflac.desktop << 'EOF'
|
||||
[Desktop Entry]
|
||||
Name=SpotiFLAC
|
||||
Exec=SpotiFLAC
|
||||
@@ -256,45 +261,37 @@ jobs:
|
||||
Comment=Get Spotify tracks in true FLAC from Tidal/Deezer
|
||||
EOF
|
||||
|
||||
# Create icon from build or SVG
|
||||
cp AppDir/spotiflac.desktop AppDir/usr/share/applications/
|
||||
|
||||
# Create icon
|
||||
if [ -f "build/appicon.png" ]; then
|
||||
# Resize to 256x256 (build/appicon.png might be 1024x1024)
|
||||
convert build/appicon.png -resize 256x256 spotiflac.png
|
||||
convert build/appicon.png -resize 256x256 AppDir/spotiflac.png
|
||||
elif [ -f "frontend/public/icon.svg" ]; then
|
||||
convert -background none -size 256x256 frontend/public/icon.svg spotiflac.png
|
||||
convert -background none -size 256x256 frontend/public/icon.svg AppDir/spotiflac.png
|
||||
else
|
||||
echo "Error: No icon found"
|
||||
exit 1
|
||||
echo "Warning: No icon found, building without icon"
|
||||
fi
|
||||
|
||||
# Use linuxdeploy to create AppImage
|
||||
# Bundle only uncommon libraries (webkit2gtk), exclude common ones (GTK, glib)
|
||||
mkdir -p dist
|
||||
./linuxdeploy \
|
||||
--appdir AppDir \
|
||||
--executable build/bin/SpotiFLAC \
|
||||
--desktop-file spotiflac.desktop \
|
||||
--icon-file spotiflac.png \
|
||||
--exclude-library "libgtk-3.so*" \
|
||||
--exclude-library "libgdk-3.so*" \
|
||||
--exclude-library "libglib-2.0.so*" \
|
||||
--exclude-library "libgobject-2.0.so*" \
|
||||
--exclude-library "libgio-2.0.so*" \
|
||||
--exclude-library "libpango-1.0.so*" \
|
||||
--exclude-library "libcairo.so*" \
|
||||
--exclude-library "libX11.so*" \
|
||||
--exclude-library "libXext.so*" \
|
||||
--exclude-library "libXrender.so*" \
|
||||
--exclude-library "libfontconfig.so*" \
|
||||
--exclude-library "libfreetype.so*" \
|
||||
--exclude-library "libpthread.so*" \
|
||||
--exclude-library "libdl.so*" \
|
||||
--exclude-library "libm.so*" \
|
||||
--exclude-library "libc.so*" \
|
||||
--output appimage
|
||||
# Copy icon if exists
|
||||
if [ -f "AppDir/spotiflac.png" ]; then
|
||||
cp AppDir/spotiflac.png AppDir/usr/share/icons/hicolor/256x256/apps/
|
||||
cp AppDir/spotiflac.png AppDir/.DirIcon
|
||||
fi
|
||||
|
||||
# Rename to match version
|
||||
mv SpotiFLAC*.AppImage dist/SpotiFLAC-${{ steps.version.outputs.version }}.AppImage
|
||||
# Create AppRun
|
||||
cat > AppDir/AppRun << 'EOF'
|
||||
#!/bin/sh
|
||||
SELF=$(readlink -f "$0")
|
||||
HERE=${SELF%/*}
|
||||
export PATH="${HERE}/usr/bin/:${PATH}"
|
||||
export LD_LIBRARY_PATH="${HERE}/usr/lib/:${LD_LIBRARY_PATH}"
|
||||
exec "${HERE}/usr/bin/SpotiFLAC" "$@"
|
||||
EOF
|
||||
chmod +x AppDir/AppRun
|
||||
|
||||
# Create AppImage
|
||||
mkdir -p dist
|
||||
ARCH=x86_64 ./appimagetool --no-appstream AppDir dist/SpotiFLAC-${{ steps.version.outputs.version }}.AppImage
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -342,6 +339,34 @@ jobs:
|
||||
- `SpotiFLAC-${{ steps.version.outputs.version }}.exe` - Windows
|
||||
- `SpotiFLAC-${{ steps.version.outputs.version }}.dmg` - macOS
|
||||
- `SpotiFLAC-${{ steps.version.outputs.version }}.AppImage` - Linux
|
||||
|
||||
<details>
|
||||
<summary><b>Linux Requirements</b></summary>
|
||||
|
||||
The AppImage requires `webkit2gtk-4.1` to be installed on your system:
|
||||
|
||||
**Ubuntu/Debian:**
|
||||
```bash
|
||||
sudo apt install libwebkit2gtk-4.1-0
|
||||
```
|
||||
|
||||
**Arch Linux:**
|
||||
```bash
|
||||
sudo pacman -S webkit2gtk-4.1
|
||||
```
|
||||
|
||||
**Fedora:**
|
||||
```bash
|
||||
sudo dnf install webkit2gtk4.1
|
||||
```
|
||||
|
||||
After installing the dependency, make the AppImage executable:
|
||||
```bash
|
||||
chmod +x SpotiFLAC-${{ steps.version.outputs.version }}.AppImage
|
||||
./SpotiFLAC-${{ steps.version.outputs.version }}.AppImage
|
||||
```
|
||||
|
||||
</details>
|
||||
files: |
|
||||
artifacts/windows-portable/*.exe
|
||||
artifacts/macos-portable/*.dmg
|
||||
|
||||
Reference in New Issue
Block a user