Code Design Question
Hi there,
i started 1 year ago with nsis to install 2 different appz with 2 different scripts. Now i have to deal with more than these 2 appz, so my wish is to rationalize some things.
I can code a little of e.g. vb or c++ etc., but shure nothing quite good cause thats not the major part of my work. But maybe you can bring me in the right direction, so i can read the rest in the docs:
Some parts of the 2 installations share exactly the same code - for each in every script. My plan was to put the doubled code outside as a NSI File and call it with the !include commando.
First time this was OK, but now i checked, that variables defined as global in the new NSI file are not known in the main script if i run the script in a other section (.oninit) than where i need the variable? Maybe i understand the word "global" in a wrong context???
For example: The external NSI should check if a dedicated app is install and detect things like version etc. (its the same to do for all appz). Inside the 2 different main scripts i want to do individual things depending of the detection routines in the external script.
At the moment i deal not with macros, cause i dont really understand the advantage/difference or how i call them correctly. But maybe macros could be my solution?
Bye