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 "Platform-releng-packager"

m (tweak formatting and add missing releng category)
 
(5 intermediate revisions by one other user not shown)
Line 11: Line 11:
  
 
<p>Eclipse components are delivered as zip files. Each zip file contains a collection
 
<p>Eclipse components are delivered as zip files. Each zip file contains a collection
   of features and plug-ins. Typically the zips contain all function that a particular
+
   of features and plug-ins. Typically the zips contain all functions that a particular
 
   component has to offer. It is often the case that consumers either need more
 
   component has to offer. It is often the case that consumers either need more
 
   than one component and/or only need parts of some components. Without assistance,
 
   than one component and/or only need parts of some components. Without assistance,
Line 23: Line 23:
 
<h3>Packager configuration files:</h3>
 
<h3>Packager configuration files:</h3>
 
<dl>
 
<dl>
   <dt><strong>packager.properties</strong></dt>
+
   <dt><strong>packager.properties</strong>
   <dd>A Java properties file that controls the packaging process</dd>
+
   <dd>A Java properties file that controls the packaging process
   <dt><strong>customTargets.xml</strong></dt>
+
   <dt><strong>customTargets.xml</strong>
   <dd>An Ant file used to customize different aspects of packaging</dd>
+
   <dd>An Ant file used to customize different aspects of packaging
   <dt> <strong>packaging.properties</strong></dt>
+
   <dt> <strong>packaging.properties</strong>
 
   <dd>A Java properties file that controls the files included at the root
 
   <dd>A Java properties file that controls the files included at the root
     of the archives and file permissions</dd>
+
     of the archives and file permissions
 
</dl>
 
</dl>
 
<h3>Quick start: </h3>
 
<h3>Quick start: </h3>
Line 41: Line 41:
 
   <li>Customize the packager.properties file as follows:<br>
 
   <li>Customize the packager.properties file as follows:<br>
 
     <ul>
 
     <ul>
       <li> <strong>baseDirectory:</strong> the directory in which the actual packaging work will take place. <br><strong> e.g. </strong>buildDirectory = C:\temp\base</li>
+
       <li> <strong>baseDirectory:</strong> the directory in which the actual packaging work will take place. <br><strong> e.g. </strong>buildDirectory = C:\temp\newPackaging</li>
 
       <li> <strong>featureList:</strong> a comma separated list of feature ids that you wish to contribute.  
 
       <li> <strong>featureList:</strong> a comma separated list of feature ids that you wish to contribute.  
 
  <br><strong> e.g. </strong>featureList = org.eclipse.platform, org.eclipse.jdt</li>
 
  <br><strong> e.g. </strong>featureList = org.eclipse.platform, org.eclipse.jdt</li>
Line 50: Line 50:
 
       <li> <strong>config:</strong> The configurations to package. This is an "&" separated list of comma separated triples of operating system, windowing system and architecture.
 
       <li> <strong>config:</strong> The configurations to package. This is an "&" separated list of comma separated triples of operating system, windowing system and architecture.
 
  <br><strong> e.g. </strong>config = win32, win32, x86 & linux, gtk, ppc</li>
 
  <br><strong> e.g. </strong>config = win32, win32, x86 & linux, gtk, ppc</li>
      <li> if you are running on linux, set <strong>zipArgs</strong> to -y </li>
 
 
     </ul>
 
     </ul>
 
     <p></p>
 
     <p></p>
Line 63: Line 62:
 
     <pre>
 
     <pre>
 
     java  
 
     java  
-jar <eclipse install>/startup.jar –application org.eclipse.ant.core.antRunner  
+
-jar <eclipse install>\startup.jar –application org.eclipse.ant.core.antRunner  
     -buildfile <<eclipse install>/plugins/org.eclipse.pde.build_<version>/scripts/package.xml>  
+
     -buildfile <<eclipse install>\plugins\org.eclipse.pde.build_<version>\scripts\package.xml>  
 
     -DpackagingInfo=<path to your packaging configuration directory>  
 
     -DpackagingInfo=<path to your packaging configuration directory>  
 
     </pre>
 
     </pre>
Line 72: Line 71:
  
 
<h3>Packager map file format: </h3>
 
<h3>Packager map file format: </h3>
The map files are used to describe the various zip, their content and where they can be fetched from. They are alike the map file for the build process.
+
The packager map files are used to describe the various archives, their content and where they can be downloaded from. They are similar to the map files used in the build process to fetch bundles from repositories. The format of a packager map file entry is as follows:
The format of a map file entry is as follow:
+
 
<br>
 
<br>
archiveName = url "|" [configList] "|" [directory] "|" contentDescription "|" componentName
+
archiveName = url | [configList] | [directory] | contentDescription | componentName
  
 
<ul>
 
<ul>
Line 94: Line 92:
 
Note that configList and directory are optional, it is important that the appropriate number "|" separators are still used.</p>
 
Note that configList and directory are optional, it is important that the appropriate number "|" separators are still used.</p>
 
Examples:<br>
 
Examples:<br>
<ul>
 
<li>#Map file entry for the eclipse platform for windows<br>
 
