Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Possible to download files other than jars through update site?
Possible to download files other than jars through update site? [message #766459] Thu, 15 December 2011 20:39 Go to next message
Roshan S. is currently offline Roshan S.
Messages: 125
Registered: July 2009
Senior Member
Hi,

I have an update site running with my features and plugins. What I wanted to know, is it possible to download a file, such as a batch file, when the user updates the plugins?
Re: Possible to download files other than jars through update site? [message #766515 is a reply to message #766459] Thu, 15 December 2011 23:07 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2500
Registered: July 2009
Senior Member
An IU can have one artifact, which typically is a jar or zip file, but
it can really be any file. You can write touchpoint instructions that
operate on the artifact when installing and uninstalling (some already
exists e.g. unzipping, cleaning up an unzip, copy, remove).

The artifact resides in an artifact repository, and it in turn point to
the actual artifact (an URL to download).

You can naturally also package your file inside the jar (or some other
jar, like a plugin that only contains resources like this...).

It all depends on what you trying to achieve.

So - Answer is 'yes'.

Hope that helps.

Regards
- henrik

On 2011-15-12 21:39, Roshan S. wrote:
> Hi,
>
> I have an update site running with my features and plugins. What I
> wanted to know, is it possible to download a file, such as a batch file,
> when the user updates the plugins?
Re: Possible to download files other than jars through update site? [message #768785 is a reply to message #766515] Tue, 20 December 2011 19:46 Go to previous messageGo to next message
Roshan S. is currently offline Roshan S.
Messages: 125
Registered: July 2009
Senior Member
Thanks for the reply Henrik,

I would like to put my file on our server so: http://www.mycompany.com/eclipsec.exe but unfortunately, I don't think the copy action point will support a URL. I used:
instructions.install=org.eclipse.equinox.p2.touchpoint.natives.copy(source:http${#58}//www.mycompany.com/updatesite/eclipsec.exe,target:${installFolder}/eclipsec.exe,overwrite:true);

Am I using the touchpoint incorrectly or would it be better to package the eclipsec.exe in a jar have that installed as part of the update and then unzip it using the unzip action?

Thanks,
Roshan
Re: Possible to download files other than jars through update site? [message #768823 is a reply to message #768785] Tue, 20 December 2011 21:55 Go to previous message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2500
Registered: July 2009
Senior Member
You should view the exe as an artefact and have an IU that describes it.
Other IUs should depend on it.
The instructions to install it will be given the reference to the
artifact - it is in some variable (but I don't remember the name).

- henrik

On 2011-20-12 20:46, Roshan S. wrote:
> Thanks for the reply Henrik,
>
> I would like to put my file on our server so:
> http://www.mycompany.com/eclipsec.exe but unfortunately, I don't think
> the copy action point will support a URL. I used:
> instructions.install=org.eclipse.equinox.p2.touchpoint.natives.copy(source:http${#58}//www.mycompany.com/updatesite/eclipsec.exe,target:${installFolder}/eclipsec.exe,overwrite:true);
>
> Am I using the touchpoint incorrectly or would it be better to package
> the eclipsec.exe in a jar have that installed as part of the update and
> then unzip it using the unzip action?
>
> Thanks,
> Roshan
Previous Topic:Uninstalling feature using p2 director after feature had been updated via update site
Next Topic:P2 documentation?
Goto Forum:
  


Current Time: Tue Sep 16 09:31:45 GMT 2014

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

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