Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 16th May 2007, 12:11   #1
aviadlich
Junior Member
 
Join Date: Apr 2007
Posts: 35
uninstall function

I have two functions that do the same one for the install and one for the uninstall
I want to unify them under the same function (save duplicate code)
how do i do it - the compiler tells me that any call to a function during the uninstall the function name must start with un. ?
aviadlich is offline   Reply With Quote
Old 16th May 2007, 13:20   #2
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 442
I do this:
code:
!macro DualUseFunctions_ un_

function ${un_}StartServices
# ...
functionEnd

function ${un_}SetPathVar
# ...
${${un_}WordFind} "$R0" "_" "E$0" $1
# ...
${${un_}WordAdd} "$R0" ";" "-$0" $R0
functionEnd

!macroend

!insertmacro DualUseFunctions_ ""
!insertmacro DualUseFunctions_ "un."

demiller9 is offline   Reply With Quote
Old 16th May 2007, 13:44   #3
aviadlich
Junior Member
 
Join Date: Apr 2007
Posts: 35
Thanks
aviadlich is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump