#!/bin/sh # Create and change to the directory we'll do all the work in work_dir=$(dirname $0)/../build/appimage mkdir -p $work_dir cd $work_dir # First we'll build a filesystem that contains zenserver mkdir fs # Copy the main binary zs_bin=../linux/x86_64/release/zenserver mkdir fs/bin cp $zs_bin fs/bin/ # Include the linked C++ library .so - this is required because some LTS distros # do not include GCC-11 at the time of writing and Zen's uses this for C++20. mkdir fs/usr cp $(ldd $zs_bin |sed -nr 's/^.+\s+=>\s+(.+)\s+\(0x0000.+$/\1/p'|grep 'c++') fs/usr/ # Download AppImage's bootstrap binary and create .desktop configuratino for it unlink AppRun-x86_64 2>/dev/null wget "https://github.com/AppImage/AppImageKit/releases/download/13/AppRun-x86_64" mv AppRun-x86_64 fs/AppRun chmod a+x fs/AppRun echo Exec=zenserver>fs/zenserver.desktop # Create the filesystem and concatenate with AppImage's runtime. mksquashfs fs zenserver.fs -root-owned -noappend unlink runtime-x86_64 2>/dev/null wget "https://github.com/AppImage/AppImageKit/releases/download/13/runtime-x86_64" unlink zenserver 2>/dev/null cat runtime-x86_64 >> zenserver cat zenserver.fs >> zenserver chmod a+x zenserver