Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to add build ID in about dialog.(How to add build ID in about dialog.)
How to add build ID in about dialog. [message #1338542] Wed, 07 May 2014 09:04 Go to next message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

I'm working on RCP application. I'm using tycho to build product.

I want to add content of About Dialog, currently I'm writing it manually by editing product file under Branding tab.

Is there is any other way to add build ID for my application in about dialog.?


index.php/fa/18028/0/
  • Attachment: Untitled.png
    (Size: 57.18KB, Downloaded 1279 times)
Re: How to add build ID in about dialog. [message #1346571 is a reply to message #1338542] Sat, 10 May 2014 17:36 Go to previous messageGo to next message
Jonathan Dumont is currently offline Jonathan DumontFriend
Messages: 58
Registered: March 2011
Location: Laval
Member
Hi,

We also use Tycho to build our RCP application, and our dialog text is updated automatically on each build.
To do this our text is externalised in a '.properties' file, and this file is updated using the standard Maven filtering mechanisms.
Re: How to add build ID in about dialog. [message #1352190 is a reply to message #1346571] Tue, 13 May 2014 10:45 Go to previous message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

Please follow the following Steps to generate Build-ID Automatically form Tycho:

1. In your plugin.xml which have org.eclipse.core.runtime.products Extension add or replace following properties.
<property name="aboutText" value="%productBlurb"/>


2. In same plugin open MANIFEST.MF and add following lines.
Bundle-Localization: plugin

This allows you to use plugin.properties

3. Create or open your plugin.properties and add following add your about dialog as below.

productBlurb=Eclipse Platform\n\
\n\
Version: {1}\n\
Build id: {0}\n\
\n\
(c) Copyright Eclipse contributors and others 2000, 2014. \
..... your thing\n



4. now create a about.mappings file if you already have change it like below.
0=${buildId}
1=${releaseName}


5. now open your pom file and add below settings.

<properties>
    <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
    <buildTimestamp>${maven.build.timestamp}</buildTimestamp>
    <buildId>${buildTimestamp}</buildId>
    <releaseName>5.0.0 RC0</releaseName>
</properties>

<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.6</version>
    <executions>
      <execution>
        <id>process-about.mappings</id>
        <phase>prepare-package</phase>
        <configuration>
          <outputDirectory>${project.build.directory}</outputDirectory>
          <overwrite>true</overwrite>
          <resources>
            <resource>
              <directory>${basedir}</directory>
              <includes>
                <include>about.mappings</include>
              </includes>
              <filtering>true</filtering>
            </resource>
          </resources>
        </configuration>
        <goals>
          <goal>copy-resources</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-packaging-plugin</artifactId>
    <version>${tycho.version}</version>
    <configuration>
      <additionalFileSets>
        <fileSet>
          <directory>${project.build.directory}</directory>
          <includes>
            <include>about.mappings</include>
          </includes>
        </fileSet>
      </additionalFileSets>
    </configuration>
  </plugin>
</plugins>


6. run the build now you will get product's about dialog with automatic generated Build-ID.
Previous Topic:Why is bundeling prefered
Next Topic:MathJax is slow in eclipse product
Goto Forum:
  


Current Time: Wed Nov 25 06:06:54 GMT 2020

Powered by FUDForum. Page generated in 0.06601 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top