-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.ps1
33 lines (29 loc) · 1.02 KB
/
build.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
30
31
32
33
#----------------------------------------------------------------------------
#
# Arm64 CPU system registers tools
# Copyright (c) 2023, Thierry Lelegard
# BSD-2-Clause license, see the LICENSE file.
#
# PowerShell script to build the driver and the applications.
#
#----------------------------------------------------------------------------
[CmdletBinding(SupportsShouldProcess=$true)]
param([switch]$NoPause = $false)
# Find MSBuild
Write-Output "Searching MSBuild..."
$MSRoots = @("C:\Program Files*\MSBuild", "C:\Program Files*\Microsoft Visual Studio")
$MSBuild = Get-ChildItem -Recurse -Path $MSRoots -Include MSBuild.exe -ErrorAction Ignore |
ForEach-Object { $_.FullName} |
Select-Object -Last 1
if (-not $MSBuild) {
Write-Output "MSBuild not found"
}
else {
# Build the project.
Write-Output "MSBuild: $MSBuild"
$SolutionFile = "$PSScriptRoot\cpusysregs.sln"
& $MSBuild $SolutionFile /nologo /property:Configuration=Release /property:Platform=ARM64
}
if (-not $NoPause) {
pause
}