automatically pull appimage deps
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
},
|
||||
"containerEnv": {
|
||||
"VNC_RESOLUTION": "1920x1080x24",
|
||||
"APPIMAGE_EXTRACT_AND_RUN": "1",
|
||||
},
|
||||
"runArgs": [
|
||||
"--device=/dev/snd:/dev/snd",
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
go-version: '1.24'
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt update && sudo apt install libmpv-dev gcc libegl1-mesa-dev xorg-dev desktop-file-utils
|
||||
run: sudo apt update && sudo apt install -y libmpv-dev gcc libegl1-mesa-dev xorg-dev
|
||||
|
||||
- name: Build
|
||||
run: make build
|
||||
|
||||
@@ -12,7 +12,12 @@ supersonic
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
*.AppImage
|
||||
Supersonic.app
|
||||
Supersonic.AppDir/
|
||||
appimagetool-x86_64.AppImage
|
||||
tmp/
|
||||
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
Regular → Executable
+25
-4
@@ -1,8 +1,24 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e
|
||||
if (ls supersonic);
|
||||
then
|
||||
rm -rf Supersonic.AppDir/
|
||||
mkdir -p Supersonic.AppDir/usr/lib
|
||||
mkdir Supersonic.AppDir/usr/bin
|
||||
mkdir -p Supersonic.AppDir/usr/bin
|
||||
|
||||
if [[ "$@" != *"--manual-libs"* ]]; then
|
||||
# auto add all dependences of binary except those on AppImage exclude list
|
||||
EXCLUDE=$(wget -nv -O - https://github.com/AppImageCommunity/pkg2appimage/raw/refs/heads/master/excludelist | grep -v "^#")
|
||||
ldd ./supersonic | grep -F "x86_64-linux-gnu" | sort | while read -r file _ path __; do
|
||||
if [[ "$EXCLUDE" == *"$file"* ]]; then
|
||||
echo "exclude $file"
|
||||
else
|
||||
echo "add $path"
|
||||
cp $path "Supersonic.AppDir/usr/lib/$file"
|
||||
fi
|
||||
done
|
||||
else
|
||||
# (smaller) manual list of dependencies which avoids some libs that are generally available on most linux installs already
|
||||
set -x
|
||||
cp /usr/lib/x86_64-linux-gnu/libpostproc.so.55 Supersonic.AppDir/usr/lib #
|
||||
cp /usr/lib/x86_64-linux-gnu/libsrt-gnutls.so.1.4 Supersonic.AppDir/usr/lib/ #
|
||||
cp /usr/lib/x86_64-linux-gnu/libx264.so.163 Supersonic.AppDir/usr/lib/ #
|
||||
@@ -92,16 +108,21 @@ cp /usr/lib/x86_64-linux-gnu/libtheoradec.so.1 Supersonic.AppDir/usr/lib/ # Open
|
||||
cp /usr/lib/x86_64-linux-gnu/libxml2.so.2 Supersonic.AppDir/usr/lib/ # CachyOS fix
|
||||
cp /usr/lib/x86_64-linux-gnu/libicuuc.so.70 Supersonic.AppDir/usr/lib/ # CachyOS fix
|
||||
cp /usr/lib/x86_64-linux-gnu/libicudata.so.70 Supersonic.AppDir/usr/lib/ # CachyOS fix
|
||||
set +x
|
||||
fi
|
||||
|
||||
printf '%s\n' '#!/bin/bash' 'SELF=$(readlink -f "$0")' 'HERE=${SELF%/*}' 'EXEC="${HERE}/usr/bin/supersonic"' 'export LD_LIBRARY_PATH="/usr/lib64:/lib64:/usr/lib/x86_64-linux-gnu:/usr/lib:${HERE}/usr/lib/"' 'exec "${EXEC}";' > Supersonic.AppDir/AppRun
|
||||
printf '%s\n' '[Desktop Entry]' 'Name=Supersonic' 'Exec=supersonic' 'Icon=ico' 'Type=Application' 'Comment=A lightweight cross-platform desktop client for self-hosted music servers' 'Categories=AudioVideo;' > Supersonic.AppDir/"supersonic.desktop"
|
||||
chmod +x Supersonic.AppDir/AppRun
|
||||
chmod +x Supersonic.AppDir/supersonic.desktop
|
||||
wget https://github.com/dweymouth/supersonic/blob/main/res/appicon.png?raw=true -O Supersonic.AppDir/ico.png
|
||||
wget -nv https://github.com/dweymouth/supersonic/blob/main/res/appicon.png?raw=true -O Supersonic.AppDir/ico.png
|
||||
cp supersonic Supersonic.AppDir/usr/bin/
|
||||
chmod +x Supersonic.AppDir/usr/bin/supersonic
|
||||
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
|
||||
wget -nv -nc https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x appimagetool-x86_64.AppImage
|
||||
./appimagetool-x86_64.AppImage Supersonic.AppDir/
|
||||
|
||||
echo "Script finished"
|
||||
else
|
||||
echo "executable not found!"
|
||||
|
||||
Reference in New Issue
Block a user