(Windows) Another try to avoid a filesystem race condition for the MinGW dependency setup script

This commit is contained in:
Leon Styhre 2023-07-10 15:58:14 +02:00
parent 4908d48498
commit df740fec5a

View file

@ -25,14 +25,14 @@ rm -rf curl*
curl -O https://curl.se/windows/dl-8.1.2_3/curl-8.1.2_3-win64-mingw.zip curl -O https://curl.se/windows/dl-8.1.2_3/curl-8.1.2_3-win64-mingw.zip
unzip curl-8.1.2_3-win64-mingw.zip unzip curl-8.1.2_3-win64-mingw.zip
# Needed due to some kind of file system race condition that sometimes occurs on Windows.
sleep 2
if [ ! -d curl-8.1.2_3-win64-mingw ]; then if [ ! -d curl-8.1.2_3-win64-mingw ]; then
echo "curl directory is missing, aborting." echo "curl directory is missing, aborting."
exit exit
fi fi
# Needed due to some kind of file system race condition that sometimes occurs on Windows.
sleep 3
mv curl-8.1.2_3-win64-mingw curl mv curl-8.1.2_3-win64-mingw curl
cp -p curl/bin/libcurl-x64.dll .. cp -p curl/bin/libcurl-x64.dll ..
@ -43,13 +43,13 @@ rm -rf glew*
curl -LO https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip curl -LO https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip
unzip glew-2.1.0.zip unzip glew-2.1.0.zip
sleep 2
if [ ! -d glew-2.1.0 ]; then if [ ! -d glew-2.1.0 ]; then
echo "GLEW directory is missing, aborting." echo "GLEW directory is missing, aborting."
exit exit
fi fi
sleep 3
mv glew-2.1.0 glew mv glew-2.1.0 glew
echo -e "\nSetting up FreeType" echo -e "\nSetting up FreeType"
@ -129,14 +129,13 @@ curl -O https://libsdl.org/release/SDL2-devel-2.28.1-mingw.tar.gz
tar xvzf SDL2-devel-2.28.1-mingw.tar.gz tar xvzf SDL2-devel-2.28.1-mingw.tar.gz
# Needed due to some kind of file system race condition that sometimes occurs on Windows.
sleep 2
if [ ! -d SDL2-2.28.1 ]; then if [ ! -d SDL2-2.28.1 ]; then
echo "SDL directory is missing, aborting." echo "SDL directory is missing, aborting."
exit exit
fi fi
sleep 3
mv SDL2-2.28.1 SDL2 mv SDL2-2.28.1 SDL2
mv SDL2/x86_64-w64-mingw32/include/SDL2 SDL2/ mv SDL2/x86_64-w64-mingw32/include/SDL2 SDL2/
@ -150,13 +149,13 @@ rm -rf ffmpeg*
curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-05-31-12-47/ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0.zip curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-05-31-12-47/ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0.zip
unzip ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0.zip unzip ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0.zip
sleep 2
if [ ! -d ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0 ]; then if [ ! -d ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0 ]; then
echo "FFmpeg directory is missing, aborting." echo "FFmpeg directory is missing, aborting."
exit exit
fi fi
sleep 3
mv ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0 ffmpeg mv ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0 ffmpeg
cp -p ffmpeg/bin/avcodec-60.dll .. cp -p ffmpeg/bin/avcodec-60.dll ..