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

Components


3 replies to this topic

dforsdike

dforsdike
  • Members
  • 3 posts

Posted 09 July 2003 - 11:29

I have a setup that is supposed to install individual components and run particular scripts from the on installed event.

The problem is that if an individual component is selected all components are installed. The problem i think is because i have called the ComponentSetupTypeSet function and defined a setup type which installs all components.

This is the first time i have created a setup in this way, where i would like individual components selected at installation run time.

I am confuseed as to what functions to call to get the components that are selected during the installation , and generally what is needed to only run/install the selected components .

can anybody help?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 July 2003 - 11:39

Either call ComponentSelectItem with FALSE for each component you want unselected.
Or create an additional setup type where all components are deselected.

dforsdike

dforsdike
  • Members
  • 3 posts

Posted 09 July 2003 - 12:00

Thanks for the prompt reply.

I have tried what you suggested and made all components in my CUSTOM setup type unselected, but as i call componentSetupTypeSet (MEDIA, "CUSTOM"); and then ComponentTransferData (MEDIA) no components are installed.

What functions do i have to call to set the dialog selected components to MEDIA?

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 09 July 2003 - 15:19

There are two places that you can set the component property. One is in the IDE by setting a check mark in the component under the setuptype. The other place is in your script, somewhere before you move the media. The script function is ComponentSelectItem ( MEDIA , YOUR_COMPONENT , TRUE );

How do you decide where to set it? It depends on your installation needs. If you have a fixed method, use the IDE. If you need to vary which compenent is installed, then use the script method. ( IDE = Static, Script = Dynamic )
When the script executes, it overrides any setting you had in the IDE’s component selections setup type.

Below is a script example that sets components TRUE or FALSE based on the value in the global variable szLanguageType. In this example, the user selected what language package they wanted installed.

CODE

function Set_Components_True_False_()

begin

// Set COMMON_COMPONENT = TRUE
ComponentSelectItem ( MEDIA , COMMON_COMPONENT , TRUE  );


// Set langage components
if szLanguageType = ENGLISH_COMPONENT then
     ComponentSelectItem ( MEDIA , ENGLISH_COMPONENT , TRUE  );
     ComponentSelectItem ( MEDIA , MEXICAN_COMPONENT , FALSE );
     ComponentSelectItem ( MEDIA , SPANISH_COMPONENT , FALSE );
elseif szLanguageType = MEXICAN_COMPONENT then
      ComponentSelectItem ( MEDIA , MEXICAN_COMPONENT , TRUE  );
      ComponentSelectItem ( MEDIA , SPANISH_COMPONENT , FALSE );
      ComponentSelectItem ( MEDIA , ENGLISH_COMPONENT , FALSE );
elseif szLanguageType = SPANISH_COMPONENT then
     ComponentSelectItem ( MEDIA , SPANISH_COMPONENT , TRUE  );
     ComponentSelectItem ( MEDIA , MEXICAN_COMPONENT , FALSE );
     ComponentSelectItem ( MEDIA , ENGLISH_COMPONENT , FALSE );
endif;
   
end;