2022-01-29 13:08:49 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
DIR=$(dirname ${BASH_SOURCE[0]})
|
|
|
|
cd "$DIR"
|
|
|
|
. common
|
|
|
|
mkdir -p "$PREBUILT_DATA_DIR"
|
|
|
|
cd "$PREBUILT_DATA_DIR"
|
|
|
|
|
2023-11-24 20:46:05 +00:00
|
|
|
VERSION=2.28.5
|
2023-11-24 20:19:18 +00:00
|
|
|
DEP_DIR="SDL2-$VERSION"
|
2022-01-29 13:08:49 +00:00
|
|
|
|
2023-11-24 20:19:18 +00:00
|
|
|
FILENAME="SDL2-devel-$VERSION-mingw.tar.gz"
|
2023-11-24 20:46:05 +00:00
|
|
|
SHA256SUM=3c0c655c2ebf67cad48fead72761d1601740ded30808952c3274ba223d226c21
|
2022-01-29 13:08:49 +00:00
|
|
|
|
|
|
|
if [[ -d "$DEP_DIR" ]]
|
|
|
|
then
|
|
|
|
echo "$DEP_DIR" found
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2023-11-24 20:19:18 +00:00
|
|
|
get_file "https://github.com/libsdl-org/SDL/releases/download/release-$VERSION/$FILENAME" \
|
|
|
|
"$FILENAME" "$SHA256SUM"
|
2022-01-29 13:08:49 +00:00
|
|
|
|
|
|
|
mkdir "$DEP_DIR"
|
|
|
|
cd "$DEP_DIR"
|
|
|
|
|
|
|
|
TAR_PREFIX="$DEP_DIR" # root directory inside the tar has the same name
|
|
|
|
tar xf "../$FILENAME" --strip-components=1 \
|
|
|
|
"$TAR_PREFIX"/i686-w64-mingw32/bin/SDL2.dll \
|
|
|
|
"$TAR_PREFIX"/i686-w64-mingw32/include/ \
|
|
|
|
"$TAR_PREFIX"/i686-w64-mingw32/lib/ \
|
|
|
|
"$TAR_PREFIX"/x86_64-w64-mingw32/bin/SDL2.dll \
|
|
|
|
"$TAR_PREFIX"/x86_64-w64-mingw32/include/ \
|
|
|
|
"$TAR_PREFIX"/x86_64-w64-mingw32/lib/ \
|