Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'releng/org.eclipse.equinox.launcher.releng/build.xml')
-rw-r--r--releng/org.eclipse.equinox.launcher.releng/build.xml396
1 files changed, 73 insertions, 323 deletions
diff --git a/releng/org.eclipse.equinox.launcher.releng/build.xml b/releng/org.eclipse.equinox.launcher.releng/build.xml
index a0cd58648..f406a3026 100644
--- a/releng/org.eclipse.equinox.launcher.releng/build.xml
+++ b/releng/org.eclipse.equinox.launcher.releng/build.xml
@@ -9,101 +9,12 @@
IBM Corporation - initial API and implementation
-->
<project name="Launcher Build" basedir="." default="build">
- <property name="gitFrameworkRepo" value="git.eclipse.org/gitroot/equinox/rt.equinox.framework.git" />
- <property name="gitBinaryRepo" value="git.eclipse.org/gitroot/equinox/rt.equinox.binaries.git" />
<property name="gitTag" value="master" />
<property name="keyfile" value="C:\BUILD\ssh\swtbuild_dsa_private" />
<available file="${basedir}/launcher.properties" property="launcherProperties" value="${basedir}/launcher.properties" />
- <!-- Macro for execing scp -->
- <macrodef name="scp-exec">
- <attribute name="dir" />
- <attribute name="source"/>
- <attribute name="destination" />
- <attribute name="flag" default="" />
- <attribute name="failonerror" default="true" />
- <sequential>
- <echo message="Copying @{source} to @{destination}."/>
- <exec dir="@{dir}" executable="scp" failonerror="@{failonerror}">
- <arg value="-q@{flag}"/>
- <arg line="@{source}" />
- <arg value="@{destination}" />
- </exec>
- </sequential>
- </macrodef>
-
- <!-- remote mkdir -->
- <macrodef name="mkremote-exec">
- <attribute name="dir" />
- <sequential>
- <echo message="mkdir @{dir}" />
- <parseLocation prefix="@{dir}" location="@{dir}" />
- <exec executable="ssh" >
- <arg value="${@{dir}_user_machine}" />
- <arg line="mkdir -p ${@{dir}_folder}" />
- </exec>
- </sequential>
- </macrodef>
-
- <target name="test" >
- <parseLocation prefix="dir" location="aniefer@wsanieferlnx:/eclipse/staging/org.eclipse.equinox.executable/bin/win32/win32/x86" />
- <echo message="user=${dir_user}" />
- <echo message="machine=${dir_machine}"/>
- <echo message="folder=${dir_folder}"/>
- <echo message="user_machine=${dir_user_machine}"/>
- </target>
- <macrodef name="mkremote-task">
- <attribute name="dir" />
- <sequential>
- <echo message="mkdir @{dir}" />
- <parseLocation prefix="@{dir}" location="@{dir}" />
- <sshexec host="${@{dir}_machine}" username="${@{dir}_user}" keyfile="${keyfile}" trust="true" failonerror="true" command="mkdir -p ${@{dir}_folder}" />
- </sequential>
- </macrodef>
-
- <macrodef name="parseLocation" >
- <attribute name="prefix" />
- <attribute name="location" />
- <sequential>
- <loadresource property="@{prefix}_user_machine" >
- <string value="@{location}" />
- <filterchain>
- <replaceregex pattern="^(([^@]*@)?([^:]*)):.*$" replace="\1" flags="g"/>
- </filterchain>
- </loadresource>
-
- <loadresource property="@{prefix}_folder" >
- <string value="@{location}" />
- <filterchain>
- <replaceregex pattern="^([^@]*@)?[^:]*:(.*)$" replace="\2" flags="g"/>
- </filterchain>
- </loadresource>
-
- <condition property="@{prefix}_user" value="swtbuild" >
- <not><contains string="${@{prefix}_user_machine}" substring="@" /></not>
- </condition>
- <condition property="@{prefix}_machine" value="${@{prefix}_user_machine}" >
- <not><contains string="${@{prefix}_user_machine}" substring="@" /></not>
- </condition>
-
- <loadresource property="@{prefix}_user" >
- <string value="${@{prefix}_user_machine}" />
- <filterchain>
- <replaceregex pattern="^([^@]*)@(.*)$" replace="\1" flags="g"/>
- </filterchain>
- </loadresource>
-
- <loadresource property="@{prefix}_machine" >
- <string value="${@{prefix}_user_machine}" />
- <filterchain>
- <replaceregex pattern="^([^@]*)@(.*)$" replace="\2" flags="g"/>
- </filterchain>
- </loadresource>
- </sequential>
- </macrodef>
-
<!-- macro to resolve properties because we can't do ${${prop}} -->
<macrodef name="resolveProperty">
<attribute name="name" />
@@ -115,19 +26,6 @@
</sequential>
</macrodef>
- <!-- macro for invoking git -->
- <macrodef name="git">
- <attribute name="dir" />
- <attribute name="command" />
- <attribute name="arguments" default="" />
- <sequential>
- <exec dir="@{dir}" executable="git" >
- <arg value="@{command}"/>
- <arg line="@{arguments}"/>
- </exec>
- </sequential>
- </macrodef>
-
<target name="init_exeFolder" >
<!-- set to "bin" or "contributed" according to which folder under org.eclipse.equinox.executable to store the built eclipse -->
<condition property="exeFolder" value="contributed" else="bin">
@@ -153,136 +51,18 @@
</condition>
</target>
- <target name="fetchExecutableSource" >
- <!-- fetch the source and put it in a folder unique to this platform so we don't interfere with other
- compiles if the working folder is shared accross multiple machines -->
- <mkdir dir="${basedir}/${os}.${ws}.${arch}" />
- <delete dir="${basedir}/${os}.${ws}.${arch}/library" failonerror="false"/>
-
- <git dir="${basedir}/${os}.${ws}.${arch}" command="clone" arguments="http://${gitFrameworkRepo}" />
- <git dir="${basedir}/${os}.${ws}.${arch}/rt.equinox.framework" command="checkout" arguments="${gitTag}" />
- <git dir="${basedir}/${os}.${ws}.${arch}/rt.equinox.framework" command="pull" />
-
- <copy todir="${basedir}/${os}.${ws}.${arch}/library" >
- <fileset dir="${basedir}/${os}.${ws}.${arch}/rt.equinox.framework/bundles/org.eclipse.equinox.executable/library" includes="**" />
- </copy>
- </target>
-
- <target name="buildNix" if="buildNix">
-
- <fixcrlf file="${libraryFolder}" includes="**/*.sh,**/*.mak,**/*.c,**/*.h" />
-
- <!-- exec the build.sh for flavors of unix -->
- <exec dir="${libraryFolder}/${ws}" executable="sh" failonerror="true">
- <arg value="build.sh"/>
- <arg line="-ws ${ws} -os ${os} -arch ${arch}"/>
- <arg line="-java ${javaHome}"/>
- <arg value="clean all" />
- <env key="PATH" value="/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/X11R6/bin" />
- </exec>
-
- <mkremote-exec dir="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}" />
- <mkremote-exec dir="${resultsBaseFolder}/${fragmentFolder}" />
-
- <!-- copy the resulting executable and .so -->
- <scp-exec dir="${libraryFolder}/${ws}" source="eclipse" destination="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}" />
- <scp-exec dir="${libraryFolder}/${ws}" source="eclipse_${maj_ver}${min_ver}.so" destination="${resultsBaseFolder}/${fragmentFolder}" />
-
- <condition property="copyMotifLib" >
- <equals arg1="aix.motif" arg2="${os}.${ws}" />
- </condition>
- <antcall target="copyMotifLib" />
- </target>
-
<target name="copyMotifLib" if="copyMotifLib" >
- <scp-exec dir="${libraryFolder}/${ws}" source="libeclipse-motif.so" destination="${resultsBaseFolder}/${fragmentFolder}" failonerror="false" />
- </target>
-
- <target name="buildS390" if="buildS390">
- <condition property="remoteHost" value="${host_s390}" else="${host_s390x}" >
- <equals arg1="${arch}" arg2="s390"/>
- </condition>
-
- <scp-exec dir="${basedir}" source="library.zip" destination="${remoteHost}:~/equinox" />
-
- <exec dir="${basedir}" executable="ssh" failonerror="true">
- <arg value="${remoteHost}"/>
- <arg value="cd equinox; rm -rf library; unzip -q library.zip; library/gtk/build.sh"/>
- </exec>
-
- <mkremote-exec dir="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}" />
- <mkremote-exec dir="${resultsBaseFolder}/${fragmentFolder}" />
-
- <!-- copy the resulting executable and .so -->
- <scp-exec dir="${basedir}" source="${remoteHost}:~/equinox/library/gtk/eclipse" destination="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}" />
- <scp-exec dir="${basedir}" source="${remoteHost}:~/equinox/library/gtk/eclipse_*.so" destination="${resultsBaseFolder}/${fragmentFolder}" />
- </target>
-
- <target name="buildWindows" if="buildWindows">
- <!-- exec the batch file to build on windows -->
- <exec dir="${libraryFolder}/${ws}" executable="cmd" failonerror="true">
- <arg value="/c" />
- <arg value="build.bat" />
- <arg line="${arch}"/>
- <arg value="-java"/>
- <arg value="${javaHome}"/>
- <arg line="clean all" />
- </exec>
-
- <mkremote-task dir="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}" />
- <mkremote-task dir="${resultsBaseFolder}/${fragmentFolder}" />
-
- <scp trust="yes" keyfile="${keyfile}" todir="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}">
- <fileset dir="${libraryFolder}/${ws}" includes="eclipse.exe,eclipsec.exe" />
- </scp>
- <scp trust="yes" keyfile="${keyfile}" todir="${resultsBaseFolder}/${fragmentFolder}">
- <fileset dir="${libraryFolder}/${ws}" includes="eclipse_${maj_ver}${min_ver}.dll,com_${maj_ver}${min_ver}.dll" />
- </scp>
- </target>
-
- <target name="buildMac" if="buildMac">
- <fixcrlf file="${libraryFolder}" includes="**/*.sh,**/*.mak" />
-
- <exec dir="${libraryFolder}/carbon" executable="sh" failonerror="true">
- <arg value="build.sh"/>
- <arg line="-ws ${ws} -arch ${arch}"/>
- <arg value="clean all" />
- <env key="PATH" value="/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:${extraPath}" />
- </exec>
-
- <mkremote-exec dir="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}/Eclipse.app/Contents/MacOS"/>
- <mkremote-exec dir="${resultsBaseFolder}/${fragmentFolder}" />
- <scp-exec dir="${libraryFolder}/carbon" source="eclipse" destination="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}/Eclipse.app/Contents/MacOS" />
- <scp-exec dir="${libraryFolder}/carbon" source="eclipse_${maj_ver}${min_ver}.so" destination="${resultsBaseFolder}/${fragmentFolder}" />
- <!-- x86 and ppc are the same universal binary, copy to both under the executable feature -->
- <condition property="copyMacPPC">
- <equals arg1="${arch}" arg2="x86" />
- </condition>
- <antcall target="copyMacPPC" />
+ <scp file="${userName}@${machine}:${lib_dir}/libeclipse-motif.so"
+ todir="${localGit}/rt.equinox.binaries/${fragmentFolder}"
+ keyfile="${keyfile}"
+ trust="true"/>
</target>
<target name="copyMacPPC" if="copyMacPPC" >
- <mkremote-exec dir="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/ppc/Eclipse.app/Contents/MacOS" />
- <scp-exec dir="${libraryFolder}/carbon" source="eclipse" destination="${resultsBaseFolder}/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/ppc/Eclipse.app/Contents/MacOS" />
- </target>
-
- <target name="determineBuild" >
- <condition property="buildWindows" >
- <equals arg1="${os}" arg2="win32"/>
- </condition>
- <condition property="buildMac" >
- <equals arg1="${os}" arg2="macosx" />
- </condition>
- <condition property="buildS390" >
- <contains string="${arch}" substring="s390" />
- </condition>
- <condition property="buildNix" >
- <not><or>
- <isset property="buildWindows" />
- <isset property="buildMac" />
- <isset property="buildS390" />
- </or></not>
- </condition>
+ <scp file="${userName}@${machine}:${lib_dir}/eclipse"
+ todir="${localGit}/rt.equinox.binaries/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/ppc${mac_suffix}"
+ keyfile="${keyfile}"
+ trust="true"/>
</target>
<target name="loadProperties" if="launcherProperties" >
@@ -306,18 +86,6 @@
<condition property="remote" >
<not> <isset property="local"/> </not>
</condition>
-
- <!-- working directory defaults for our machines. Others should
- pass in workspace as a property on the command line -->
- <condition property="workspace" value="/Users/swtbuild/build/equinox" >
- <equals arg1="${os}" arg2="macosx"/>
- </condition>
- <!--
- <condition property="workspace" value="~/equinox" >
- <equals arg1="${os}.${arch}" arg2="solaris.x86" />
- </condition>
- -->
- <property name="workspace" value="/bluebird/teamswt/equinox" />
</target>
@@ -334,100 +102,82 @@
-javaHome /path/to/jdk
or -java relative/path/to/jdk
-->
- <target name="build" depends="initProperties">
+ <target name="build" depends="initProperties,init_exeFolder,init_fragment">
<echo message="Building for ${os}, ${ws}, ${arch}"/>
<antcall target="buildLocal" />
<antcall target="buildRemote" />
</target>
- <target name="cloneGitRepos" unless="gitRepoExists" >
- <git dir="${staging}" command="clone" arguments="ssh://${gitBinaryRepo}" />
- <git dir="${staging}" command="clone" arguments="ssh://${gitFrameworkRepo}" />
- </target>
-
-
- <target name="stageBinaries" depends="initProperties">
- <tstamp/>
- <property name="tag" value="v${DSTAMP}-${TSTAMP}"/>
- <property name="staging" value="${basedir}/staging" />
- <property name="commitMsg" value="" />
-
- <available file="${staging}/rt.equinox.binaries" type="dir" property="gitRepoExists" />
- <antcall target="cloneGitRepos" />
-
- <git dir="${staging}/rt.equinox.binaries" command="checkout" arguments="${gitTag}" />
- <git dir="${staging}/rt.equinox.framework" command="checkout" arguments="${gitTag}" />
-
- <git dir="${staging}/rt.equinox.binaries" command="pull" />
- <git dir="${staging}/rt.equinox.framework" command="pull" />
-
- <execscp-exec dir="${staging}" flag="r" source="${resultsBaseFolder}/org.eclipse.equinox.executable/*" destination="${staging}/rt.equinox.binaries/org.eclipse.equinox.executable" />
- <execscp-exec dir="${staging}" flag="r" source="${resultsBaseFolder}/org.eclipse.equinox.launcher/fragments/*" destination="${staging}/rt.equinox.binaries" />
- <execscp-exec dir="${staging}" flag="r" source="${resultsBaseFolder}/org.eclipse.equinox.launcher/contributed/*" destination="${staging}/rt.equinox.binaries" />
-
- <git dir="${staging}/rt.equinox.binaries" command="commit" arguments="-a -m &quot;Recompiled binaries ${commitMsg}&quot;" />
- <git dir="${staging}/rt.equinox.binaries" command="tag" arguments="${tag}" />
- <git dir="${staging}/rt.equinox.binaries" command="push" />
- <git dir="${staging}/rt.equinox.binaries" command="push" arguments="--tags" />
-
- <replaceregexp match="binaryTag=(.*)" replace="binaryTag=${tag}" >
- <fileset dir="${staging}/rt.equinox.framework" includes="**/build.properties" />
- </replaceregexp>
- <git dir="${staging}/rt.equinox.framework" command="commit" arguments="-a -m &quot;Binaries ${tag} ${commitMsg}&quot;" />
- <git dir="${staging}/rt.equinox.framework" command="push" />
-
- </target>
-
<target name="buildLocal" if="local" >
- <condition property="javaHome" value="${j_win32}" else="${java.home}" >
- <isset property="j_win32"/>
- </condition>
-
- <mkdir dir="${basedir}/${os}.${ws}.${arch}/library" />
- <copy todir="${basedir}/${os}.${ws}.${arch}/library" >
- <fileset dir="${localGitClone}/bundles/org.eclipse.equinox.executable/library" includes="**" />
+ <property name="tmpdir" value="${basedir}/${fragmentFolder}.${gitTag}"/>
+ <property file="${localGit}/rt.equinox.framework/bundles/org.eclipse.equinox.executable/library/make_version.mak" />
+ <mkdir dir="${tmpdir}" />
+ <copy todir="${tmpdir}">
+ <fileset dir="${localGit}/rt.equinox.framework/bundles/org.eclipse.equinox.executable/library" includes="**" />
</copy>
-
- <antcall target="buildConfig" />
+ <exec dir="${tmpdir}/${ws}" executable="${tmpdir}/${ws}/build.bat" failonerror="true">
+ <arg line="${arch}"/>
+ <arg line="clean all" />
+ </exec>
+ <copy todir="${localGit}/rt.equinox.binaries/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}">
+ <fileset dir="${tmpdir}/${ws}" includes="*.exe"/>
+ </copy>
+ <copy todir="${localGit}/rt.equinox.binaries/${fragmentFolder}">
+ <fileset dir="${tmpdir}/${ws}" includes="eclipse_${maj_ver}${min_ver}.dll"/>
+ </copy>
+ <delete dir="${tmpdir}"/>
</target>
<target name="buildRemote" if="remote">
<echo message="Machine: ${machine}" />
- <condition property="scpDest" value="${userName}@${machine}" else="${machine}" >
- <isset property="userName" />
+ <property name="remotebuilddir" value="~/build"/>
+ <property name="remotetmpdir" value="${remotebuilddir}/${fragmentFolder}.${gitTag}"/>
+ <property name="zip_file" value="${fragmentFolder}.${gitTag}.library.zip"/>
+ <property file="${localGit}/rt.equinox.framework/bundles/org.eclipse.equinox.executable/library/make_version.mak" />
+ <zip basedir="${localGit}/rt.equinox.framework/bundles/org.eclipse.equinox.executable/library" includes="**" destfile="${basedir}/${zip_file}"/>
+ <scp file="${basedir}/${zip_file}"
+ todir="${userName}@${machine}:${remotebuilddir}"
+ keyfile="${keyfile}"
+ trust="true"/>
+ <condition property="lib_dir" value="${remotetmpdir}/carbon" else="${remotetmpdir}/${ws}" >
+ <equals arg1="cocoa" arg2="${ws}" />
</condition>
-
- <zip basedir="${localGitClone}/bundles/org.eclipse.equinox.executable/library" includes="**" destfile="${basedir}/library.zip" />
- <mkremote-task dir="${scpDest}:${workspace}/${os}.${ws}.${arch}"/>
-
- <scp trust="yes" keyfile="${keyfile}" todir="${scpDest}:${workspace}/${os}.${ws}.${arch}" >
- <fileset dir="${basedir}" includes="remote.sh,build.xml,launcher.properties,library.zip" />
- </scp>
-
- <echo message="Execing ssh ${machine}" />
- <sshexec host="${machine}" username="${userName}" keyfile="${keyfile}" trust="true" failonerror="true"
- command="sh ${workspace}/${os}.${ws}.${arch}/remote.sh ${javaArg} -Dos=${os} -Dws=${ws} -Darch=${arch} -DgitTag=${gitTag} -DresultsBaseFolder=${resultsBaseFolder}" />
- </target>
-
- <target name="buildConfig" depends="init_exeFolder,init_fragment,loadProperties,determineBuild" >
- <!--<antcall target="fetchExecutableSource" />-->
- <property name="javaHome" value="${java.home}/.." />
- <property name="libraryFolder" value="${basedir}/library" />
-
- <delete dir="${libraryFolder}" failonerror="false" />
- <mkdir dir="${libraryFolder}" />
- <unzip src="${basedir}/library.zip" dest="${libraryFolder}" />
-
- <property file="${libraryFolder}/make_version.mak" />
-
- <antcall target="buildNix" />
- <antcall target="buildWindows" />
- <antcall target="buildMac" />
- <antcall target="buildS390" />
+ <condition property="javaParam" value="" else="-java ${javaArg}" >
+ <equals arg1="macosx" arg2="${os}" />
+ </condition>
+ <sshexec host="${machine}"
+ username="${userName}"
+ keyfile="${keyfile}"
+ trust="true"
+ command="rm -rf ${remotetmpdir}; mkdir ${remotetmpdir}; cd ${remotetmpdir}; unzip -aa ${remotebuilddir}/${zip_file}; cd ${lib_dir}; if sh build.sh -os ${os} -ws ${ws} -arch ${arch} ${javaParam} all; then cd; else cd; rm -rf ${remotetmpdir}; rm ${remotebuilddir}/${zip_file}; exit 1; fi"/>
+ <condition property="mac_suffix" value="/Eclipse.app/Contents/MacOS" else="">
+ <equals arg1="macosx" arg2="${os}" />
+ </condition>
+ <scp file="${userName}@${machine}:${lib_dir}/eclipse"
+ todir="${localGit}/rt.equinox.binaries/org.eclipse.equinox.executable/${exeFolder}/${ws}/${os}/${arch}${mac_suffix}"
+ keyfile="${keyfile}"
+ trust="true"/>
+ <scp file="${userName}@${machine}:${lib_dir}/eclipse_${maj_ver}${min_ver}.*"
+ todir="${localGit}/rt.equinox.binaries/${fragmentFolder}"
+ keyfile="${keyfile}"
+ trust="true"/>
+ <!-- x86 and ppc are the same universal binary, copy to both under the executable feature -->
+ <condition property="copyMacPPC">
+ <and>
+ <equals arg1="${arch}" arg2="x86" />
+ <equals arg1="${os}" arg2="macosx" />
+ </and>
+ </condition>
+ <antcall target="copyMacPPC" />
+ <condition property="copyMotifLib" >
+ <equals arg1="aix.motif" arg2="${os}.${ws}" />
+ </condition>
+ <antcall target="copyMotifLib" />
+ <sshexec host="${machine}"
+ username="${userName}"
+ keyfile="${keyfile}"
+ trust="true"
+ command="rm -rf ${remotetmpdir}; rm ${remotebuilddir}/${zip_file}"/>
+ <delete file="${basedir}/${zip_file}"/>
</target>
-
</project>
-
-
-
-

Back to the top