Enable game-specific appimage builds
This commit is contained in:
parent
00e0d3bb1e
commit
f5a3f9469b
1 changed files with 51 additions and 20 deletions
|
@ -27,6 +27,7 @@ download_if_needed() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
download_if_needed appimagetool-${ARCH}.AppImage
|
download_if_needed appimagetool-${ARCH}.AppImage
|
||||||
download_if_needed AppRun-${ARCH}
|
download_if_needed AppRun-${ARCH}
|
||||||
|
|
||||||
|
@ -41,16 +42,46 @@ cd love-prepared
|
||||||
cp ../wrapper usr/bin/wrapper-love
|
cp ../wrapper usr/bin/wrapper-love
|
||||||
cp ../AppRun-${ARCH} AppRun
|
cp ../AppRun-${ARCH} AppRun
|
||||||
|
|
||||||
|
local desktopfile="love.desktop"
|
||||||
|
local icon="love"
|
||||||
|
local target="love-${VERSION}"
|
||||||
|
|
||||||
|
if test -f ../../game.desktop.in; then
|
||||||
|
desktopfile="game.desktop"
|
||||||
|
cp ../../game.desktop.in .
|
||||||
|
fi
|
||||||
|
if test -f ../../game.svg; then
|
||||||
|
icon="game"
|
||||||
|
cp ../../game.svg .
|
||||||
|
fi
|
||||||
|
if test -f ../../game.love; then
|
||||||
|
target="game"
|
||||||
|
cat usr/bin/love ../../game.love > usr/bin/love-fused
|
||||||
|
mv usr/bin/love-fused usr/bin/love
|
||||||
|
chmod +x usr/bin/love
|
||||||
|
fi
|
||||||
|
|
||||||
# Add our desktop file
|
# Add our desktop file
|
||||||
sed -e 's/%BINARY%/wrapper-love/' -e 's/%ICON%/love/' love.desktop.in > love.desktop
|
sed -e 's/%BINARY%/wrapper-love/' -e "s/%ICON%/${icon}/" "${desktopfile}.in" > "$desktopfile"
|
||||||
rm love.desktop.in
|
rm "${desktopfile}.in"
|
||||||
|
|
||||||
# Add a DirIcon
|
# Add a DirIcon
|
||||||
cp love.svg .DirIcon
|
cp "${icon}.svg" .DirIcon
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
if test -f ../../game.desktop.in; then
|
||||||
|
rm love.desktop.in
|
||||||
|
fi
|
||||||
|
if test -f ../../game.svg; then
|
||||||
|
rm love.svg
|
||||||
|
fi
|
||||||
|
|
||||||
# Now build the final AppImage
|
# Now build the final AppImage
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Work around missing FUSE/docker
|
# Work around missing FUSE/docker
|
||||||
./appimagetool-${ARCH}.AppImage --appimage-extract
|
./appimagetool-${ARCH}.AppImage --appimage-extract
|
||||||
./squashfs-root/AppRun love-prepared love-${VERSION}-${ARCH}.AppImage
|
./squashfs-root/AppRun love-prepared "${target}-${ARCH}.AppImage"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
|
|
Loading…
Reference in a new issue