Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ tests/buildtest/bin/
tests/buildtest/inc/
tests/buildtest/logs/
tests/buildtest/driver/x64
tests/buildtest/driver/packages

20 changes: 16 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ param(
Specify one of "EWDK","VS2022","VS2019","VS2017","VS2015".
Default EWDK.
#>
[ValidateSet("EWDK","VS2022","VS2019","VS2017","VS2015")]
[ValidateSet("EWDK","VS2026","VS2022","VS2019","VS2017","VS2015")]
[string]$toolset="EWDK",
# the directory where the msbuild project file to be built is located
[Parameter(ValueFromPipeline)]
Expand Down Expand Up @@ -53,7 +53,7 @@ $ErrorActionPreference = 'Stop'

$root = $PSScriptRoot
$buildModule = "$root\buildFuncs.psm1"
Import-Module -Name $buildModule
Import-Module -Name $buildModule -Force

try
{
Expand Down Expand Up @@ -147,10 +147,22 @@ try
}

if ("$($platforms[0])" -eq "all") {
$platforms = @("x86", "x64")
$platforms = @()
$match = Get-Content "$projectPath\$projectName" | Select-String -Pattern '|Win32' -SimpleMatch
if ($match) {
$platforms = @("Win32", "x64")
$platforms += "Win32"
}
$match = Get-Content "$projectPath\$projectName" | Select-String -Pattern '|x86' -SimpleMatch
if ($match) {
$platforms += "x86"
}
$match = Get-Content "$projectPath\$projectName" | Select-String -Pattern '|x64' -SimpleMatch
if ($match) {
$platforms += "x64"
}
$match = Get-Content "$projectPath\$projectName" | Select-String -Pattern '|ARM64' -SimpleMatch
if ($match) {
$platforms += "ARM64"
}
}

Expand Down
6 changes: 6 additions & 0 deletions buildFuncs.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ function getVsCmdScripts
}
}
}
'VS2026' {
$defaultProfessionalToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\18\Professional\Common7\Tools"
$defaultEnterpriseToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\18\Enterprise\Common7\Tools"
$defaultCommunityToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\18\Community\Common7\Tools"
$batName = @("vsdevcmd.bat")
}
'VS2022' {
$defaultProfessionalToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\2022\Professional\Common7\Tools"
$defaultEnterpriseToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\2022\Enterprise\Common7\Tools"
Expand Down
2 changes: 1 addition & 1 deletion tests/buildtest/build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"toolset" : "VS2022",
"toolset" : "VS2026",
"projectRootPath" : "./buildtest",
"htsToolsPath" : "../",
"projectPath" : "./buildtest/driver"
Expand Down
18 changes: 18 additions & 0 deletions tests/buildtest/driver/directory.build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>

<Import Project="packages\Microsoft.Windows.WDK.x64.10.0.28000.2526\build\native\Microsoft.Windows.WDK.x64.props"
Condition="Exists('packages\Microsoft.Windows.WDK.x64.10.0.28000.2526\build\native\Microsoft.Windows.WDK.x64.props') and '$(Platform)' == 'x64'"/>

<Import Project="packages\Microsoft.Windows.WDK.arm64.10.0.28000.2526\build\native\Microsoft.Windows.WDK.arm64.props"
Condition="Exists('packages\Microsoft.Windows.WDK.arm64.10.0.28000.2526\build\native\Microsoft.Windows.WDK.arm64.props') and '$(Platform)' == 'ARM64'"/>

<Import Project="packages\Microsoft.Windows.SDK.CPP.x64.10.0.28000.2526\build\native\Microsoft.Windows.SDK.cpp.x64.props"
Condition="Exists('packages\Microsoft.Windows.SDK.CPP.x64.10.0.28000.2526\build\native\Microsoft.Windows.SDK.cpp.x64.props') and '$(Platform)' == 'x64'"/>

<Import Project="packages\Microsoft.Windows.SDK.CPP.arm64.10.0.28000.2526\build\native\Microsoft.Windows.SDK.cpp.arm64.props"
Condition="Exists('packages\Microsoft.Windows.SDK.CPP.arm64.10.0.28000.2526\build\native\Microsoft.Windows.SDK.cpp.arm64.props') and '$(Platform)' == 'ARM64'"/>

<Import Project="packages\Microsoft.Windows.SDK.CPP.10.0.28000.2526\build\native\Microsoft.Windows.SDK.cpp.props"
Condition="Exists('packages\Microsoft.Windows.SDK.CPP.10.0.28000.2526\build\native\Microsoft.Windows.SDK.cpp.props')"/>

</Project>
8 changes: 8 additions & 0 deletions tests/buildtest/driver/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.SDK.CPP" version="10.0.28000.2526" targetFramework="native" />
<package id="Microsoft.Windows.SDK.CPP.x64" version="10.0.28000.2526" targetFramework="native" />
<package id="Microsoft.Windows.SDK.CPP.arm64" version="10.0.28000.2526" targetFramework="native" />
<package id="Microsoft.Windows.WDK.x64" version="10.0.28000.2526" targetFramework="native" />
<package id="Microsoft.Windows.WDK.arm64" version="10.0.28000.2526" targetFramework="native" />
</packages>
2 changes: 2 additions & 0 deletions tests/test1.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ try {
Remove-Item -recurse -path $p -force
}
}
# restore nuget packages (required for github)
nuget restore .\buildtest\driver\packages.config -PackagesDirectory .\buildtest\driver\packages\
../build.ps1 -jsonfile "$root/buildtest/build.json"
if ($LASTEXITCODE -ne 0) {
write-error "Build exit code $LASTEXITCODE "
Expand Down
2 changes: 1 addition & 1 deletion wdkEnv.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
param(
[ValidateSet("EWDK","VS2022","VS2019","VS2017","VS2015")]
[ValidateSet("EWDK","VS2026","VS2022","VS2019","VS2017","VS2015")]
[string]$toolset="EWDK",
[switch] $noSession
)
Expand Down
Loading