<?xml version="1.0" encoding="UTF-8"?>
<project name="org.eclipse.platform.launchers" default="build.update.jar" basedir=".">

	<target name="init">
		<property name="feature.destination" value="${basedir}"/>
		<property name="p2.build.repo" value="file:${buildDirectory}/buildRepo"/>
		<condition property="p2.publish.parts" value="true"		>
			<istrue value="${p2.gathering}"/>
		</condition>
	</target>

	<target name="all.plugins" depends="init">
	</target>
	<target name="all.features" depends="init">
	</target>
	<target name="update.feature" depends="init">
	</target>

	<target name="all.children" depends="init,all.features,all.plugins,update.feature">
	</target>

	<target name="children" if="include.children">
		<antcall target="all.children"/>
	</target>

	<target name="build.jars" depends="init" description="Build all the jars for the feature: org.eclipse.platform.launchers.">
	</target>

	<target name="build.sources" depends="init">
	</target>

	<target name="build.zips" depends="init">
	</target>

	<target name="build.update.jar" depends="init" description="Build the feature jar of: org.eclipse.platform.launchers for an update site.">
	</target>

	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
		<eclipse.gatherFeature
		   metadataRepository="${p2.build.repo}"
		   artifactRepository="${p2.build.repo}"
		   buildResultFolder="${basedir}"
		   baseDirectory="${basedir}"
		/>
	</target>

	<target name="gather.bin.parts" depends="init" if="feature.base">
		<subant target="rootFiles${os}_${ws}_${arch}" buildpath="." failonerror="false" inheritall="true"/>
	</target>

	<target name="rootFileswin32_win32_aarch64">
		<mkdir dir="${feature.base}/win32.win32.aarch64/${collectingFolder}"/>
		<copy todir="${feature.base}/win32.win32.aarch64/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/win32/win32/aarch64">
				<include name="launcher.exe"/>
			</fileset>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/win32.win32.aarch64/${collectingFolder}" includes="launcher.exe" />
	</target>

	<target name="rootFileswin32_win32_x86_64">
		<mkdir dir="${feature.base}/win32.win32.x86_64/${collectingFolder}"/>
		<copy todir="${feature.base}/win32.win32.x86_64/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/win32/win32/x86_64">
				<include name="launcher.exe"/>
			</fileset>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/win32.win32.x86_64/${collectingFolder}" includes="launcher.exe" />
	</target>

	<target name="rootFilesmacosx_cocoa_x86_64">
		<mkdir dir="${feature.base}/macosx.cocoa.x86_64/${collectingFolder}"/>
		<copy todir="${feature.base}/macosx.cocoa.x86_64/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/cocoa/macosx/x86_64" includes="**"			/>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/macosx.cocoa.x86_64/${collectingFolder}" includes="${launcherName}" />
		<chmod perm="755" dir="${feature.base}/macosx.cocoa.x86_64/${collectingFolder}" includes="Eclipse.app/Contents/MacOS/launcher" />
	</target>
	<target name="rootFilesmacosx_cocoa_aarch64">
		<mkdir dir="${feature.base}/macosx.cocoa.aarch64/${collectingFolder}"/>
		<copy todir="${feature.base}/macosx.cocoa.aarch64/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/cocoa/macosx/aarch64" includes="**"			/>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/macosx.cocoa.aarch64/${collectingFolder}" includes="${launcherName}" />
		<chmod perm="755" dir="${feature.base}/macosx.cocoa.aarch64/${collectingFolder}" includes="Eclipse.app/Contents/MacOS/launcher" />
	</target>
	<target name="rootFileslinux_gtk_ppc64le">
		<mkdir dir="${feature.base}/linux.gtk.ppc64le/${collectingFolder}"/>
		<copy todir="${feature.base}/linux.gtk.ppc64le/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/gtk/linux/ppc64le" includes="**"			/>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/linux.gtk.ppc64le/${collectingFolder}" includes="launcher" />
	</target>
    <target name="rootFileslinux_gtk_aarch64">
		<mkdir dir="${feature.base}/linux.gtk.aarch64/${collectingFolder}"/>
		<copy todir="${feature.base}/linux.gtk.aarch64/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/gtk/linux/aarch64" includes="**"			/>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/linux.gtk.aarch64/${collectingFolder}" includes="launcher" />
	</target>
	<target name="rootFileslinux_gtk_x86_64">
		<mkdir dir="${feature.base}/linux.gtk.x86_64/${collectingFolder}"/>
		<copy todir="${feature.base}/linux.gtk.x86_64/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/gtk/linux/x86_64" includes="**"			/>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/linux.gtk.x86_64/${collectingFolder}" includes="launcher" />
	</target>
	<target name="rootFileslinux_gtk_loongarch64">
		<mkdir dir="${feature.base}/linux.gtk.loongarch64/${collectingFolder}"/>
		<copy todir="${feature.base}/linux.gtk.loongarch64/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/gtk/linux/loongarch64" includes="**"			/>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/linux.gtk.loongarch64/${collectingFolder}" includes="launcher" />
	</target>
	<target name="rootFileslinux_gtk_riscv64">
		<mkdir dir="${feature.base}/linux.gtk.riscv64/${collectingFolder}"/>
		<copy todir="${feature.base}/linux.gtk.riscv64/${collectingFolder}" failonerror="true" overwrite="true">
			<fileset dir="${basedir}/bin/gtk/linux/riscv64" includes="**"			/>
			<fileset dir="${basedir}/root" includes="**"			/>
		</copy>
		<chmod perm="755" dir="${feature.base}/linux.gtk.riscv64/${collectingFolder}" includes="launcher" />
	</target>
	<target name="rootFilesgroup_group_group">
		<antcall target="rootFileswin32_win32_aarch64"/>
		<antcall target="rootFileswin32_win32_x86_64"/>
		<antcall target="rootFilesmacosx_cocoa_x86_64"/>
		<antcall target="rootFileslinux_gtk_ppc64le"/>
		<antcall target="rootFileslinux_gtk_aarch64"/>
		<antcall target="rootFileslinux_gtk_x86_64"/>
		<antcall target="rootFileslinux_gtk_riscv64"/>
	</target>

	<target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: org.eclipse.platform.launchers.">
	</target>

	<target name="zip.sources" depends="init">
	</target>

	<target name="zip.logs" depends="init">
	</target>

	<target name="clean" depends="init" description="Clean the feature: org.eclipse.platform.launchers of all the zips, jars and logs created.">
	</target>

	<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
	</target>

	<target name="gather.sources">
	</target>

	<target name="gather.logs" depends="init">
	</target>

</project>
