A macro calling a macro is invalid?
Being purist that I am, I use the following technique to implement a single function for both install and uninstall sections, without writing it twice:
!macro MACROFUNC un0Calling MyFunc and un.MyFunc from a script works perfectly, if it is a direct call:
>Function ${un0}MyFunc
# NSIS code that works perfectly well.
>FunctionEnd
>!macroend
>!insertmacro MACROFUNC ""
>!insertmacro MACROUNFUNC "un."
Push "somestring"
call MyFunc
>
However, when I try to further "macrosize" the above by:
macro MACRO_INST param
Push${param}
call MyFunc
>!macroend
>
So that I can call the function in a single line:
MACRO_INST "somestring"
NSIS compiler fails with an error:Invalid command: MACRO_INSTWhat am I doing wrong? What am I missing?
Thanks.