Generating an Installer

Basic steps in generating an installer:
  1. Export project to pepare for packaging.
  2. Create a new Installer Project.
  3. Assemble your installer for deployment.
  4. Locate and launch your installer.


1. Export project to prepare for packaging.


  • To export the Contact Manager product, select the menu item File > Export. A list of export wizards is shown.
  • From the list, select the Export RCP Product wizard. Note: In other versions of Eclipse, the Export RCP Product is under Other.
  • Click Next


Export RCP Product


The wizard fields are set to default values and the Contact Manager product is ready for export. 
  • If the Configuration File field is not automatically populated or if you have multiple RCP Application projects defined, you can use the Browse… button to select the appropriate configuration. 
  • For this tutorial, select contactmanager.product.
Note: If you decide to export to another directory, take careful note of it. When you create an installer for your application make sure that the install-image directory is the location where you have exported the product.
  • Click Finish to complete the Export process. 
That’s the complete cycle of generating an application to exporting it for packaging.

Test the exported project

  • To test the exported project, navigate to the Destination directory specified in the previous step (the explorer window should already be opened at the location specified). 
  • Open the ...install-image\eclipse sub-directory and double click on eclipse.exe. This launches the Contact Manager application. This is the the same window opened in the previous step when you clicked the Launch an Eclipse Application link.


Note: If you are using Eclipse v3.3 and above and you get an error dialog that says, "The eclipse executable launcher was unable to locate its companion shared library.", you need to copy the org.eclipse.equinox.launcher.win32.win32.x86_vxxx directory and org.eclipse.equinox.launcher_vxxx.jar jar file from your eclipse\plugins directory to your build\RCP\install-image\eclipse\plugins directory. Also, if you are unable to launch the Contact Manager from Eclipse, open the contactmanager.product file, switch to the Configuration tab and click the Add Required Plug-ins button and Save.


2. Create a New Installer Project

Select a wizard

  • Choose the menu item File > New > Project, or click New on the toolbar.
  • Choose New Installer Project under RCP.
  • Click Next.
Note: Generating an installer project is simple, but you should know what you want your installer to do before you start.

Create an Installer Project

The is the first page of the New Installer Project wizard. 
  • Enter your company name and the product name. We’re using “Instantiations” as the company name and “Contact Manager” as the product name. The remaining fields are automatically filled in while you type the company and product name. You may edit them if you need to. 
  • Make sure that the install-image directory is the location to which you have exported the product. 
  • Select the steps in the Install process. This controls the number and type of pages that the final installer contains. We’re using the default but any of the pages may be omitted. You have to select a couple, though, or the installer won’t be much of an installer.
  • Click Next to continue.

Welcome Page

Each page contains a title and a description. The installer pages that are generated look remarkably similar to the pages of this wizard, by the way. The title of the installer pages will be bold and the description text will be underneath it, just as on these wizard pages (and on most Eclipse wizard pages).
  • Now we begin defining the pages of the installer. The first page is an introduction or the Welcome page. Its default text contains the string “<description-here>” which is where a description of the product should go. We replaced it with “managing contacts.” You may, of course, replace the entire default value with your own text.
  • Click Next to continue.

License Agreement

  • Review and edit the License agreement. Standard boilerplate is included but you should review and edit it for your product. Your legal representatives would probably have an opinion here. Note that the company name and product name are inserted in appropriate places.
  • Click Next to continue.

Default Install Directory

  • Set the default directory. This is where the executable goes when you install your product. You can modify or leave the default.
  • Click Finish to generate the installer project. 

Review the files generated (edit them if necessary)

Package Explorer

  • ContactManagerInstaller.java
    The source code to the installer is in ContactManagerInstaller.java. The code relies on a library of installer functions, which has a public API. That means you can extend or modify the installer simply by editing the generated code.
  • install.properties
    If you open the install.properties file (it is in the src folder) in a text editor you’ll see that all the text values entered while running the wizard are defined there. You can edit them without re-running the wizard if you need to.
  • product.properties
    The product name and version number are stored in the product.properties file under build-settings.
  • build-installer.xml
    Contains the Ant script that generates the installer.

3. Assemble your installer for deployment


To assemble the installer for deployment, run the build-installer.xml Ant script:
  • Select the script and choose Run As > Ant Build…. That opens up the Ant launcher dialog.

  • Confirm that the default target (build_installer) is checked then select the JRE page.
  • Select the “Run in the same JRE as the workspace” option then click the Run button. 
That will generate the installer files into your build directory. If your user name is James Q. Code, as in this example, then on MS Windows the build directory is found at C:\Documents and Settings\James Q. Coder\build (or wherever user-specific files are saved, if not to the C: drive).


4. Locate and launch your installer

If you used the default install-image directory, as in this example, then on MS Windows the build directory can be found at C:\Documents and Settings\user name\build\.

  • Open up the ContactManager sub-directory of the build directory. Within its product directory you’ll find native installers that can be distributed to users of your application. In this case, the installer we’re interested in is the Windows installer: ContactManager_v1.0.0.exe.
  • You can run it from there or copy it to wherever you’d like to test the installation then launch it. You’ll see the installer pages corresponding to the pages selected in the installer generation wizard. Click through them to confirm that they are generated correctly. (You’ll need to click the radio button on the license page if you included one.)
  • After installing, you can review the files installed at the location specified in the previous step. By default, it is located at C:\Program Files\ Instantiations\Contact Manager.

That concludes this tutorial. For more documentation, go to the Eclipse help sytem or the Instantiations, Inc. website.