From 36500f3054f851a1dc32ffcd5080585c832c7fab Mon Sep 17 00:00:00 2001 From: Dmitry Baryshev Date: Sun, 17 Oct 2021 19:32:02 +0300 Subject: [PATCH] SAIL: Added script to build portable versions automatically --- dist/windows/build-portable.sh | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 dist/windows/build-portable.sh diff --git a/dist/windows/build-portable.sh b/dist/windows/build-portable.sh new file mode 100644 index 00000000..f5f40106 --- /dev/null +++ b/dist/windows/build-portable.sh @@ -0,0 +1,51 @@ +#!/bin/sh -e + +cd "$(dirname "$0")" + +rm -rf build +mkdir -p build +cd build + +install_root="$PWD/install-root" +source_root="../../.." + +clean() +{ + rm -rf "$install_root" + rm -f CMakeCache.txt +} + +build_install() +{ + local build_type="$1" + + if [ -z "$build_type" ]; then + echo "Error: Build type is empty" >&2 + exit 1 + fi + + "$source_root/extra/build" $build_type + cmake -A x64 -S "$source_root" -DCMAKE_INSTALL_PREFIX="$install_root" -DSAIL_DEV=OFF -DCMAKE_BUILD_TYPE="$build_type" -DSAIL_BUILD_TESTS=ON -DSAIL_COMBINE_CODECS=ON .. + cmake --build . --config "$build_type" --target install + + cd tests + ctest -C "$build_type" + cd - +} + +make_portable() +{ + ./make-portable.sh +} + +clean +build_install Debug +make_portable + +clean +build_install Release +make_portable + +echo +echo Success +echo