From dfc3e086813776e16858da0ff6194be60db66f3a Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 7 Dec 2019 19:18:46 +0100 Subject: [PATCH] Updated windows build --- third_party/DataPipes | 2 +- third_party/build.sh | 7 ++++++- third_party/build_boringssl.sh | 12 +++++++++++- third_party/build_breakpad.sh | 13 +++++++++++-- third_party/build_cxxterminal.sh | 13 +++++++++++-- third_party/build_datapipes.sh | 13 +++++++++++-- third_party/build_ed25519.sh | 13 +++++++++++-- third_party/build_jemalloc.sh | 13 +++++++++++-- third_party/build_jsoncpp.sh | 11 ++++++++++- third_party/build_libevent.sh | 13 +++++++++++-- third_party/build_libfvad.sh | 13 +++++++++++-- third_party/build_mysqlconnector.sh | 4 +--- third_party/build_opus.sh | 13 +++++++++++-- third_party/build_portaudio.sh | 13 +++++++++++-- third_party/build_soxr.sh | 13 +++++++++++-- third_party/build_spdlog.sh | 11 ++++++++++- third_party/build_stringvariable.sh | 13 +++++++++++-- third_party/build_threadpool.sh | 11 ++++++++++- third_party/build_tom.sh | 13 +++++++++++-- third_party/build_unbound.sh | 12 +++++++++++- third_party/build_yaml.sh | 13 +++++++++++-- 21 files changed, 203 insertions(+), 36 deletions(-) diff --git a/third_party/DataPipes b/third_party/DataPipes index 4f199d0..6803c93 160000 --- a/third_party/DataPipes +++ b/third_party/DataPipes @@ -1 +1 @@ -Subproject commit 4f199d074580a6cf591b6300024c09f4e5101326 +Subproject commit 6803c93043aa1ec2ab962c99921e83144dc067ae diff --git a/third_party/build.sh b/third_party/build.sh index 46c2f24..68cb1ee 100755 --- a/third_party/build.sh +++ b/third_party/build.sh @@ -3,7 +3,12 @@ # Enter third_party/ directory cd $(dirname $0) -source ../scripts/build_helper.sh +export build_helper_file="../build-helpers/build_helper.sh" +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} begin_task "build_third_party" "Building libraries" function exec_script() { diff --git a/third_party/build_boringssl.sh b/third_party/build_boringssl.sh index d8bab7c..053e8af 100755 --- a/third_party/build_boringssl.sh +++ b/third_party/build_boringssl.sh @@ -1,6 +1,16 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + + library_path="boringssl" requires_rebuild ${library_path} [[ $? -eq 0 ]] && exit 0 diff --git a/third_party/build_breakpad.sh b/third_party/build_breakpad.sh index d824691..c07f69b 100755 --- a/third_party/build_breakpad.sh +++ b/third_party/build_breakpad.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="breakpad" requires_rebuild ${library_path} @@ -27,4 +36,4 @@ cd ../.. # cmake_build ${library_path} -DCMAKE_C_FLAGS="-fPIC -I../../boringssl/include/" -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_OPENSSL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo # check_err_exit ${library_path} "Failed to build libevent!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_cxxterminal.sh b/third_party/build_cxxterminal.sh index 3eff8eb..086b4c4 100755 --- a/third_party/build_cxxterminal.sh +++ b/third_party/build_cxxterminal.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="CXXTerminal" requires_rebuild ${library_path} @@ -10,4 +19,4 @@ _fpic="" [[ ${build_os_type} == "linux" ]] && _fpic="-fPIC" cmake_build ${library_path} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_FLAGS="${_fpic}" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_LIBEVENT=ON -DNO_EMBETTED_LIBEVENT=ON -DLibevent_DIR="`pwd`/libevent/out/${build_os_type}_${build_os_arch}/" check_err_exit ${library_path} "Failed to build CXXTerminal!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_datapipes.sh b/third_party/build_datapipes.sh index 0d150c3..370cabf 100755 --- a/third_party/build_datapipes.sh +++ b/third_party/build_datapipes.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="DataPipes" requires_rebuild ${library_path} @@ -34,4 +43,4 @@ _cxx_options="" [[ ${build_os_type} == "win32" ]] && _cxx_options="-DWIN32" cmake_build ${library_path} -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED=OFF -DCrypto_ROOT_DIR="`pwd`/boringssl/" -DCRYPTO_TYPE="boringssl" -DCMAKE_CXX_FLAGS="${_cxx_options}" -DBUILD_TESTS=OFF -DBUILD_WEBRTC=OFF -DMSVC_RUNTIME=static check_err_exit ${library_path} "Failed to build DataPipes!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_ed25519.sh b/third_party/build_ed25519.sh index 3c1aee4..e6d9866 100755 --- a/third_party/build_ed25519.sh +++ b/third_party/build_ed25519.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="ed25519" requires_rebuild ${library_path} @@ -19,4 +28,4 @@ crypto_include="`pwd`/boringssl/include/" #-L`pwd`/boringssl/build/ssl/ -L`pwd`/boringssl/build/crypto/ cmake_build ${library_path} -DCMAKE_C_FLAGS="${_fpic} -I$crypto_include" -DUSE_OPENSSL=OFF -DBUILD_TESTS=OFF -DCMAKE_CXX_FLAGS="${_fpic}" -DCMAKE_BUILD_TYPE=RelWithDebInfo check_err_exit ${library_path} "Failed to build ed25519!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_jemalloc.sh b/third_party/build_jemalloc.sh index 1274c2c..5df5bab 100755 --- a/third_party/build_jemalloc.sh +++ b/third_party/build_jemalloc.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="jemalloc" requires_rebuild ${library_path} @@ -54,4 +63,4 @@ if [[ $? -ne 0 ]]; then #Workaround because the install fails fi cd ../../../ -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_jsoncpp.sh b/third_party/build_jsoncpp.sh index 8e3b41a..7bef5c0 100755 --- a/third_party/build_jsoncpp.sh +++ b/third_party/build_jsoncpp.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="jsoncpp" requires_rebuild ${library_path} diff --git a/third_party/build_libevent.sh b/third_party/build_libevent.sh index 6aaaaa1..ad8c193 100755 --- a/third_party/build_libevent.sh +++ b/third_party/build_libevent.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="libevent" requires_rebuild ${library_path} @@ -11,7 +20,7 @@ _fpic="" make_targets=("event_static") [[ ${build_os_type} == "linux" ]] && make_targets+=("event_pthreads_static") -#cmake ../../ -G"Visual Studio 14 2015 Win64" -DEVENT_INSTALL_CMAKE_DIR=cmake -DCMAKE_INSTALL_PREFIX=. -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__LIBRARY_TYPE=BOTH -DEVENT__MSVC_STATIC_RUNTIME=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_OPENSSL=ON +#cmake ../../ -G"Visual Studio 16 2019" -DEVENT_INSTALL_CMAKE_DIR=cmake -DCMAKE_INSTALL_PREFIX=. -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__LIBRARY_TYPE=BOTH -DEVENT__MSVC_STATIC_RUNTIME=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_OPENSSL=ON cmake_build ${library_path} -DCMAKE_C_FLAGS="${_fpic} -I../../boringssl/include/" -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__LIBRARY_TYPE=STATIC -DEVENT__MSVC_STATIC_RUNTIME=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_OPENSSL=ON -DCMAKE_BUILD_TYPE="Release" check_err_exit ${library_path} "Failed to build libevent!" set_build_successful ${library_path} diff --git a/third_party/build_libfvad.sh b/third_party/build_libfvad.sh index 169e5b8..5a3637f 100755 --- a/third_party/build_libfvad.sh +++ b/third_party/build_libfvad.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="libfvad" requires_rebuild ${library_path} @@ -10,4 +19,4 @@ _fpic="" [[ ${build_os_type} == "linux" ]] && _fpic="-fPIC" cmake_build ${library_path} -DCMAKE_C_FLAGS="${_fpic}" -DBUILD_TESTS=OFF -DCMAKE_CXX_FLAGS="${_fpic}" -DBUILD_TESTS=OFF -DBUILD_SHARED=OFF -DBUILD_STATIC=ON -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release check_err_exit ${library_path} "Failed to build ed25519!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_mysqlconnector.sh b/third_party/build_mysqlconnector.sh index 490c4c9..40a5c9c 100755 --- a/third_party/build_mysqlconnector.sh +++ b/third_party/build_mysqlconnector.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh - library_path="mysqlconnector" requires_rebuild ${library_path} [[ $? -eq 0 ]] && exit 0 @@ -22,4 +20,4 @@ cd .. cmake_build ${library_path} -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -I`pwd`/boringssl/include/" -DWITH_JDBC=ON -DWITH_SSL="`pwd`/boringssl/" -DOPENSSL_ROOT_DIR="`pwd`/boringssl/" -DCMAKE_BUILD_TYPE=RelWithDebInfo check_err_exit ${library_path} "Failed to build mysqlconnector!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_opus.sh b/third_party/build_opus.sh index 7480863..1f71ba4 100755 --- a/third_party/build_opus.sh +++ b/third_party/build_opus.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="opus" requires_rebuild ${library_path} @@ -21,4 +30,4 @@ _cflags="" cmake_build ${library_path} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="${_fpic} ${_cflags}" -DOPUS_X86_PRESUME_AVX=OFF -DOPUS_X86_PRESUME_SSE4_1=OFF check_err_exit ${library_path} "Failed to build opus!" set_build_successful ${library_path} -# \ No newline at end of file +# diff --git a/third_party/build_portaudio.sh b/third_party/build_portaudio.sh index 29c93c2..920c1d8 100755 --- a/third_party/build_portaudio.sh +++ b/third_party/build_portaudio.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="portaudio" requires_rebuild ${library_path} @@ -10,4 +19,4 @@ _fpic="" [[ ${build_os_type} == "linux" ]] && _fpic="-fPIC" cmake_build ${library_path} -DCMAKE_C_FLAGS="${_fpic}" -DPA_BUILD_SHARED=OFF -DPA_BUILD_STATIC=ON -DPA_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo check_err_exit ${library_path} "Failed to build portaudio!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_soxr.sh b/third_party/build_soxr.sh index 67b0609..6c9a527 100755 --- a/third_party/build_soxr.sh +++ b/third_party/build_soxr.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="soxr" requires_rebuild ${library_path} @@ -10,4 +19,4 @@ _fpic="" [[ ${build_os_type} == "linux" ]] && _fpic="-fPIC" cmake_build ${library_path} -DCMAKE_C_FLAGS="${_fpic}" -DBUILD_SHARED_RUNTIME=OFF -DWITH_OPENMP=OFF -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_EXAMPLES=OFF check_err_exit ${library_path} "Failed to build soxr!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_spdlog.sh b/third_party/build_spdlog.sh index 1450cca..b405ad2 100755 --- a/third_party/build_spdlog.sh +++ b/third_party/build_spdlog.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="spdlog" requires_rebuild ${library_path} diff --git a/third_party/build_stringvariable.sh b/third_party/build_stringvariable.sh index 8fb4807..33e6eb8 100755 --- a/third_party/build_stringvariable.sh +++ b/third_party/build_stringvariable.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="StringVariable" requires_rebuild ${library_path} @@ -12,4 +21,4 @@ _cmake_options="" [[ ${build_os_type} == "win32" ]] && _cmake_options="-DMSVC_RUNTIME=static" cmake_build ${library_path} -DCMAKE_CXX_FLAGS="${_fpic}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${_cmake_options} check_err_exit ${library_path} "Failed to build StringVariable!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path} diff --git a/third_party/build_threadpool.sh b/third_party/build_threadpool.sh index 821eab4..a75ca31 100755 --- a/third_party/build_threadpool.sh +++ b/third_party/build_threadpool.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="Thread-Pool" requires_rebuild ${library_path} diff --git a/third_party/build_tom.sh b/third_party/build_tom.sh index e7a2089..451980d 100755 --- a/third_party/build_tom.sh +++ b/third_party/build_tom.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + _fpic="" [[ ${build_os_type} == "linux" ]] && _fpic="-fPIC" @@ -32,4 +41,4 @@ requires_rebuild ${library_path} check_err_exit ${library_path} "Failed to build tomcrypt!" set_build_successful ${library_path} } -exit 0 \ No newline at end of file +exit 0 diff --git a/third_party/build_unbound.sh b/third_party/build_unbound.sh index ed19a46..3000cc2 100755 --- a/third_party/build_unbound.sh +++ b/third_party/build_unbound.sh @@ -1,12 +1,22 @@ #!/usr/bin/env bash +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + + if [[ ${build_os_type} == "win32" ]]; then echo "Windows does not require libunbound" echo "Dont building library" exit 0 fi -source ../scripts/build_helper.sh library_path="unbound" requires_rebuild ${library_path} [[ $? -eq 0 ]] && exit 0 diff --git a/third_party/build_yaml.sh b/third_party/build_yaml.sh index 7915354..bb25bc2 100755 --- a/third_party/build_yaml.sh +++ b/third_party/build_yaml.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash -source ../scripts/build_helper.sh +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + library_path="yaml-cpp" requires_rebuild ${library_path} @@ -10,4 +19,4 @@ _cxx_flags="" [[ ${build_os_type} == "linux" ]] && _cxx_flags="-D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11 -fPIC" cmake_build ${library_path} -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${_cxx_flags}" check_err_exit ${library_path} "Failed to build yaml-cpp!" -set_build_successful ${library_path} \ No newline at end of file +set_build_successful ${library_path}