[CMake] CPack/NSIS installation of specific components

Doug Gregor doug.gregor at gmail.com
Sat Apr 19 14:32:46 EDT 2008


On Fri, Apr 18, 2008 at 11:06 AM, Doug Gregor <doug.gregor at gmail.com> wrote:
> On Thu, Apr 17, 2008 at 9:33 PM, Doug Gregor <doug.gregor at gmail.com> wrote:
>  >  Okay, the bug report is here:
>  >
>  >   http://public.kitware.com/Bug/view.php?id=6847
>  >
>  >  The archive attached to it contains the patch (*with* the additional
>  >  header) and an example with a few components. I also went ahead and
>  >  implemented the "component groups" feature.
>
>  ... and now there's a "v2" patch on there, which contains the first
>  patch plus add/remove functionality. If you run the installer again
>  (after already installing the app, or parts of it), the components
>  selected will be exactly those components you installed the first time
>  around. You can select/deselect components and your installation will
>  be updated to reflect your choices.

I've almost implemented every part of this feature that I like... the
new "v3" patch in the bug tracker adds two new features:

  - Component descriptions: if provided, these will show up when the
user hovers the mouse pointer over the component in the installer.
Just set the _DESCRIPTION variable for each component to enable this
feature.

  - Component dependencies: if provided, the installer will make sure
that all of the inter-component dependencies are satisfied. For
example, if you select a component "D" that depends on "B" and "C"
(directly), and where "B" also depends on "A", then the installer will
go ahead and select "A", and "B", and "C" if they weren't already.
Then, if you then deselect "B", the installer will also deselect "D"
(since "D" can no longer be used). This was a pain to implement :)

The patch is getting large, but it is backward-compatible and degrades
gracefully when some information is missing. If you don't provide a
list of components, the "Components" page won't even show up. If you
don't provide any component descriptions, the "description" box will
be removed from the resulting installer, etc. Of course, it's okay to
not specify dependencies when you don't have any.

Only one feature to go before I call this patch done: I'd like to
support installation types, which preselects sets of components. NSIS
can do this; we just need CPack syntax and support in the NSIS
generator.

Comments welcome :)

  - Doug


More information about the CMake mailing list