Search code examples
eclipse-rcptycho

Tycho - Eclipse RCP Product (re)branding issue : wrong splash screen shown


Goal:

I would like to make an Eclipse RCP product feature-based with existing Eclipse.org features and additional features of my own.

Introduction:

To start fresh, I've followed the Lars Vogel's Eclipse Tycho tutorial up to step 9.

I made just few adjustments:

  • I'm using the latest version of Eclips RCP platform (Oxygen)
  • I'm using the latest version of Eclipse Tycho (1.0.0)
  • I had to set the autostart-mode of the plugins part of the configuration of the product (c.f. com.vogella.tycho.rcp.product file)
  • I've added these two branding files
    • the "splash.bmp" image in the root folder of the com.vogella.tycho.rcp plugin, furthermore I've added the splash.bmp to binary build defined by the build.properties file
    • the "icons/product.ico" icon to com.vogella.tycho.product project
  • finally I've completed the definition of the product, defined by com.vogella.tycho.rcp.product file, with the icon and and the location of the splash image.

... I built the product with Maven 3, executing the following command from the root project folder:

mvn clean verify

And finally I made a smoke test:

run-product.bat

Outcome: the startup is as expected, the icon appears in the taskbar and the right splash screen show-up. alright !

The issue:

Now, I add to the production definition exactly one feature from Eclipse.org : org.eclipse.epp.package.java.feature

Then I redo the build and the smoke test ... and unfortunately it is the Eclipse "Oxygen" splash screen that shows-up ...

How could I prevent the Eclipse "Oxygen" splash screen to show up and to have my splash screen instead ?

Product definition file:

<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="com.vogella.tycho.rcp" uid="foo" id="com.vogella.tycho.rcp.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="1.0.0.qualifier" useFeatures="true" includeLaunchers="true">
   <configIni use="default"></configIni>
   <launcherArgs>
      <programArgs>-clearPersistedState</programArgs>
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
   </launcherArgs>
   <windowImages/>
   <splash location="com.vogella.tycho.rcp" />
   <launcher name="foo">
      <win useIco="true">
        <ico path="icons/product.ico"/>
        <bmp/>
      </win>
   </launcher>
   <vm>
   </vm>
   <plugins>
   </plugins>
   <features>
      <feature id="org.eclipse.e4.rcp" installMode="root"/>
      <feature id="com.vogella.tycho.feature" version="1.0.0.qualifier"/>
      <feature id="org.eclipse.emf.common"/>
      <feature id="org.eclipse.emf.ecore"/>
      <feature id="org.eclipse.epp.package.java.feature"/>
   </features>
   <configurations>
      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="3" />
      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="3" />
   </configurations>
</product>

Attachement:

Eclipse Project achive


Solution

  • After hours of debugging the Maven build, I figured out that the feature "org.eclipse.epp.package.java.feature" seems to contain a configuration with touchpoints to modify the config.ini and therefore change values of osgi.splashPath, eclipse.product and eclipse.application.

    So I decided to change the product definition file, and to use the "org.eclipse.jdt" feature (instead of "org.eclipse.epp.package.java.feature") and added its dependencies to the product definition file.

    Now both the new icon and new splash screen appears as desired.

    Here is the final product definition file:

    <?xml version="1.0" encoding="UTF-8"?>
    <?pde version="3.5"?>
    
    <product name="com.vogella.tycho.rcp" uid="foo" id="com.hipperos.workbench.rcp.product" application="org.eclipse.ui.ide.workbench" version="1.0.0.qualifier" useFeatures="true" includeLaunchers="true">
    
       <configIni use="default">
       </configIni>
    
       <launcherArgs>
          <programArgs>-clearPersistedState
          </programArgs>
          <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
          </vmArgsMac>
       </launcherArgs>
    
       <windowImages/>
    
       <splash
          location="com.vogella.tycho.rcp" />
       <launcher name="foo">
          <win useIco="true">
             <ico path="icons/product.ico"/>
             <bmp/>
          </win>
       </launcher>
    
       <vm>
       </vm>
    
       <plugins>
       </plugins>
    
       <features>
          <feature id="org.eclipse.e4.rcp" installMode="root"/>
          <feature id="com.vogella.tycho.feature" version="1.0.0.qualifier"/>
          <feature id="org.eclipse.emf.common"/>
          <feature id="org.eclipse.emf.ecore"/>
          <feature id="org.eclipse.rcp" version="4.7.0.v20170308-2000"/>
          <feature id="org.eclipse.jdt" version="3.13.0.v20170308-2105"/>
          <feature id="org.eclipse.platform" version="4.7.0.v20170308-2000"/>
          <feature id="org.eclipse.equinox.p2.core.feature" version="1.4.0.v20170208-2010"/>
          <feature id="org.eclipse.ecf.core.feature" version="1.3.0.v20170110-1317"/>
          <feature id="org.eclipse.ecf.filetransfer.feature" version="3.13.5.v20170216-0456"/>
          <feature id="org.eclipse.help" version="2.2.100.v20170308-2000"/>
       </features>
    
       <configurations>
          <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
          <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="3" />
          <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="3" />
       </configurations>
    
    </product>