VMware Cloud Community
JohnRocha
Enthusiast
Enthusiast
Jump to solution

How to reuse custom action in different installers

How do reuse my custom actions in different installers?

We use install builder for our various products.

I use the <actionDefinition> to create some of my own actions.

I would like those custom actions to be available to all of my install builder instances.

How would I do this?

I see a way to share components using the <include> directive. How could I do this for the custom actions?

Labels (1)
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
michieldhont_
Hot Shot
Hot Shot
Jump to solution

Hi @JohnRocha,

Since you have several functions you can create a single component, for example:

 

<component name="functions">
  ...
 <functionDefinitionList>
  <actionDefinition name"action1">
     ...
  </actionDefinition>
  <actionDefinition name"action2">
     ...
  </actionDefinition>

 </functionDefinitionList>
 ...
<component>

 

 

You can then include the functions component as follows:

    

 

<project>
 ...
<componentList>
    <include file="functions.xml" />
</componentList>
 ...
</project>

 

 

Best regards,

Michiel

View solution in original post

0 Kudos
3 Replies
michieldhont_
Hot Shot
Hot Shot
Jump to solution

Hi @JohnRocha,

You can add an <include> tag inside any list, so also inside the <functionDefinitionList>. You can find more information about it here:

https://clients.bitrock.com/installbuilder/docs/installbuilder-userguide.html#adding_components_from...

If you plan to use more custom actions I recommend using a component that contains all the actions, and include it as a "library" component inside all your installers.

Best regards,

Michiel

0 Kudos
JohnRocha
Enthusiast
Enthusiast
Jump to solution

Hello @michieldhont_ ,

Thank you for the suggestion.

How does placing the custom actions in a component work?

Looking at the documentation, I see that

  1. <actionDefinition> can only be a child of <functionDefinitionList>
  2. <functionDefinitionList> an only be a child of <project>

How would I create component that provides a <functionDefinitionList>?

I understand that I could crate separate files for each <actionDefintion> and then pull those into the <functionDefinitionList> but that really doesn't scale well since we have several functions that we want to re-use.

0 Kudos
michieldhont_
Hot Shot
Hot Shot
Jump to solution

Hi @JohnRocha,

Since you have several functions you can create a single component, for example:

 

<component name="functions">
  ...
 <functionDefinitionList>
  <actionDefinition name"action1">
     ...
  </actionDefinition>
  <actionDefinition name"action2">
     ...
  </actionDefinition>

 </functionDefinitionList>
 ...
<component>

 

 

You can then include the functions component as follows:

    

 

<project>
 ...
<componentList>
    <include file="functions.xml" />
</componentList>
 ...
</project>

 

 

Best regards,

Michiel

0 Kudos