From 413367631f8a50fe8437d8572ce586203e8beb05 Mon Sep 17 00:00:00 2001 From: Maksym H Date: Tue, 1 Aug 2023 02:02:59 +0300 Subject: [PATCH] Windows: update (cherry picked from commit 8d4be7181047a91265515ef32529c5edb1b455ad) --- .github/workflows/build.yml | 12 +++++++----- Windows/deps/SDL2.sh | 4 ++-- Windows/deps/freetype.sh | 8 ++++---- Windows/deps/gettext.sh | 6 +++--- Windows/deps/irrlicht.sh | 2 +- Windows/deps/libcurl.sh | 6 +++--- Windows/deps/libjpeg.sh | 6 +++--- Windows/deps/libogg.sh | 2 +- Windows/deps/libpng.sh | 6 +++--- Windows/deps/luajit.sh | 4 ++-- Windows/deps/openal.sh | 2 +- Windows/deps/sdk.sh | 5 ++++- Windows/deps/sqlite.sh | 4 ++-- Windows/deps/vorbis.sh | 2 +- Windows/deps/zlib.sh | 4 ++-- 15 files changed, 39 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9d5c7b75..cb2c65d0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -221,12 +221,15 @@ jobs: run: shell: msys2 {0} steps: - - uses: actions/checkout@v3 - - uses: msys2/setup-msys2@v2 + - name: Checkout + uses: actions/checkout@v3 + + - name: Install MSYS2 + uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true - install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-autotools git zip + install: mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-autotools mingw-w64-x86_64-tcl git zip - name: Build run: | @@ -243,7 +246,6 @@ jobs: cp -r ./builtin MultiCraft/ cp -r ./client MultiCraft/ cp -r ./fonts MultiCraft/ - cp -r ./games MultiCraft/ cp -r ./locale MultiCraft/ cp -r ./textures MultiCraft/ zip -r MultiCraft.zip MultiCraft @@ -322,5 +324,5 @@ jobs: - uses: actions/upload-artifact@v3 with: - name: msvc-${{ matrix.config.arch }}-${{ matrix.type }} + name: MultiCraft-msvc-${{ matrix.config.arch }}-${{ matrix.type }} path: .\Package\ diff --git a/Windows/deps/SDL2.sh b/Windows/deps/SDL2.sh index ae14b4d8e..bd1599249 100755 --- a/Windows/deps/SDL2.sh +++ b/Windows/deps/SDL2.sh @@ -6,7 +6,7 @@ SDL2_VERSION=2.26.5 if [ ! -d SDL2-src ]; then wget https://github.com/libsdl-org/SDL/archive/release-$SDL2_VERSION.tar.gz - tar -xzvf release-$SDL2_VERSION.tar.gz + tar -xzf release-$SDL2_VERSION.tar.gz mv SDL-release-$SDL2_VERSION sdl2-src rm release-$SDL2_VERSION.tar.gz fi @@ -22,7 +22,7 @@ cmake .. \ -DSDL_SHARED=0 \ -DSDL_STATIC=1 -cmake --build . -j$NPROC +cmake --build . -j${NPROC} # update `include` folder rm -rf ../../sdl2/include diff --git a/Windows/deps/freetype.sh b/Windows/deps/freetype.sh index 746f744bc..f28c71f95 100755 --- a/Windows/deps/freetype.sh +++ b/Windows/deps/freetype.sh @@ -1,12 +1,12 @@ #!/bin/bash -e -FREETYPE_VERSION=2.13.0 +FREETYPE_VERSION=2.13.1 . ./sdk.sh if [ ! -d freetype-src ]; then - wget https://download.savannah.gnu.org/releases/freetype/freetype-$FREETYPE_VERSION.tar.gz - tar -xzvf freetype-$FREETYPE_VERSION.tar.gz + wget https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$FREETYPE_VERSION.tar.gz + tar -xzf freetype-$FREETYPE_VERSION.tar.gz mv freetype-$FREETYPE_VERSION freetype-src rm freetype-$FREETYPE_VERSION.tar.gz mkdir freetype-src/build @@ -23,7 +23,7 @@ cmake .. \ -DFT_DISABLE_BROTLI=TRUE \ -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" -cmake --build . -j$NPROC +cmake --build . -j${NPROC} # update `include` folder rm -rf ../../freetype/include diff --git a/Windows/deps/gettext.sh b/Windows/deps/gettext.sh index bc8436411..1f04abaf2 100755 --- a/Windows/deps/gettext.sh +++ b/Windows/deps/gettext.sh @@ -1,11 +1,11 @@ #!/bin/bash -e . ./sdk.sh -GETTEXT_VERSION=0.21.1 +GETTEXT_VERSION=0.22 if [ ! -d gettext-src ]; then wget https://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VERSION.tar.gz - tar -xzvf gettext-$GETTEXT_VERSION.tar.gz + tar -xzf gettext-$GETTEXT_VERSION.tar.gz mv gettext-$GETTEXT_VERSION gettext-src rm gettext-$GETTEXT_VERSION.tar.gz fi @@ -15,7 +15,7 @@ cd gettext-src/gettext-runtime ./configure CFLAGS="$CFLAGS" CPPFLAGS="$CXXFLAGS" \ --disable-shared --enable-static --disable-libasprintf -make -j$NPROC +make -j${NPROC} # update `include` folder rm -rf ../../gettext/include diff --git a/Windows/deps/irrlicht.sh b/Windows/deps/irrlicht.sh index ba5f1bfdf..454ceba10 100755 --- a/Windows/deps/irrlicht.sh +++ b/Windows/deps/irrlicht.sh @@ -18,7 +18,7 @@ CPPFLAGS="$CPPFLAGS \ -I$DEPS_ROOT/libjpeg/include \ -I$DEPS_ROOT/libpng/include" \ CXXFLAGS="$CXXFLAGS -std=gnu++17" \ -make staticlib_win32 -j$NPROC NDEBUG=1 +make staticlib_win32 -j${NPROC} NDEBUG=1 # update `include` folder rm -rf ../../../irrlicht/include diff --git a/Windows/deps/libcurl.sh b/Windows/deps/libcurl.sh index a2e8f1e86..09d237954 100755 --- a/Windows/deps/libcurl.sh +++ b/Windows/deps/libcurl.sh @@ -1,13 +1,13 @@ #!/bin/bash -e . ./sdk.sh -CURL_VERSION=8.1.1 +CURL_VERSION=8.2.1 export DEPS_ROOT=$(pwd) if [ ! -d libcurl-src ]; then wget https://curl.haxx.se/download/curl-$CURL_VERSION.tar.gz - tar -xzvf curl-$CURL_VERSION.tar.gz + tar -xzf curl-$CURL_VERSION.tar.gz mv curl-$CURL_VERSION libcurl-src rm curl-$CURL_VERSION.tar.gz fi @@ -27,7 +27,7 @@ cd libcurl-src --without-zstd --without-brotli --without-nghttp2 --without-libidn2 \ --without-libpsl -make -j$NPROC +make -j${NPROC} # update `include` folder rm -rf ../libcurl/include diff --git a/Windows/deps/libjpeg.sh b/Windows/deps/libjpeg.sh index e6f6083b9..12eb88dbd 100755 --- a/Windows/deps/libjpeg.sh +++ b/Windows/deps/libjpeg.sh @@ -1,11 +1,11 @@ #!/bin/bash -e . ./sdk.sh -JPEG_VERSION=2.1.5.1 +JPEG_VERSION=3.0.0 if [ ! -d libjpeg-src ]; then wget https://download.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$JPEG_VERSION.tar.gz - tar -xzvf libjpeg-turbo-$JPEG_VERSION.tar.gz + tar -xzf libjpeg-turbo-$JPEG_VERSION.tar.gz mv libjpeg-turbo-$JPEG_VERSION libjpeg-src rm libjpeg-turbo-$JPEG_VERSION.tar.gz mkdir libjpeg-src/build @@ -18,7 +18,7 @@ cmake .. \ -DENABLE_SHARED=OFF \ -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" -cmake --build . -j$NPROC +cmake --build . -j${NPROC} # update `include` folder rm -rf ../../libjpeg/include diff --git a/Windows/deps/libogg.sh b/Windows/deps/libogg.sh index 25f8f95fd..110025349 100755 --- a/Windows/deps/libogg.sh +++ b/Windows/deps/libogg.sh @@ -15,7 +15,7 @@ cmake .. \ -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" \ -DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" -cmake --build . -j$NPROC +cmake --build . -j${NPROC} # update `include` folder rm -rf ../../libogg/include diff --git a/Windows/deps/libpng.sh b/Windows/deps/libpng.sh index 16f8c72d6..b00700564 100755 --- a/Windows/deps/libpng.sh +++ b/Windows/deps/libpng.sh @@ -1,13 +1,13 @@ #!/bin/bash -e . ./sdk.sh -PNG_VERSION=1.6.39 +PNG_VERSION=1.6.40 export DEPS_ROOT=$(pwd) if [ ! -d libpng-src ]; then wget https://download.sourceforge.net/libpng/libpng-$PNG_VERSION.tar.gz - tar -xzvf libpng-$PNG_VERSION.tar.gz + tar -xzf libpng-$PNG_VERSION.tar.gz mv libpng-$PNG_VERSION libpng-src rm libpng-$PNG_VERSION.tar.gz mkdir libpng-src/build @@ -24,7 +24,7 @@ cmake .. \ -DZLIB_INCLUDE_DIRS="$DEPS_ROOT/zlib/include" \ -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" -cmake --build . -j$NPROC +cmake --build . -j${NPROC} # update `include` folder rm -rf ../../libpng/include diff --git a/Windows/deps/luajit.sh b/Windows/deps/luajit.sh index 80e7db248..fa3311304 100755 --- a/Windows/deps/luajit.sh +++ b/Windows/deps/luajit.sh @@ -6,14 +6,14 @@ LUAJIT_VERSION=2.1 if [ ! -d luajit-src ]; then wget https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz - tar -xzvf v$LUAJIT_VERSION.tar.gz + tar -xzf v$LUAJIT_VERSION.tar.gz mv LuaJIT-$LUAJIT_VERSION luajit-src rm v$LUAJIT_VERSION.tar.gz fi cd luajit-src -make amalg -j$NPROC BUILDMODE=static +make amalg -j${NPROC} BUILDMODE=static # update `include` folder rm -rf ../luajit/include diff --git a/Windows/deps/openal.sh b/Windows/deps/openal.sh index 82be18721..b233fdc44 100755 --- a/Windows/deps/openal.sh +++ b/Windows/deps/openal.sh @@ -20,7 +20,7 @@ cmake .. \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" -cmake --build . -j$NPROC +cmake --build . -j${NPROC} # update `include` folder rm -rf ../../openal/include diff --git a/Windows/deps/sdk.sh b/Windows/deps/sdk.sh index 00d7043d2..d8d09b97f 100755 --- a/Windows/deps/sdk.sh +++ b/Windows/deps/sdk.sh @@ -1,6 +1,9 @@ #!/bin/bash -e +export CC=clang +export CXX=clang++ + export CFLAGS="-fvisibility=hidden -fexceptions -O3" export CXXFLAGS="$CFLAGS -frtti -O3" -export NPROC=`nproc` +export NPROC=$(( $(nproc) + 1 )) diff --git a/Windows/deps/sqlite.sh b/Windows/deps/sqlite.sh index c5e3ecb20..f13e4daca 100755 --- a/Windows/deps/sqlite.sh +++ b/Windows/deps/sqlite.sh @@ -6,7 +6,7 @@ SQLITE_VERSION=3.42.0 if [ ! -d sqlite-src ]; then wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=version-$SQLITE_VERSION - tar -xzvf sqlite.tar.gz?r=version-$SQLITE_VERSION + tar -xzf sqlite.tar.gz?r=version-$SQLITE_VERSION mv sqlite sqlite-src rm sqlite.tar.gz?r=version-$SQLITE_VERSION mkdir sqlite-src/build @@ -18,7 +18,7 @@ cd sqlite-src/build --enable-shared \ --enable-static -make -j$NPROC +make -j${NPROC} # update `include` folder rm -rf ../../sqlite/include diff --git a/Windows/deps/vorbis.sh b/Windows/deps/vorbis.sh index f841ffff9..94cfdf056 100755 --- a/Windows/deps/vorbis.sh +++ b/Windows/deps/vorbis.sh @@ -17,7 +17,7 @@ cmake .. \ -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" \ -DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" -cmake --build . -j$NPROC +cmake --build . -j${NPROC} # update `include` folder rm -rf ../../libvorbis/include diff --git a/Windows/deps/zlib.sh b/Windows/deps/zlib.sh index 4d9392342..1517ba7dc 100755 --- a/Windows/deps/zlib.sh +++ b/Windows/deps/zlib.sh @@ -6,7 +6,7 @@ ZLIB_VERSION=1.2.13 if [ ! -d zlib-src ]; then wget https://github.com/madler/zlib/archive/v$ZLIB_VERSION.tar.gz - tar -xzvf v$ZLIB_VERSION.tar.gz + tar -xzf v$ZLIB_VERSION.tar.gz mv zlib-$ZLIB_VERSION zlib-src rm v$ZLIB_VERSION.tar.gz fi @@ -19,7 +19,7 @@ cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS="$CFLAGS" -cmake --build . -j$NPROC +cmake --build . -j${NPROC} # update `include` folder rm -rf ../../zlib/include