In Inno Setup, I have a main script, which is the "main system", which means everything that is absolutely necessary for our software to install / run in general. In addition, I write script files for each main function, which may or may not be compiled into the installer. At the top of the main script file, I include other script files ...
#include "AdditionalOption.iss"
#include "AnotherOption.iss"
When compiling this main script, face compilation can choose whether to compile these specific parameters in the installer at all (to save file size for various reasons).
The problem occurs when I have special code in the main script that depends on something in one of these additional scripts. For example...
procedure InitializeWizard();
begin
//Creates custom wizard page only if "AdditionalOption.iss" is compiled
CreatePageForAdditionalOption;
//Creates custom wizard page only if "AnotherOption.iss" is compiled
CreatePageForAnotherOption;
end;
InitializeWizard , , . script, , , , script.
Delphi :
{$DEFINE ADD_OPT}
{$DEFINE ANO_OPT}
procedure InitializeWizard();
begin
{$IFDEF ADD_OPT}
CreatePageForAdditionalOption;
{$ENDIF}
{$IFDEF ANO_OPT}
CreatePageForAnotherOption;
{$ENDIF}
end;
, Delphi. Inno Setup?