Browse Source

Create helper script for setting up MinGW builds

pull/992/head
Anders Jenbo 5 years ago
parent
commit
4fed130adc
  1. 13
      .circleci/config.yml
  2. 15
      Packaging/windows/mingw-prep.sh
  3. 3
      README.md

13
.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}

15
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

3
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.
```

Loading…
Cancel
Save