Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » HELP: Adding files to RCP product root.
HELP: Adding files to RCP product root. [message #42002] Fri, 23 January 2009 15:29 Go to next message
Dushyanth is currently offline DushyanthFriend
Messages: 13
Registered: July 2009
Junior Member
Hi

HELP: Adding files to RCP product root.

I am newbie - spent almost 5 days to learn on how to add files/folders to
an RCP product root – but not successful.

All I am trying to do is –>
==> Create an RCP product using "Hello RCP application with a view" example
plug-in
==> Then add few html files and a folder to the RCP product root.

I have been through the below articles – but it was really very
complicated for me to understand at this level.

http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_rootfiles.htm
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/reference/pde_feature_generating_build.htm
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_feature_generating_antcommandline.htm
http://wiki.eclipse.org/index.php/PDEBuild#Including_files_i n_the_root_of_my_build

I have created a “product configuration” file [.product], choose the
option “product configuration is based on: to ‘plug-ins’”. Finally,
exported the plug-in as “Eclipse product” using “.product” file
configuration. The final product created following files and folders:
Configuration [Folder]
plugins [Folder]
.eclipseproduct
eclipse.exe

All I want to learn know is how can I add a new folder, just like plugins
or configuration folders and few html files to the final product build.

CAN SOMEONE PLEASE PROVIDE ME HELP, EXPLAINING IN SIMPLE STEPS

Thanks
DJ
Re: HELP: Adding files to RCP product root. [message #42094 is a reply to message #42002] Fri, 23 January 2009 15:57 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

DJ,

You need to have a product which is based on features, not on plug-ins
(and this is what is explained in the first link of your list).
Then, you'll simply need to have one of your features declaring a
build.properties containing "root" entries.
For example, here is the build.properties of a features my.jre.feature
(for example) that you could add to the lists of features of your
product, to ship the right JRE according to the platform. The jre will
end up in a "./jre" folder of your RCP app.

root.win32.win32.x86.folder.jre=absolute:/path/to/a/windows_ jre
root.linux.gtk.x86.folder.jre=absolute:/path/to/a/linux_x86_ jre
root.linux.gtk.x86_64.folder.jre=absolute:/path/to/a/linux_x 86_64_jre


HTH,
Ben

Dushyanth a écrit :
> Hi
> HELP: Adding files to RCP product root.
>
> I am newbie - spent almost 5 days to learn on how to add files/folders
> to an RCP product root ? but not successful.
> All I am trying to do is ?> ==> Create an RCP product using "Hello RCP
> application with a view" example plug-in
> ==> Then add few html files and a folder to the RCP product root.
>
> I have been through the below articles ? but it was really very
> complicated for me to understand at this level.
>
> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_rootfiles.htm
>
> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/reference/pde_feature_generating_build.htm
>
> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_feature_generating_antcommandline.htm
>
> http://wiki.eclipse.org/index.php/PDEBuild#Including_files_i n_the_root_of_my_build
>
>
> I have created a ?product configuration? file [.product], choose the
> option ?product configuration is based on: to ?plug-ins??. Finally,
> exported the plug-in as ?Eclipse product? using ?.product? file
> configuration. The final product created following files and folders:
> Configuration [Folder]
> plugins [Folder]
> .eclipseproduct
> eclipse.exe
>
> All I want to learn know is how can I add a new folder, just like
> plugins or configuration folders and few html files to the final product
> build.
> CAN SOMEONE PLEASE PROVIDE ME HELP, EXPLAINING IN SIMPLE STEPS
> Thanks
> DJ
>
>


Re: HELP: Adding files to RCP product root. [message #42270 is a reply to message #42094] Fri, 23 January 2009 22:49 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Ben is correct, to add root files when exporting from the UI, you must
use feature based products.

It is possible to add root files to plugin based products, but only when
you are running headless builds, not when exporting from the UI.
(This is done by adding the rootfile properties to the generated
org.eclipse.pde.build.container.feature that productBuild.xml generates)

-Andrew
Benjamin CABE wrote:
> DJ,
>
> You need to have a product which is based on features, not on plug-ins
> (and this is what is explained in the first link of your list).
> Then, you'll simply need to have one of your features declaring a
> build.properties containing "root" entries.
> For example, here is the build.properties of a features my.jre.feature
> (for example) that you could add to the lists of features of your
> product, to ship the right JRE according to the platform. The jre will
> end up in a "./jre" folder of your RCP app.
>
> root.win32.win32.x86.folder.jre=absolute:/path/to/a/windows_ jre
> root.linux.gtk.x86.folder.jre=absolute:/path/to/a/linux_x86_ jre
> root.linux.gtk.x86_64.folder.jre=absolute:/path/to/a/linux_x 86_64_jre
>
>
> HTH,
> Ben
>
> Dushyanth a écrit :
>> Hi
>> HELP: Adding files to RCP product root.
>>
>> I am newbie - spent almost 5 days to learn on how to add files/folders
>> to an RCP product root ? but not successful.
>> All I am trying to do is ?> ==> Create an RCP product using "Hello RCP
>> application with a view" example plug-in
>> ==> Then add few html files and a folder to the RCP product root.
>>
>> I have been through the below articles ? but it was really very
>> complicated for me to understand at this level.
>>
>> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_rootfiles.htm
>>
>> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/reference/pde_feature_generating_build.htm
>>
>> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_feature_generating_antcommandline.htm
>>
>> http://wiki.eclipse.org/index.php/PDEBuild#Including_files_i n_the_root_of_my_build
>>
>>
>> I have created a ?product configuration? file [.product], choose the
>> option ?product configuration is based on: to ?plug-ins??. Finally,
>> exported the plug-in as ?Eclipse product? using ?.product? file
>> configuration. The final product created following files and folders:
>> Configuration [Folder]
>> plugins [Folder]
>> .eclipseproduct
>> eclipse.exe
>>
>> All I want to learn know is how can I add a new folder, just like
>> plugins or configuration folders and few html files to the final
>> product build. CAN SOMEONE PLEASE PROVIDE ME HELP, EXPLAINING IN
>> SIMPLE STEPS
>> Thanks
>> DJ
>>
>>
Re: HELP: Adding files to RCP product root. [message #42677 is a reply to message #42270] Mon, 26 January 2009 23:38 Go to previous message
Dushyanth is currently offline DushyanthFriend
Messages: 13
Registered: July 2009
Junior Member
Thanks Ben and Andrew for your help.

Finally I am able to add files and folders to my RCP product root.

I thought I would share the process in simple steps, so that it will be
helpful to newbies like me in future. Please comment and post your
corrections, in case my process is wrong.

Objective 1 : Buld a RCP product [Hello world with a view] based on
"Features"
Objective 2 : Then add few files or folders to the RCP product root


Step 1 :

Create a feature [say: org.eclipse.core] that will holds all necessary
core [ or basic] plugins [such as
org.eclipse.rcp;org.eclipse.core.runtime,etc] required to run helloworld
RCP. After ading these basic plugins using PDEs "plug-ins and fragments"
tab, click on "Versions" button and choose second option:
"Copy versions from plug-in and fragment manifests"

By doing this, PDE adds version numers to each plug-in we included.

Now try export this feature using PDE overview page's "Export wizard". If
everything goes well, this will creats two folders :
A "features" folder and a "Plugins" folder

One problem you may expect here is "Wrong Plug-in version number" - This
can be solved by correcting the plug-in's version number or adding the
latest plugin versions with in your Eclipse plugin directory
[As a simple guide - i have included my feature.xml file below, which had
some core plugins included]

Step 2 :
Create an example [Hello world with a view] RCP plugin. [say name:
org.me.helloworld.product]
At this level, this plugin is completely independent, and we can launch it
with out any problem.

Step 3 :
In this step we create a new feature [say org.me.helloworld.feature] for
"org.me.helloworld.product" plugin.
In the PDE "Overview page" we add "org.me.helloworld.product" plug-in as
"Branding Plug-in" name.
In the PDE "plug-ins and fragments" tab, we add our
"org.me.helloworld.product" plug-in.
Then in the "Dependencies" tab, we click "Compute" button, which will add
few dependency plugins.


At this point we bundled our "org.me.helloworld.product" plug-in into
"org.me.helloworld.feature" feature. [in Step 3]
And all other necessary plugins requried by "org.me.helloworld.product"
plug-in are bundled into "org.eclipse.core" [in Step 1]

Step 4:
Create an RCP product: to do this we create a new product file under
"org.me.helloworld.product" plugin.
Choose "The product configuration is based on to : features" in PDE
product configuration overview page.
Then add features: "org.me.helloworld.feature" and "org.eclipse.core"
using "Configuration" tab.
At this point, by using "Export->Eclipse product" facility, we can create
an executable RCP product. Thats our Object 1 is done.

Step 5 : Objective 2

Create a new feature [say org.me.helloworld.files.feature]
Under the new feature, we create a file called "hi.html" and a folder
called "myfiles"
In the "build.properties" page remove "bin.includes = feature.xml" line,
then add "root=file:hi.html,myfiles"

Finally, we go back to our Step 4 to add "org.me.helloworld.files.feature"
feature to the product file using "Configuration" tab.
Then Export the RCP product, now we can see "hi.html and myfiles folder"
under RCP product root directory.That our Object 2 is done.

I have been through the below articles ? but it was really very
complicated for me to understand at this level.

FURTHER READING:
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_rootfiles.htm
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/reference/pde_feature_generating_build.htm
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_feature_generating_antcommandline.htm http://wiki.eclipse.org/index.php/PDEBuild#Including_files_i n_the_root_of_my_build


Sorry for my english and rough guidlines
I may be completely wrong, but this works for me, and this is what I
understand at this level.. Please feel free to correct me.

Thanks

DJ


-------------------------------
"org.eclipse.core" - feature.cml
-------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.eclipse.core.feature"
label="Core Feature"
version="1.0.0"
provider-name="Eclipse foundation">

<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>

<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>

<license url="http://www.example.com/license">
[Enter License Description here.]
</license>

<plugin
id="org.eclipse.core.databinding.beans"
download-size="0"
install-size="0"
version="1.1.1.M20080827-0800a"
unpack="false"/>

<plugin
id="org.eclipse.core.expressions"
download-size="0"
install-size="0"
version="3.4.0.v20080603-2000"
unpack="false"/>

<plugin
id="org.eclipse.core.jobs"
download-size="0"
install-size="0"
version="3.4.0.v20080512"
unpack="false"/>

<plugin
id="org.eclipse.core.runtime"
download-size="0"
install-size="0"
version="3.4.0.v20080512"
unpack="false"/>

<plugin
id="org.eclipse.core.runtime.compatibility.auth"
download-size="0"
install-size="0"
version="3.2.100.v20070502"
unpack="false"/>

<plugin
id="org.eclipse.equinox.app"
download-size="0"
install-size="0"
version="1.1.0.v20080421-2006"
unpack="false"/>

<plugin
id="org.eclipse.equinox.common"
download-size="0"
install-size="0"
version="3.4.0.v20080421-2006"
unpack="false"/>

<plugin
id="org.eclipse.equinox.launcher"
download-size="0"
install-size="0"
version="1.0.101.R34x_v20080819"
unpack="false"/>

<plugin
id="org.eclipse.equinox.launcher.carbon.macosx"
os="macosx"
ws="carbon"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.linux.ppc"
os="linux"
ws="gtk"
arch="ppc"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.linux.x86"
os="linux"
ws="gtk"
arch="x86"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.linux.x86_64"
os="linux"
ws="gtk"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.solaris.sparc"
os="solaris"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.motif.aix.ppc"
os="aix"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.win32.win32.x86"
os="win32"
download-size="0"
install-size="0"
version="1.0.101.R34x_v20080731"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.wpf.win32.x86"
os="win32"
ws="wpf"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.preferences"
download-size="0"
install-size="0"
version="3.2.201.R34x_v20080709"
unpack="false"/>

<plugin
id="org.eclipse.equinox.registry"
download-size="0"
install-size="0"
version="3.4.0.v20080516-0950"
unpack="false"/>

<plugin
id="org.eclipse.help"
download-size="0"
install-size="0"
version="3.3.101.v20080702_34x"
unpack="false"/>

<plugin
id="org.eclipse.jface"
download-size="0"
install-size="0"
version="3.4.1.M20080827-2000"
unpack="false"/>

<plugin
id="org.eclipse.jface.databinding"
download-size="0"
install-size="0"
version="1.2.1.M20080827-0800a"
unpack="false"/>

<plugin
id="org.eclipse.osgi"
download-size="0"
install-size="0"
version="3.4.2.R34x_v20080826-1230"
unpack="false"/>

<plugin
id="org.eclipse.rcp"
download-size="0"
install-size="0"
version="3.4.0.v20080507"
unpack="false"/>

<plugin
id="org.eclipse.swt"
download-size="0"
install-size="0"
version="3.4.1.v3449c"
unpack="false"/>

<plugin
id="org.eclipse.swt.carbon.macosx"
os="macosx"
ws="carbon"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.gtk.linux.ppc"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.gtk.linux.x86"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.gtk.linux.x86_64"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.gtk.solaris.sparc"
os="solaris"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.motif.aix.ppc"
os="aix"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.win32.win32.x86"
os="win32"
ws="win32"
download-size="0"
install-size="0"
version="3.4.1.v3449c"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.wpf.win32.x86"
os="win32"
ws="wpf"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.ui"
download-size="0"
install-size="0"
version="3.4.1.M20080910-0800"
unpack="false"/>

<plugin
id="org.eclipse.ui.carbon"
os="macosx"
ws="carbon"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.ui.workbench"
download-size="0"
install-size="0"
version="3.4.1.M20080827-0800a"
unpack="false"/>

<plugin
id="org.eclipse.update.configurator"
download-size="0"
install-size="0"
version="3.2.201.R34x_v20080819"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem"
download-size="0"
install-size="0"
version="1.2.0.v20080604-1400"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.linux.ppc"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.linux.x86"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.linux.x86_64"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.macosx"
os="macosx"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.solaris.sparc"
os="solaris"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.win32.x86"
os="win32"
download-size="0"
install-size="0"
version="1.1.0.v20080604-1400"
fragment="true"
unpack="false"/>

<plugin
id="javax.servlet"
download-size="0"
install-size="0"
version="2.4.0.v200806031604"
unpack="false"/>

<plugin
id="javax.servlet.jsp"
download-size="0"
install-size="0"
version="2.0.0.v200806031607"
unpack="false"/>

<plugin
id="org.apache.commons.el"
download-size="0"
install-size="0"
version="1.0.0.v200806031608"
unpack="false"/>

<plugin
id="org.apache.commons.logging"
download-size="0"
install-size="0"
version="1.0.4.v20080605-1930"
unpack="false"/>

<plugin
id="org.apache.jasper"
download-size="0"
install-size="0"
version="5.5.17.v200806031609"
unpack="false"/>

<plugin
id="org.apache.lucene"
download-size="0"
install-size="0"
version="1.9.1.v20080530-1600"
unpack="false"/>

<plugin
id="org.apache.lucene.analysis"
download-size="0"
install-size="0"
version="1.9.1.v20080530-1600"
unpack="false"/>

<plugin
id="org.eclipse.core.net"
download-size="0"
install-size="0"
version="1.1.0.I20080604"
unpack="false"/>

<plugin
id="org.eclipse.core.resources"
download-size="0"
install-size="0"
version="3.4.1.R34x_v20080902"
unpack="false"/>

<plugin
id="org.eclipse.core.resources.compatibility"
download-size="0"
install-size="0"
version="3.4.0.v20080604-1400"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.runtime.compatibility.registry"
download-size="0"
install-size="0"
version="3.2.200.v20080610"
fragment="true"/>

<plugin
id="org.eclipse.core.variables"
download-size="0"
install-size="0"
version="3.2.100.v20080529-1300"
unpack="false"/>

<plugin
id="org.eclipse.draw2d"
download-size="0"
install-size="0"
version="3.4.0.v20080529"
unpack="false"/>

<plugin
id="org.eclipse.equinox.http.jetty"
download-size="0"
install-size="0"
version="1.1.0.v20080425"
unpack="false"/>

<plugin
id="org.eclipse.equinox.http.registry"
download-size="0"
install-size="0"
version="1.0.100.v20080427-0830"
unpack="false"/>

<plugin
id="org.eclipse.equinox.http.servlet"
download-size="0"
install-size="0"
version="1.0.100.v20080427-0830"
unpack="false"/>

<plugin
id="org.eclipse.equinox.jsp.jasper"
download-size="0"
install-size="0"
version="1.0.100.v20080427-0830"
unpack="false"/>

<plugin
id="org.eclipse.equinox.jsp.jasper.registry"
download-size="0"
install-size="0"
version="1.0.0.v20080427-0830"
unpack="false"/>

<plugin
id="org.eclipse.gef"
download-size="0"
install-size="0"
version="3.4.1.v20080716"
unpack="false"/>

<plugin
id="org.eclipse.help.appserver"
download-size="0"
install-size="0"
version="3.1.300.v20080507"
unpack="false"/>

<plugin
id="org.eclipse.help.base"
download-size="0"
install-size="0"
version="3.3.101.M20080728_34x"
unpack="false"/>

<plugin
id="org.eclipse.help.ui"
download-size="0"
install-size="0"
version="3.3.101.M20080715_34x"
unpack="false"/>

<plugin
id="org.eclipse.help.webapp"
download-size="0"
install-size="0"
version="3.3.101.M20080805_34x"
unpack="false"/>

<plugin
id="org.eclipse.osgi.services"
download-size="0"
install-size="0"
version="3.1.200.v20071203"
unpack="false"/>

<plugin
id="org.eclipse.ui.forms"
download-size="0"
install-size="0"
version="3.3.101.v20080708_34x"
unpack="false"/>

<plugin
id="org.eclipse.ui.views"
download-size="0"
install-size="0"
version="3.3.0.I20080509-2000"
unpack="false"/>

<plugin
id="org.eclipse.ui.workbench.compatibility"
download-size="0"
install-size="0"
version="3.2.0.I20080509-2000"
fragment="true"/>

<plugin
id="org.eclipse.update.core"
download-size="0"
install-size="0"
version="3.2.201.R34x_v20080714"
unpack="false"/>

<plugin
id="org.eclipse.update.core.linux"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.update.core.win32"
download-size="0"
install-size="0"
version="3.2.100.v20080107"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.update.scheduler"
download-size="0"
install-size="0"
version="3.2.100.v20080404"
unpack="false"/>

<plugin
id="org.eclipse.update.ui"
download-size="0"
install-size="0"
version="3.2.100.v20080318"
unpack="false"/>

<plugin
id="org.mortbay.jetty"
download-size="0"
install-size="0"
version="5.1.14.v200806031611"
unpack="false"/>

<plugin
id="com.ibm.icu"
download-size="0"
install-size="0"
version="3.8.1.v20080530"
unpack="false"/>

<plugin
id="org.eclipse.core.commands"
download-size="0"
install-size="0"
version="3.4.0.I20080509-2000"
unpack="false"/>

<plugin
id="org.eclipse.core.contenttype"
download-size="0"
install-size="0"
version="3.3.0.v20080604-1400"
unpack="false"/>

<plugin
id="org.eclipse.core.databinding"
download-size="0"
install-size="0"
version="1.1.1.M20080827-0800b"
unpack="false"/>

<plugin
id="org.eclipse.core.resources.win32.x86"
download-size="0"
install-size="0"
version="3.4.0.v20071204"
fragment="true"
unpack="false"/>

</feature>
Re: HELP: Adding files to RCP product root. [message #590360 is a reply to message #42002] Fri, 23 January 2009 15:57 Go to previous message
Eclipse UserFriend
Originally posted by: benjamin.cabe.anyware-tech.com

DJ,

You need to have a product which is based on features, not on plug-ins
(and this is what is explained in the first link of your list).
Then, you'll simply need to have one of your features declaring a
build.properties containing "root" entries.
For example, here is the build.properties of a features my.jre.feature
(for example) that you could add to the lists of features of your
product, to ship the right JRE according to the platform. The jre will
end up in a "./jre" folder of your RCP app.

root.win32.win32.x86.folder.jre=absolute:/path/to/a/windows_ jre
root.linux.gtk.x86.folder.jre=absolute:/path/to/a/linux_x86_ jre
root.linux.gtk.x86_64.folder.jre=absolute:/path/to/a/linux_x 86_64_jre


HTH,
Ben

Dushyanth a écrit :
> Hi
> HELP: Adding files to RCP product root.
>
> I am newbie - spent almost 5 days to learn on how to add files/folders
> to an RCP product root ? but not successful.
> All I am trying to do is ?> ==> Create an RCP product using "Hello RCP
> application with a view" example plug-in
> ==> Then add few html files and a folder to the RCP product root.
>
> I have been through the below articles ? but it was really very
> complicated for me to understand at this level.
>
> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_rootfiles.htm
>
> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/reference/pde_feature_generating_build.htm
>
> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_feature_generating_antcommandline.htm
>
> http://wiki.eclipse.org/index.php/PDEBuild#Including_files_i n_the_root_of_my_build
>
>
> I have created a ?product configuration? file [.product], choose the
> option ?product configuration is based on: to ?plug-ins??. Finally,
> exported the plug-in as ?Eclipse product? using ?.product? file
> configuration. The final product created following files and folders:
> Configuration [Folder]
> plugins [Folder]
> .eclipseproduct
> eclipse.exe
>
> All I want to learn know is how can I add a new folder, just like
> plugins or configuration folders and few html files to the final product
> build.
> CAN SOMEONE PLEASE PROVIDE ME HELP, EXPLAINING IN SIMPLE STEPS
> Thanks
> DJ
>
>
Re: HELP: Adding files to RCP product root. [message #590423 is a reply to message #42094] Fri, 23 January 2009 22:49 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Ben is correct, to add root files when exporting from the UI, you must
use feature based products.

It is possible to add root files to plugin based products, but only when
you are running headless builds, not when exporting from the UI.
(This is done by adding the rootfile properties to the generated
org.eclipse.pde.build.container.feature that productBuild.xml generates)

-Andrew
Benjamin CABE wrote:
> DJ,
>
> You need to have a product which is based on features, not on plug-ins
> (and this is what is explained in the first link of your list).
> Then, you'll simply need to have one of your features declaring a
> build.properties containing "root" entries.
> For example, here is the build.properties of a features my.jre.feature
> (for example) that you could add to the lists of features of your
> product, to ship the right JRE according to the platform. The jre will
> end up in a "./jre" folder of your RCP app.
>
> root.win32.win32.x86.folder.jre=absolute:/path/to/a/windows_ jre
> root.linux.gtk.x86.folder.jre=absolute:/path/to/a/linux_x86_ jre
> root.linux.gtk.x86_64.folder.jre=absolute:/path/to/a/linux_x 86_64_jre
>
>
> HTH,
> Ben
>
> Dushyanth a écrit :
>> Hi
>> HELP: Adding files to RCP product root.
>>
>> I am newbie - spent almost 5 days to learn on how to add files/folders
>> to an RCP product root ? but not successful.
>> All I am trying to do is ?> ==> Create an RCP product using "Hello RCP
>> application with a view" example plug-in
>> ==> Then add few html files and a folder to the RCP product root.
>>
>> I have been through the below articles ? but it was really very
>> complicated for me to understand at this level.
>>
>> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_rootfiles.htm
>>
>> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/reference/pde_feature_generating_build.htm
>>
>> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_feature_generating_antcommandline.htm
>>
>> http://wiki.eclipse.org/index.php/PDEBuild#Including_files_i n_the_root_of_my_build
>>
>>
>> I have created a ?product configuration? file [.product], choose the
>> option ?product configuration is based on: to ?plug-ins??. Finally,
>> exported the plug-in as ?Eclipse product? using ?.product? file
>> configuration. The final product created following files and folders:
>> Configuration [Folder]
>> plugins [Folder]
>> .eclipseproduct
>> eclipse.exe
>>
>> All I want to learn know is how can I add a new folder, just like
>> plugins or configuration folders and few html files to the final
>> product build. CAN SOMEONE PLEASE PROVIDE ME HELP, EXPLAINING IN
>> SIMPLE STEPS
>> Thanks
>> DJ
>>
>>
Re: HELP: Adding files to RCP product root. [message #590602 is a reply to message #42270] Mon, 26 January 2009 23:38 Go to previous message
Dushyanth is currently offline DushyanthFriend
Messages: 13
Registered: July 2009
Junior Member
Thanks Ben and Andrew for your help.

Finally I am able to add files and folders to my RCP product root.

I thought I would share the process in simple steps, so that it will be
helpful to newbies like me in future. Please comment and post your
corrections, in case my process is wrong.

Objective 1 : Buld a RCP product [Hello world with a view] based on
"Features"
Objective 2 : Then add few files or folders to the RCP product root


Step 1 :

Create a feature [say: org.eclipse.core] that will holds all necessary
core [ or basic] plugins [such as
org.eclipse.rcp;org.eclipse.core.runtime,etc] required to run helloworld
RCP. After ading these basic plugins using PDEs "plug-ins and fragments"
tab, click on "Versions" button and choose second option:
"Copy versions from plug-in and fragment manifests"

By doing this, PDE adds version numers to each plug-in we included.

Now try export this feature using PDE overview page's "Export wizard". If
everything goes well, this will creats two folders :
A "features" folder and a "Plugins" folder

One problem you may expect here is "Wrong Plug-in version number" - This
can be solved by correcting the plug-in's version number or adding the
latest plugin versions with in your Eclipse plugin directory
[As a simple guide - i have included my feature.xml file below, which had
some core plugins included]

Step 2 :
Create an example [Hello world with a view] RCP plugin. [say name:
org.me.helloworld.product]
At this level, this plugin is completely independent, and we can launch it
with out any problem.

Step 3 :
In this step we create a new feature [say org.me.helloworld.feature] for
"org.me.helloworld.product" plugin.
In the PDE "Overview page" we add "org.me.helloworld.product" plug-in as
"Branding Plug-in" name.
In the PDE "plug-ins and fragments" tab, we add our
"org.me.helloworld.product" plug-in.
Then in the "Dependencies" tab, we click "Compute" button, which will add
few dependency plugins.


At this point we bundled our "org.me.helloworld.product" plug-in into
"org.me.helloworld.feature" feature. [in Step 3]
And all other necessary plugins requried by "org.me.helloworld.product"
plug-in are bundled into "org.eclipse.core" [in Step 1]

Step 4:
Create an RCP product: to do this we create a new product file under
"org.me.helloworld.product" plugin.
Choose "The product configuration is based on to : features" in PDE
product configuration overview page.
Then add features: "org.me.helloworld.feature" and "org.eclipse.core"
using "Configuration" tab.
At this point, by using "Export->Eclipse product" facility, we can create
an executable RCP product. Thats our Object 1 is done.

Step 5 : Objective 2

Create a new feature [say org.me.helloworld.files.feature]
Under the new feature, we create a file called "hi.html" and a folder
called "myfiles"
In the "build.properties" page remove "bin.includes = feature.xml" line,
then add "root=file:hi.html,myfiles"

Finally, we go back to our Step 4 to add "org.me.helloworld.files.feature"
feature to the product file using "Configuration" tab.
Then Export the RCP product, now we can see "hi.html and myfiles folder"
under RCP product root directory.That our Object 2 is done.

I have been through the below articles ? but it was really very
complicated for me to understand at this level.

FURTHER READING:
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_rootfiles.htm
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/reference/pde_feature_generating_build.htm
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_feature_generating_antcommandline.htm http://wiki.eclipse.org/index.php/PDEBuild#Including_files_i n_the_root_of_my_build


Sorry for my english and rough guidlines
I may be completely wrong, but this works for me, and this is what I
understand at this level.. Please feel free to correct me.

Thanks

DJ


-------------------------------
"org.eclipse.core" - feature.cml
-------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.eclipse.core.feature"
label="Core Feature"
version="1.0.0"
provider-name="Eclipse foundation">

<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>

<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>

<license url="http://www.example.com/license">
[Enter License Description here.]
</license>

<plugin
id="org.eclipse.core.databinding.beans"
download-size="0"
install-size="0"
version="1.1.1.M20080827-0800a"
unpack="false"/>

<plugin
id="org.eclipse.core.expressions"
download-size="0"
install-size="0"
version="3.4.0.v20080603-2000"
unpack="false"/>

<plugin
id="org.eclipse.core.jobs"
download-size="0"
install-size="0"
version="3.4.0.v20080512"
unpack="false"/>

<plugin
id="org.eclipse.core.runtime"
download-size="0"
install-size="0"
version="3.4.0.v20080512"
unpack="false"/>

<plugin
id="org.eclipse.core.runtime.compatibility.auth"
download-size="0"
install-size="0"
version="3.2.100.v20070502"
unpack="false"/>

<plugin
id="org.eclipse.equinox.app"
download-size="0"
install-size="0"
version="1.1.0.v20080421-2006"
unpack="false"/>

<plugin
id="org.eclipse.equinox.common"
download-size="0"
install-size="0"
version="3.4.0.v20080421-2006"
unpack="false"/>

<plugin
id="org.eclipse.equinox.launcher"
download-size="0"
install-size="0"
version="1.0.101.R34x_v20080819"
unpack="false"/>

<plugin
id="org.eclipse.equinox.launcher.carbon.macosx"
os="macosx"
ws="carbon"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.linux.ppc"
os="linux"
ws="gtk"
arch="ppc"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.linux.x86"
os="linux"
ws="gtk"
arch="x86"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.linux.x86_64"
os="linux"
ws="gtk"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.solaris.sparc"
os="solaris"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.motif.aix.ppc"
os="aix"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.win32.win32.x86"
os="win32"
download-size="0"
install-size="0"
version="1.0.101.R34x_v20080731"
fragment="true"/>

<plugin
id="org.eclipse.equinox.launcher.wpf.win32.x86"
os="win32"
ws="wpf"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>

<plugin
id="org.eclipse.equinox.preferences"
download-size="0"
install-size="0"
version="3.2.201.R34x_v20080709"
unpack="false"/>

<plugin
id="org.eclipse.equinox.registry"
download-size="0"
install-size="0"
version="3.4.0.v20080516-0950"
unpack="false"/>

<plugin
id="org.eclipse.help"
download-size="0"
install-size="0"
version="3.3.101.v20080702_34x"
unpack="false"/>

<plugin
id="org.eclipse.jface"
download-size="0"
install-size="0"
version="3.4.1.M20080827-2000"
unpack="false"/>

<plugin
id="org.eclipse.jface.databinding"
download-size="0"
install-size="0"
version="1.2.1.M20080827-0800a"
unpack="false"/>

<plugin
id="org.eclipse.osgi"
download-size="0"
install-size="0"
version="3.4.2.R34x_v20080826-1230"
unpack="false"/>

<plugin
id="org.eclipse.rcp"
download-size="0"
install-size="0"
version="3.4.0.v20080507"
unpack="false"/>

<plugin
id="org.eclipse.swt"
download-size="0"
install-size="0"
version="3.4.1.v3449c"
unpack="false"/>

<plugin
id="org.eclipse.swt.carbon.macosx"
os="macosx"
ws="carbon"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.gtk.linux.ppc"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.gtk.linux.x86"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.gtk.linux.x86_64"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.gtk.solaris.sparc"
os="solaris"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.motif.aix.ppc"
os="aix"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.win32.win32.x86"
os="win32"
ws="win32"
download-size="0"
install-size="0"
version="3.4.1.v3449c"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.swt.wpf.win32.x86"
os="win32"
ws="wpf"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.ui"
download-size="0"
install-size="0"
version="3.4.1.M20080910-0800"
unpack="false"/>

<plugin
id="org.eclipse.ui.carbon"
os="macosx"
ws="carbon"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.ui.workbench"
download-size="0"
install-size="0"
version="3.4.1.M20080827-0800a"
unpack="false"/>

<plugin
id="org.eclipse.update.configurator"
download-size="0"
install-size="0"
version="3.2.201.R34x_v20080819"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem"
download-size="0"
install-size="0"
version="1.2.0.v20080604-1400"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.linux.ppc"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.linux.x86"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.linux.x86_64"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.macosx"
os="macosx"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.solaris.sparc"
os="solaris"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.filesystem.win32.x86"
os="win32"
download-size="0"
install-size="0"
version="1.1.0.v20080604-1400"
fragment="true"
unpack="false"/>

<plugin
id="javax.servlet"
download-size="0"
install-size="0"
version="2.4.0.v200806031604"
unpack="false"/>

<plugin
id="javax.servlet.jsp"
download-size="0"
install-size="0"
version="2.0.0.v200806031607"
unpack="false"/>

<plugin
id="org.apache.commons.el"
download-size="0"
install-size="0"
version="1.0.0.v200806031608"
unpack="false"/>

<plugin
id="org.apache.commons.logging"
download-size="0"
install-size="0"
version="1.0.4.v20080605-1930"
unpack="false"/>

<plugin
id="org.apache.jasper"
download-size="0"
install-size="0"
version="5.5.17.v200806031609"
unpack="false"/>

<plugin
id="org.apache.lucene"
download-size="0"
install-size="0"
version="1.9.1.v20080530-1600"
unpack="false"/>

<plugin
id="org.apache.lucene.analysis"
download-size="0"
install-size="0"
version="1.9.1.v20080530-1600"
unpack="false"/>

<plugin
id="org.eclipse.core.net"
download-size="0"
install-size="0"
version="1.1.0.I20080604"
unpack="false"/>

<plugin
id="org.eclipse.core.resources"
download-size="0"
install-size="0"
version="3.4.1.R34x_v20080902"
unpack="false"/>

<plugin
id="org.eclipse.core.resources.compatibility"
download-size="0"
install-size="0"
version="3.4.0.v20080604-1400"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.core.runtime.compatibility.registry"
download-size="0"
install-size="0"
version="3.2.200.v20080610"
fragment="true"/>

<plugin
id="org.eclipse.core.variables"
download-size="0"
install-size="0"
version="3.2.100.v20080529-1300"
unpack="false"/>

<plugin
id="org.eclipse.draw2d"
download-size="0"
install-size="0"
version="3.4.0.v20080529"
unpack="false"/>

<plugin
id="org.eclipse.equinox.http.jetty"
download-size="0"
install-size="0"
version="1.1.0.v20080425"
unpack="false"/>

<plugin
id="org.eclipse.equinox.http.registry"
download-size="0"
install-size="0"
version="1.0.100.v20080427-0830"
unpack="false"/>

<plugin
id="org.eclipse.equinox.http.servlet"
download-size="0"
install-size="0"
version="1.0.100.v20080427-0830"
unpack="false"/>

<plugin
id="org.eclipse.equinox.jsp.jasper"
download-size="0"
install-size="0"
version="1.0.100.v20080427-0830"
unpack="false"/>

<plugin
id="org.eclipse.equinox.jsp.jasper.registry"
download-size="0"
install-size="0"
version="1.0.0.v20080427-0830"
unpack="false"/>

<plugin
id="org.eclipse.gef"
download-size="0"
install-size="0"
version="3.4.1.v20080716"
unpack="false"/>

<plugin
id="org.eclipse.help.appserver"
download-size="0"
install-size="0"
version="3.1.300.v20080507"
unpack="false"/>

<plugin
id="org.eclipse.help.base"
download-size="0"
install-size="0"
version="3.3.101.M20080728_34x"
unpack="false"/>

<plugin
id="org.eclipse.help.ui"
download-size="0"
install-size="0"
version="3.3.101.M20080715_34x"
unpack="false"/>

<plugin
id="org.eclipse.help.webapp"
download-size="0"
install-size="0"
version="3.3.101.M20080805_34x"
unpack="false"/>

<plugin
id="org.eclipse.osgi.services"
download-size="0"
install-size="0"
version="3.1.200.v20071203"
unpack="false"/>

<plugin
id="org.eclipse.ui.forms"
download-size="0"
install-size="0"
version="3.3.101.v20080708_34x"
unpack="false"/>

<plugin
id="org.eclipse.ui.views"
download-size="0"
install-size="0"
version="3.3.0.I20080509-2000"
unpack="false"/>

<plugin
id="org.eclipse.ui.workbench.compatibility"
download-size="0"
install-size="0"
version="3.2.0.I20080509-2000"
fragment="true"/>

<plugin
id="org.eclipse.update.core"
download-size="0"
install-size="0"
version="3.2.201.R34x_v20080714"
unpack="false"/>

<plugin
id="org.eclipse.update.core.linux"
os="linux"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.update.core.win32"
download-size="0"
install-size="0"
version="3.2.100.v20080107"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.update.scheduler"
download-size="0"
install-size="0"
version="3.2.100.v20080404"
unpack="false"/>

<plugin
id="org.eclipse.update.ui"
download-size="0"
install-size="0"
version="3.2.100.v20080318"
unpack="false"/>

<plugin
id="org.mortbay.jetty"
download-size="0"
install-size="0"
version="5.1.14.v200806031611"
unpack="false"/>

<plugin
id="com.ibm.icu"
download-size="0"
install-size="0"
version="3.8.1.v20080530"
unpack="false"/>

<plugin
id="org.eclipse.core.commands"
download-size="0"
install-size="0"
version="3.4.0.I20080509-2000"
unpack="false"/>

<plugin
id="org.eclipse.core.contenttype"
download-size="0"
install-size="0"
version="3.3.0.v20080604-1400"
unpack="false"/>

<plugin
id="org.eclipse.core.databinding"
download-size="0"
install-size="0"
version="1.1.1.M20080827-0800b"
unpack="false"/>

<plugin
id="org.eclipse.core.resources.win32.x86"
download-size="0"
install-size="0"
version="3.4.0.v20071204"
fragment="true"
unpack="false"/>

</feature>
Previous Topic:Problem with build - stupid
Next Topic:Re: Building an Epsilon product is, well, hum...
Goto Forum:
  


Current Time: Fri Apr 19 14:58:19 GMT 2024

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

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

Back to the top