123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <project name="PDE-Build" default="launch" basedir=".">
- <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="lib/ant-contrib-1.0b3.jar" />
- <property environment="env" />
- <property file="run.properties" />
- <property name="buildFile" value="run.xml" />
- <target name="prepareLauncherAndProvisionerDirectory">
- <if>
- <not>
- <or>
- <available file="${launcher}" />
- <available file="${provisioner}" />
- </or>
- </not>
- <then>
- <mkdir dir="${launcher}" />
- <trycatch>
- <try>
- <antcall target="prepareLauncherAndProvisioner" />
- </try>
- <catch>
- <echo message="Preparing launcher failed. Cleaning up..." />
- <delete dir="${launcher}" />
- <echo message="Done." />
- </catch>
- </trycatch>
- </then>
- </if>
- </target>
- <target name="prepareLauncherAndProvisioner">
- <echo message="Preparing launcher and provisioner ..." />
- <property name="download.eclipse.src" value="${downloadMirror}/eclipse/downloads/drops/${launcherBuildType}-${launcherBuildMilestone}-${launcherBuildID}" />
- <property name="eclipse.sdk.filename" value="eclipse-SDK-${launcherBuildMilestone}-${launcheros}-${launcherws}-${launcherarch}.${launcherArchiveFormat}" />
- <!-- download launcher if not already contained in downloads directory -->
- <if>
- <not>
- <available file="${downloadDirectory}/${eclipse.sdk.filename}" property="downloadLauncherNeccessary" />
- </not>
- <then>
- <get src="${download.eclipse.src}/${eclipse.sdk.filename}" dest="${downloadDirectory}/${eclipse.sdk.filename}" />
- </then>
- </if>
- <!-- use unzip executable of choice -->
- <if>
- <equals arg1="${launcherArchiveFormat}" arg2="zip" />
- <then>
- <unzip src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${launcher}/" />
- <unzip src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${provisioner}/" />
- </then>
- <else>
- <untar src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${launcher}/" compression="gzip" />
- <untar src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${provisioner}/" compression="gzip" />
- </else>
- </if>
- <!-- if we are on macosx or linux, ensure builder is executable -->
- <if>
- <or>
- <equals arg1="${launcheros}" arg2="macosx" />
- <equals arg1="${launcheros}" arg2="linux" />
- </or>
- <then>
- <chmod file="${launcherLocation}/eclipse" perm="ugo+rx" />
- <chmod file="${provisionerLocation}/eclipse" perm="ugo+rx" />
- </then>
- </if>
- <echo message="Preparing launcher and provisioner done." />
- </target>
- <target name="launch">
- <if>
- <not>
- <available file="${downloadDirectory}" property="downloadDirectoryExists" />
- </not>
- <then>
- <mkdir dir="${downloadDirectory}" />
- </then>
- </if>
- <echo message="Preparing Launcher and Provisioner" />
- <antcall target="prepareLauncherAndProvisionerDirectory" />
- <echo message="Starting build with launcher: ${launcherLocation}" />
- <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
- <arg value="-application" />
- <arg value="org.eclipse.ant.core.antRunner" />
- <arg value="-clean" />
- <arg value="-nosplash" />
- <arg value="-consoleLog" />
- <arg value="-nl" />
- <arg value="en_US" />
- <arg value="-data" />
- <arg value="${launcherWorkspace}" />
- <arg value="-buildfile" />
- <arg value="${buildFile}" />
- <classpath>
- <fileset dir="${launcherLocation}/plugins">
- <include name="org.eclipse.equinox.launcher_*.jar" />
- </fileset>
- </classpath>
- </java>
- </target>
- </project>
|