aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/scripts
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-01-26 15:48:45 -0800
committerSiva Velusamy <vsiva@google.com>2012-01-26 16:02:16 -0800
commite63fabc5ec18325c4a25ac620011889930664f4c (patch)
treefd2e107f8fc3b4b62b0c8e7ffd8b99c5004a40c9 /eclipse/scripts
parent75014c3dfd4f2117355c1c509fcab0ae71e62685 (diff)
downloadsdk-e63fabc5ec18325c4a25ac620011889930664f4c.zip
sdk-e63fabc5ec18325c4a25ac620011889930664f4c.tar.gz
sdk-e63fabc5ec18325c4a25ac620011889930664f4c.tar.bz2
rcp: support per platform builds.
The ant script now takes an option that controls which platforms to build the RCP for. If no option is given, the RCP is built for all platforms. Change-Id: I433ae41cd65af820e2d21f25f1324844512a63da
Diffstat (limited to 'eclipse/scripts')
-rw-r--r--eclipse/scripts/rcp/HOWTO-BUILD10
-rw-r--r--eclipse/scripts/rcp/build.properties5
-rw-r--r--eclipse/scripts/rcp/build.xml102
3 files changed, 66 insertions, 51 deletions
diff --git a/eclipse/scripts/rcp/HOWTO-BUILD b/eclipse/scripts/rcp/HOWTO-BUILD
index 9278f98..3eb695f 100644
--- a/eclipse/scripts/rcp/HOWTO-BUILD
+++ b/eclipse/scripts/rcp/HOWTO-BUILD
@@ -1,9 +1,15 @@
To build the Monitor RCP based application, do:
$ lunch sdk-eng
-$ ./sdk/eclipse/scripts/create_all_symlinks.sh -f
+$ ./sdk/eclipse/scripts/create_all_symlinks.sh
$ cd sdk/eclipse/scripts/rcp
$ ant
-This will build the RCP in the folder:
+This will build the RCP for all the platforms in the folder:
$ANDROID_SRC/out/host/eclipse/rcp/build/I.RcpBuild/
+
+To build only a subset of platforms, use:
+
+ant -DbuildFor=<platform>
+
+where platform is one of linux, darwin or windows.
diff --git a/eclipse/scripts/rcp/build.properties b/eclipse/scripts/rcp/build.properties
index 3e69a96..0ca363a 100644
--- a/eclipse/scripts/rcp/build.properties
+++ b/eclipse/scripts/rcp/build.properties
@@ -14,11 +14,6 @@ product=/com.android.ide.eclipse.monitor/monitor.product
runPackager=true
archivePrefix=monitor
collectingFolder=${archivePrefix}
-configs=linux,gtk,x86_64 & \
- linux,gtk,x86 & \
- macosx,cocoa,x86_64 & \
- win32,win32,x86_64 & \
- win32,win32,x86
allowBinaryCycles = true
buildType=I
buildId=RcpBuild
diff --git a/eclipse/scripts/rcp/build.xml b/eclipse/scripts/rcp/build.xml
index d4d2bd9..5335c36 100644
--- a/eclipse/scripts/rcp/build.xml
+++ b/eclipse/scripts/rcp/build.xml
@@ -20,69 +20,83 @@
<!-- Location of the sources -->
<property name="srcDir" value="${ANDROID_SRC}/sdk/eclipse/" />
+ <!-- Identify configurations to build -->
+ <condition property="buildconfigs" value="linux,gtk,x86 &amp; linux,gtk,x86_64">
+ <equals arg1="${buildFor}" arg2="linux" />
+ </condition>
+ <condition property="buildconfigs" value="macosx,cocoa,x86_64">
+ <equals arg1="${buildFor}" arg2="darwin" />
+ </condition>
+ <condition property="buildconfigs" value="win32,win32,x86 &amp; win32,win32,x86_64">
+ <equals arg1="${buildFor}" arg2="windows" />
+ </condition>
+
+ <!-- if no platforms are provided, then build for all platforms -->
+ <property name="buildconfigs" value="linux,gtk,x86 &amp; linux,gtk,x86_64 &amp; win32,win32,x86 &amp; win32,win32,x86_64 &amp; macosx,cocoa,x86_64" />
+
<!-- locate launcher plugin inside eclipse -->
- <path id="equinox.launcher.path">
- <fileset dir="${basebuilder}/plugins">
- <include name="org.eclipse.equinox.launcher_*.jar" />
- </fileset>
- </path>
- <property name="equinox.launcher" refid="equinox.launcher.path" />
+ <path id="equinox.launcher.path">
+ <fileset dir="${basebuilder}/plugins">
+ <include name="org.eclipse.equinox.launcher_*.jar" />
+ </fileset>
+ </path>
+ <property name="equinox.launcher" refid="equinox.launcher.path" />
<!-- locate pde build plugin inside eclipse -->
- <path id="pde.build.dir.path">
- <dirset dir="${basebuilder}/plugins">
- <include name="org.eclipse.pde.build_*" />
- </dirset>
- </path>
- <property name="pde.build.dir" refid="pde.build.dir.path" />
+ <path id="pde.build.dir.path">
+ <dirset dir="${basebuilder}/plugins">
+ <include name="org.eclipse.pde.build_*" />
+ </dirset>
+ </path>
+ <property name="pde.build.dir" refid="pde.build.dir.path" />
<!-- create the build directory, copy plugins and features into it -->
- <target name="copy_srcs">
- <mkdir dir="${buildDir}" />
- <copy todir="${buildDir}">
- <fileset dir="${srcDir}/">
+ <target name="copy_srcs">
+ <mkdir dir="${buildDir}" />
+ <copy todir="${buildDir}">
+ <fileset dir="${srcDir}/">
<include name="plugins/**" />
<include name="features/**" />
</fileset>
- </copy>
- </target>
+ </copy>
+ </target>
<!-- create target platform -->
<target name="create-target">
- <mkdir dir="${targetDir}" />
- <mkdir dir="${targetDir}/deltapack" />
- <mkdir dir="${targetDir}/repos" />
+ <mkdir dir="${targetDir}" />
+ <mkdir dir="${targetDir}/deltapack" />
+ <mkdir dir="${targetDir}/repos" />
- <unzip src="${targetSrcDir}/deltapack/eclipse-3.6.2-delta-pack.zip" dest="${targetDir}/deltapack" />
- <unzip src="${targetSrcDir}/platform/org.eclipse.platform.source-3.6.2.zip" dest="${targetDir}/repos/platform" />
+ <unzip src="${targetSrcDir}/deltapack/eclipse-3.6.2-delta-pack.zip" dest="${targetDir}/deltapack" overwrite="false" />
+ <unzip src="${targetSrcDir}/platform/org.eclipse.platform.source-3.6.2.zip" dest="${targetDir}/repos/platform" overwrite="false" />
</target>
-
+
<!-- Launch pde build -->
- <target name="pde-build">
- <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
- <arg value="-application" />
- <arg value="org.eclipse.ant.core.antRunner" />
- <arg value="-buildfile" />
- <arg value="${pde.build.dir}/scripts/productBuild/productBuild.xml" />
+ <target name="pde-build" depends="copy_srcs, create-target">
+ <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
+ <arg value="-application" />
+ <arg value="org.eclipse.ant.core.antRunner" />
+ <arg value="-buildfile" />
+ <arg value="${pde.build.dir}/scripts/productBuild/productBuild.xml" />
<arg value="-data" />
<arg value="${buildDir}/workspace" />
- <arg value="-Dtimestamp=${timestamp}" />
+ <arg value="-Dtimestamp=${timestamp}" />
<arg value="-DeclipseLocation=${baseBuilder}" />
<arg value="-DbuildDirectory=${buildDir}" />
<arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" />
<arg value="-DrepoBaseLocation=${targetDir}/repos/" />
<arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" />
- <classpath>
- <pathelement location="${equinox.launcher}" />
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete dir="${outDir}" />
- <delete dir="${targetDir}" />
- </target>
-
- <target name="build" depends="clean, copy_srcs, create-target, pde-build" />
-</project>
+ <arg value="-Dconfigs=${buildconfigs}" />
+ <classpath>
+ <pathelement location="${equinox.launcher}" />
+ </classpath>
+ </java>
+ </target>
+
+ <target name="clean">
+ <delete dir="${outDir}" />
+ <delete dir="${targetDir}" />
+ </target>
+ <target name="build" depends="pde-build" />
+</project>