Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Add Update site does not work with SWT(Cannot add update site for SWT)
Add Update site does not work with SWT [message #1751839] Mon, 16 January 2017 05:06 Go to next message
Joe Fernandez is currently offline Joe FernandezFriend
Messages: 27
Registered: November 2014
Junior Member
I don't have a good understanding of Oomph and the install and update process so I don't know if this question should be posted here or not.

I used Oomph to install Neon for RCP developers on Windows 10 and - as far as I understand - it has updated the previous Mars P2 pool with all the Neon version plugins.

I copied over a project from a Mars workspace on the same Windows 10 machine and added to it, built and launched and it all works fine and launches successfully on Windows 10.

Previously using the Mars workspace I used to export my Eclipse 4 RCP application for multiple OSes and run it on, for example, Linux 64.

When I try to do the same in my Neon installation, I need the Equinox Target components, so I download this which comes as a Zip file that is also a P2 repository, add this as an update site and this all works fine.

However, when I try to do the same for SWT, it is not recognized as an update site.

Specifically I am doing the following:

1. Go to the SWT home page https://www.eclipse.org/swt/

2. Follow the instructions there which say:


Stable
Eclipse download page

http://download.eclipse.org/eclipse/downloads/

"For links to the stable SWT Binary and Source for all platforms,
select the entry for the latest official release and then scroll to bottom of page."


3. As per the instructions, I go to the link provided under the label "Eclipse download page":
and select the 4.6.2 release
http://download.eclipse.org/eclipse/downloads/drops4/R-4.6.2-201611241400/


Scroll down to the bottom of this page and get to a section entitled:
"SWT Binary and Source "

which has a set of ZIP files.

I download swt-4.6.2-gtk-linux-x86_64.zip

4. In Eclipse Neon I invoke
Install New Software

and attempt to add this (which has not been labelled as a P2 repository)

Eclipse complains that it cannot find a jar file in this case (and naturally cannot find it as a repository).

Thanks for any suggestions and corrections!

Re: Add Update site does not work with SWT [message #1751840 is a reply to message #1751839] Mon, 16 January 2017 05:39 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6692
Registered: July 2009
Senior Member
The zip file that you've downloaded is not a P2 repository, but rather, it seems, a plain Java workspace project with the SWT jars inside. I suspect you'd use that for non-OSGi applications on top of SWT. It's probably not what you want.

If you're developing an RCP application you need more than just SWT in your target platform. And I strongly recommend to set up a dedicated target platform (as opposed to using the running IDE as the target platform). But this all seems mostly unrelated to Oomph. Well, you can use Oomph's TargetsTask to set up your target platform, but you'd still need to know what's supposed to be in it and fro where to get that stuff. I suggest that you ask on an RCP forum such as https://www.eclipse.org/forums/index.php/f/106/


Re: Add Update site does not work with SWT [message #1751841 is a reply to message #1751839] Mon, 16 January 2017 05:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Note the pool is a pool of all the artifacts you've used in all your installations. So it's not a p2 Mars pool or anything else specific like that. Nothing is every removed from the pool automatically, but you can garbage collect it either using the installer or the preference page.

It sounds like you're using the installation as the target platform. It seems generally better to keep those things separate, and I'm not even sure how the approach you outlined works to be able to create multiple distros for different target platforms, given that an installation can only have the fragments for the platform you're running on, while the target platform you can choose to include fragments for all platforms.

I would use http://download.eclipse.org/eclipse/updates/4.6 for creating a Neon target platform with the 4.6 versions of SWT and other platform things, but I'm not sure what specifically you're trying to install that isn't already installed. If there are specific things you're looking to install, you can use the repository explorer to find update sites (as opposed to zip files)

https://wiki.eclipse.org/Eclipse_Oomph_Authoring#How_to_find_a_P2_repository_at_Eclipse_using_the_Repository_Explorer

And to make really good use of Oomph, you could author a project setup that would automate setting up not just your installation but also provisioning the projects into the workspace and using targlets to create a proper separate target platform with exactly the right contents from the right update sites. If you use the wizard to create a project setup in some project currently in your Git clone, the wizard is pretty smart to create a functional initial version.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Add Update site does not work with SWT [message #1751870 is a reply to message #1751840] Mon, 16 January 2017 11:14 Go to previous messageGo to next message
Joe Fernandez is currently offline Joe FernandezFriend
Messages: 27
Registered: November 2014
Junior Member
Hi Eike

Thank you very much for your very prompt reply.

Yes, as I noted it is not labelled by the SWT guys as a P2 repository.

What I was hoping for was either a reply with a link to where a SWT P2 repository is available Razz or a reply about setting up an update site that is not a P2 repository Razz . (Hope springs eternal.)

Yes, you are correct, I do not want just a jar for non OSGi applications.

I do have a target platform set up. Whether I have it set up correctly or not may be another question. Sad

And my set up worked running Mars in a Mars workspace. - that is to say, I was able to export my OSGi application and get it to run on Linux machines.

I am about to reply with some more details to Ed Merks but I really appreciate the quick replies from both you and Ed.

Thanks

Joe

Re: Add Update site does not work with SWT [message #1751879 is a reply to message #1751841] Mon, 16 January 2017 12:57 Go to previous messageGo to next message
Joe Fernandez is currently offline Joe FernandezFriend
Messages: 27
Registered: November 2014
Junior Member
Hello Ed

Thank you very much for your very prompt and detailed reply.

I assumed the pool would have Luna, Mars, Neon versions of plugins ( I think I started with Luna on this machine) and I assumed nothing would be deleted. So we are more or less on the same wavelength here.

The pool has win32 versions of the SWT jars that I would expect would be needed to run Eclipse itself on Windows. It does not have Linux GTK versions, which does not surprise me because my download was for Windows.

I have had a Target platform defined since starting development on Mars or Luna.

And as I mentioned, it seemed to be correctly set up since I could run the application on Windows and Linux machines. However, your comments are making me check the current Target Definition. I will let you know what I learn here.

As regards what I am trying to install, it is the SWT GTK jars so that I can again export versions of the application for that OS.

Thanks for the Repository Explorer link, I will look into that as well.



Re: Add Update site does not work with SWT [message #1751888 is a reply to message #1751879] Mon, 16 January 2017 14:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
I believe these zipped downloads are really just a zip of a p2 update site so using jar:<URI-of-zipped-p2-update-site>!/ should work as a URI for accessing that as an update URL...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Add Update site does not work with SWT [message #1752396 is a reply to message #1751888] Mon, 23 January 2017 11:54 Go to previous message
Joe Fernandez is currently offline Joe FernandezFriend
Messages: 27
Registered: November 2014
Junior Member
Thank you very much, Ed and Eike, for pointing me in the right direction.

Ed, I don't think the zip file that I downloaded is a zip of a p2 update site in the case of SWT - it was in the case of the Equinox project, but not in the case of SWT as far as I can tell, and I think that what Eike was also saying is that the SWT zip file is not a P2 repository.

I created a new Target Definition, gave it the Neon site, and included the Eclipse SDK feature as suggested on the SWT forum and this allows me to again export versions that run on Linux.

My problem with the previous Target Definition was probably that when going from Mars to Neon I had deleted Mars sites in the Target definition and not replaced them with the relevant Neon sites - it was pointing to the local pool and resolving locally.

I'll look into making more use of Oomph along the lines of the update project setup you suggested.

Thanks again.


Previous Topic:eclipse installer on windows
Next Topic:Oomph keep on adding site in available update sites
Goto Forum:
  


Current Time: Sun Dec 08 19:02:10 GMT 2024

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

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

Back to the top