1
1
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
908 B

4 years ago
#!/bin/bash
set -e
set -o pipefail
# This is here for building the windows binary
4 years ago
wget https://www.libsdl.org/release/SDL2-devel-2.0.12-mingw.tar.gz -O /tmp/sdl.tar.gz
4 years ago
mkdir -p /tmp/sdl-extract
printf "extracting...\n"
4 years ago
# We want the library
4 years ago
tar -C /tmp/sdl-extract -xvzf /tmp/sdl.tar.gz SDL2-2.0.12/x86_64-w64-mingw32/lib
4 years ago
# and the DLL
4 years ago
tar -C /tmp/sdl-extract -xvzf /tmp/sdl.tar.gz SDL2-2.0.12/x86_64-w64-mingw32/bin/SDL2.dll
4 years ago
# and the headers just to be safe
4 years ago
tar -C /tmp/sdl-extract -xvzf /tmp/sdl.tar.gz SDL2-2.0.12/x86_64-w64-mingw32/include
4 years ago
printf "copying...\n"
# move them to where they belong
#cp -r /tmp/sdl-extract/SDL2-2.0.12/x86_64-w64-mingw32/* .
mv -n /tmp/sdl-extract/SDL2-2.0.12/x86_64-w64-mingw32/bin/SDL2.dll build/
mv -n /tmp/sdl-extract/SDL2-2.0.12/x86_64-w64-mingw32/lib/ src/sdllib
mv -n /tmp/sdl-extract/SDL2-2.0.12/x86_64-w64-mingw32/include/SDL2 src/
4 years ago
printf "Success.\n"