From e9eade1d2faed5bf15dbc5e96a4233f9540a170b Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Sun, 26 Nov 2023 21:22:23 -0600 Subject: [PATCH] Windows x86_64 building. --- build-all.sh | 58 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/build-all.sh b/build-all.sh index ab365eb5b..cd6cd3cf7 100755 --- a/build-all.sh +++ b/build-all.sh @@ -30,6 +30,7 @@ function buildAll() { local OS=$1 local ARCH=$2 local COMMON= + local OPT1= # Activate toolchain for this platform. source <(../toolchains/toolchains.sh use ${ARCH} ${OS}) @@ -124,14 +125,14 @@ if [[ 1 == 1 ]]; then pushd thirdparty/zlib clearAndEnterBuild - ../configure \ + CFLAGS="-I${PWD}" ../configure \ --prefix=${G_TARGET} \ --static make install popd - if [[ "${OS}" == "windows" ]]; then - mv ${G_TARGET}/lib/libzlibstatic.a ${G_TARGET}/lib/libz.a - fi + #if [[ "${OS}" == "windows" ]]; then + # mv ${G_TARGET}/lib/libzlibstatic.a ${G_TARGET}/lib/libz.a + #fi pushd thirdparty/zstd clearAndEnterBuild @@ -181,24 +182,33 @@ if [[ 1 == 1 ]]; then pushd thirdparty/openssl clearAndEnterBuild - # --cross-compile-prefix="${TRIPLE}-" \ - ../Configure \ - --prefix="${G_TARGET}" \ - --libdir=lib \ - --with-zlib-include="${G_TARGET}/include" \ - --with-zlib-lib="${G_TARGET}/lib" \ - --with-zstd-include="${G_TARGET}/include" \ - --with-zstd-lib="${G_TARGET}/lib" \ - no-apps \ - no-docs \ - no-dso \ - no-dynamic-engine \ - no-module \ - no-shared \ - no-tests \ - zlib \ - enable-zstd - make install + if [[ "${OS}" == "windows" ]]; then + if [[ "${ARCH}" == "x86" ]]; then + OPT1="mingw" + else + OPT1="mingw64" + fi + else + OPT1="" + fi + # --cross-compile-prefix="${TRIPLE}-" \ + ../Configure ${OPT1} \ + --prefix="${G_TARGET}" \ + --libdir=lib \ + --with-zlib-include="${G_TARGET}/include" \ + --with-zlib-lib="${G_TARGET}/lib" \ + --with-zstd-include="${G_TARGET}/include" \ + --with-zstd-lib="${G_TARGET}/lib" \ + no-apps \ + no-docs \ + no-dso \ + no-dynamic-engine \ + no-module \ + no-shared \ + no-tests \ + zlib \ + enable-zstd + make install popd lua thirdparty/luasec/src/options.lua -g "${G_TARGET}/include/openssl/ssl.h" > "${G_TARGET}/generated/luasec_options.c" @@ -475,9 +485,9 @@ sudo apt-get install -y \ #buildAll linux x86 -buildAll linux x86_64 2>&1 | tee linux-x86_64.log +#buildAll linux x86_64 2>&1 | tee linux-x86_64.log #buildAll macos aarch64 #buildAll macos x86 #***TODO*** Needs older SDL2 #buildAll macos x86_64 #***TODO*** Needs older SDL2 #buildAll windows x86 -#buildAll windows x86_64 +buildAll windows x86_64 2>&1 | tee windows-x86_64.log