diff --git a/.circleci/config.yml b/.circleci/config.yml index 0f1b29e27..492d912e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,17 +62,8 @@ jobs: steps: - checkout - run: apt-get update -y - - run: apt-get install -y cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 wget git - - run: wget https://www.libsdl.org/release/SDL2-devel-2.0.9-mingw.tar.gz - - run: tar -xzf SDL2-devel-2.0.9-mingw.tar.gz - - run: wget https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-mingw.tar.gz - - run: tar -xzf SDL2_ttf-devel-2.0.15-mingw.tar.gz - - run: wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-mingw.tar.gz - - run: tar -xzf SDL2_mixer-devel-2.0.4-mingw.tar.gz - - run: wget https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18-mingw.tar.gz - - run: tar -xzf libsodium-1.0.18-mingw.tar.gz --no-same-owner - - run: cp -r libsodium-win32/* /usr/i686-w64-mingw32 - - run: cp -r SDL2*/i686-w64-mingw32 /usr + - run: apt-get install -y cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 wget git sudo + - run: Packaging/windows/mingw-prep.sh - run: cmake -S. -Bbuild -DNIGHTLY_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/mingwcc.cmake - run: cmake --build build -j $(nproc) - store_artifacts: {path: ./build/devilutionx.exe, destination: devilutionx_x86.exe} diff --git a/Packaging/windows/mingw-prep.sh b/Packaging/windows/mingw-prep.sh new file mode 100755 index 000000000..15e182771 --- /dev/null +++ b/Packaging/windows/mingw-prep.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# exit when any command fails +set -euo pipefail + +wget https://www.libsdl.org/release/SDL2-devel-2.0.9-mingw.tar.gz +tar -xzf SDL2-devel-2.0.9-mingw.tar.gz +wget https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-mingw.tar.gz +tar -xzf SDL2_ttf-devel-2.0.15-mingw.tar.gz +wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-mingw.tar.gz +tar -xzf SDL2_mixer-devel-2.0.4-mingw.tar.gz +wget https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18-mingw.tar.gz +tar -xzf libsodium-1.0.18-mingw.tar.gz --no-same-owner +sudo cp -r libsodium-win32/* /usr/i686-w64-mingw32 +sudo cp -r SDL2*/i686-w64-mingw32 /usr diff --git a/README.md b/README.md index f262ec7d1..791300cc6 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,8 @@ cmake --build . -j $(sysctl -n hw.ncpuonline) ### Installing dependencies on WSL, Debian and Ubuntu -Download and place the 32bit MinGW Development Libraries of [SDL2](https://www.libsdl.org/download-2.0.php), [SDL2_mixer](https://www.libsdl.org/projects/SDL_mixer/), [SDL2_ttf](https://www.libsdl.org/projects/SDL_ttf/) and [Libsodium](https://github.com/jedisct1/libsodium/releases) in `/usr/i686-w64-mingw32`. +Download and place the 32bit MinGW Development Libraries of [SDL2](https://www.libsdl.org/download-2.0.php), [SDL2_mixer](https://www.libsdl.org/projects/SDL_mixer/), [SDL2_ttf](https://www.libsdl.org/projects/SDL_ttf/) and [Libsodium](https://github.com/jedisct1/libsodium/releases) in `/usr/i686-w64-mingw32`. This can be done automatically by running +`Packaging/windows/mingw-prep.sh`. NOTE: SDL2 2.0.12 appears to not compile correctly. ```