diff --git a/SMP/appveyor.yml b/SMP/appveyor.yml index df94cebd05..752e7b78d9 100644 --- a/SMP/appveyor.yml +++ b/SMP/appveyor.yml @@ -4,7 +4,7 @@ branches: only: - master skip_non_tags: true -shallow_clone: true +clone_depth: 10 configuration: Release+ReleaseDLL @@ -13,7 +13,11 @@ platform: x86+x64 environment: matrix: - MSVC_VER: 12 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - MSVC_VER: 14 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + - MSVC_VER: 15 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 install: # Install GitLink @@ -24,7 +28,7 @@ before_build: - ps: >- $script = @' - + @@ -61,28 +65,45 @@ before_build: $script = $script -replace "APPVEYOR_REPO_COMMIT", "$env:APPVEYOR_REPO_COMMIT" + $script = $script -replace "APPVEYOR_MSVC_VER", "$env:MSVC_VER" + $script | Out-File build.vcxproj # Backup platform so it is not affected by vcvars - cmd: SET PLATFORMBACK=%PLATFORM% # Setup msvc environment for required compiler version (specified by MSVC_VER) -- ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:MSVC_VER" + "0COMNTOOLS")) -- cmd: call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" amd64 +- ps: >- + if ($env:MSVC_VER -eq 15) { + $env:VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" + } else { + $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:MSVC_VER" + "0COMNTOOLS")) + $env:VCVARS="%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" + } + +- cmd: call "%VCVARS%" amd64 # Reset platform - cmd: SET PLATFORM=%PLATFORMBACK% +# Set Targets path so that gitlink works correctly +- ps: $env:MSBUILDDIR=((Get-Command msbuild.exe).Path | Split-Path -parent) +- ps: >- + if ($env:MSVC_VER -eq 15) { + $env:VCTargetsPath="$env:MSBUILDDIR\..\..\..\Common7\IDE\VC\VCTargets" + } else { + $env:VCTargetsPath="$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\V${env:MSVC_VER}0" + } + # Download and install yasm integration - ps: (New-Object Net.WebClient).DownloadFile('http://www.tortall.net/projects/yasm/releases/vsyasm-1.3.0-win64.zip', "$pwd\yasm.zip") - ps: Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory("$pwd\yasm.zip", "$pwd\TempYASMUnpack") -- ps: Move-Item -Force "TempYASMUnpack\*.exe" "$env:VSCOMNTOOLS\..\..\VC\bin" -- ps: $env:MSBUILDDIR=((Get-Command msbuild.exe).Path | Split-Path -parent) +- ps: New-Item -ItemType Directory -Force -Path "$env:VCINSTALLDIR\bin\" +- ps: Move-Item -Force "TempYASMUnpack\*.exe" "$env:VCINSTALLDIR\bin\" - ps: (Get-Content "$pwd\TempYASMUnpack\vsyasm.props") -replace '\$\(Platform\)', 'win$(PlatformArchitecture)' | Set-Content "$pwd\TempYASMUnpack\vsyasm.props" -- ps: Copy-Item -Force "TempYASMUnpack\*.*" "$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\V${env:MSVC_VER}0\BuildCustomizations" -# Make additional copy so its available to GitLink (which currently looks in the wrong location) -- ps: Copy-Item -Force "TempYASMUnpack\*.*" "$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\BuildCustomizations" -- ps: Copy-Item -Force "TempYASMUnpack\*.*" "$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\V120\BuildCustomizations" +- ps: Copy-Item -Force "TempYASMUnpack\*.*" "$env:VCTargetsPath\BuildCustomizations" +# Additional yasm location in order to fix gitlink error +- ps: if ($env:MSVC_VER -ne 15) { Copy-Item -Force "TempYASMUnpack\*.*" "$env:VCTargetsPath\..\BuildCustomizations" } build: project: build.vcxproj