Last active
January 14, 2022 13:47
-
-
Save daquexian/cd140d70b1772daa4a736c0642a68e9d to your computer and use it in GitHub Desktop.
generate appimage out-of-the-box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -uexo pipefail | |
if [ ! -f linuxdeploy-x86_64.AppImage ] | |
then | |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
fi | |
if [ ! -f linuxdeploy-plugin-appimage-x86_64.AppImage ] | |
then | |
wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage | |
fi | |
chmod +x linuxdeploy-*.AppImage | |
rm -rf appimage/appdir | |
mkdir -p appimage/appdir/usr/bin | |
cp $1 appimage/appdir/usr/bin/ | |
bn=`basename $1` | |
echo "[Desktop Entry] | |
Name=$bn | |
Exec=$bn | |
Icon=$bn | |
Type=Application | |
Terminal=true | |
Categories=Development;" > appimage/$bn.desktop | |
convert -size 32x32 xc:white appimage/$bn.png | |
./linuxdeploy-x86_64.AppImage --appdir appimage/appdir -d appimage/$bn.desktop -i appimage/$bn.png --output appimage | |
rm -rf appimage/appdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment