InnoDependencyInstaller icon indicating copy to clipboard operation
InnoDependencyInstaller copied to clipboard

Support optional installation based on selected components

Open sippeangelo opened this issue 3 years ago • 0 comments

These are the changes we made to support optional installation based on component selection. We don't expect this to be merged as is, but maybe it's useful to someone or good as a starting point.

This is a bit of a breaking change, since Inno's "Pascal Script" doesn't support default arguments or overloads. Maybe someone has a better suggestion on how to accomplish this.

This change only really useful for custom dependencies at the moment, as all the default Dependency_Add... functions would have to be updated to accept optional component arguments too.

By providing a component name or a component boolean expression, only those components that have been selected by the user will be downloaded and installed.

By calling the Dependency_DeselectComponent function instead of Dependency_Add in the else case of your "already installed" check, your component will automatically be deselected in the component selection page (follow the argument format of WizardSelectComponents).

sippeangelo avatar Feb 04 '22 18:02 sippeangelo