diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-01-25 16:48:32 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-01-25 16:48:32 -0800 |
| commit | 6e07cbeff467a027b14870f57a8b8a18357b243e (patch) | |
| tree | e57c043cb1c1f4015641df414e03866174e135e6 | |
| parent | edcc8e2c364b2030e4f542faf05b4d36220083e9 (diff) | |
| download | vcpkg-6e07cbeff467a027b14870f57a8b8a18357b243e.tar.gz vcpkg-6e07cbeff467a027b14870f57a8b8a18357b243e.zip | |
[bootstrap] Specify full path for dirs.proj
| -rw-r--r-- | scripts/bootstrap.ps1 | 54 |
1 files changed, 23 insertions, 31 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 3e886b26a..ab7838127 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -37,39 +37,31 @@ if (!(Test-Path $vcpkgSourcesPath)) return } -try -{ - Push-Location $vcpkgSourcesPath - $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath - $msbuildExe = $msbuildExeWithPlatformToolset[0] - $platformToolset = $msbuildExeWithPlatformToolset[1] - $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 - - $arguments = ( - "`"/p:VCPKG_VERSION=-$gitHash`"", - "`"/p:DISABLE_METRICS=$disableMetrics`"", - "/p:Configuration=Release", - "/p:Platform=x86", - "/p:PlatformToolset=$platformToolset", - "/p:TargetPlatformVersion=$windowsSDK", - "/m", - "dirs.proj") -join " " +$msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath +$msbuildExe = $msbuildExeWithPlatformToolset[0] +$platformToolset = $msbuildExeWithPlatformToolset[1] +$windowsSDK = & $scriptsDir\getWindowsSDK.ps1 - # vcpkgInvokeCommandClean cmd "/c echo %PATH%" - $ec = vcpkgInvokeCommandClean $msbuildExe $arguments - - if ($ec -ne 0) - { - Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." - return - } +$arguments = ( +"`"/p:VCPKG_VERSION=-$gitHash`"", +"`"/p:DISABLE_METRICS=$disableMetrics`"", +"/p:Configuration=Release", +"/p:Platform=x86", +"/p:PlatformToolset=$platformToolset", +"/p:TargetPlatformVersion=$windowsSDK", +"/m", +"$vcpkgSourcesPath\dirs.proj") -join " " - Write-Verbose("Placing vcpkg.exe in the correct location") +# vcpkgInvokeCommandClean cmd "/c echo %PATH%" +$ec = vcpkgInvokeCommandClean $msbuildExe $arguments - Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null - Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null -} -finally +if ($ec -ne 0) { - Pop-Location + Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." + return } + +Write-Verbose("Placing vcpkg.exe in the correct location") + +Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null +Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null |
