From ffeaaf09348cbeb5c94c596ab628375fed217822 Mon Sep 17 00:00:00 2001 From: Bob Clary Date: Wed, 6 Aug 2008 00:23:51 -0700 Subject: [PATCH] Sisyphus - Improve compiler environment customization on Windows, bug 446092 --- testing/sisyphus/bin/set-build-env.sh | 24 +++++++++++------------ testing/sisyphus/bin/set-msvc6-env.sh | 13 ++++++++----- testing/sisyphus/bin/set-msvc8-env.sh | 28 ++++++++++++++------------- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/testing/sisyphus/bin/set-build-env.sh b/testing/sisyphus/bin/set-build-env.sh index 8c9208f5b47..10378af83cc 100755 --- a/testing/sisyphus/bin/set-build-env.sh +++ b/testing/sisyphus/bin/set-build-env.sh @@ -157,36 +157,36 @@ for step in step1; do # dummy loop for handling exits # you must cd to the desired directory as part of "command" since msys will set the # directory to the home directory prior to executing the command. - if [[ -e "/c/mozilla-build" ]]; then + if [[ -e "/c/mozilla-build" && $branch != "1.8.0" ]]; then export BUILDDIR=${BUILDDIR:-/c/work/mozilla/builds} export buildbash="/c/mozilla-build/msys/bin/bash" export bashlogin=--login # this is for msys' bash. if echo $branch | egrep -q '^1\.8'; then - export MOZ_TOOLS="/c/mozilla-build/moztools-180compat" - source ${TEST_DIR}/bin/set-msvc6-env.sh + export MOZ_TOOLS=${MOZ_TOOLS:-"/c/mozilla-build/moztools-180compat"} + export SET_MSVC_ENV=${SET_MSVC_ENV:-${TEST_DIR}/bin/set-msvc6-env.sh} else - export MOZ_TOOLS="/c/mozilla-build/moztools" - source ${TEST_DIR}/bin/set-msvc8-env.sh + export MOZ_TOOLS=${MOZ_TOOLS:-"/c/mozilla-build/moztools"} + export SET_MSVC_ENV=${SET_MSVC_ENV:-${TEST_DIR}/bin/set-msvc8-env.sh} fi - echo moztools Location: $MOZ_TOOLS else export BUILDDIR=${BUILDDIR:-/work/mozilla/builds} export buildbash="/bin/bash" export bashlogin=-l if echo $branch | egrep -q '^1\.8'; then - export MOZ_TOOLS="$BUILDDIR/moztools" - source ${TEST_DIR}/bin/set-msvc6-env.sh + export MOZ_TOOLS=${MOZ_TOOLS:-"$BUILDDIR/moztools"} + export SET_MSVC_ENV=${SET_MSVC_ENV:-${TEST_DIR}/bin/set-msvc6-env.sh} else - export MOZ_TOOLS="$BUILDDIR/moztools-static" - source ${TEST_DIR}/bin/set-msvc8-env.sh + export MOZ_TOOLS=${MOZ_TOOLS:-"$BUILDDIR/moztools-static"} + export SET_MSVC_ENV=${SET_MSVC_ENV:-${TEST_DIR}/bin/set-msvc8-env.sh} fi - - echo moztools Location: $MOZ_TOOLS fi + source $SET_MSVC_ENV + echo moztools Location: $MOZ_TOOLS + # now convert TEST_DIR and BUILDDIR to cross compatible paths using # the common cygdrive prefix for cygwin and msys TEST_DIR_WIN=`cygpath -w $TEST_DIR` diff --git a/testing/sisyphus/bin/set-msvc6-env.sh b/testing/sisyphus/bin/set-msvc6-env.sh index c74bcc7bbc4..de942728234 100755 --- a/testing/sisyphus/bin/set-msvc6-env.sh +++ b/testing/sisyphus/bin/set-msvc6-env.sh @@ -35,16 +35,21 @@ # # ***** END LICENSE BLOCK ***** +echo Setting environment for using Microsoft Visual Studio 6 + +# Visual Studio 6 Installation Directory +export VS6INSTALLDIR=${VS6INSTALLDIR:-'C:\Program Files\Microsoft Visual Studio'} + # Root of Visual Developer Studio Common files. -export VSCommonDir='C:\Program Files\Microsoft Visual Studio\Common' +export VSCommonDir="$VS6INSTALLDIR\\Common" export VSCommonDir_cyg=`cygpath -u "$VSCommonDir"` # Root of Visual Developer Studio installed files. -export MSDevDir='C:\Program Files\Microsoft Visual Studio\Common\MSDev98' +export MSDevDir="$VSCommonDir\\MSDev98" export MSDevDir_cyg=`cygpath -u "$MSDevDir"` # Root of Visual C++ installed files. -export MSVCDir='C:\Program Files\Microsoft Visual Studio\VC98' +export MSVCDir="$VS6INSTALLDIR\\VC98" export MSVCDir_cyg=`cygpath -u "$MSVCDir"` # VcOsDir is used to help create either a Windows 95 or Windows NT specific path. @@ -53,8 +58,6 @@ if [[ "$OS" == "Windows_NT" ]]; then export VcOsDir=WINNT fi -echo Setting environment for using Microsoft Visual C++ tools. - if [[ "$OS" == "Windows_NT" ]]; then export PATH="$MSDevDir_cyg/Bin":"$MSVCDir_cyg/Bin":"$VSCommonDir_cyg/Tools/$VcOsDir":"$VSCommonDir_cyg/Tools":"$MOZ_TOOLS/bin":"$PATH" elif [[ "$OS" == "" ]]; then diff --git a/testing/sisyphus/bin/set-msvc8-env.sh b/testing/sisyphus/bin/set-msvc8-env.sh index e0c18eecafa..9d15e7536cd 100755 --- a/testing/sisyphus/bin/set-msvc8-env.sh +++ b/testing/sisyphus/bin/set-msvc8-env.sh @@ -35,20 +35,22 @@ # # ***** END LICENSE BLOCK ***** -export VSINSTALLDIR='C:\Program Files\Microsoft Visual Studio 8' -export VS80COMNTOOLS="$VSINSTALLDIR\\Common7\\Tools\\" -export VCINSTALLDIR="$VSINSTALLDIR\\VC" -export FrameworkDir='C:\WINDOWS\Microsoft.NET\Framework' -export FrameworkVersion='v2.0.50727' -export FrameworkSDKDir="$VSINSTALLDIR\\SDK\\v2.0" -export DevEnvDir="$VSINSTALLDIR\\Common7\\IDE" -export MSVCDir="$VSINSTALLDIR\\VC" +echo Setting environment for using Microsoft Visual Studio 8 + +export VS8INSTALLDIR=${VS8INSTALLDIR:-'C:\Program Files\Microsoft Visual Studio 8'} +export VS8COMNTOOLS="$VS8INSTALLDIR\\Common7\\Tools\\" +export VCINSTALLDIR="$VS8INSTALLDIR\\VC" +export FrameworkDir=${FrameworkDir:-'C:\WINDOWS\Microsoft.NET\Framework'} +export FrameworkVersion=${FrameworkVersion:-'v2.0.50727'} +export FrameworkSDKDir="$VS8INSTALLDIR\\SDK\\v2.0" +export DevEnvDir="$VS8INSTALLDIR\\Common7\\IDE" +export MSVCDir="$VS8INSTALLDIR\\VC" export PlatformSDKDir="$MSVCDir"\\PlatformSDK # Windows SDK 6 or later is required after https://bugzilla.mozilla.org/show_bug.cgi?id=412374 # v6.0 - Windows SDK Update for Vista # v6.1 - Windows SDK for Windows Server 2008 -export WindowsSDK6='c:\Program Files\Microsoft SDKs\Windows\v6.0' +export WindowsSDK6=${WindowsSDK6:-'c:\Program Files\Microsoft SDKs\Windows\v6.0'} export WindowsSDK6_cyg=`cygpath -u "$WindowsSDK6"` if [[ ! -d "$WindowsSDK6_cyg" ]]; then @@ -56,8 +58,8 @@ if [[ ! -d "$WindowsSDK6_cyg" ]]; then export WindowsSDK6_cyg=`cygpath -u "$WindowsSDK6"` fi -export VSINSTALLDIR_cyg=`cygpath -u "$VSINSTALLDIR"` -export VS80COMNTOOLS_cyg=`cygpath -u "$VSINSTALLDIR"` +export VS8INSTALLDIR_cyg=`cygpath -u "$VS8INSTALLDIR"` +export VS8COMNTOOLS_cyg=`cygpath -u "$VS8COMNTOOLS"` export VCINSTALLDIR_cyg=`cygpath -u "$VCINSTALLDIR"` export FrameworkDir_cyg=`cygpath -u "$FrameworkDir"` export DevEnvDir_cyg=`cygpath -u "$DevEnvDir"` @@ -87,8 +89,8 @@ export PATH="\ $WindowsSDK6_cyg/bin:\ $DevEnvDir_cyg:\ $MSVCDir_cyg/bin:\ -$VS80COMNTOOLS_cyg:\ -$VS80COMNTOOLS_cyg/bin:\ +$VS8COMNTOOLS_cyg:\ +$VS8COMNTOOLS_cyg/bin:\ $PlatformSDKDir_cyg/bin:\ $FrameworkSDKDir_cyg/bin:\ $FrameworkDir_cyg/$FrameworkVersion:\