![]() |
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: code: 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. code: !insertmacro: macro "FUNCTION_STRING_StrRep" requires 0 parameter(s), passed 4! Can someone please explain how to use/setup. Thanks. |
Wiki's StrRep function is a little different from that in StrFunc header. If you use the header, you should use ${StrRep} first outside of sections and functions and before you use it to implement the actual function (or the error you described happens). For else, it's the same.
I plan in the future to replace that header with UseFunc so that this easy inclusion syntax found on this StrFunc header can be exploited more. |
| All times are GMT. The time now is 04:57. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.