forked from OpenRA/OpenRA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch-thirdparty-deps-windows.sh
executable file
·65 lines (56 loc) · 1.57 KB
/
fetch-thirdparty-deps-windows.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# Die on any error for Travis CI to automatically retry:
set -e
if [ $# -ne "1" ]; then
echo "Usage: $(basename "$0") (32|64)"
exit 1
fi
if [ "$1" != "x86" ] && [ "$1" != "x64" ]; then
echo "Usage: $(basename "$0") (32|64)"
exit 1
fi
download_dir="${0%/*}/download/windows"
mkdir -p "${download_dir}"
cd "${download_dir}" || exit 1
if [ ! -f SDL2.dll ]; then
echo "Fetching SDL2 from libsdl.org"
if [ "$1" = "x86" ]; then
curl -LOs https://www.libsdl.org/release/SDL2-2.0.5-win32-x86.zip
unzip SDL2-2.0.5-win32-x86.zip SDL2.dll
rm SDL2-2.0.5-win32-x86.zip
else
curl -LOs https://www.libsdl.org/release/SDL2-2.0.5-win32-x64.zip
unzip SDL2-2.0.5-win32-x64.zip SDL2.dll
rm SDL2-2.0.5-win32-x64.zip
fi
fi
if [ ! -f freetype6.dll ]; then
echo "Fetching FreeType2 from NuGet"
../../noget.sh SharpFont.Dependencies 2.6.0
if [ "$1" = "x86" ]; then
cp ./SharpFont.Dependencies/bin/msvc9/x86/freetype6.dll .
else
cp ./SharpFont.Dependencies/bin/msvc9/x64/freetype6.dll .
fi
rm -rf SharpFont.Dependencies
fi
if [ ! -f lua51.dll ]; then
echo "Fetching Lua 5.1 from NuGet"
../../noget.sh lua.binaries 5.1.5
if [ "$1" = "x86" ]; then
cp ./lua.binaries/bin/win32/dll8/lua5.1.dll ./lua51.dll
else
cp ./lua.binaries/bin/win64/dll8/lua5.1.dll ./lua51.dll
fi
rm -rf lua.binaries
fi
if [ ! -f soft_oal.dll ]; then
echo "Fetching OpenAL Soft from NuGet"
../../noget.sh OpenAL-Soft 1.16.0
if [ "$1" = "x86" ]; then
cp ./OpenAL-Soft/bin/Win32/soft_oal.dll ./soft_oal.dll
else
cp ./OpenAL-Soft/bin/Win64/soft_oal.dll ./soft_oal.dll
fi
rm -rf OpenAL-Soft
fi