Creating a Macro Component

5/10/2007

A macro component is a component that has dependencies upon other components and has no file or registry resources of its own. Macro components are useful for bundling components that must appear together in a configuration, or for bundling functionality that will be used again.

To create a macro component

  1. In Component Designer, from the File menu, choose New to create a new component definition (.sld) file.

  2. Expand the Windows XP Embedded Client (x86) tree.

  3. Right-click Components, and then choose Add a Component. The Component Properties appear in the Details pane.

  4. In the Component Properties pane, type the name and description of the macro component, and then select Macro component check box.

  5. To create a dependency on another component, follow these steps:

    1. Right-click Component or Group Dependency, and then choose Add and then choose Component Dependency. The Add Component Dependency dialog box appears.
    2. Select the component you want to include in your macro component from the component list.
    3. Choose OK.
  6. To create a dependency on a group, follow these steps:

    1. Right-click Component or Group Dependency in the tree, and then choose Add and then choose Group Dependency. The Add Component Dependency dialog box appears.
    2. Select the group you want to include in your macro from the group list.
    3. Choose OK.
  7. To allow the components that will be pulled in by this macro component to be optionally excluded from a configuration, in Target Designer, follow these steps:

    1. In the Component Properties pane, for the Prototype field, choose Browse. The Select Prototype Component dialog box appears.
    2. Under Software\Test & Development, choose Selector Prototype Component.
  8. Save the component definition.

  9. Using Component Database Manager, import the macro component into the component database.

    The macro component can now be added to a configuration by using Target Designer. When you run a dependency check on the configuration, the components upon which the macro component is dependent will be added as well.

  1. In Component Designer, from the File menu, choose New to create a new component definition (.sld) file.

  2. Expand the Windows XP Embedded Client (x86) tree.

  3. Right-click Components, and then choose Add a Component. The Component Properties appear in the Details pane.

  4. In the Component Properties pane, type the name and description of the macro component, and then select Macro component check box.

  5. To create a dependency on another component, follow these steps:

    1. Right-click Component or Group Dependency, and then choose Add and then choose Component Dependency. The Add Component Dependency dialog box appears.
    2. Select the component you want to include in your macro component from the component list.
    3. Choose OK.
  6. To create a dependency on a group, follow these steps:

    1. Right-click Component or Group Dependency in the tree, and then choose Add and then choose Group Dependency. The Add Component Dependency dialog box appears.
    2. Select the group you want to include in your macro from the group list.
    3. Choose OK.
  7. To allow the components that will be pulled in by this macro component to be optionally excluded from a configuration, in Target Designer, follow these steps:

    1. In the Component Properties pane, for the Prototype field, choose Browse. The Select Prototype Component dialog box appears.
    2. Under Software\Test & Development, choose Selector Prototype Component.
  8. Save the component definition.

  9. Using Component Database Manager, import the macro component into the component database.

    The macro component can now be added to a configuration by using Target Designer. When you run a dependency check on the configuration, the components upon which the macro component is dependent will be added as well.

See Also

Concepts

Macro Components

Other Resources

Using Macro Components