diff --git a/.gitignore b/.gitignore
index 00fed1b..48023f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,5 @@ tests/buildtest/bin/
tests/buildtest/inc/
tests/buildtest/logs/
tests/buildtest/driver/x64
+tests/buildtest/driver/packages
diff --git a/build.ps1 b/build.ps1
index 9d13537..910bc8e 100644
--- a/build.ps1
+++ b/build.ps1
@@ -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)]
@@ -53,7 +53,7 @@ $ErrorActionPreference = 'Stop'
$root = $PSScriptRoot
$buildModule = "$root\buildFuncs.psm1"
-Import-Module -Name $buildModule
+Import-Module -Name $buildModule -Force
try
{
@@ -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"
}
}
diff --git a/buildFuncs.psm1 b/buildFuncs.psm1
index a8796b2..19194eb 100644
--- a/buildFuncs.psm1
+++ b/buildFuncs.psm1
@@ -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"
diff --git a/tests/buildtest/build.json b/tests/buildtest/build.json
index 7b267fa..90caeba 100644
--- a/tests/buildtest/build.json
+++ b/tests/buildtest/build.json
@@ -1,5 +1,5 @@
{
- "toolset" : "VS2022",
+ "toolset" : "VS2026",
"projectRootPath" : "./buildtest",
"htsToolsPath" : "../",
"projectPath" : "./buildtest/driver"
diff --git a/tests/buildtest/driver/directory.build.props b/tests/buildtest/driver/directory.build.props
new file mode 100644
index 0000000..68ade2f
--- /dev/null
+++ b/tests/buildtest/driver/directory.build.props
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/buildtest/driver/packages.config b/tests/buildtest/driver/packages.config
new file mode 100644
index 0000000..90edacf
--- /dev/null
+++ b/tests/buildtest/driver/packages.config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/tests/test1.ps1 b/tests/test1.ps1
index 3cc1af5..5c3742a 100644
--- a/tests/test1.ps1
+++ b/tests/test1.ps1
@@ -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 "
diff --git a/wdkEnv.ps1 b/wdkEnv.ps1
index 0a681d3..3b75d07 100644
--- a/wdkEnv.ps1
+++ b/wdkEnv.ps1
@@ -1,5 +1,5 @@
param(
- [ValidateSet("EWDK","VS2022","VS2019","VS2017","VS2015")]
+ [ValidateSet("EWDK","VS2026","VS2022","VS2019","VS2017","VS2015")]
[string]$toolset="EWDK",
[switch] $noSession
)