Currently any NSIS script function (not a method within a plugin) called from an uninstall section, directly or indirectly must have a name beginning with "un.". On the other hand, any NSIS script function called from an install section, directly or indirectly must NOT have a name beginning with "un."
This makes it impossible to share common code between installer and uninstaller without enclosing the function inside a macro:
!macro MYMACRO un
DetailPrint "Oh this is a very funny restriction on function names!"
So, include files like TextLog.nsh cannot be used in the uninstaller as its functions are not inside a macro.
It will be a good idea to remove this restriction on function names. An alternative solution is to allow functions whose names begin with say, "both.", to be called from both installer and uninstaller code and allow the "both." functions to call any function, "un.", "both." and other functions.
Log in to post a comment.