Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Create product with resources(create product with external resources)
Create product with resources [message #1116045] Tue, 24 September 2013 23:17 Go to next message
Martin Bayer is currently offline Martin BayerFriend
Messages: 26
Registered: December 2012
Junior Member
Hi all,
I'd like to ask someone for help with following situation:
I need to export eclipse product with the external resources folder which contains the files I need to run my program (and I need the ability to change them easily). Is there any way how to create this folder in root (beside exported .exe file) and fill it with the correct files?
It would be also nice if it was work without changes in the same way in Eclipse IDE and via exported *.exe file.
Thank you very much,

Martin
Re: Create product with resources [message #1116253 is a reply to message #1116045] Wed, 25 September 2013 06:45 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1407
Registered: July 2012
Senior Member
IMHO you need an automated build using Ant or Maven Tycho. Using this you are able to perform operations that add external folders to your finished product. Using the Eclipse product export wizard won't give you that ability. At least I am not aware of that.
Re: Create product with resources [message #1116283 is a reply to message #1116253] Wed, 25 September 2013 07:31 Go to previous messageGo to next message
Martin Bayer is currently offline Martin BayerFriend
Messages: 26
Registered: December 2012
Junior Member
Oh, ok,
Thank you very much. So can I have one more question?
When I want to get the path to the folder created by maven, is it correct way to use it as follows:
FileLocator.resolve("platform:/plugin/name.of.my.plugin")...and then traverse to the folder outside the plugin?

Thank you once again:)
Re: Create product with resources [message #1116284 is a reply to message #1116045] Wed, 25 September 2013 07:32 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5468
Registered: July 2009
Senior Member
You know that you can export bundles in an exploded state? This would
endup in the plugins-folder then. Would that be acceptable? Advantage of
this would be that you can even update those "external files" using p2.

Tom

On 25.09.13 01:17, Martin Bayer wrote:
> Hi all,
> I'd like to ask someone for help with following situation:
> I need to export eclipse product with the external resources folder
> which contains the files I need to run my program (and I need the
> ability to change them easily). Is there any way how to create this
> folder in root (beside exported .exe file) and fill it with the correct
> files?
> It would be also nice if it was work without changes in the same way in
> Eclipse IDE and via exported *.exe file.
> Thank you very much,
>
> Martin
Re: Create product with resources [message #1116290 is a reply to message #1116283] Wed, 25 September 2013 07:44 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1407
Registered: July 2012
Senior Member
Counter question: What do you mean by "external location" or "folder outside the plugin"?

Is it completely outside your product? Then you need to specify the location as start parameter or something like that, that points to your file system. Otherwise how should your plugin be able to locate it?

Is it a folder that will reside in your product installation? Then you can make use of org.eclipse.core.runtime.Platform.
To get the product installation folder
Platform.getInstallLocation()

To get the workspace folder
Platform.getInstanceLocation()


Using the resulting Location you are able to create a File object by using
new File(location.getURL().getFile());
for example.
Re: Create product with resources [message #1116294 is a reply to message #1116045] Wed, 25 September 2013 07:46 Go to previous messageGo to next message
Eclipse UserFriend
On 09/25/2013 01:17 AM, Martin Bayer wrote:
> I'd like to ask someone for help with following situation:
> I need to export eclipse product with the external resources folder
> which contains the files I need to run my program (and I need the
> ability to change them easily). Is there any way how to create this
> folder in root (beside exported .exe file) and fill it with the correct
> files?
> It would be also nice if it was work without changes in the same way in
> Eclipse IDE and via exported *.exe file.

Hi Martin,

have a look at rootfiles [1].

M.

[1]
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Ftasks%2Fpde_rootfiles.htm
Re: Create product with resources [message #1116701 is a reply to message #1116290] Wed, 25 September 2013 19:06 Go to previous messageGo to next message
Martin Bayer is currently offline Martin BayerFriend
Messages: 26
Registered: December 2012
Junior Member
When I export the e4 product, the content is:

+configuration
+jre
+plugins
.eclipseproduct
MyProgram.exe

And I need following structure:

+configuration
+jre
+plugins
.eclipseproduct
MyProgram.exe
+resources

[Updated on: Wed, 25 September 2013 19:08]

Report message to a moderator

Re: Create product with resources [message #1116703 is a reply to message #1116294] Wed, 25 September 2013 19:09 Go to previous message
Martin Bayer is currently offline Martin BayerFriend
Messages: 26
Registered: December 2012
Junior Member
Ok, I'll check this option.
Thank you,

Martin
Previous Topic:No icons after exporting
Next Topic:[Solved] Eclipse e4 - No bundle loaded after exporting to exe
Goto Forum:
  


Current Time: Wed Nov 26 16:50:47 GMT 2014

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

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