build: Simplify appimage build (#356)

* Simplify creating an AppImage

- package.sh packages the build result into an AppImage. It requires
squashfs-tools to work
- runtime-x86_64 is a binary distributed by the AppImage project that takes
care of extracting and running the image

* use AppRun from AppImage project

* clean up no longer needed bits

* Keep docker way of working around

- Docker now also uses `package.sh`, so no more need for FUSE.
- Fetch binaries instead of storing in git.

* Fix details

* wait a little longer for the container to start
This commit is contained in:
wardwouts
2021-12-03 09:53:15 +01:00
committed by GitHub
parent 21cc8555b5
commit 451c550b19
6 changed files with 100 additions and 56 deletions

View File

@@ -1,14 +1,16 @@
#!/bin/bash
# Set the TAG environment variable to build a specific tag
# Set the REPO environment variable to point at a different git repository
# Make sure we're in the same direcotry as this script
# Make sure we're in the same directory as this script
pushd $(dirname "$(realpath "$0")")
if [ -z "$TAG" ]; then
docker build -t imhex-appimage-build .
else
docker build --build-arg=TAG=$TAG -t imhex-appimage-build-$TAG .
fi
BUILDARG=""
SUFFIX=""
[ -n "${TAG}" ] && BUILDARG="${BUILDARG} --build-arg=TAG=${TAG}" && SUFFIX=":${TAG}"
[ -n "${REPO}" ] && BUILDARG="${BUILDARG} --build-arg=REPO=${REPO}"
docker build ${BUILDARG} -t imhex-appimage-build${SUFFIX} .
popd