-
Notifications
You must be signed in to change notification settings - Fork 6
/
local.ps1.sample
28 lines (23 loc) · 1.01 KB
/
local.ps1.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$global:d_msys2 = "C:/msys64"
$global:d_git = "$env:ProgramFiles/Git"
$global:d_vcpkg = "C:/vcpkg"
# below is used by GitHub Actions and locally
$env:VCPKG_INSTALLATION_ROOT = "C:/vcpkg"
$global:7z = "$env:ProgramFiles/7-Zip/7z.exe".replace('\', '/')
# limits parallel jobs to no more than 6
$global:jobs = (([int]$env:NUMBER_OF_PROCESSORS, 6) | Measure-Object -Minimum).Minimum
$global:orig_path = $env:Path
if ($build_sys -eq "msys2") {
$global:base_path = ("$env:ProgramFiles/7-Zip;$d_git/cmd;" + `
"$env:SystemRoot/system32;$env:ProgramFiles;$env:SystemRoot").replace('\', '/')
} else {
# mswin
$global:vcvars = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
if (!(Test-Path -Path $vcvars -PathType Leaf )) {
echo "File:`n$vcvars`ndoes not exist, please fix"
exit 1
}
Set-VCVars-Env
$global:base_path = $env:Path.replace('\', '/')
$global:no_ruby_path = $base_path -replace '[^;]+?(Chocolatey|CMake|OpenSSL|Ruby|Strawberry)[^;]*;', ''
}