Skip to content

Commit 5e4bfea

Browse files
committed
A couple of extra comment notes.
Former-commit-id: 224d995ff0c497512b560f314c686637bec975fa
1 parent eb895e1 commit 5e4bfea

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

build.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff 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

4751
function 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"

0 commit comments

Comments
 (0)