Open ghost opened 4 years ago
Probably not.
hi alexey,
reason for suggesting this - the format offers quite neat features. just to name one, carry a portable, desktop agnostic one-file deadbeef on an usb stick incl. all additional files (config) in an extra folder alongside. could also be understood as a backup. there is more to follow in the attached link.
You can do nearly all that you can do with appimage, simply by downloading a zipped build of deadbeef. It's even more distro-agnostic than appimage - works on more distros.
tbh, i have not yet tried deadbeef portable. does it store everything (config, extra plugins...) inside its folder then? this is my aim.
No, but you can tell deadbeef where to store the config using $XDG_CONFIG_HOME environment variable.
plugins are stored inside of its folder, yes
You can do nearly all that you can do with appimage, simply by downloading a zipped build of deadbeef. It's even more distro-agnostic than appimage - works on more distros.
@probonopd What do you think?
Show me a distro where the zipped build of deadbeef runs but the AppImage (containing the identical binaries) doesn't and we're talking ;-)
Deadbeef builds are binary compatible with any linux distribution with GLIBC/GTK/ALSA released in the last 8 years. TBH I don't know if Appimage is compatible with 8 year old linux distros, but if it is -- then probably compatibility is the same.
(I can't test whether it would work, since I don't have an appimage of deadbeef)
Yes, it should.
I was able to build an appimage by simply taking the portable build of deadbeef and adding the following inside the directory:
a script named AppRun:
#! /usr/bin/env bash
set -e
this_dir="$(readlink -f "$(dirname "$0")")"
exec "$this_dir"/AppRun.wrapped "$@"
A symlink named AppRun.wrapped that just points to the deadbeef executable and a deadbeef.desktop file.
Then named the deadbeef dir to deadbeef.AppDir and ran the appimagetool appimagetool --comp zstd deadbeef.AppDir
And that was it! I just copied the way CPU-X builds its appimage and it worked! Super easy. I hope deadbeef can come as an appimage, I myself when I was using voidlinux jumped thru so many hoops trying to get deadbeef to work because the native package was outdated and had issues with the nix version of the package and didn't know the portable build existed which I think is something very few people know exists.
Why an AppRun.wrapped
symlink, you should be able to just call the deadbeef executable directly in the script without an extra symlink. Something like this (note POSIX /bin/sh
being used for improved compatibility):
#! /bin/sh
HERE="$(readlink -f "$(dirname "$0")")"
exec "$HERE"/usr/bin/deadbeef "$@"
Why an
AppRun.wrapped
symlink, you should be able to just call the deadbeef executable directly in the script without an extra symlink. Something like this (note POSIX/bin/sh
being used for improved compatibility):#! /bin/sh HERE="$(readlink -f "$(dirname "$0")")" exec "$HERE"/usr/bin/deadbeef "$@"
I just copied the way CPU-X builds its appimage, yeah I also noticed that but I assumed there most have been a reason to have symlink with such name but looks like there isn't lol.
edit: Also the deabeef executable is right on the folder in the portable build, it isn't inside a /usr/bin dir.
I made this script that downloads the nightly build of deadbeef and turns it into an appimage:
#!/bin/sh
APP=deadbeef
# Create folders
if [ -z "$APP" ]; then exit 1; fi
mkdir -p ./$APP/tmp && cd ./$APP/tmp
# DOWNLOAD THE ARCHIVE
version=$(wget -q https://sourceforge.net/projects/deadbeef/files/travis/linux/master/ -O - | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | sort -u | grep "x86_64.tar.bz2")
wget $version -O download.tar.bz2
echo "$version" >> ./version
tar fx ./*tar*
cd ..
mkdir ./$APP.AppDir
mv --backup=t ./tmp/*/* ./$APP.AppDir
rm -rf "./tmp"
cd ./$APP.AppDir
# DESKTOP ENTRY
echo "[Desktop Entry]
Type=Application
Name=DeaDBeeF Nightly
Exec=deadbeef %F
Icon=deadbeef
GenericName=Audio Player
GenericName[pt_BR]=Reprodutor de áudio
GenericName[ru]=Аудио плеер
GenericName[zh_CN]=音频播放器
GenericName[zh_TW]=音樂播放器
Comment=Listen to music
Comment[pt_BR]=Escute músicas
Comment[ru]=Слушай музыку
Comment[zh_CN]=倾听音乐
Comment[zh_TW]=聆聽音樂
MimeType=application/ogg;audio/x-vorbis+ogg;application/x-ogg;audio/mp3;audio/prs.sid;audio/x-flac;audio/mpeg;audio/x-mpeg;audio/x-mod;audio/x-it;audio/x-s3m;audio/x-xm;audio/x-mpegurl;audio/x-scpls;application/x-cue;
Categories=Audio;AudioVideo;Player;GTK;
Keywords=Sound;Music;Audio;Player;Musicplayer;MP3;
Terminal=false
Actions=Play;Pause;Toggle-Pause;Stop;Next;Prev;
X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Next;Prev;
X-PulseAudio-Properties=media.role=music
[Desktop Action Play]
Name=Play
Name[zh_CN]=播放
Name[zh_TW]=播放
Exec=deadbeef --play
[Desktop Action Pause]
Name=Pause
Name[zh_CN]=暂停
Name[zh_TW]=暫停
Exec=deadbeef --pause
[Desktop Action Toggle-Pause]
Name=Toggle Pause
Name[zh_CN]=播放/暂停
Name[zh_TW]=播放/暫停
Exec=deadbeef --toggle-pause
[Desktop Action Stop]
Name=Stop
Name[zh_TW]=停止
Exec=deadbeef --stop
[Desktop Action Next]
Name=Next
Name[zh_TW]=下一首
Exec=deadbeef --next
[Desktop Action Prev]
Name=Prev
Name[zh_TW]=上一首
Exec=deadbeef --prev" >> ./$APP.desktop
# Icon
wget https://raw.githubusercontent.com/DeaDBeeF-Player/deadbeef/master/icons/scalable/deadbeef.svg -O ./deadbeef.svg 2> /dev/null
ln -s ./deadbeef.svg ./.DirIcon
# AppRun
cat >> ./AppRun << 'EOF'
#!/bin/sh
CURRENTDIR="$(readlink -f "$(dirname "$0")")"
exec "$CURRENTDIR"/deadbeef "$@"
EOF
chmod a+x ./AppRun
# MAKE APPIMAGE
cd ..
wget -q $(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - | grep -v zsync | grep -i continuous | grep -i appimagetool | grep -i x86_64 | grep browser_download_url | cut -d '"' -f 4 | head -1) -O appimagetool
chmod a+x ./appimagetool
# Do the thing!
ARCH=x86_64 VERSION=$(./appimagetool -v | grep -o '[[:digit:]]*') ./appimagetool -s ./$APP.AppDir &&
ls ./*.AppImage || { echo "appimagetool failed to make the appimage"; exit 1; }
# Clean up
if [ -z "$APP" ]; then exit 1; fi # Being extra safe lol
rm -rf "./$APP.AppDir"
rm ./appimagetool
echo "All Done!"
Edit: I'm also releasing it: https://github.com/Samueru-sama/DeaDBeef-AppImage
Thanks @Samueru-sama. It would be nice if the AppImage could be built as part of the CI pipeline for every build.
Thanks @Samueru-sama. It would be nice if the AppImage could be built as part of the CI pipeline for every build.
Wanna know something? I don't even know what a CI pipeline is 💀. (I will try my best though).
Thanks @Samueru-sama. It would be nice if the AppImage could be built as part of the CI pipeline for every build.
If you meant automated builds, it has been doing that already btw.
any chance for packaging deadbeef as an appimage?
please have a look over here for more infos.