Advanced Installer Customization

You can extend the installers generated by SDC to make them suit your needs. The purpose of this appendix is to show how to cause SDC Admin Console to pick up installer customizations. Two examples are provided:

  • ChangeDefaultInstallFolderModule.java: This example lets you set a custom default installation directory for the SDC installers. Inside this class, you should write your logic to calculate the installation directory.
  • ChangeDefaultWorkspaceProcessor.java: This example lets you write values into the config.ini properties file once the installation is complete. Inside this class, you can write the properties you need, such as the default workspace directory.

For further details on extending installers, contact your SDC sales representative.

Set Up Your Workspace to Extend OneInstall Installers

Install Eclipse
Create and install an Eclipse IDE for RCP and RAP package. This is necessary because you will need the Plugin Development Environment.

Add Example Projects to Your Workspace
Download example projects at example-paths-override-project.zip. This zip contains three projects that should be added into the workspace.

  1. In Eclipse, select File>Import from the menu.
  2. Select the Existing Projects into Workspace option.
  3. Select the Select Archive File option, and browse for the archive, example-paths-override-project.zip. Be sure all three projects are selected.
  4. Click Finish.

The projects will be imported into your workspace.

Add the Missing Plug-ins
You need to include some features into your workspace to be able to compile the OneInstall extensions. The example Includes a plugins folder, which contains four plug-ins that need to be added to your target platform.

  1. Extract the example-paths-override-project.zip file.
  2. In Eclipse, select Window>Preferences from the menu, expand Plug-in Development, and select Target Platform.
  3. Select your active target platform, and click Edit.
  4. Click Add, select Directory, browse for the plugins folder in the extracted example folder, and click Next.
  5. Click Finish twice.
  6. Reload your active target platform.

After this, there should be no errors on the projects you imported.

Customize and Build the Examples

Customize the Examples
At this point, you can customize the examples to suit your needs. The two classes you want to customize are:

com.genuitec.pulse.installer.example.path.overrides.ChangeDefaultInstallFolderModule and 
com.genuitec.pulse.installer.example.path.overrides.ChangeDefaultWorkspaceProcessor.

Build the Site
After your customizations are complete, you need to build the site for them.

  1. Open the site.xml file in com.genuitec.pulse.installer.example.path.overrides.updatesite project.
  2. Select the Build All option to create two folders, features and plugins, and two files artifacts.jar and content.jar.

Set Up Admin Console to Pick Up the Customization
Now you are ready to have the Admin Console pick up the installer customizations.

  1. Close the Admin Console.
  2. Navigate to <admin-console installation folder>/local-storage/metavc/environmental-policies.
  3. Open the folder of the Environmental Policy you want to customize with your changes. The Installers built using this policy will contain the customizations.
  4. Create an installer folder in the chosen Environmental Policy folder.
  5. Using your system explorer, copy the contents of the com.genuitec.pulse.installer.example.path.overrides.updatesite project from your workspace location on disk to the newly created installer folder. It’s important to copy the sequences.xml and installer.xml files. These files instruct SDC to include the extensions in the installers associated with the environmental policy, and instructs the installer runtime to include the extra logic that tailors the paths.

    Note: If you are unsure of the project file location, right-click the project in the Project Explorer view, select Properties, and click Resource to find the location on disk.
  6. Start the Admin Console. You will see an outgoing change without description for the modified environmental policy.
  7. Commit and Promote the change.

After this, you can assign this environmental policy to any package, and the installer generated for will include your customizations.