Reputation: 6721
I currently have an application setup created in Inno Setup which contains the main application and all the plugins (as components).
However, the powers that be want to be able to sell the plugins individually so they want me create a standalone setup file for the main application and standalone setup files for each plugin.
Is there a canonical way to accomplish this with Inno Setup?
Upvotes: 1
Views: 700
Reputation: 6721
My answer was provided by TLama (and Miral) in this question.
In the main application setup .iss, add a registry key with the app installation dir:
[Registry]
Root: HKLM; Subkey: "Software\Company\{#AppName}"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
And in the plugin .iss we simply use that key if it exists, and if not install to the default path:
[Setup]
DefaultDirName={reg:HKLM\Software\Company\{#AppName},InstallPath|{pf}\Company\{#AppName}}
DisableProgramGroupPage=yes
DirExistsWarning=no
In this example, I've also disabled adding program group in the start menu for the plugin, and suppressed the warning that we're installing to a non-empty dir (since the main app is already there that's always going to be true).
Additionally, this question has information on how the DefaultDirName can be changed dynamically through the [Code]
section.
Upvotes: 1