eclipse-platform-S-3.2RC7-200606021317-win32.zip=http://download.eclipse.org/eclipse/downloads/drops/S-3.2RC7-200606021317/ | win32,win32,x86 | | runtime | ide<br></li>
 
  
<li>#Map file entry for EMF (platform independent)<br>
+
#Map file entry for the eclipse platform for windows
emf-sdo-runtime-S200606051102.zip=http://download.eclipse.org/tools/emf/downloads/drops/2.2.0/S200606051102/ | | | runtime | emf<br></li>
+
eclipse-platform-S3.2RC7-win32.zip=http://download.eclipse.org/eclipse/downloads/drops/S-3.2RC7-200606021317/ | win32,win32,x86 | | runtime | ide
</ul>
+
 +
#Map file entry for EMF (platform independent)
 +
emf-sdo-runtime-S200606051102.zip=http://download.eclipse.org/tools/emf/downloads/drops/2.2.0/S200606051102/ | | | runtime | emf
 +
 
 +
[[Category:Releng]]

Latest revision as of 17:20, 11 April 2008

Packaging eclipse components
Repackaging Eclipse

Eclipse components are delivered as zip files. Each zip file contains a collection of features and plug-ins. Typically the zips contain all functions that a particular component has to offer. It is often the case that consumers either need more than one component and/or only need parts of some components. Without assistance, consumers would have to manually fetch the zips containing the superset of the function they need and then manually extract the required features and plug-ins. This can be a laborious and error prone process.

Fortunately, PDE contains a batch oriented mechanism, the packager which can help. In short, the packager takes as input a list of zips containing features and a list of interesting features. It then fetches the zips, extracts the features (and their plug-ins) and repackages them into an output zip.

Packager configuration files:

packager.properties
A Java properties file that controls the packaging process
customTargets.xml
An Ant file used to customize different aspects of packaging
packaging.properties
A Java properties file that controls the files included at the root of the archives and file permissions

Quick start:

Below is a set of basic steps to get started with the packager. More information is available near the various properties in the actual packager configuration files. It is suggested that you build *nix packages on a *nix machine to ensure that file permissions are assigned correctly.

  1. Create a packaging configuration directory to host the packaging work (we'll use c:\temp\newPackaging here)
  2. Copy the packager template files into C:\temp\newPackaging
  3. Customize the packager.properties file as follows:
    • baseDirectory: the directory in which the actual packaging work will take place.
      e.g. buildDirectory = C:\temp\newPackaging
    • featureList: a comma separated list of feature ids that you wish to contribute.
      e.g. featureList = org.eclipse.platform, org.eclipse.jdt
    • componentFilter: A comma separated list of components from which your features can be found. Specifying this will avoid unnecessary downloads. Use * if you don't know the components. This lists includes eclipse, jdt, cdt, gef, emf, etc.
      e.g. componentFilter = eclipse
    • contentFilter: A comma separated list of content type you are interested in. Common content types are runtime, sdk, source, doc, etc. This is used to optimize the downloading of the archives. Leave this blank to not filter on content type.
      e.g. contentFilter = sdk, runtime, source
    • config: The configurations to package. This is an "&" separated list of comma separated triples of operating system, windowing system and architecture.
      e.g. config = win32, win32, x86 & linux, gtk, ppc

  4. Get packager map files. The following properties control downloading the map files:
    • localMaps: Set this property if you have map files locally (e.g. localMaps = true), put the map files in ${downloadDirectory} (by default this is ${baseDirectory}/toPackage) (e.g. C:\temp\base\toPackage). Comment out this property to automatically download the map file.
    • packagerMapURL: The URL from which to download the map file. Set the URL if you wish to download the map file from the web.

    The packager script will concatenate all *.map files found in ${downloadDirectory}. To download more than one map file, or to fetch them from CVS edit the customTargets.xml file and change the getMapFiles target in customTargets.xml.

  5. Run the packager using the following command:
         java 
    	-jar <eclipse install>\startup.jar –application org.eclipse.ant.core.antRunner 
        	-buildfile <<eclipse install>\plugins\org.eclipse.pde.build_<version>\scripts\package.xml> 
        	-DpackagingInfo=<path to your packaging configuration directory> 
        

Packager map file format:

The packager map files are used to describe the various archives, their content and where they can be downloaded from. They are similar to the map files used in the build process to fetch bundles from repositories. The format of a packager map file entry is as follows:

archiveName = url | [configList] | [directory] | contentDescription | componentName
  • archivename: This represents the name of the archive
  • url: the url where the archive can be found. The concatenation of url and archiveName should point to the archive to download.
  • configList: This is an "&" separated list of configs that this archive contains. (eg: win32, win32, x86 & linux, gtk, x86). If no value is given the archive is considered to be platform independant.
  • directory: The directory where the content of the archive should be extracted relative to a standard eclipse installation. When no value is specified it means that the archive contains an eclipse installation directory at its root.
  • contentDescription: The content flags indicating the type of content in this archive. Normally this is something like runtime, sdk, source, doc, etc.
  • componentName: The canonical name of the component this archive is for. For example eclipse, jdt, cdt, gef, emf, etc.

Note that configList and directory are optional, it is important that the appropriate number "|" separators are still used.

Examples:

#Map file entry for the eclipse platform for windows
eclipse-platform-S3.2RC7-win32.zip=http://download.eclipse.org/eclipse/downloads/drops/S-3.2RC7-200606021317/ | win32,win32,x86 | | runtime | ide

#Map file entry for EMF (platform independent)
emf-sdo-runtime-S200606051102.zip=http://download.eclipse.org/tools/emf/downloads/drops/2.2.0/S200606051102/ | | | runtime | emf

Back to the top