Increase Allowable File Path Length

2019-08-30 00:07发布

问题:

Is it possible to increase the file path/string length for NSIS? I am attempting to use the function FILE with a path that is rather long and I get the compile error:

File: failed opening file "..\..\..\..\12d\10.00\DPTI_Customisation\\DESIGN_12d10\DPTI_Design_User\DPTI_D_Toolbars\DPTI_D_Create_D_Boundaries_for_Tin.slx"

Is it possible to increase the allowable length like how you can increase the $NSIS_MAX_STRLEN varaible length?

This thread says that the error is caused by the file path being too long.

Edit
Heres the code:

FILE /r "..\..\..\..\12d\10.00\DPTI_Customisation\"
# The folder DPTI_Customisation contains many sub folders and files

回答1:

You could try using the unicode version of NSIS.

Alternatively, I wonder if you could use multiple calls to cd in order to reduce your path length.

Ref: http://nsis.sourceforge.net/Docs/Chapter5.html#5.1.5