15.1. Product Configuration
So far your RCP applications can only get started from Eclipse itself. We will now create a stand-alone program, which is called "product".
Tip
In Eclipse terms a product is everything that goes with your application, including all the plugs-ins it depends on, a program to run the application and any branding (icons, etc.) of the application.To create a product you need a product configuration. This configuration file contains all the information about required packages, configuration file, etc. The configuration file is used for exporting / creating your product.
Create a new RCP project "de.vogella.rcp.intro.deploy" based on the "RCP application with a view" template. Validate that this plugin runs without problems.
Right-click on your project and select New -> Product Configuration.
Name your product configuration "de.vogella.rcp.intro.deploy.product". Select "Create a configuration file with basis settings". Press finish.
This will create your product configuration file "de.vogella.rcp.intro.deploy.product" and open the "Overview" Tab of your product configuration.
The overview tab for the product configuration file "de.vogella.rcp.intro.deploy.product" should still be open.
Use the id "de.vogella.rcp.intro.deploy.product" and name "DeployTest" for your product. The name of your product is the name which will be displayed in the title of the window.
Tip
You can change this default name in class ApplicationWorkbenchWindowAdvisor in the method preWindowOpen() via the configurer.setTitle("New title");)
Press New under product configuration.
Maintain the following values. Select the application of your plugin "de.vogella.rcp.intro.deploy.application". Press finish.
As a result the "Product Definition" part should now be filled.
Tip
The product identifier is stored as extension in the plugin in which you maintain your product configuration file. Open your plugin.xml and have a look at the "org.eclipse.runtime.products" extension point.
Tip
A product can either be based on plugins or features. This setting is done on the overview tab.
See Eclipse Feature Project - Tutorial for details on how to create a feature project.
In this example we are using a plugin based product configuration.
Switch to the "Dependencies" Tab and click "Add". Select the plugin "de.vogella.rcp.intro.deploy". Press "Add Required Plug-ins". Save.
On the overview tab press synchronize and then press the launch application (or the big run button).
Tip
Synchronize will allign your product configuration with the other existing configuration files. .
Tip
If you receive the error "Dependent plug-in could not be loaded" or "Application could not be found" then you may have to adjust your launch configuration configuration. Open the launch configuration and press "Add required Plug-ins".
Tip
The launch configuration for your product is automatically created and updated based on your product configuration, e.g. the selected plugins. Changes in the launch configuration will not automatically update the product configuration.The tab "Splash" allows you to specify the splash screen. Your application will use the splash.bmp picture which must be in the plugin.xml directory. The file must be a bmp file and it must be called splash.bmp.
You can add a message and a process bar to your splash screen by selecting the corresponding settings.
Create a "splash.bmp" via your favority graphics tool and save it in the "de.vogella.rcp.intro.deploy" project. Maintain the the following.
If you now start your application you should see a slashscreen. For example I used a screenshot of my webpage.
In this example I do not use this.
The standard Eclipse About Dialog can be branded. You can add an icon and / or and a text to your application.
Add the standard command "org.eclipse.ui.help.about" to your menu to open the about dialog. See Eclipse Commands Tutorial for information how to use Eclipse standard commands.
In this example I do not use this.
The launcher is the executable program that is created during the deployment of the product. Per default "eclipse.exe" with an "eclipse" icon is created. To change this select the launcher tab of your product configuration.
Here you can specify the name of the application and the icon which should be used. Make sure the deep of the icons is correctly maintained otherwise Eclipse will not use these icons.
In the launcher section you can also specify parameters to your Eclipse program or JVM arguments.
0 comments:
Post a Comment