blob: 0e7163c67a0b92c83f6d309b5589a3cfee948144 [file]
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
Aug 30, 2007 11:28:45 PM
epp
Build the the install files for the 5 standard eclipse packages
Mark Russell
====================================================================== -->
<project name="epp" default="package">
<description>
Build the the install files for the 5 standard eclipse packages
</description>
<import file="build-macros.xml"/>
<!-- ================================================= -->
<target name="set_recorder" if="recorder.file"
depends="read_build_properties">
<echo>recorder file ${build.root}/${recorder.file}</echo>
<mkdir dir="${build.root}"/>
<touch file="${build.root}/${recorder.file}"></touch>
<record name="${build.root}/${recorder.file}" loglevel="${recorder.level}"/>
<echoproperties format="text" destfile="${build.root}/properties.txt" />
</target>
<!-- =================================================
Read build properties
-->
<target name="read_build_properties">
<read_product_properties />
<property name="epp.package.dir" location="/opt/eclipses" />
<property name="epp.package.loc" location="${epp.package.dir}" />
</target>
<!-- =================================================
setup for local builds
-->
<target name="setup_local"
if="setup.local">
<!-- but this in the temp directory so the eclipsetools.removeNontaggedDirectories
does not try to cleanup the temp directory
-->
<mkdir dir="${build.temp}"/>
<touch file="${build.temp}/.clean_build"></touch>
</target>
<!-- =================================================
If this is Cruise Control,
then import the projects and set classpath variables
-->
<target name="setup_workspace"
if="setup.workspace"
depends="read_build_properties">
</target>
<!-- =================================================
cleanup the temparary directories
-->
<target name="clean_tmp_directories"
if="clean.temp.directories.flag">
<delete_temp_directories/>
</target>
<!-- ================================================= -->
<target name="product_init"
depends="read_build_properties, set_recorder, setup_workspace">
<checkEclipseRunning />
<condition property="clean.temp.directories.flag">
<or>
<istrue value="${clean.temp.directories}"/>
<not>
<isset property="clean.temp.directories" />
</not>
</or>
</condition>
</target>
<target name="package" depends="init, product_init, clean_tmp_directories, setup_local, package_java"
description="--> Build the the install files for the 5 standard eclipse packages">
<echo message="package(s) built" />
</target>
<target name="init">
<tstamp />
</target>
<target name="package_java">
<property name="epp.java.package.base" value="eclipse-java-europa-" />
<property name="epp.java.package.base.full" value="${epp.package.loc}/eclipse-java-europa-" />
<unzip_target package="java" file="${epp.java.package.base.full}win32.zip" />
<package_target package="java" installerName="${epp.java.package.base}win32-installer" />
<cleanup_target package="java" />
</target>
<!-- = = = = = = = = = = = = = = = = =
macrodef: unzip_targer
unzip an ecipse package to a given directory
=== required Parameters:
package - the package this unzip is for
file - the zip fiole to unzip
=== optional Parameters:
dest - the directory the zip file is unzipped to
(default ${build.temp}/@{package}})
=== Properties defined:
none
= = = = = = = = = = = = = = = = = -->
<macrodef name="unzip_target">
<attribute name="package" />
<attribute name="file" />
<attribute name="dest" default="${build.temp}/@{package}"/>
<sequential>
<echo>Unziping @{file} into @{dest}</echo>
<mkdir dir="@{dest}"/>
<unzip dest="@{dest}" src="@{file}" overwrite="false" />
</sequential>
</macrodef>
<!-- = = = = = = = = = = = = = = = = =
macrodef: package_target
packages a target
=== required Parameters:
package - the package this unzip is for
installerName - name of the Installer
=== optional Parameters:
dest - the directory the zip file is unzipped to
(default ${build.out}})
=== Properties defined:
none
= = = = = = = = = = = = = = = = = -->
<macrodef name="package_target">
<attribute name="package" />
<attribute name="installerName" />
<attribute name="dest" default="${build.out}"/>
<sequential>
<echo>
should package the target here
</echo>
</sequential>
</macrodef>
<!-- = = = = = = = = = = = = = = = = =
macrodef: cleanup_target
cleanup the data from a given target
=== required Parameters:
package - the package this unzip is for
=== optional Parameters:
dest - the directory the zip file is unzipped to
(default ${build.temp/@{package}})
=== Properties defined:
none
= = = = = = = = = = = = = = = = = -->
<macrodef name="cleanup_target">
<attribute name="package" />
<attribute name="dest" default="${build.temp}/@{package}"/>
<sequential>
<echo> cleaning up @{dest} </echo>
<delete includeemptydirs="yes">
<fileset dir="@{dest}" />
</delete>
</sequential>
</macrodef>
</project>