28 lines
913 B
Bash
Raw Permalink Normal View History

2018-12-12 21:31:20 -07:00
#!/usr/bin/bash -e
# install pefile
pip3 install pefile
2020-02-24 18:42:55 -03:00
# SDL2
SDL2_VER='2.0.22'
2020-02-24 18:42:55 -03:00
wget "https://www.libsdl.org/release/SDL2-devel-${SDL2_VER}-mingw.tar.gz"
tar -zxf "SDL2-devel-${SDL2_VER}-mingw.tar.gz"
cd SDL2-${SDL2_VER}/
make install-package arch=x86_64-w64-mingw32 prefix=/usr/x86_64-w64-mingw32;
cd ..
2019-01-27 09:15:46 +08:00
# ffmpeg
FFMPEG_VER='4.4.2'
FILENAME="ffmpeg-n${FFMPEG_VER}-95-ga8f16d4eb4-win64-gpl-shared-${FFMPEG_VER%.*}"
2021-09-13 17:44:59 -06:00
echo "Downloading ffmpeg (${FFMPEG_VER})..."
wget -c "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-10-03-12-38/${FILENAME}.zip"
2021-09-13 17:44:59 -06:00
7z x "${FILENAME}.zip"
2019-01-27 09:15:46 +08:00
echo "Copying ffmpeg ${FFMPEG_VER} files to sysroot..."
2021-09-13 17:44:59 -06:00
cp -v "${FILENAME}"/bin/*.dll /usr/x86_64-w64-mingw32/lib/
cp -vr "${FILENAME}"/include /usr/x86_64-w64-mingw32/
cp -v "${FILENAME}"/lib/*.{a,def} /usr/x86_64-w64-mingw32/lib/
2019-01-27 09:15:46 +08:00
2018-12-12 21:31:20 -07:00
# remove the directory
ABS_PATH="$(readlink -f $0)"
rm -rf "$(dirname ${ABS_PATH})"