diff --git a/.gitignore b/.gitignore index 3d372d7225..c00716c1f0 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,8 @@ thirdparty/nunit* thirdparty/windows/SDL2.dll thirdparty/Mono.Nat.dll thirdparty/nuget.exe +thirdparty/windows/lua51.dll +thirdparty/windows/zlib1.dll # backup files by various editors *~ diff --git a/Makefile b/Makefile index 1503f80627..2608652128 100644 --- a/Makefile +++ b/Makefile @@ -310,6 +310,9 @@ distclean: clean dependencies: cli-dependencies native-dependencies +windows-dependencies: + cd thirdparty && ./fetch-thirdparty-deps-windows.sh && cd .. + cli-dependencies: cd thirdparty && ./fetch-thirdparty-deps.sh && cd .. @ $(CP_R) thirdparty/*.dll . diff --git a/thirdparty/fetch-thirdparty-deps-windows.sh b/thirdparty/fetch-thirdparty-deps-windows.sh new file mode 100755 index 0000000000..a379b9973a --- /dev/null +++ b/thirdparty/fetch-thirdparty-deps-windows.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Die on any error for Travis CI to automatically retry: +set -e + +if [ ! -f windows/SDL2.dll ]; then + echo "Fetching SDL2 from nuget" + nuget install sdl2 -Version 2.0.3 + cp ./sdl2.redist.2.0.3/build/native/bin/Win32/dynamic/SDL2.dll ./windows/ + rm -rf sdl2.2.0.3 sdl2.redist.2.0.3 +fi + +if [ ! -f windows/freetype6.dll ]; then + echo "Fetching SharpFont from nuget" + nuget install SharpFont -Version 2.5.0.1 + cp ./SharpFont.2.5.0.1/Content/freetype6.dll ./windows/ + rm -rf SharpFont.2.5.0.1 +fi + +if [ ! -f windows/lua51.dll ]; then + echo "Fetching Lua 5.1 from nuget" + nuget install lua51.redist -Version 5.1.5 + cp ./lua51.redist.5.1.5/build/native/bin/Win32/v120/Release/lua5.1.dll ./windows/lua51.dll + rm -rf lua51.redist.5.1.5 +fi + +if [ ! -f windows/zlib1.dll ]; then + echo "Fetching ZLib from nuget" + nuget install zlib.redist -Version 1.2.8.7 + cp ./zlib.redist.1.2.8.7/build/native/bin/v120/Win32/Release/dynamic/stdcall/zlib.dll windows/zlib1.dll + rm -rf zlib.redist.1.2.8.7 +fi + diff --git a/thirdparty/fetch-thirdparty-deps.ps1 b/thirdparty/fetch-thirdparty-deps.ps1 index a8dc6e8720..8b36766ff7 100644 --- a/thirdparty/fetch-thirdparty-deps.ps1 +++ b/thirdparty/fetch-thirdparty-deps.ps1 @@ -1,3 +1,5 @@ +mkdir windows -Force >$null + if (!(Test-Path "nuget.exe")) { echo "Fetching NuGet." @@ -69,5 +71,21 @@ if (!(Test-Path "Mono.Nat.dll")) echo "Fetching Mono.Nat from NuGet." ./nuget.exe install Mono.Nat -Version 1.2.21 cp Mono.Nat.1.2.21.0/lib/net40/Mono.Nat.dll . - rmdir Mono.Nat.1.2.21.0 -Recurse -} \ No newline at end of file + rmdir Mono.Nat.1.2.21.0 -Recurse +} + +if (!(Test-Path "windows/lua51.dll")) +{ + echo "Fetching Lua 5.1 from NuGet." + ./nuget.exe install lua51.redist -Version 5.1.5 + cp lua51.redist.5.1.5/build/native/bin/Win32/v120/Release/lua5.1.dll ./windows/lua51.dll + rmdir lua51.redist.5.1.5 -Recurse +} + +if (!(Test-Path "windows/zlib1.dll")) +{ + echo "Fetching ZLib from NuGet." + ./nuget.exe install zlib.redist -Version 1.2.8.7 + cp zlib.redist.1.2.8.7/build/native/bin/v120/Win32/Release/dynamic/stdcall/zlib.dll windows/zlib1.dll + rmdir zlib.redist.1.2.8.7 -Recurse +} diff --git a/thirdparty/fetch-thirdparty-deps.sh b/thirdparty/fetch-thirdparty-deps.sh index dd4c63c2fa..d55d238c2f 100755 --- a/thirdparty/fetch-thirdparty-deps.sh +++ b/thirdparty/fetch-thirdparty-deps.sh @@ -35,7 +35,6 @@ if [ ! -f SharpFont.dll ]; then nuget install SharpFont -Version 2.5.0.1 cp ./SharpFont.2.5.0.1/lib/net20/SharpFont* . cp ./SharpFont.2.5.0.1/Content/SharpFont.dll.config . - cp ./SharpFont.2.5.0.1/Content/freetype6.dll ./windows/ rm -rf SharpFont.2.5.0.1 fi @@ -46,13 +45,6 @@ if [ ! -f nunit.framework.dll ]; then rm -rf NUnit.2.6.4 fi -if [ ! -f windows/SDL2.dll ]; then - echo "Fetching SDL2 from nuget" - nuget install sdl2 -Version 2.0.3 - cp ./sdl2.redist.2.0.3/build/native/bin/Win32/dynamic/SDL2.dll ./windows/ - rm -rf sdl2.2.0.3 sdl2.redist.2.0.3 -fi - if [ ! -f Mono.Nat.dll ]; then echo "Fetching Mono.Nat from nuget" nuget install Mono.Nat -Version 1.2.21 diff --git a/thirdparty/windows/lua51.dll b/thirdparty/windows/lua51.dll deleted file mode 100644 index 9eb7113dff..0000000000 Binary files a/thirdparty/windows/lua51.dll and /dev/null differ diff --git a/thirdparty/windows/zlib1.dll b/thirdparty/windows/zlib1.dll deleted file mode 100644 index 775aaf1f2c..0000000000 Binary files a/thirdparty/windows/zlib1.dll and /dev/null differ