blob: 8a31aec3f0b61629c151699627c0dc1a16da83b1 [file] [log] [blame]
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; U) [Netscape]">
<title>Updates - Software Update Example</title>
</head>
<body>
<h2>
<b>Example - Software Update</b></h2>
<h3>
Introduction</h3>
This example demonstrates how to install additional components to the Eclipse
platform. It is contained in plug-in <b><tt>org.eclipse.update.examples
</tt></b>.
<br>&nbsp;
<h3>
Running the example</h3>
To run the example, you'll need to have an HTTP server available (eg. Apache
server). Copy the entire <b><tt>install</tt></b> directory from the example
plug-in <b><tt>org.eclipse.update.examples</tt></b> into the HTTP server
document tree (eg. <tt>htdocs</tt> directory for Apache server). Make sure
the server is running.
<p>Start the Eclipse workbench. Select <b>Help</b>, then <b>Software Updates</b>,
then <b>Add...</b>
<br>On the location page enter the URL of your server (eg. http://my.server/
... fill in your actual server URL here). The URL needs to&nbsp; reflect
any additional server path elements leading to the <tt>install</tt> directory
you copied. For example, if you copied the <tt>install</tt> directory into
htdocs/examples (so the path is htdocs/examples/install), you would enter
the URL as http://my.server/examples.
<br>Press <b>Add</b> and <b>Next></b>. You should be presented with a list
containing installable components. The provided example contains a single
component called <b>Update Example</b>. Select it and complete the installation.You'll
need to restart the workbench to activate the changes.
<p>Once restarted, you can see the new example function by adding it to
your perspectives. Select <b>Perspective</b>, <b>Customize...</b> and then
expand <b>Other</b>. Select <b>Sample Action Set</b> (this is an action
set implemented by this example plug-in that you just downloaded and installed).
A new menu labeled
<b>Sample Menu</b> should appear in the workbench with
a new action. Clicking the menu action displays an information box (to
verify the installation actually worked).
<br>&nbsp;
<h3>
Details</h3>
The example illustrates the structure required on an HTTP server for downloading
Eclipse components. The example consists of a simple plugin that adds a
menu and an action to the workbench. The plug-in has been packaged as a
component jar using the Plug-in Development tools in the Eclipse workbench
(PDE). Note, that the base plug-in directory for <tt>org.eclipse.update.examples</tt>
does not contain the <tt>plugin.xml</tt> file. Consequently the base plugin
does not contribute anything to the workbench. The base plugin contains
an <tt>install</tt> directory that is used in the previous steps.
<p>The install directory that you copied to the HTTP server is the output
of building a component jar using the PDE Component Project setup (with
one extra "server-side" file added). It contains the following:
<p><tt>install/</tt>
<br><tt>&nbsp;&nbsp;&nbsp; components/</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install.index</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; org.eclipse.update.examples.component_1.0.0/</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
install.xml</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
install.properties</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
install_en.properties</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
orq.eclipse.update.examples.component_1.0.0.jar</tt>
<p>The above directory structure is required to exist on the server. There
is a common <tt>install</tt> root. There is also a common <tt>components</tt>
subdirectory. It contains a subdirectory for each component available for
download (in the example case just one, <tt>org.eclipse.update.examples.component_1.0.0</tt>).
The file <tt>install.index</tt> was manually created (not generated by
PDE). It is a simple directory index of component directories (one line
per directory). This allows the update client to discover which component
directories actually exist on the server.
<p>The actual component as created by PDE is contained in the <tt>orq.eclipse.update.examples.component_1.0.0.jar.
</tt>Its
<tt>install.xml</tt>
file that describes the component is also exposed to allow the update support
to find out about the component without the need to actually download the
jar. The <tt>install[_locale].properties</tt> files contain separated strings.
<p>Please refer to PDE documentation for additional details of creating
component jars. Select <b>Help</b>, then <b>Help Contents</b> and <b>PDE
ISV Guide</b> (from the drop box). Please refer to the Eclipse platform
documentation for additional details of the installation conventions. Select
<b>Help</b>,
then <b>Help Contents</b> and <b>Platform Plug-In Developer Guide</b> (from
the drop box). The installation information is contained in section <b>Reference</b>,
<b>Other
Reference Articles, Platform Installation and Update</b>.
<br>&nbsp;
<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation 2000" BORDER=0 height=12 width=195></a>
</body>
</html>