Skip to content

Commit b89ca46

Browse files
committed
Add testedversion.ps1
1 parent e5227db commit b89ca46

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

SimpleCom/app.manifest

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
55
<application>
66
<!-- Windows 10, 11 -->
7-
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" maxversiontested="10.0.19042.868" />
7+
<maxversiontested Id="10.0.26100" />
8+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
89
<!-- Windows 8.1 -->
910
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
1011
<!-- Windows 8 -->
@@ -23,4 +24,4 @@
2324
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
2425
</dependentAssembly>
2526
</dependency>
26-
</assembly>
27+
</assembly>

testedversion.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$solutiondir = $PSScriptRoot
2+
$os_version = (Get-ComputerInfo).OsVersion
3+
4+
Write-Output "OS Version: $os_version"
5+
6+
$manifest_file = "$solutiondir\SimpleCom\app.manifest"
7+
$xml = [xml]::new()
8+
$xml.Load($manifest_file)
9+
$xml.assembly.compatibility.application.maxversiontested.Id = $os_version
10+
$xml.Save($manifest_file)

versionup.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ How to increase version number
1313
* Output filename
1414
* I cannot ensure the result of this script because the spec of .vdproj file is closed.
1515

16+
[testedversion.ps1](testedversion.ps1) helps to bump the OS version in [maxversiontested](https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#maxversiontested) in `app.manifest`.
17+
1618
# Usage
1719

1820
```
@@ -23,3 +25,5 @@ versionup.ps1 [version number]
2325
* Version number is converted into [SemVer](https://semver.org/)
2426
* x.y.z is given, it is used straightly as SemVer, and adds `0` as a revision number in Windows
2527
* w.x.y.z is given, it is converted into w.x.t+z
28+
29+
`testedversion.ps1` can be called without any arguments.

0 commit comments

Comments
 (0)