1 <project name="com.android.eclipse.rcp.build" default="build"> 2 <!-- Root of Android Source Tree --> 3 <property name="ANDROID_SRC" location="../../" /> 4 5 <!-- Host Eclipse used for building the RCP --> 6 <property name="basebuilder" value="${ANDROID_SRC}/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/" /> 7 8 <!-- Source for target prebuilts --> 9 <property name="targetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse/" /> 10 11 <!-- Location where build happens and resulting binaries are generated --> 12 <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/rcp/" /> 13 14 <!-- Location where the target platform is created --> 15 <property name="targetDir" value="${outDir}/target" /> 16 17 <!-- Location where the target platform is created --> 18 <property name="buildDir" value="${outDir}/build" /> 19 20 <!-- Location of the sources --> 21 <property name="srcDir" value="${ANDROID_SRC}/sdk/eclipse/" /> 22 23 <!-- Identify configurations to build --> 24 <condition property="buildconfigs" value="linux,gtk,x86 & linux,gtk,x86_64"> 25 <equals arg1="${buildFor}" arg2="linux" /> 26 </condition> 27 <condition property="buildconfigs" value="macosx,cocoa,x86_64"> 28 <equals arg1="${buildFor}" arg2="darwin" /> 29 </condition> 30 <condition property="buildconfigs" value="win32,win32,x86 & win32,win32,x86_64"> 31 <equals arg1="${buildFor}" arg2="windows" /> 32 </condition> 33 34 <!-- if no platforms are provided, then build for all platforms --> 35 <property name="buildconfigs" value="linux,gtk,x86 & linux,gtk,x86_64 & win32,win32,x86 & win32,win32,x86_64 & macosx,cocoa,x86_64" /> 36 37 <!-- locate launcher plugin inside eclipse --> 38 <path id="equinox.launcher.path"> 39 <fileset dir="${basebuilder}/plugins"> 40 <include name="org.eclipse.equinox.launcher_*.jar" /> 41 </fileset> 42 </path> 43 <property name="equinox.launcher" refid="equinox.launcher.path" /> 44 45 <!-- locate pde build plugin inside eclipse --> 46 <path id="pde.build.dir.path"> 47 <dirset dir="${basebuilder}/plugins"> 48 <include name="org.eclipse.pde.build_*" /> 49 </dirset> 50 </path> 51 <property name="pde.build.dir" refid="pde.build.dir.path" /> 52 53 <!-- create the build directory, copy plugins and features into it --> 54 <target name="copy_srcs"> 55 <mkdir dir="${buildDir}" /> 56 <copy todir="${buildDir}"> 57 <fileset dir="${srcDir}/"> 58 <include name="plugins/**" /> 59 <include name="features/**" /> 60 </fileset> 61 </copy> 62 </target> 63 64 <!-- create target platform --> 65 <target name="create-target"> 66 <mkdir dir="${targetDir}" /> 67 <mkdir dir="${targetDir}/deltapack" /> 68 <mkdir dir="${targetDir}/repos" /> 69 70 <unzip src="${targetSrcDir}/deltapack/eclipse-3.7.2-delta-pack.zip" dest="${targetDir}/deltapack" overwrite="false" /> 71 <unzip src="${targetSrcDir}/platform/org.eclipse.platform-3.7.2.zip" dest="${targetDir}/repos/platform" overwrite="false" /> 72 </target> 73 74 <!-- Launch pde build --> 75 <target name="pde-build" depends="copy_srcs, create-target"> 76 <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true"> 77 <arg value="-application" /> 78 <arg value="org.eclipse.ant.core.antRunner" /> 79 <arg value="-buildfile" /> 80 <arg value="${pde.build.dir}/scripts/productBuild/productBuild.xml" /> 81 <arg value="-data" /> 82 <arg value="${buildDir}/workspace" /> 83 <arg value="-configuration" /> 84 <arg value="${buildDir}/configuration" /> 85 <arg value="-Dtimestamp=${timestamp}" /> 86 <arg value="-DeclipseLocation=${baseBuilder}" /> 87 <arg value="-DbuildDirectory=${buildDir}" /> 88 <arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" /> 89 <arg value="-DrepoBaseLocation=${targetDir}/repos/" /> 90 <arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" /> 91 <arg value="-Dconfigs=${buildconfigs}" /> 92 <classpath> 93 <pathelement location="${equinox.launcher}" /> 94 </classpath> 95 </java> 96 </target> 97 98 <target name="clean"> 99 <delete dir="${outDir}" /> 100 <delete dir="${targetDir}" /> 101 </target> 102 103 <target name="build" depends="pde-build" /> 104 </project> 105