[FFmpeg-trac] #8885(build system:reopened): Windows 10 long path support
FFmpeg
trac at avcodec.org
Mon Feb 28 03:55:40 EET 2022
#8885: Windows 10 long path support
-------------------------------------+-------------------------------------
Reporter: stax76 | Owner: (none)
Type: enhancement | Status: reopened
Priority: wish | Component: build
| system
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Elad Karako):
f.y.i.
you should be able to seamlessly patch up most of exe/dll/ocx (etc..) by
using `mt.exe` (available in visual studio build tools you probably
already have) and a generic manifest file like this one:
https://github.com/eladkarako/manifest/blob/master/example_manifests/generic.manifest#L13
(you can add `assemblyIdentity` and `description` blocks if you want)
the commands are: (for exe use `1`, for dll use `2`, this is just an
example, repeat as needed for any of your files).
{{{
mt.exe -nologo -manifest generic.manifest -outputresource:"ffmpeg.exe";1
}}}
{{{
mt.exe -nologo -manifest generic.manifest
-outputresource:"avcodec-59.dll";2
}}}
it should properly write embed the manifest (resource 24) into the file
(overwriting any existing one).
after you'll also apply a registry patch (one time):
{{{
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001
}}}
and reboot, you should be able to test it on your PC.
it should effect those functions:
CopyFileW, CopyFile2, CopyFileExW, CreateFileW, CreateFile2,
CreateHardLinkW, CreateSymbolicLinkW, DeleteFileW, FindFirstFileW,
FindFirstFileExW, FindNextFileW, GetFileAttributesW, GetFileAttributesExW,
SetFileAttributesW, GetFullPathNameW, GetLongPathNameW, MoveFileW,
MoveFileExW, MoveFileWithProgressW, ReplaceFileW, SearchPathW,
FindFirstFileNameW, FindNextFileNameW, FindFirstStreamW, FindNextStreamW,
GetCompressedFileSizeW, GetFinalPathNameByHandleW.
no actual code change is needed.
https://docs.microsoft.com/en-gb/windows/win32/fileio/maximum-file-path-
limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8885#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list