From 21a5c023331d99a0c8f62a3296160b3310a6845d Mon Sep 17 00:00:00 2001 From: "Miso Zmiric (Mike Squinter)" Date: Sat, 30 May 2015 22:11:06 +0100 Subject: [PATCH] use powershell pre-build, switch back to /MT --- pre-build.ps1 | 15 +++++++++++++++ projects/libs/libs.vcxproj | 5 ++--- projects/openrct2.vcxproj | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 pre-build.ps1 diff --git a/pre-build.ps1 b/pre-build.ps1 new file mode 100644 index 0000000000..8dadd76d26 --- /dev/null +++ b/pre-build.ps1 @@ -0,0 +1,15 @@ +$path = Split-Path $Script:MyInvocation.MyCommand.Path +$zip = $path+'\lib\orcalibs.zip' +$libs = $path+'\lib' +$libcurl = Test-Path $path\lib\libcurl\ +$jansson = Test-Path $path\lib\jansson\ +$sdl = Test-Path $path\lib\sdl\ +if (!$libcurl -or !$jansson -or !$sdl) { + Invoke-WebRequest http://misozmiric.com/ted/openrct2/orcalibs-vs.zip -OutFile $path\lib\orcalibs.zip + rm $path\lib\libcurl -r -Force -ErrorAction SilentlyContinue + rm $path\lib\jansson -r -Force -ErrorAction SilentlyContinue + rm $path\lib\sdl -r -Force -ErrorAction SilentlyContinue + [System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null + [System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $libs) + rm $path\lib\orcalibs.zip -Force -ErrorAction SilentlyContinue +} diff --git a/projects/libs/libs.vcxproj b/projects/libs/libs.vcxproj index 78a6c82be8..61f4192ac0 100644 --- a/projects/libs/libs.vcxproj +++ b/projects/libs/libs.vcxproj @@ -70,7 +70,7 @@ true true _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;HAVE_CONFIG_H;_USE_MATH_DEFINES;NS_ENABLE_THREADS;NS_ENABLE_SSL;DISABLE_MD5;%(PreprocessorDefinitions) - MultiThreadedDLL + MultiThreaded 1Byte @@ -84,8 +84,7 @@ libcurl.lib;Ws2_32.lib;%(AdditionalDependencies) - - + Powershell -NonInteractive -ExecutionPolicy "ByPass" -File "$(ProjectDir)../../pre-build.ps1" diff --git a/projects/openrct2.vcxproj b/projects/openrct2.vcxproj index 80ede23ea6..cc5a145480 100644 --- a/projects/openrct2.vcxproj +++ b/projects/openrct2.vcxproj @@ -307,7 +307,7 @@ true - MultiThreadedDLL + MultiThreaded 1Byte 4013