#!/usr/bin/env bash set -e if [ "$#" -lt 1 ]; then echo "Syntax: $0 [-system-freetype] [-system-harfbuzz] [-system-libjpeg] [-system-libpng] [-system-libwebp] [-system-zstd] [-system-qt] [-skip-download] [-skip-cleanup] " exit 1 fi for arg in "$@"; do if [ "$arg" == "-system-freetype" ]; then echo "Skipping building FreeType." SKIP_FREETYPE=true shift elif [ "$arg" == "-system-harfbuzz" ]; then echo "Skipping building HarfBuzz." SKIP_HARFBUZZ=true shift elif [ "$arg" == "-system-libjpeg" ]; then echo "Skipping building libjpeg." SKIP_LIBJPEG=true shift elif [ "$arg" == "-system-libpng" ]; then echo "Skipping building libpng." SKIP_LIBPNG=true shift elif [ "$arg" == "-system-libwebp" ]; then echo "Skipping building libwebp." SKIP_LIBWEBP=true shift elif [ "$arg" == "-system-zstd" ]; then echo "Skipping building zstd." SKIP_ZSTD=true shift elif [ "$arg" == "-system-qt" ]; then echo "Skipping building Qt." SKIP_QT=true shift elif [ "$arg" == "-skip-download" ]; then echo "Not downloading sources." SKIP_DOWNLOAD=true shift elif [ "$arg" == "-skip-cleanup" ]; then echo "Not removing build directory." SKIP_CLEANUP=true shift fi done SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}")) NPROCS="$(getconf _NPROCESSORS_ONLN)" INSTALLDIR="$1" if [ "${INSTALLDIR:0:1}" != "/" ]; then INSTALLDIR="$PWD/$INSTALLDIR" fi FREETYPE=2.13.3 HARFBUZZ=9.0.0 LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075 LIBJPEGTURBO=3.0.3 LIBPNG=1.6.43 LIBWEBP=1.4.0 SDL2=2.30.7 QT=6.7.2 ZSTD=1.5.6 CPUINFO=7524ad504fdcfcf75a18a133da6abd75c5d48053 DISCORD_RPC=144f3a3f1209994d8d9e8a87964a989cb9911c1e LUNASVG=9af1ac7b90658a279b372add52d6f77a4ebb482c SHADERC=f60bb80e255144e71776e2ad570d89b78ea2ab4f SOUNDTOUCH=463ade388f3a51da078dc9ed062bf28e4ba29da7 SPIRV_CROSS=vulkan-sdk-1.3.290.0 mkdir -p deps-build cd deps-build if [ "$SKIP_DOWNLOAD" != true ]; then curl -C - -L \ -O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \ -O "https://github.com/libsdl-org/SDL/releases/download/release-$SDL2/SDL2-$SDL2.tar.gz" \ -o "cpuinfo-$CPUINFO.tar.gz" "https://github.com/stenzek/cpuinfo/archive/$CPUINFO.tar.gz" \ -o "discord-rpc-$DISCORD_RPC.tar.gz" "https://github.com/stenzek/discord-rpc/archive/$DISCORD_RPC.tar.gz" \ -o "lunasvg-$LUNASVG.tar.gz" "https://github.com/stenzek/lunasvg/archive/$LUNASVG.tar.gz" \ -o "shaderc-$SHADERC.tar.gz" "https://github.com/stenzek/shaderc/archive/$SHADERC.tar.gz" \ -o "soundtouch-$SOUNDTOUCH.tar.gz" "https://github.com/stenzek/soundtouch/archive/$SOUNDTOUCH.tar.gz" fi cat > SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <