Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [p2 director] Add to a product bundles and launchers for another platform
[p2 director] Add to a product bundles and launchers for another platform [message #515674] Fri, 19 February 2010 17:40 Go to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi all,

This is a follow-up of several unanswered questions I asked here: http://www.eclipse.org/forums/index.php?t=msg&goto=51530 8&#msg_515308

More focused on p2, I ask it here, with a small refactoring:
Is there a way, when using p2 to retrieve a product from a repository, to install in the same product folder all launchers and bundles for all platforms? For example: I have an update-site that contains product built for Linux, Win and Mac; I can retrieve the product for Linux and get a fully working Linux application; how can I add to it Win and Mac launchers and bundles (or how can I get in one-shot all products from repo) so that I am be able to package it as a single zip containing all the necessary stuff to start on any platform?

If this do-able? If yes, an how-to or an example would be a dream. Otherwise, I think about opening a bug to make it a feature request on p2.

Regards,
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Re: [p2 director] Add to a product bundles and launchers for another platform [message #516018 is a reply to message #515674] Mon, 22 February 2010 14:07 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Possible problems I can think of: Does the SDKProfile contain its
linux,gtk,x86? That would cause problems trying to install a
win32,win32,x86 fragment.

Creating a product (like the SDK) has platform specific instructions,
even ones like (short version):


units.1.id=toolingorg.eclipse.configuration.macosx
units.1.filter=(osgi.os=macosx)
units.1.instructions.configure=setProgramProperty(propName:o sgi.instance.area.default,propValue:@user.home/Documents/wor kspace);
units.1.instructions.unconfigure=setProgramProperty(propName :osgi.instance.area.default,propValue:);

units.2.id=toolingorg.eclipse.configuration
units.2.filter=(!(osgi.os=macosx))
units.2.instructions.configure=setProgramProperty(propName:o sgi.instance.area.default,propValue:@user.home/workspace);
units.2.instructions.unconfigure=setProgramProperty(propName :osgi.instance.area.default,propValue:);


They are mutually exclusive.

You probably need to open a bug. It might be possible now, I guess the
way to check would be to create your product once, and then use the
director to add other plugins with the different os,ws,arch values.

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_director.html

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: [p2 director] Add to a product bundles and launchers for another platform [message #516037 is a reply to message #516018] Mon, 22 February 2010 14:57 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Paul Webster a écrit :
> Possible problems I can think of: Does the SDKProfile contain its
> linux,gtk,x86? That would cause problems trying to install a
> win32,win32,x86 fragment.

Yes it does.

> Creating a product (like the SDK) has platform specific instructions,
> even ones like (short version):
>
>
> units.1.id=toolingorg.eclipse.configuration.macosx
> units.1.filter=(osgi.os=macosx)
> units.1.instructions.configure=setProgramProperty(propName:o sgi.instance.area.default,propValue:@user.home/Documents/wor kspace);
>
> units.1.instructions.unconfigure=setProgramProperty(propName :osgi.instance.area.default,propValue:);
>
>
> units.2.id=toolingorg.eclipse.configuration
> units.2.filter=(!(osgi.os=macosx))
> units.2.instructions.configure=setProgramProperty(propName:o sgi.instance.area.default,propValue:@user.home/workspace);
>
> units.2.instructions.unconfigure=setProgramProperty(propName :osgi.instance.area.default,propValue:);
>
>
>
> They are mutually exclusive.

Do they really need to be exclusive since OSGi should be able to load only the platform-friendly bundles? Does p2 adds a restriction at install-time that OSGi can resolve at dev-time?

> You probably need to open a bug.

Ok, I'll enter this as an enhancement request.

> It might be possible now, I guess the
> way to check would be to create your product once, and then use the
> director to add other plugins with the different os,ws,arch values.
>
> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_director.html

I gave several tries with p2 director from command-line (starting from the linux version, and trying to add products for other platforms), and did not succeed to merge my products. If you think it is possible, could you please provide me a concrete example or directly the command to try?

Thanks a lot!

--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Re: [p2 director] Add to a product bundles and launchers for another platform [message #516049 is a reply to message #516037] Mon, 22 February 2010 15:16 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

>> You probably need to open a bug.
>
> Ok, I'll enter this as an enhancement request.

I asked for this feature on bug 303490.

--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Re: [p2 director] Add to a product bundles and launchers for another platform [message #516140 is a reply to message #516037] Mon, 22 February 2010 20:10 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Mickael Istria wrote:
>>
>> units.1.id=toolingorg.eclipse.configuration.macosx
>>
>> units.2.id=toolingorg.eclipse.configuration
>
> Do they really need to be exclusive since OSGi should be able to load
> only the platform-friendly bundles? Does p2 adds a restriction at
> install-time that OSGi can resolve at dev-time?

These 2 IUs are changing config files to be appropriate for the platform
(so at install time, not runtime) and (in this case) are needed before
Equinox launches OSGi. There aren't usually many of these (2 or 3 per
platform for the Eclipse SDK, for example) but I can see how they would
cause problems.

>
> I gave several tries with p2 director from command-line (starting from
> the linux version, and trying to add products for other platforms), and
> did not succeed to merge my products. If you think it is possible, could
> you please provide me a concrete example or directly the command to try?

I'm a consumer of p2, if you've tried what's on that page that's all I
would have tried. The only thing I can think of is while you might not
be able to install the same product twice into one instance, does it
work if you install one product and then switch os,ws,arch and try to
install smaller plugins? Like installing org.eclipse.swt.gtk.linux.x86
fragment into your win32,win32,x86 product.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:java.lang.IllegalStateException: Registry Directory not available.
Next Topic:unknown_0.0.0
Goto Forum:
  


Current Time: Thu Apr 25 08:20:06 GMT 2024

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

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

Back to the top