Archive: Install vs. uninstall functions


Install vs. uninstall functions
  I find myself duplicating a lot of functions, since they are used in both installer and uninstaller. As you know, uninstaller can call only functions with "un." prefix, and they in turn can call only "un." functions.

Given the fact that the optimizer will throw away unused functions anyway, this limitations looks superfluous and leads to code duplication -> problems with maintenance.

BTW, how can one become a member of NSIS team and get access to SourceForge source tree? If intensity of my load at work will permit, I probably could to try to implement this change myself (I am quite experienced C++ programmer).

Ivan


The optimizer doesn't exactly throws them away, it zeros them. If you do want to duplicate just make a macro out of it and insert that macro in two functions, install and uninstall. If you need to call functions from within that macro use ${UN?} define:


?

>Call ${UN?}.otherFunction
>!macroend
>
If you want to get into the NSIS team you will have to just do stuff and if we see that you do a lot of good stuff you will get in (as vague as possible :D)... There are no rules or something like that.