|
|
#1 |
|
Junior Member
Join Date: Dec 2008
Posts: 3
|
macro within a macro
I've seen (and am using) the code to define a single function and use it for both installer and uninstaller.
I've run into a problem where I'm using a third-party macro within my function and the builder is complaining that I need to have "un." before uninstall functions and not in front of install functions. How do I get around this without writing two functions? code: I've tried ${un}${ThirdPartyMacro}, ${${un}ThirdPartyMacro} and ${un.ThirdPartyMacro}, and none of them work. The weird thing is that "un.ThirdPartyMacro" is actually defined in the third party nsh file. Thanks! Mitch |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
it would you know, help if you said the name of the macro, but, the nsh probably has so way to define the uninstall macro
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2008
Posts: 3
|
In one case it's a function from the StrFunc.nsh. Using ${StrRep} in the install function, and ${UnStrRep} in the separate uninstall function works, but that's the only difference in an otherwise lengthy function, which I would like to maintain only one copy of.
In the second case, I turned the code from here: http://nsis.sourceforge.net/REG_MULTI_SZ_Reader, into a nsh file, and defined 2 macros, ReadRegMulti & un.ReadRegMulti. I'm certainly willing to entertain the notion that I didn't set it up correctly, given my lack of understanding of the NSIS scripting language, so any help in configuring it correctly would be swell! code: |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|