Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

shortcut components


3 replies to this topic

Kelter

Kelter
  • Full Members
  • 14 posts

Posted 06 December 2010 - 17:33

Since i want users to be able to turn on and off desktop and start menu shortcuts independently, i have separated icons into different components. I set the component conditions to include DT_ICONS="TRUE" for the desktop icons, and SM_ICONS="TRUE" for the stat menu icons. i set these components transitive bit (Reevaluate condition = Yes), and i set the properties associated with a couple checkboxes to SM_ICONS and DT_ICONS and their values set to TRUE. I can see in the log that these values are getting set and cleared as i check and uncheck the checkboxes, yet the state of these components doesn't get modified during a modify operation.

During the initial installation, the installation of the shortcuts depends on the states of those checkboxes, but on a modify operation, changing the checkboxes doesn't affect anything. On a repair, however, this works just fine.

So obviously the takeaway is that conditions of transitive components are only reevaluated when their features are being REINSTALLed.

What's the best way around this?

The two ideas that i'm thinking of are (1) always set REINSTALL to include a list of the names of features that contain shortcut components, or (2) gather all of the shortcut components into a single feature, always set REINSTALL toi include this feature, and add to the conditions on each one of these components a term that will make sure it's only installed if it's associated component is installed...this is faulty because component conditions can't depend on the states or actions of other components.

so is option 1 viable? is there a better way to do this?

Thank you in advance!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 December 2010 - 14:53

To make things selectable by users, use features. Not component conditions. Also not feature conditions. But put the shortcut components in separate features and let users select them in the feature tree dialog or using checkboxes (using control events AddLocal and Remove, respectively, on the "Next" button)

Kelter

Kelter
  • Full Members
  • 14 posts

Posted 07 December 2010 - 16:31

Part of the problem is that the shortcuts should only be installed if their respective components are installed. (Granularity) For this reason the shortcut components all fall under the same features as the components containing the shortcut targets. Some of these are in merge modules. What you are suggesting would mean that to "modify" an installation in order to add the shortcuts, i would have to reinstall whole merge modules.

one goal here is to allow people who are using our merge modules to simply set a property to determine whether or not the shortcuts should be installed (control). is there a way to balance control and granularity?

even if i were to put the shortcut components into a single feature, and "AddLocal" the feature, the individual components would have to include conditions depend on the states of other components which we've already talked about.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 December 2010 - 10:19

You could put each shortcut in its own feature which is a sub-feature of the respective files. Not possible in merge modules however.