<!-- build script to create a plugin from org.eclipse.jdt.launching.macosx -->

<project name="org.eclipse.jdt.launching.macosx" default="export" basedir="..">
	<target name="init">
		<tstamp/>
		<property name="destdir" value="../../plugin-export" />
		<property name="tempdir" value="../../tmp" />
		<property name="plugin"  value="org.eclipse.jdt.launching.macosx" />
		<property name="plugin_version"  value="_3.1.0" />
		<property name="dest"  value="${destdir}/${plugin}${plugin_version}" />
		<property name="destjar"  value="${destdir}/${plugin}${plugin_version}.jar" />
		</target>

	<target name="build" depends="init">
    	<eclipse.incrementalBuild project="${plugin}" kind="incr"/>
	</target>

	<target name="export" depends="build">
		<delete dir="${tempdir}" />
		<mkdir dir="${tempdir}" />	
		<mkdir dir="${destdir}" />
		<delete file="${destjar}" />
		<zip zipfile="${tempdir}/src.zip">
		    <fileset dir="macosx" />
  		</zip>
		<zip zipfile="${destjar}">
			<fileset dir=".">
			  <include name="plugin.xml" />
			  <include name="plugin.properties" />
			  <include name="icons/**" />
			  <include name="META-INF/**" />
			</fileset>
			<fileset dir="bin" />
			<fileset file="${tempdir}/src.zip" />
		</zip>
		<delete file="${tempdir}/src.zip" />
	</target>
</project>
