Show More
@@ -666,15 +666,6 b' class buildhgextindex(Command):' | |||||
666 |
|
666 | |||
667 | class buildhgexe(build_ext): |
|
667 | class buildhgexe(build_ext): | |
668 | description = 'compile hg.exe from mercurial/exewrapper.c' |
|
668 | description = 'compile hg.exe from mercurial/exewrapper.c' | |
669 | user_options = build_ext.user_options + [ |
|
|||
670 | ( |
|
|||
671 | 'long-paths-support', |
|
|||
672 | None, |
|
|||
673 | 'enable support for long paths on ' |
|
|||
674 | 'Windows (off by default and ' |
|
|||
675 | 'experimental)', |
|
|||
676 | ), |
|
|||
677 | ] |
|
|||
678 |
|
669 | |||
679 | LONG_PATHS_MANIFEST = """ |
|
670 | LONG_PATHS_MANIFEST = """ | |
680 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
|
671 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
@@ -689,7 +680,6 b' class buildhgexe(build_ext):' | |||||
689 |
|
680 | |||
690 | def initialize_options(self): |
|
681 | def initialize_options(self): | |
691 | build_ext.initialize_options(self) |
|
682 | build_ext.initialize_options(self) | |
692 | self.long_paths_support = False |
|
|||
693 |
|
683 | |||
694 | def build_extensions(self): |
|
684 | def build_extensions(self): | |
695 | if os.name != 'nt': |
|
685 | if os.name != 'nt': | |
@@ -774,22 +764,11 b' class buildhgexe(build_ext):' | |||||
774 | self.compiler.link_executable( |
|
764 | self.compiler.link_executable( | |
775 | objects, self.hgtarget, libraries=[], output_dir=self.build_temp |
|
765 | objects, self.hgtarget, libraries=[], output_dir=self.build_temp | |
776 | ) |
|
766 | ) | |
777 | if self.long_paths_support: |
|
767 | ||
778 |
|
|
768 | self.addlongpathsmanifest() | |
779 |
|
769 | |||
780 | def addlongpathsmanifest(self): |
|
770 | def addlongpathsmanifest(self): | |
781 |
|
|
771 | """Add manifest pieces so that hg.exe understands long paths | |
782 |
|
||||
783 | This is an EXPERIMENTAL feature, use with care. |
|
|||
784 | To enable long paths support, one needs to do two things: |
|
|||
785 | - build Mercurial with --long-paths-support option |
|
|||
786 | - change HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\ |
|
|||
787 | LongPathsEnabled to have value 1. |
|
|||
788 |
|
||||
789 | Please ignore 'warning 81010002: Unrecognized Element "longPathAware"'; |
|
|||
790 | it happens because Mercurial uses mt.exe circa 2008, which is not |
|
|||
791 | yet aware of long paths support in the manifest (I think so at least). |
|
|||
792 | This does not stop mt.exe from embedding/merging the XML properly. |
|
|||
793 |
|
772 | |||
794 | Why resource #1 should be used for .exe manifests? I don't know and |
|
773 | Why resource #1 should be used for .exe manifests? I don't know and | |
795 | wasn't able to find an explanation for mortals. But it seems to work. |
|
774 | wasn't able to find an explanation for mortals. But it seems to work. | |
@@ -807,7 +786,7 b' class buildhgexe(build_ext):' | |||||
807 | # it merge the embedded and supplied manifests in the -outputresource |
|
786 | # it merge the embedded and supplied manifests in the -outputresource | |
808 | self.spawn( |
|
787 | self.spawn( | |
809 | [ |
|
788 | [ | |
810 |
|
|
789 | self.compiler.mt, | |
811 | '-nologo', |
|
790 | '-nologo', | |
812 | '-manifest', |
|
791 | '-manifest', | |
813 | manfname, |
|
792 | manfname, |
General Comments 0
You need to be logged in to leave comments.
Login now