From 4cc80613cb6444fe7660ad5f828148acc8f88919 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Wed, 29 Aug 2018 22:05:57 +0200 Subject: [PATCH] Remove compatibility hacks --- scripts/linux/build-appimage-docker.sh | 2 +- scripts/linux/build-appimage.sh | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/linux/build-appimage-docker.sh b/scripts/linux/build-appimage-docker.sh index fc49e231e0..8ac54e010a 100644 --- a/scripts/linux/build-appimage-docker.sh +++ b/scripts/linux/build-appimage-docker.sh @@ -7,6 +7,6 @@ REPO_ROOT=$(readlink -f $(dirname "$0")/../..) docker run --rm -it -e NO_CLEANUP=1 -e CI=1 --device /dev/fuse:mrw -v $(readlink -f .):/ws openrct2/openrct2:ubuntu_amd64 bash -xc " cd /ws apt-get update -apt-get install -y wget +apt-get install -y wget libcairo2 bash -xe scripts/linux/build-appimage.sh " diff --git a/scripts/linux/build-appimage.sh b/scripts/linux/build-appimage.sh index dde6f84d09..292d34ed72 100644 --- a/scripts/linux/build-appimage.sh +++ b/scripts/linux/build-appimage.sh @@ -10,7 +10,7 @@ else TEMP_BASE=/tmp fi -BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" AppImageUpdate-build-XXXXXX) +BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" OpenRCT2-appimage-build-XXXXXX) cleanup () { if [ -d "$BUILD_DIR" ]; then @@ -26,20 +26,16 @@ OLD_CWD=$(readlink -f .) pushd "$BUILD_DIR" -#wget https://raw.githubusercontent.com/wheybags/glibc_version_header/master/version_headers/force_link_glibc_2.27.h - -#flags="-include "$(readlink -f "force_link_glibc_2.27.h") -CC=clang CXX=clang++ CFLAGS="$flags" CXXFLAGS="$flags" cmake "$REPO_ROOT" -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_EXE_LINKER_FLAGS="-pthread" +# standard linuxdeploy pattern +#see https://docs.appimage.org/packaging-guide/from-source/index.html for more information +cmake "$REPO_ROOT" -DCMAKE_INSTALL_PREFIX=/usr make -j$(nproc) VERBOSE=1 make install DESTDIR=AppDir wget https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage chmod +x linuxdeploy*.AppImage -./linuxdeploy*.AppImage --appimage-extract -wget https://github.com/TheAssassin/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh -chmod +x linuxdeploy-plugin-checkrt-*.sh -mv linuxdeploy-plugin-checkrt-*.sh squashfs-root/usr/bin -ARCH=x86_64 squashfs-root/AppRun --appdir AppDir/ --output appimage -l /lib/x86_64-linux-gnu/libz.so.1 + +./linuxdeploy*.AppImage --appimage-extract-and-run --appdir AppDir/ --output appimage mv OpenRCT2*.AppImage "$OLD_CWD"/