When running makensis Installer.nsi
on my installer I am running into a MAX_PATH length problem it seems.
When it runs the line
File /r "..\Name-Of-App\*"
I get an error:
File: failed opening file "..\Name-Of-App\long\path\name"
When checking what the absolute path becomes, it ends up at 262 characters.
Now I have enabled long path on Windows, so that should not be the problem.
I moved the source code and everything related somewhere with a shorter path, and it builds correctly.
At this point I assume it's either a bug or a missing feature inside nsis
Since this is known for 10 years and a fix was deemed unnecessary, one has to assume it is an intended limitation of NSIS.
Thank you for the response, I hope it can one day be included.
I never saw this Pull/Patch request, so than you so kuch for that. I at least have the possibility to compile my own NSIS. So I will probably do that with that patch (if it still works). I hope one day it can be incorporated to the main release
It MIGHT be possible to add a makensis.exe.manifest file to NSIS\Bin that unlocks long path support (the policy/registry entry also needs to be set). This has never been tested and might crash or not work.
Last edit: Anders 2024-04-10
I am not sure if a software automagically becomes long file path aware by just specifying it in the manifest (which needs to be done in VS and should be done in your build system, not on a users machine).
You probably need to use the new Windows API functions as well (suffixed with W or 2).
See the last paragraph on https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
Why would I suggest it if it has zero chance of working?