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 - Building"

 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page contains information on how to build the [[Equinox p2]] code.
+
{{warning|This page contains obsolete information on how to build the [[Equinox p2]] code in pre-Tycho era. Check [[Equinox/p2/Build]] for Tycho-based build instructions.}}
  
 
===Workspace Setup===
 
===Workspace Setup===
A project has been created in CVS which contains a builder and the build scripts for the new provisioning work. Check out the project from CVS with the following information:
+
The build has been integrated into the Eclipse SDK builds so the build scripts are located in the Eclipse SDK Releng team's eclipsebuilder project. We will modify a few of the property values before we are able to run the build. Check out the project from CVS with the following information:
  
 
<pre>
 
<pre>
 
server: dev.eclipse.org
 
server: dev.eclipse.org
 
repository: /cvsroot/eclipse
 
repository: /cvsroot/eclipse
project: /equinox-incubator/provisioning/org.eclipse.equinox.prov.releng.builder
+
project: org.eclipse.releng.eclipsebuilder
 
</pre>
 
</pre>
  
There is a <code>builder</code> sub-directory which contains an Eclipse install with the minimal bundles required to run the build. It is a Window build and should be replaced with a Linux drop if that is appropriate for the machine that you are running on.
+
Next create a new file <code>org.eclipse.releng.eclipse.builder/equinox/buildConfigs/equinox.prov/local_run.xml</code> with the following contents:
  
Open the <code>run.xml</code> file for editing. There are a few properties in here that you will have to modify.
+
<source lang="xml">
 +
<project name="local run" default="run">
 +
  <target name="run">
 +
      <tstamp>
 +
        <format property="buildId" pattern="yyyyMMdd-HHmm" />
 +
      </tstamp>
 +
      <property name="postingDirectory" value="/home/username" />
 +
      <property name="p2.root" value="${postingDirectory}" />
 +
      <property name="p2.output.base" value="${p2.root}/equinox.p2.build" />
 +
      <property name="equinoxPostingDirectory" value="${p2.output.base}" />
 +
      <property name="java15-home" value="/path/to/java/sun_1.5.0-sr11/jre" />
 +
      <property name="buildLabel" value="${buildId}" />
  
<pre>
+
      <property name="build.timestamp" value="I20071031-0800" />
<property name="prov.root" value="c:" />
+
<property name="prov.output.base" value="${prov.root}/equinox.prov.build" />
+
<property name="prov.install.folder" value="equinox.prov" />
+
<property name="sdk.archive" value="${prov.root}/downloads/eclipse-SDK-3.4M1-win32.zip" />
+
<property name="rcp.delta.archive" value="${prov.root}/downloads/eclipse-RCP-3.4M1-delta-pack.zip" />
+
<property name="rcp.archive" value="${prov.root}/downloads/eclipse-RCP-3.4M1-win32.zip" />
+
<property name="prov.java" value="d:/java/jdk1.5.0_11/jre/bin/java" />
+
</pre>
+
  
Then from the command-line, run the appropriate build file: either <code>build_win.bat</code> or <code>build_lnx</code>.
+
      <property name="sdk.archive" value="/path/to/eclipse-SDK-${build.timestamp}-linux-gtk.tar.gz" />
 +
      <property name="rcp.archive" value="/path/to/eclipse-RCP-${build.timestamp}-linux-gtk.tar.gz" />
 +
      <property name="rcp.delta.archive" value="/path/to/eclipse-RCP-${build.timestamp}-delta-pack.zip" />
 +
      <property name="releng.tools.archive" value="/path/to/org.eclipse.releng.tools-${build.timestamp}.zip" />
 +
 
 +
      <property name="updateSite" value="/path/to/update/site" />
 +
      <mkdir dir="${updateSite}" />
 +
 
 +
      <ant antfile="run.xml"/>
 +
 
 +
      <property name="p2.result" value="/path/to/result/dir" />
 +
      <property name="p2.result.builds" value="${p2.result}/builds/${buildLabel}" />
 +
      <mkdir dir="${p2.result.builds}" />
 +
      <copy todir="${p2.result.builds}">
 +
        <fileset dir="${p2.output.base}/${buildId}">
 +
            <include name="**/*" />
 +
        </fileset>
 +
      </copy>
 +
  </target>
 +
</project>
 +
</source>
 +
 
 +
Make sure you download the appropriate files and change all the paths in the file you just created!
 +
 
 +
Next you will create a new Eclipse Application and run the AntRunner and point it to your new file:
 +
# Run Settings...
 +
# create new Eclipse Application
 +
# change the application to be <code>org.eclipse.ant.core.antRunner</code>
 +
# add the build file to the command-line arguments: <code>-buildfile ${resource_loc:/org.eclipse.releng.eclipsebuilder/equinox/buildConfigs/equinox.prov/local_run.xml}</code>
  
 
''Note:'' you must have the CVS executable available from the command-line in order for the checkout to work.
 
''Note:'' you must have the CVS executable available from the command-line in order for the checkout to work.
 +
 +
Then run your new launch configuration to build.
  
 
===Output===
 
===Output===

Latest revision as of 20:46, 28 October 2013

Warning2.png
This page contains obsolete information on how to build the Equinox p2 code in pre-Tycho era. Check Equinox/p2/Build for Tycho-based build instructions.


Workspace Setup

The build has been integrated into the Eclipse SDK builds so the build scripts are located in the Eclipse SDK Releng team's eclipsebuilder project. We will modify a few of the property values before we are able to run the build. Check out the project from CVS with the following information:

server: dev.eclipse.org
repository: /cvsroot/eclipse
project: org.eclipse.releng.eclipsebuilder

Next create a new file org.eclipse.releng.eclipse.builder/equinox/buildConfigs/equinox.prov/local_run.xml with the following contents:

<project name="local run" default="run">
   <target name="run">
      <tstamp>
         <format property="buildId" pattern="yyyyMMdd-HHmm" />
      </tstamp>
      <property name="postingDirectory" value="/home/username" />
      <property name="p2.root" value="${postingDirectory}" />
      <property name="p2.output.base" value="${p2.root}/equinox.p2.build" />
      <property name="equinoxPostingDirectory" value="${p2.output.base}" />
      <property name="java15-home" value="/path/to/java/sun_1.5.0-sr11/jre" />
      <property name="buildLabel" value="${buildId}" />
 
      <property name="build.timestamp" value="I20071031-0800" />
 
      <property name="sdk.archive" value="/path/to/eclipse-SDK-${build.timestamp}-linux-gtk.tar.gz" />
      <property name="rcp.archive" value="/path/to/eclipse-RCP-${build.timestamp}-linux-gtk.tar.gz" />
      <property name="rcp.delta.archive" value="/path/to/eclipse-RCP-${build.timestamp}-delta-pack.zip" />
      <property name="releng.tools.archive" value="/path/to/org.eclipse.releng.tools-${build.timestamp}.zip" />
 
      <property name="updateSite" value="/path/to/update/site" />
      <mkdir dir="${updateSite}" />
 
      <ant antfile="run.xml"/>
 
      <property name="p2.result" value="/path/to/result/dir" />
      <property name="p2.result.builds" value="${p2.result}/builds/${buildLabel}" />
      <mkdir dir="${p2.result.builds}" />
      <copy todir="${p2.result.builds}">
         <fileset dir="${p2.output.base}/${buildId}">
            <include name="**/*" />
         </fileset>
      </copy>
   </target>
</project>

Make sure you download the appropriate files and change all the paths in the file you just created!

Next you will create a new Eclipse Application and run the AntRunner and point it to your new file:

  1. Run Settings...
  2. create new Eclipse Application
  3. change the application to be org.eclipse.ant.core.antRunner
  4. add the build file to the command-line arguments: -buildfile ${resource_loc:/org.eclipse.releng.eclipsebuilder/equinox/buildConfigs/equinox.prov/local_run.xml}

Note: you must have the CVS executable available from the command-line in order for the checkout to work.

Then run your new launch configuration to build.

Output

  • The Agent zip will be in ${prov.output.base}/equinox-prov-agent-<timestamp>-win32.zip
  • The Metadata and Artifact repositories will be in ${prov.output.base}/servers

What Happens

  1. build features for the director, metadata generator, and self-hosting bundles
  2. build the agent from a product
  3. generate the metadata for the agent
  4. run the director and install the agent from the generated metadata and artifacts
  5. zip up the agent install
  6. generate the metadata for the self-hosting bundles and Eclipse SDK

TODO

  • integrate with the regular Platform builds
  • write code to determine the output file of the build
  • should enhance so instead of building several different things, we should build one big feature and then use the packager to put together the things that we need

Back to the top