From 08cce61ac9e4b7ebb557b68d57097bd7eab930f3 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Tue, 4 Nov 2025 21:35:33 +0800 Subject: Remove unused tools. --- scripts/Use-VC.ps1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/Use-VC.ps1 (limited to 'scripts/Use-VC.ps1') diff --git a/scripts/Use-VC.ps1 b/scripts/Use-VC.ps1 new file mode 100644 index 00000000..ad3dbcba --- /dev/null +++ b/scripts/Use-VC.ps1 @@ -0,0 +1,24 @@ +function Use-VC { + param( + [Parameter()] + [ValidateSet('x64', 'x86')] + $Arch = 'x64' + ) + + if ($Arch -eq 'x86') { + $p = 'x86'; + } + else { + $p = 'amd64' + } + + cmd /c "`"$(vswhere.exe -format value -property installationPath)\VC\Auxiliary\Build\vcvars64.bat`" $p & set" | + ForEach-Object { + if ($_ -match '=') { + $v = $_ -split '=' + Set-Item -Force -Path "ENV:\$($v[0])" -Value "$($v[1])" + } + } + Pop-Location + Write-Host "Visual Studio Command Prompt variables set." -ForegroundColor Yellow +} -- cgit v1.2.3