snes9x/gtk/scripts/makeappimage.sh
2023-03-30 14:33:05 -05:00

32 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
if [ ! -f appimagetool-x86_64.AppImage ]; then
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
fi
if [ ! -f linuxdeploy-x86_64.AppImage ]; then
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
fi
DESTDIR=AppDir ninja install
./linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir=AppDir \
--exclude-library="libX*" \
--exclude-library="libglib*" \
--exclude-library="libgobject*" \
--exclude-library="libgdk_pixbuf*" \
--exclude-library="libwayland*" \
--exclude-library="libgmodule*" \
--exclude-library="libgio*" \
--exclude-library="libxcb*" \
--exclude-library="libxkbcommon*" \
--exclude-library="libdb*"
rm AppDir/snes9x.png
pushd AppDir
ln -s usr/share/icons/hicolor/256x256/apps/snes9x.png
chmod +x AppRun
popd
./appimagetool-x86_64.AppImage --appimage-extract-and-run AppDir