discord-awesomeaudio/scripts/build-appimage.sh

32 lines
897 B
Bash
Raw Normal View History

2022-07-13 16:00:30 -04:00
#!/usr/bin/bash
set -e
# Check if inside of docker container
if [ ! -f /.dockerenv ]; then
# Check if docker is available
if ! command -v docker >/dev/null 2>&1; then
echo "Error: Docker is not available."
exit 1
fi
2022-07-16 14:41:26 -04:00
docker run --rm -u $(id -u) -v "$PWD":/work discord-screenaudio-buildenv bash /work/scripts/build-appimage.sh
2022-07-13 16:00:30 -04:00
exit 0
fi
tmpdir="$(mktemp -d)"
builddir="$tmpdir/build"
appdir="$tmpdir/AppDir"
2022-07-16 16:03:33 -04:00
export CMAKE_GENERATOR="Ninja"
2022-07-13 16:00:30 -04:00
cmake -B "$builddir" -S "$PWD"
cmake --build "$builddir" --config Release
DESTDIR="$appdir" cmake --install "$builddir" --prefix "/usr"
2022-07-16 16:03:33 -04:00
VERSION="$(cat version)" linuxdeploy \
--appdir "$appdir" \
--icon-file "assets/discord.png" \
--plugin qt \
--library "/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so" \
--library "/usr/lib/x86_64-linux-gnu/nss/libnssckbi.so" \
--exclude-library "libpipewire-0.3.so.0" \
--output appimage