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
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.
- In Eclipse, select File>Import from the menu.
- Select the Existing Projects into Workspace option.
- Select the Select Archive File option, and browse for the archive, example-paths-override-project.zip. Be sure all three projects are selected.
- 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.
- Extract the example-paths-override-project.zip file.
- In Eclipse, select Window>Preferences from the menu, expand Plug-in Development, and select Target Platform.
- Select your active target platform, and click Edit.
- Click Add, select Directory, browse for the plugins folder in the extracted example folder, and click Next.
- Click Finish twice.
- 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:
Build the Site
After your customizations are complete, you need to build the site for them.
- Open the site.xml file in com.genuitec.pulse.installer.example.path.overrides.updatesite project.
- 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.
- Close the Admin Console.
- Navigate to <admin-console installation folder>/local-storage/metavc/environmental-policies.
- Open the folder of the Environmental Policy you want to customize with your changes. The Installers built using this policy will contain the customizations.
- Create an installer folder in the chosen Environmental Policy folder.
- 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.
- Start the Admin Console. You will see an outgoing change without description for the modified environmental policy.
- 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.