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="deltaPackTargetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse/" /> 10 <property name="targetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse/" /> 11 12 <!-- Location where build happens and resulting binaries are generated --> 13 <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/adtproduct/" /> 14 15 <!-- Location where final results are released --> 16 <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/androidide/" /> 17 18 <!-- Location where the target platform is created --> 19 <property name="targetDir" value="${outDir}/target" /> 20 21 <!-- Location where the target platform is created --> 22 <property name="buildDir" value="${outDir}/build" /> 23 24 <!-- Location of the sources --> 25 <property name="srcDir" value="${ANDROID_SRC}/sdk/eclipse/" /> 26 27 <!-- Identify configurations to build --> 28 <condition property="buildconfigs" value="linux,gtk,x86_64"> 29 <equals arg1="${buildFor}" arg2="linux" /> 30 </condition> 31 <condition property="buildconfigs" value="macosx,cocoa,x86_64"> 32 <equals arg1="${buildFor}" arg2="darwin" /> 33 </condition> 34 <condition property="buildconfigs" value="win32,win32,x86 & win32,win32,x86_64"> 35 <equals arg1="${buildFor}" arg2="windows" /> 36 </condition> 37 38 <!-- if no platforms are provided, then build for all platforms --> 39 <property name="buildconfigs" value="linux,gtk,x86_64 & win32,win32,x86_64 & macosx,cocoa,x86_64" /> 40 41 <!-- locate launcher plugin inside eclipse --> 42 <path id="equinox.launcher.path"> 43 <fileset dir="${basebuilder}/plugins"> 44 <include name="org.eclipse.equinox.launcher_*.jar" /> 45 </fileset> 46 </path> 47 <property name="equinox.launcher" refid="equinox.launcher.path" /> 48 49 <!-- locate pde build plugin inside eclipse --> 50 <path id="pde.build.dir.path"> 51 <dirset dir="${basebuilder}/plugins"> 52 <include name="org.eclipse.pde.build_*" /> 53 </dirset> 54 </path> 55 <property name="pde.build.dir" refid="pde.build.dir.path" /> 56 57 <!-- create the build directory, copy plugins and features into it --> 58 <target name="copy_srcs"> 59 <mkdir dir="${buildDir}" /> 60 <copy todir="${buildDir}" preservelastmodified="true"> 61 <fileset dir="${srcDir}/"> 62 <include name="plugins/**" /> 63 <include name="features/**" /> 64 <exclude name="plugins/*/bin/**" /> 65 </fileset> 66 </copy> 67 </target> 68 69 <!-- create target platform --> 70 <target name="create-target"> 71 <mkdir dir="${targetDir}" /> 72 <mkdir dir="${targetDir}/deltapack" /> 73 <mkdir dir="${targetDir}/repos" /> 74 75 <unzip src="${deltaPackTargetSrcDir}/deltapack/eclipse-3.7.2-delta-pack.zip" dest="${targetDir}/deltapack" overwrite="false" /> 76 <unzip src="${targetSrcDir}/platform/org.eclipse.platform-3.8.zip" dest="${targetDir}/repos/platform" overwrite="false" /> 77 <unzip src="${targetSrcDir}/cdt/cdt-master-8.0.2.zip" dest="${targetDir}/repos/cdt" overwrite="false" /> 78 <unzip src="${targetSrcDir}/emf/emf-xsd-SDK-M201201231045.zip" dest="${targetDir}/repos/emf" overwrite="false" /> 79 <unzip src="${targetSrcDir}/jdt/org.eclipse.jdt.source-3.7.2.zip" dest="${targetDir}/repos/jdt" overwrite="false" /> 80 <unzip src="${targetSrcDir}/wtp/wtp-repo-R-3.3.2-20120210195245.zip" dest="${targetDir}/repos/wtp" overwrite="false" /> 81 <unzip src="${targetSrcDir}/gef/GEF-SDK-3.7.2.zip" dest="${targetDir}/repos/gef" overwrite="false" /> 82 </target> 83 84 <!-- Launch pde build --> 85 <target name="pde-build" depends="copy_srcs, create-target"> 86 <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true"> 87 <arg value="-application" /> 88 <arg value="org.eclipse.ant.core.antRunner" /> 89 <arg value="-buildfile" /> 90 <arg value="${pde.build.dir}/scripts/productBuild/productBuild.xml" /> 91 <arg value="-data" /> 92 <arg value="${buildDir}/workspace" /> 93 <arg value="-configuration" /> 94 <arg value="${buildDir}/configuration" /> 95 <arg value="-Dtimestamp=${timestamp}" /> 96 <arg value="-DeclipseLocation=${baseBuilder}" /> 97 <arg value="-DbuildDirectory=${buildDir}" /> 98 <arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" /> 99 <arg value="-DrepoBaseLocation=${targetDir}/repos/" /> 100 <arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" /> 101 <arg value="-Dconfigs=${buildconfigs}" /> 102 <classpath> 103 <pathelement location="${equinox.launcher}" /> 104 </classpath> 105 </java> 106 </target> 107 108 <target name="clean"> 109 <delete dir="${outDir}" /> 110 <delete dir="${targetDir}" /> 111 </target> 112 113 <target name="build" depends="pde-build" /> 114</project> 115