##// END OF EJS Templates
setup: use the full executable manifest from `python.exe`...
Matt Harbison -
r50291:ece490b0 default
parent child Browse files
Show More
@@ -667,16 +667,51 b' class buildhgextindex(Command):'
667 667 class buildhgexe(build_ext):
668 668 description = 'compile hg.exe from mercurial/exewrapper.c'
669 669
670 LONG_PATHS_MANIFEST = """
671 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
672 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
673 <application>
674 <windowsSettings
675 xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
676 <ws2:longPathAware>true</ws2:longPathAware>
677 </windowsSettings>
678 </application>
679 </assembly>"""
670 LONG_PATHS_MANIFEST = """\
671 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
672 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
673 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
674 <security>
675 <requestedPrivileges>
676 <requestedExecutionLevel
677 level="asInvoker"
678 uiAccess="false"
679 />
680 </requestedPrivileges>
681 </security>
682 </trustInfo>
683 <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
684 <application>
685 <!-- Windows Vista -->
686 <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
687 <!-- Windows 7 -->
688 <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
689 <!-- Windows 8 -->
690 <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
691 <!-- Windows 8.1 -->
692 <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
693 <!-- Windows 10 and Windows 11 -->
694 <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
695 </application>
696 </compatibility>
697 <application xmlns="urn:schemas-microsoft-com:asm.v3">
698 <windowsSettings
699 xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
700 <ws2:longPathAware>true</ws2:longPathAware>
701 </windowsSettings>
702 </application>
703 <dependency>
704 <dependentAssembly>
705 <assemblyIdentity type="win32"
706 name="Microsoft.Windows.Common-Controls"
707 version="6.0.0.0"
708 processorArchitecture="*"
709 publicKeyToken="6595b64144ccf1df"
710 language="*" />
711 </dependentAssembly>
712 </dependency>
713 </assembly>
714 """
680 715
681 716 def initialize_options(self):
682 717 build_ext.initialize_options(self)
@@ -776,21 +811,18 b' class buildhgexe(build_ext):'
776 811 exefname = self.compiler.executable_filename(self.hgtarget)
777 812 fdauto, manfname = tempfile.mkstemp(suffix='.hg.exe.manifest')
778 813 os.close(fdauto)
779 with open(manfname, 'w') as f:
814 with open(manfname, 'w', encoding="UTF-8") as f:
780 815 f.write(self.LONG_PATHS_MANIFEST)
781 816 log.info("long paths manifest is written to '%s'" % manfname)
782 inputresource = '-inputresource:%s;#1' % exefname
783 817 outputresource = '-outputresource:%s;#1' % exefname
784 818 log.info("running mt.exe to update hg.exe's manifest in-place")
785 # supplying both -manifest and -inputresource to mt.exe makes
786 # it merge the embedded and supplied manifests in the -outputresource
819
787 820 self.spawn(
788 821 [
789 822 self.compiler.mt,
790 823 '-nologo',
791 824 '-manifest',
792 825 manfname,
793 inputresource,
794 826 outputresource,
795 827 ]
796 828 )
General Comments 0
You need to be logged in to leave comments. Login now