build: Added AppImage builder (#355)

* Docker files to create an AppImage

* Using ENTRYPOINT is a bit nicer here

* typo

* put with other dist files
This commit is contained in:
wardwouts
2021-12-01 21:35:47 +01:00
committed by GitHub
parent 278d46ccd7
commit be1c5f5d1d
7 changed files with 122 additions and 0 deletions

26
dist/AppImage/extract.sh vendored Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Set the TAG environment variable to move to a versioned name while extracting
# Make sure we're in the same direcotry as this script
pushd $(dirname "$(realpath "$0")")
# Remove old containers
docker rm imhex 2>&1 > /dev/null
# AppImage uses FUSE, which makes --device /dev/fuse --cap-add SYS_ADMIN necessary here
# on Debian --security-opt apparmor:unconfined is also needed
if [ -z "$TAG" ]; then
docker run -d --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --name imhex imhex-appimage-build
else
docker run -d --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --name imhex imhex-appimage-build-$TAG
fi
sleep 10
docker cp imhex:/ImHex-x86_64.AppImage .
# Move to tagged name if $TAG set
if [ -n "$TAG" ]; then
mv ImHex-x86_64.AppImage ImHex-${TAG}-x86_64.AppImage
fi
popd