Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Equinox/p2/Director application"

< Equinox‎ | p2
 
(38 intermediate revisions by 15 users not shown)
Line 1: Line 1:
The director application is a headless way of performing some of the p2 operations such as installing or uninstalling installable units. Given the appropriate metadata, this application is capable on provisioning a complete installation from scratch or simply extending your application.  
+
The [http://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html director application] is a headless way of performing some of the p2 operations such as installing or uninstalling installable units. Given the appropriate metadata, this application is capable of provisioning a complete installation from scratch or simply extending your application.  
  
Depending on the needs, this application can be executed inside or outside of the application being provisioned
+
Depending on the needs, this application can be executed inside or outside of the application being provisioned. For complete documentation on the director, including a full list of supported arguments and related examples, see the official [http://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html p2 director documentation].
  
 +
== Scripted Examples ==
 +
* [[Equinox_p2_director_application/Examples/Install_into_dropins|Install into eclipse/dropins/]]
 +
* [[Equinox_p2_director_application/Examples/Install_into_dropins_with_link_file|Install into eclipse/dropins/ with .link file]]
 +
* [[Equinox_p2_director_application/Examples/Install_into_eclipse_using_SDKProfile|Install into eclipse/ using SDKProfile]] (the [[Equinox_p2_Update_UI_Users_Guide|p2 Update UI]]'s default behaviour)
  
== Terminology ==
+
== See Also ==
; Director application :the application performing p2 operations such as install or uninstall. This application is provided by the org.eclipse.equinox.p2.director.app bundle.
+
; Provisioning operation :an operation installing, uninstalling features.
+
; Target product :the installation targeted by the provisioning operation.
+
+
== Running inside the target application ==
+
In this mode, the provisioning operation happens from within the targeted produced that you are provisioning. It is equivalent to starting up the targeted product and using the p2 UI to perform the equivalent operation.
+
  
This means that the target application has to be in a runnable state and that it has to contain the director application bundle. Also since the target product will have run, cache files will have been created in the configuration folder (e.g. configuration/org.eclipse.osgi).
+
* [http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html Installing software using the p2 director application]
  
The following example shows the command line used to install CDT into the SDK.
+
[[Category:Equinox_p2|Director application]] [[Category:Equinox_p2_Director]]
<tt>
+
    <targetProductFolder>/eclipse.exe
+
    -application org.eclipse.equinox.p2.director.app.application
+
    -metadataRepository file:d:/tmp/cdt/site.xml
+
    -artifactRepository file:d:/tmp/cdt/site.xml
+
    -installIU org.eclipse.cdt.feature.group
+
</tt>
+
 
+
Note that this mode is equivalent to the former update manager command line application (http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/update_standalone.html).
+
 
+
== Provisioning without running the target application ==
+
In this case the provisioning operation is happening "outside" of the targeted product. The "targeted product" is *not* started. This allows to both modify an existing installation and create a complete installation from scratch given proper metadata.
+
 
+
It also has the advantage that since the targeted product does not need to be started, the provisioning operation can be performed on any platform for any other platform (e.g. on my windows machine, I can create add plug-ins to a linux-based target application).
+
+
=== Installing / uninstalling IUs into a target product  ===
+
To install or uninstall something into an existing target product a few extra arguments than in the "inside" mode need to be set. It mostly consist in letting the provisioning operation the ID of the profile it needs to operate on, and where it is located on disk.
+
 
+
For example, if from a directory called "d:/builder", I want to install CDT into an existing SDK located into "d:/eclipse", I will use the following command line.
+
 
+
<tt>
+
    -application org.eclipse.equinox.p2.director.app.application
+
    -metadataRepository file:d:/tmp/cdt/site.xml
+
    -artifactRepository file:d:/tmp/cdt/site.xml
+
    -installIU org.eclipse.cdt.feature.group
+
    -destination d:/eclipse/
+
    -profile SDKProfile
+
   
+
    -vmArgs
+
    -Declipse.p2.data.area=d:/eclipse/p2
+
</tt>
+
 
+
=== Installing a complete system ===
+
 
+
== Arguments ==
+
; -application org.eclipse.equinox.p2.director.app.application :the application ID.
+
; -metadataRepository :the metadata repository where the installable unit to be installed is found.
+
; -artifactRepository :the artifact repositiry where the artifacts will be found.
+
; -installIU :the identifier of the installable unit to install. If you are looking to install a feature, the identifier of the feature has to be suffixed with ".feature.group".
+
 
+
 
+
[[Category:Equinox_p2|Director application]]
+

Latest revision as of 10:56, 10 January 2020

The director application is a headless way of performing some of the p2 operations such as installing or uninstalling installable units. Given the appropriate metadata, this application is capable of provisioning a complete installation from scratch or simply extending your application.

Depending on the needs, this application can be executed inside or outside of the application being provisioned. For complete documentation on the director, including a full list of supported arguments and related examples, see the official p2 director documentation.

Scripted Examples

See Also

Back to the top