File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,14 @@ function Invoke-BatchFile
2929 )
3030
3131 $tempFile = [IO.Path ]::GetTempFileName()
32- $batFile = [IO.Path ]::GetTempFileName() + ' .cmd'
3332
34- Set-Content - Path $batFile - Value " `" $Path `" $Parameters && set > `" $tempFile `" "
33+ # NOTE: A better solution would be to use PSCX's Push-EnvironmentBlock before calling
34+ # this and popping it before calling this function again as repeated use of this function
35+ # can (unsurprisingly) cause the PATH variable to max out at Windows upper limit.
36+ $batFile = [IO.Path ]::GetTempFileName() + ' .cmd'
37+ Set-Content - Path $batFile - Value " `" $Path `" $Parameters && set > `" $tempFile `"`r`n "
3538
36- $batFile
39+ & $batFile
3740
3841 Get-Content $tempFile | Foreach-Object {
3942 if ($_ -match " ^(.*?)=(.*)$" )
@@ -42,6 +45,7 @@ function Invoke-BatchFile
4245 }
4346 }
4447 Remove-Item $tempFile
48+ Remove-Item $batFile
4549}
4650
4751function Write-Diagnostic
@@ -207,6 +211,7 @@ function Msvs
207211 if ($env: CEFSHARP_BUILD_IS_BOOTSTRAPPED -ne " $Toolchain$Platform " ) {
208212 Invoke-BatchFile $VCVarsAll $Platform
209213 pushd $CefDir
214+ # Remove previously generated CMake data for the different platform/toolchain
210215 rm CMakeCache.txt - ErrorAction:Ignore
211216 rm - r CMakeFiles - ErrorAction:Ignore
212217 cmake - G " $CmakeGenerator$CmakeArch "
You can’t perform that action at this time.
0 commit comments