add gzip and brotli support

This commit is contained in:
ading2210 2024-01-08 22:09:20 -05:00
parent 7472c899db
commit e4c064401e
6 changed files with 69 additions and 7 deletions

26
client/tools/brotli.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
#compile brotli for use with emscripten
set -x
set -e
CORE_COUNT=$(nproc --all)
PREFIX=$(realpath build/brotli-wasm)
cd build
rm -rf brotli
git clone -b master --depth=1 https://github.com/google/brotli
cd brotli
emcmake cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./installed
cmake --build . --config Release --target install
rm -rf $PREFIX
mkdir -p $PREFIX
cp -r installed/* $PREFIX
rm -rf $PREFIX/bin
rm -rf $PREFIX/share
rm -rf $PREFIX/lib/pkgconfig
cd ../../