diff options
author | Gabriel Nagy <gabrielnagy@me.com> | 2021-05-17 02:33:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 08:33:08 +0900 |
commit | 229cb0fcdb7957b19d7042b000d803ae58cc6593 (patch) | |
tree | 77e714a8dc61a2bf781711ea981cf7699915b803 /win32/resource.rb | |
parent | adafa8105f58bddc05a6ca12314890e07cbf5f5b (diff) |
[Win32] long path name support [Bug #12551]
Implement long path support on Windows by applying Microsoft's
recommended application manifest.
To make this work on both Visual C++ and MinGW, include the manifest as
a resource when generating the resource files. This way it will be
embedded into the executables generated by both compilers.
It's important for the manifest resource to have ID 1, otherwise GCC
will embed a default manifest.
Note that in addition to this, the user needs to have [long paths enabled]
either by modifying the registry or by enabling a group policy.
[long paths enabled]: https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4505
Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'win32/resource.rb')
-rwxr-xr-x | win32/resource.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/resource.rb b/win32/resource.rb index e19e04b922..bc3eda5630 100755 --- a/win32/resource.rb +++ b/win32/resource.rb @@ -61,6 +61,7 @@ end #include <winver.h> #{icon || ''} +#{type == 'VFT_APP' ? "1 RT_MANIFEST ruby.manifest" : ""} VS_VERSION_INFO VERSIONINFO FILEVERSION #{nversion} PRODUCTVERSION #{nversion} @@ -93,4 +94,3 @@ END EOF } end - |