Archive: File doesn't seem to handle / in paths


File doesn't seem to handle / in paths
Our build system uses cygwin tools, so file name & path defines passed on the command line are easier done using forward slashes (/) instead of back slashes (\). I thought previous versions of NSIS supported them (as long as it didn't start with a /)? but the current version doesn't seem to.

E.g.
Given
Command line defined: "OPT_CRTL_LOCAL=C:/Progra~1/Micros~2/REDIST/"
Command line defined: "OPT_CRTL_FILENAME=msvcrt.dll"

Section "CRTLIB" section_crtlib_local
SectionIn 2
SetOutPath $INSTDIR\${PRODUCT}\bin

File "${OPT_CRTL_LOCAL}${OPT_CRTL_FILENAME}"

SectionEnd

results in
File: failed opening file "msvcrt.dll"
Error in script "./AbiWord.nsi" on line 562 -- aborting creation process

using backslashes works (at least when overriding the define, as its a pain to get them from the make file for defining on the command line). Any suggestions for workarounds other than figuring out how to get a \ in defines from the makefiles?

Thanks,
Jeremy


I don't think it really supported it sometime, it just slipped by. NSIS needs to process the path to get the file name so it can extract files. To do that it searches for backslashes because that's the Windows standard. On the other hand, !cd just passes what it gets to SetCurrentDirecetory, so this might work:

!cd "${OPT_CRTL_LOCAL}"
File "${OPT_CRTL_FILENAME}"

I think that will work.
You always have such simple solutions to my problems!

Thank you


nsis is very mighty, there's always a simple solution :D