ATF/MacOSAllInOne

From Eclipsepedia

< ATF
Jump to: navigation, search

The MacOSX all-in-one has a symbolic link. The link is eclipse/eclipse-->Eclipse.app/Contents/MacOS/eclipse. The are two problems with symbolic links, the ant tar task doesn't maintain symbolic links and Windows XP doesn't support symbolic links. To get around this problem the ATF build doesn't us the ant tar task. The build also must be run on a Linux machine. It is possible to build the MacOSX all-in-one on Windows, but the resulting tar file will not contain the symbolic link.

The code to build on Linux is

	<target name="macBuildLinux" if="isbuildOnLinux">
		<property name="symName" value="${mac}/eclipse/eclipse"/>
		<property name="symTarget" value="Eclipse.app/Contents/MacOS/eclipse"/>
		<unzip dest="${mac}" overwrite="true" src="${archDir}/${archiveNameAllMacZip}" />
		<delete verbose="true" file="${symName}"/>
		<symlink link="${symName}" resource="${symTarget}"/>
		<chmod file="${mac}/eclipse/${symTarget}" perm="ugo+rx"/>
		<exec executable="tar">
			<arg value="-czC"/>
			<arg value="${mac}"/>
			<arg value="-f"/>
			<arg value="${archDir}/atf-incubation-wst-all-in-one-${buildLabel}-macosx-carbon.tar.gz"/>
			<arg value="eclipse"/>
		</exec>
	</target>

The code to build on Windows is

	<target name="macBuildWindows" unless="isbuildOnLinux">
		<echo>*** Mac Build on Windows, Symbolic links will be missing. Build on Linux **** </echo>
		<tar destfile="${archDir}/atf-incubation-wst-all-in-one-${buildLabel}-macosx-carbon.tar.gz"
                compression="gzip"  longfile="gnu" >
			<tarfileset dir="${mac}" mode="755" >
				<include name="eclipse/eclipse"/>
				<include name="eclipse/Eclipse.app/Contents/MacOS/eclipse"/>
			</tarfileset>
			<tarfileset dir="${mac}" >
				<exclude name="eclipse/eclipse"/>
				<exclude name="eclipse/Eclipse.app/Contents/MacOS/eclipse"/>
			</tarfileset>
			<zipfileset src="${archDir}/${archiveNameAllMacZip}"/>
		</tar>
	</target>