v5.7-patch1-build4
This commit is contained in:
+64
-39
@@ -236,17 +236,22 @@ jobs:
|
|||||||
- name: Build application
|
- name: Build application
|
||||||
run: wails build -platform linux/amd64
|
run: wails build -platform linux/amd64
|
||||||
|
|
||||||
- name: Download linuxdeploy and appimagetool
|
- name: Download appimagetool
|
||||||
run: |
|
run: |
|
||||||
wget -O linuxdeploy https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
wget -O appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||||
chmod +x linuxdeploy
|
chmod +x appimagetool
|
||||||
|
|
||||||
- name: Create AppImage
|
- name: Create AppImage
|
||||||
run: |
|
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)
|
# Copy binary
|
||||||
cat > spotiflac.desktop << 'EOF'
|
cp build/bin/SpotiFLAC AppDir/usr/bin/
|
||||||
|
|
||||||
|
# Create desktop file
|
||||||
|
cat > AppDir/spotiflac.desktop << 'EOF'
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=SpotiFLAC
|
Name=SpotiFLAC
|
||||||
Exec=SpotiFLAC
|
Exec=SpotiFLAC
|
||||||
@@ -256,45 +261,37 @@ jobs:
|
|||||||
Comment=Get Spotify tracks in true FLAC from Tidal/Deezer
|
Comment=Get Spotify tracks in true FLAC from Tidal/Deezer
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Create icon from build or SVG
|
cp AppDir/spotiflac.desktop AppDir/usr/share/applications/
|
||||||
|
|
||||||
|
# Create icon
|
||||||
if [ -f "build/appicon.png" ]; then
|
if [ -f "build/appicon.png" ]; then
|
||||||
# Resize to 256x256 (build/appicon.png might be 1024x1024)
|
convert build/appicon.png -resize 256x256 AppDir/spotiflac.png
|
||||||
convert build/appicon.png -resize 256x256 spotiflac.png
|
|
||||||
elif [ -f "frontend/public/icon.svg" ]; then
|
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
|
else
|
||||||
echo "Error: No icon found"
|
echo "Warning: No icon found, building without icon"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use linuxdeploy to create AppImage
|
# Copy icon if exists
|
||||||
# Bundle only uncommon libraries (webkit2gtk), exclude common ones (GTK, glib)
|
if [ -f "AppDir/spotiflac.png" ]; then
|
||||||
mkdir -p dist
|
cp AppDir/spotiflac.png AppDir/usr/share/icons/hicolor/256x256/apps/
|
||||||
./linuxdeploy \
|
cp AppDir/spotiflac.png AppDir/.DirIcon
|
||||||
--appdir AppDir \
|
fi
|
||||||
--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
|
|
||||||
|
|
||||||
# Rename to match version
|
# Create AppRun
|
||||||
mv SpotiFLAC*.AppImage dist/SpotiFLAC-${{ steps.version.outputs.version }}.AppImage
|
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
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -342,6 +339,34 @@ jobs:
|
|||||||
- `SpotiFLAC-${{ steps.version.outputs.version }}.exe` - Windows
|
- `SpotiFLAC-${{ steps.version.outputs.version }}.exe` - Windows
|
||||||
- `SpotiFLAC-${{ steps.version.outputs.version }}.dmg` - macOS
|
- `SpotiFLAC-${{ steps.version.outputs.version }}.dmg` - macOS
|
||||||
- `SpotiFLAC-${{ steps.version.outputs.version }}.AppImage` - Linux
|
- `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: |
|
files: |
|
||||||
artifacts/windows-portable/*.exe
|
artifacts/windows-portable/*.exe
|
||||||
artifacts/macos-portable/*.dmg
|
artifacts/macos-portable/*.dmg
|
||||||
|
|||||||
Reference in New Issue
Block a user