-
Notifications
You must be signed in to change notification settings - Fork 120
/
UpdateSDK.ps1
29 lines (22 loc) · 1.09 KB
/
UpdateSDK.ps1
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
28
29
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[string]$Version
)
. "$PSScriptRoot\CommonUtils.ps1"
$buildToolsProj = Resolve-Path (Join-Path $PSScriptRoot "..\BuildTools\BuildTools.proj")
Write-Host "Updating $buildToolsProj..."
(Get-Content $buildToolsProj) -replace
"<PackageReference Include=""Microsoft.Windows.SDK.CPP"".*",
"<PackageReference Include=""Microsoft.Windows.SDK.CPP"" Version=""$Version"" GeneratePathProperty=""true""/>" -replace
"<PackageReference Include=""Microsoft.Windows.SDK.CPP.x64"".*",
"<PackageReference Include=""Microsoft.Windows.SDK.CPP.x64"" Version=""$Version"" GeneratePathProperty=""true""/>" |
Set-Content $buildToolsProj
Write-Host "Rebuilding $buildToolsProj..."
dotnet build $buildToolsProj -t:Clean
Write-Host "Recompiling IDL files for scraping..."
. "$PSScriptRoot\RecompileIdlFilesForScraping.ps1"
Write-Host "Creating libMappings.rsp..."
. "$PSScriptRoot\CreateProcLibMappingForAllLibs.ps1"
Remove-Item (Join-Path $windowsWin32ProjectRoot libMappings.old.rsp)
Write-Host "Review libMappings.rsp for manual entries that were removed during the update."