### Eclipse Workspace Patch 1.0 #P eclipse-build Index: generatebuild.xml =================================================================== --- generatebuild.xml (revision 23733) +++ generatebuild.xml (working copy) @@ -5,7 +5,7 @@ <target name="genBuild"> <echo message="About to generate source bundles and build.xml files" /> <eclipse.buildScript elements="feature@${featureToBuild}" - configInfo="linux,gtk,${buildArch}" + configInfo="${buildOs},gtk,${buildArch}" buildingosgi="true" recursivegeneration="true" builddirectory="${buildDirectory}" Index: build.xml =================================================================== --- build.xml (revision 23733) +++ build.xml (working copy) @@ -137,6 +137,7 @@ <ant inheritall="false" antfile="pdebuild.xml"> <property name="buildId" value="${buildId}" /> <property name="buildArch" value="${buildArch}" /> + <property name="buildOs" value="${buildOs}" /> <property name="buildDirectory" value="../../" /> </ant> </target> @@ -406,7 +407,10 @@ <!-- Only build for one target (bug #293952) --> <copy file="${buildConfigs}/eclipse-build-config/build.properties.in" tofile="${buildConfigs}/eclipse-build-config/build.properties" /> - <replace file="${buildConfigs}/eclipse-build-config/build.properties" token="@build_arch@" value="${buildArch}" /> + <replace file="${buildConfigs}/eclipse-build-config/build.properties"> + <replacefilter token="@build_arch@" value="${buildArch}" /> + <replacefilter token="@build_os@" value="${buildOs}" /> + </replace> <!-- This one should be removed when Eclipse bug 369215 is fixed --> @@ -563,6 +567,7 @@ <!-- <ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}"> <property name="arch" value="${buildArch}"/> + <property os="os" value="${buildOs}"/> <property name="builder" value="${buildConfig}" /> </ant> --> @@ -571,9 +576,9 @@ <target name="compile.libgnomeproxy"> <!-- build libgnomeproxy --> - <exec dir="${buildDirectory}/plugins/org.eclipse.core.net/natives/unix/linux" executable="make" failonerror="true" /> - <copy file="${buildDirectory}/plugins/org.eclipse.core.net/natives/unix/linux/libgnomeproxy-1.0.0.so" todir="${buildDirectory}/plugins/org.eclipse.core.net.linux.${buildArch}/" /> - <move file="${buildDirectory}/plugins/org.eclipse.core.net/natives/unix/linux/libgnomeproxy-1.0.0.so" todir="${buildDirectory}/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.${buildArch}/" /> + <exec dir="${buildDirectory}/plugins/org.eclipse.core.net/natives/unix/${buildOs}" executable="make" failonerror="true" /> + <copy file="${buildDirectory}/plugins/org.eclipse.core.net/natives/unix/${buildOs}/libgnomeproxy-1.0.0.so" todir="${buildDirectory}/plugins/org.eclipse.core.net.${buildOs}.${buildArch}/" /> + <move file="${buildDirectory}/plugins/org.eclipse.core.net/natives/unix/${buildOs}/libgnomeproxy-1.0.0.so" todir="${buildDirectory}/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.${buildOs}.${buildArch}/" /> </target> <target name="compilelibs" unless="compilelibs.complete"> @@ -585,16 +590,16 @@ <include name="**/*.so" /> </fileset> </delete> - <ant antfile="build.xml" target="build.nativeLibraries" dir="${buildDirectory}/plugins/org.eclipse.swt.gtk.linux.${buildArch}" /> + <ant antfile="build.xml" target="build.nativeLibraries" dir="${buildDirectory}/plugins/org.eclipse.swt.gtk.${buildOs}.${buildArch}" /> <property name="launcherlibs" value="${buildDirectory}/features/org.eclipse.equinox.executable" /> <exec dir="${launcherlibs}/library/gtk/" executable="sh" failonerror="true"> <arg line="build.sh" /> </exec> - <property name="launcherfragment" value="org.eclipse.equinox.launcher.gtk.linux.${buildArch}" /> + <property name="launcherfragment" value="org.eclipse.equinox.launcher.gtk.${buildOs}.${buildArch}" /> - <copy file="${launcherlibs}/library/gtk/eclipse" todir="${buildDirectory}/features/org.eclipse.equinox.executable/bin/gtk/linux/${buildArch}/" /> + <copy file="${launcherlibs}/library/gtk/eclipse" todir="${buildDirectory}/features/org.eclipse.equinox.executable/bin/gtk/${buildOs}/${buildArch}/" /> <copy todir="${buildDirectory}/plugins/${launcherfragment}"> <fileset dir="${launcherlibs}/library/gtk"> <include name="**/*.so" /> @@ -602,8 +607,8 @@ </copy> <!-- build liblocalfile --> - <exec dir="${buildDirectory}/plugins/org.eclipse.core.filesystem/natives/unix/linux" executable="make" failonerror="true" /> - <move file="${buildDirectory}/plugins/org.eclipse.core.filesystem/natives/unix/linux/libunixfile_1_0_0.so" todir="${buildDirectory}/plugins/org.eclipse.core.filesystem.linux.${buildArch}/os/linux/${buildArch}"> + <exec dir="${buildDirectory}/plugins/org.eclipse.core.filesystem/natives/unix/${buildOs}" executable="make" failonerror="true" /> + <move file="${buildDirectory}/plugins/org.eclipse.core.filesystem/natives/unix/${buildOs}/libunixfile_1_0_0.so" todir="${buildDirectory}/plugins/org.eclipse.core.filesystem.${buildOs}.${buildArch}/os/${buildOs}/${buildArch}"> </move> <!-- build libgnomeproxy --> <antcall target="compile.libgnomeproxy" /> @@ -699,7 +704,7 @@ <arg line="-application org.eclipse.ant.core.antRunner " /> <arg line="-buildfile buildConfiguration.xml" /> <arg line="-propertyfile ${basedir}/build.properties " /> - <arg line="-Dconfigs=linux,gtk,${buildArch} " /> + <arg line="-Dconfigs=${buildOs},gtk,${buildArch} " /> <arg line="-Dreposource=${reposource} " /> <arg line="-Dbasedir=${productFiles}/rcpConfig" /> <arg line="-DbuildId=${buildId} " /> @@ -743,6 +753,7 @@ <arg line="-buildfile publishProduct.xml" /> <arg line="-propertyfile ${basedir}/build.properties " /> <arg line="-DbuildArch=${buildArch} " /> + <arg line="-DbuildOs=${buildOs} " /> <arg line="-Dreposource=${reposource} " /> <arg line="-DbuildConfig=${buildConfig} " /> <arg line="-DproductFile=${productFile} " /> @@ -756,7 +761,7 @@ <arg line="-consoleLog" /> <arg line="-application org.eclipse.equinox.p2.publisher.ProductPublisher " /> <arg line="-flavor tooling" /> - <arg line="-configs gtk.linux.${buildArch}" /> + <arg line="-configs gtk.${buildOs}.${buildArch}" /> <arg line="-productFile ${productFile}" /> <arg line="-metadataRepository file:${reposource}" /> <arg line="-artifactRepository file:${reposource}" /> @@ -812,7 +817,7 @@ <param name="p2.director.profile" value="${profileName}" /> <param name="p2.director.install.path" value="${provisionDir}" /> <param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" /> - <param name="p2.os" value="linux" /> + <param name="p2.os" value="${buildOs}" /> <param name="p2.ws" value="gtk" /> <param name="p2.arch" value="${buildArch}" /> <param name="p2.repo" value="${reposource}" /> @@ -828,7 +833,7 @@ <param name="p2.director.profile" value="${profileName}" /> <param name="p2.director.install.path" value="${provisionDir}" /> <param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" /> - <param name="p2.os" value="linux" /> + <param name="p2.os" value="${buildOs}" /> <param name="p2.ws" value="gtk" /> <param name="p2.arch" value="${buildArch}" /> <param name="p2.repo" value="${reposource}" /> @@ -976,7 +981,7 @@ <mkdir dir="${destDir}${prefix}/bin" /> <symlink link="${destDir}${prefix}/bin/eclipse" resource="../${libDir}/eclipse/eclipse" overwrite="true"/> <!-- Create the "swt.jar" and friends symlinks --> - <fileset dir="${installationDir}/plugins" includes="org.eclipse.swt.gtk.linux.${buildArch}_*" id="swtjar" /> + <fileset dir="${installationDir}/plugins" includes="org.eclipse.swt.gtk.${buildOs}.${buildArch}_*" id="swtjar" /> <property name="swtjarpath" refid="swtjar" /> <symlink link="${installationDir}/swt-gtk-${label}.jar" resource="plugins/${swtjarpath}" overwrite="true"/> <symlink link="${installationDir}/swt-gtk.jar" resource="plugins/${swtjarpath}" overwrite="true"/> @@ -995,7 +1000,7 @@ <param name="p2.director.profile" value="PlatformProfile" /> <param name="p2.director.install.path" value="${installationDir}" /> <param name="p2.director.extraArgs" value="-purgeHistory" /> - <param name="p2.os" value="linux" /> + <param name="p2.os" value="${buildOs}" /> <param name="p2.ws" value="gtk" /> <param name="p2.arch" value="${buildArch}" /> <param name="p2.repo" value="${installationDir}" /> Index: pdebuild.xml =================================================================== --- pdebuild.xml (revision 23733) +++ pdebuild.xml (working copy) @@ -88,7 +88,7 @@ <filelist id="helpDirs" dir="${sdkSource}/plugins" files="${helpDirsProperty}"/> <property name="depsDirs2Property" - value="org.eclipse.swt.gtk.linux.${buildArch} + value="org.eclipse.swt.gtk.${buildOs}.${buildArch} org.eclipse.core.filesystem org.eclipse.core.resources org.eclipse.core.commands @@ -214,12 +214,14 @@ <subant> <property name="buildId" value="${buildId}" /> <property name="buildArch" value="${buildArch}" /> + <property name="buildOs" value="${buildOs}" /> <property file="pdebuild.properties" /> <filelist refid="depsDirs" /> </subant> <subant> <property name="buildId" value="${buildId}" /> <property name="buildArch" value="${buildArch}" /> + <property name="buildOs" value="${buildOs}" /> <property file="pdebuild.properties" /> <filelist refid="helpDirs" /> </subant> @@ -245,6 +247,7 @@ <arg line="-application org.eclipse.ant.core.antRunner " /> <arg line="-buildfile ../pdebuild.xml generateScripts2" /> <arg line="-DbuildArch=${buildArch} " /> + <arg line="-DbuildOs=${buildOs} " /> <arg line="-DbuildId=${buildId} " /> <arg line="-debug -consolelog" /> </java> @@ -287,10 +288,10 @@ <target name="removeGeneratedBuildXMLs" depends="zipPlugins2"> <fileset id="buildXMLsToKeep" dir="${sdkSource}/plugins" excludes="**/org.eclipse.swt.gtk.*/*, - **/org.eclipse.update.core.linux/**/*, + **/org.eclipse.update.core.${buildOs}/**/*, **/org.eclipse.pde.build/scripts/*, **/org.eclipse.jdt.core/scripts/*, - **/org.eclipse.update.core.linux/src/*, + **/org.eclipse.update.core.${buildOs}/src/*, **/org.eclipse.jdt.doc.isv/*, **/org.eclipse.swt/*, **/org.eclipse.jdt.doc.user/*" Index: publishProduct.xml =================================================================== --- publishProduct.xml (revision 23733) +++ publishProduct.xml (working copy) @@ -1,7 +1,7 @@ <project name="Eclipse SDK build" default="publish" basedir="."> <target name="publish"> <p2.publish.product flavor="tooling" repository="file:${reposource}" productFile="${productFile}" compress="true"> - <config os="linux" ws="gtk" arch="${buildArch}" /> + <config os="${buildOs}" ws="gtk" arch="${buildArch}" /> <advice kind="featureVersions" file="${buildDirectory}/finalFeaturesVersions.properties" /> <advice kind="pluginVersions" file="${buildDirectory}/finalPluginsVersions.properties" /> </p2.publish.product> Index: buildTests.xml =================================================================== --- buildTests.xml~ Wed Mar 28 11:50:23 2012 +++ buildTests.xml Fri Jun 22 10:11:05 2012 @@ -215,6 +215,8 @@ --> <exec executable="${basedir}/runtests.sh" dir="${basedir}"> <arg value="-t${timestamp}" /> + <arg value="-a${buildArch}" /> + <arg value="-o${buildOs}" /> <arg value="-b ${testsBuildDirectory}" /> <arg value="-p ${provisionWithTestsDir}" /> <arg value="${testSwitches}" /> Index: runtests.sh =================================================================== --- runtests.sh (revision 23733) +++ runtests.sh (working copy) @@ -16,6 +16,8 @@ -b Tests build directory -p Clean installation directory to copy for running test suites -t Timestamp string with which to tag the results + -a Architecture to run the tests on + -o OS to run the tests on -v Make test runs output to the console _EOF_ } @@ -83,6 +85,8 @@ headless=1 fi + buildOs=linux + label=$(grep label build.properties | sed s/label=//) testframework=$(grep ^testframework build.properties | sed s/testframework=//) @@ -142,21 +146,16 @@ if [ ${headless} == 1 ]; then # Try to find Xvnc xvnc= - if [ -a /usr/bin/Xvnc ] - then - xvnc=/usr/bin/Xvnc - setupXvnc - else - if [ -a /usr/X11/bin/Xvnc ] - then - xvnc=/usr/X11/bin/Xvnc + for _xvnc in /usr/bin/Xvnc /usr/X11/bin/Xvnc /usr/local/bin/Xvnc; do + if [ -a $_xvnc ]; then + xvnc=$_xvnc setupXvnc - else - echo "Couldn't find Xvnc (/usr/bin/Xvnc or /usr/X11/bin/Xvnc). Using DISPLAY=0:0" - DISPLAY=`$HOST`:0.0 + break fi + done + if [ "x$xvnc" = "x" ]; then + echo "Couldn't find Xvnc. Using default DISPLAY from environment" fi - export DISPLAY fi } @@ -165,9 +164,11 @@ port=`expr '(' $RANDOM '*' 9 / 32767 ')' + 58` echo localhost > Xvnc.cfg echo "Setting up Xvnc on port ${port} with password VNCpassword1" - $xvnc :$port -screen 1 1024x768x32 -auth Xvnc.cfg -localhost -PasswordFile eclipse-tests-vncpwd &> Xvnc.log & + $xvnc :$port -geometry 1024x768 -depth 24 -auth Xvnc.cfg -localhost -rfbauth eclipse-tests-vncpwd &> Xvnc.log & Xvncpid=$! - DISPLAY=`$HOST`:$port + DISPLAY=$HOST:$port + export DISPLAY + } function setArch() { @@ -186,13 +187,15 @@ arch=ia64 ;; ppc) arch=ppc ;; - x86_64) + x86_64|amd64) arch=x86_64 ;; *) echo "Unrecognized architecture: $arch" 1>&2 exit 1 ;; esac echo >&2 "Architecture not specified. Assuming host architecture: $arch" + else + arch=$buildArch fi } @@ -206,7 +209,7 @@ -application org.eclipse.ant.core.antRunner \ -file $testDriver \ -Declipse-home=${eclipseHome} \ - -Dos=linux \ + -Dos=${buildOs} \ -Dws=gtk \ -Darch=${arch} \ -Dlibrary-file=$libraryXml \ @@ -214,7 +217,7 @@ -logger org.apache.tools.ant.DefaultLogger \ -vmargs \ -Duser.home=${homedir} \ - -Dosgi.os=linux \ + -Dosgi.os=${buildOs} \ -Dosgi.ws=gtk \ -Dosgi.arch=${arch} else @@ -348,7 +351,7 @@ } # Command-line arguments -while getopts "vde:gb:p:t:h" OPTION +while getopts "vde:gb:p:t:a:o:h" OPTION do case $OPTION in d) @@ -366,6 +369,12 @@ p) provisionDir=$OPTARG ;; + a) + buildArch=$OPTARG + ;; + o) + buildOs=$OPTARG + ;; h) usage exit 1 --- task-src/org/eclipse/linuxtools/eclipsebuild/SymlinkNonOSGiJars.java~ Thu Feb 25 21:14:10 2010 +++ task-src/org/eclipse/linuxtools/eclipsebuild/SymlinkNonOSGiJars.java Fri Nov 5 11:39:46 2010 @@ -36,8 +36,8 @@ for (Iterator<Object> jarIter = jarLocations.iterator(); jarIter.hasNext();) { String origLocation = (String) jarIter.next(); - String systemLocations = (String) dependencies.get(origLocation); + String systemLocations = getProject().replaceProperties((String) dependencies.get(origLocation)); String[] systemLocationList = systemLocations.split(":"); String attemptedLocations = ""; for (int j = 0; j < systemLocationList.length; j++) {