Request MUI example with multiple install directories for 'family' of apps
I've seen a number of posts about using multiple installation directories. It hasn't jelled in my mind, and I think a "best practices" example using the Modern-UI would be VERY helpful.
I've looked at MUI InstallOptions.nsi and think I can maybe figure out something, but that would perhaps be reinventing the wheel, and the MUI author (or other expert) would seem the best person to provide something like a template to clone from.
The application I'm working on is part of a "family" of freeware apps. Each app would be in its own directory and use something like a FAMILY_PATH registry variable or environment variable to find resources that are used in common "family wide" by multiple applications.
I want to allow the end-user to provide the installation directory for that specific executable, and a separate resource path. The default might be something like:
C:\Program Files
C:\Program Files\Family
C:\Program Files\Family\Resources
C:\Program Files\Family\BasicApp
Another person might use a simiar nsis script to install
C:\Program Files\Family\AdvancedApp
It could detect that Family\Resources were already installed and proceed accordingly.
Each application might be available "bare bones" or with a "StarterKit" with a basic resource. The apps aren't usable until there is at least one resource installed (there are hundreds of resources). A concern is having redundant resources with the directory structure ending up like:
C:\Program Files\BasicApp\Resources
C:\Program Files\AdvancedApp\Resources
A great example might handle reading and possibly writing the actual FAMILY_PATH environment variable with something like:
WriteEnvStr.nsh
(perhaps using a separate component page?)
The uninstall would seem to be tricky ... to detect if another "family application" is installed and use that information to control whether the resources could/should be removed.
Does something like this already exist? I've seen previous examples, but my impression is that many are obsolete with nsis version 2.0 and the MUI.
Such an example would be greatly appreciated.