svn commit: r1933257 - in subversion/trunk/build: generator/templates win32

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <177687775611.1643121.16100843193111500063@svn03-he-fi>
Author: ivan
Date: Wed Apr 22 17:09:15 2026
New Revision: 1933257

Log:
Add Windows manifest with compatibility information to executable files.

Without compatibility information Windows executes application in
"compatibility context".

For example, this results in 'svn --version -v' displaying wrong OS version
information. Other possible changes are listed in [2].

Partly discussed in [3].

[1]: https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#compatibility
[2]: https://learn.microsoft.com/en-us/windows/compatibility/application-executable-manifest#manifestation
[3]: https://lists.apache.org/thread/vd19wz81qjqnz6dn01rk5vc46j12sxw3

* build/generator/templates/targets.cmake.ezt
  (): Add build/win32/compatibility.manifest for executables.
* build/generator/templates/vcnet_vcxproj.ezt
  (): Add build/win32/compatibility.manifest for executables.
* build/win32/compatibility.manifest
  (): New.

Added:
   subversion/trunk/build/win32/compatibility.manifest
Modified:
   subversion/trunk/build/generator/templates/targets.cmake.ezt
   subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt

Modified: subversion/trunk/build/generator/templates/targets.cmake.ezt
==============================================================================
--- subversion/trunk/build/generator/templates/targets.cmake.ezt	Wed Apr 22 15:51:53 2026	(r1933256)
+++ subversion/trunk/build/generator/templates/targets.cmake.ezt	Wed Apr 22 17:09:15 2026	(r1933257)
@@ -59,6 +59,9 @@ if ([targets.enable_condition])[is targe
   add_executable([targets.name][for targets.sources]
     [targets.sources][end]
   )
+  if (WIN32)
+    target_sources([targets.name] PRIVATE build/win32/compatibility.manifest)
+  endif()
   [end][is targets.type "test"]
   add_executable([targets.name][for targets.sources]
     [targets.sources][end]

Modified: subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt
==============================================================================
--- subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt	Wed Apr 22 15:51:53 2026	(r1933256)
+++ subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt	Wed Apr 22 17:09:15 2026	(r1933257)
@@ -96,7 +96,10 @@
       <TargetMachine>[is platforms "X64"]MachineX64[else][is platforms "ARM64"]MachineARM64[else]MachineX86[end][end]</TargetMachine>
 [is configs.name "Debug"]      <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
 [end]    </Lib>
-[end][end][end]  </ItemDefinitionGroup>
+[end][end][end][is config_type "Application"]    <Manifest>
+      <AdditionalManifestFiles>..\compatibility.manifest</AdditionalManifestFiles>
+    </Manifest>
+[end]  </ItemDefinitionGroup>
 [end][end][if-any target.desc]  <ItemGroup>
     <ResourceCompile Include="..\svn.rc" />
   </ItemGroup>

Added: subversion/trunk/build/win32/compatibility.manifest
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ subversion/trunk/build/win32/compatibility.manifest	Wed Apr 22 17:09:15 2026	(r1933257)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+    <application>
+      <!-- Windows Vista -->
+      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+      <!-- Windows 7 -->
+      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+      <!-- Windows 8 -->
+      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+      <!-- Windows 8.1 -->
+      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+      <!-- Windows 10 -->
+      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+    </application>
+  </compatibility>
+</assembly>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.