how to use StrRep
I need to convert $INSTDIR for a Java properties file, so I have to replace the back slashes with forward slashes in the path.
I read about StrRep but I don't understand the syntax for using this function/macro.
In a Function, I write this:
!include StrFunc.nsh
...
Function configure
...
StrCpy $5 $INSTDIR
Push "$5"
Push "\"
Push "/"
Call StrRep
Pop "$6"
...
FunctionEnd
This results in:
Processed 1 file, writing output:
Adding plug-ins initializing function... Done!
Error: resolving install function "StrRep" in function "configure"
Note: uninstall functions must begin with "un.", and install functions must not
Error - aborting creation process
If I called it as the example here, http://nsis.sourceforge.net/StrRep, suggests, I get an argument error.
${StrRep} $5 $INSTDIR "\" "/"
!insertmacro: macro "FUNCTION_STRING_StrRep" requires 0 parameter(s), passed 4!
Can someone please explain how to use/setup. Thanks.