diff --git a/js/tests/bisect.sh b/js/tests/bisect.sh index 2a9c4e8a9d8..183d8370c20 100755 --- a/js/tests/bisect.sh +++ b/js/tests/bisect.sh @@ -143,7 +143,15 @@ fi OPTIND=1 +# evaluate set-build-env.sh in this process to pick up the necessary environment +# variables, but restore the PATH and PYTHON to prevent their interfering with +# Sisyphus. + +savepath="$PATH" +savepython="$PYTHON" eval source $TEST_DIR/bin/set-build-env.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype > /dev/null +PATH=$savepath +PYTHON=$savepython # TEST_JSDIR must be set after set-build-env.sh is called # on Windows since TEST_DIR can be modified in set-build-env.sh diff --git a/js/tests/config.sh b/js/tests/config.sh index 1f76a3e14b1..825760d1b95 100755 --- a/js/tests/config.sh +++ b/js/tests/config.sh @@ -87,6 +87,15 @@ if [[ "$OS_ARCH" == "CYGWIN32_NT" ]]; then OS_ARCH="WINNT" fi +if echo "$OS_ARCH" | grep -iq MINGW32_NT; then + OS_RELEASE="`echo $OS_ARCH|sed 's/MINGW32_NT-//'`" + OS_ARCH="WINNT" +fi + +if [[ "$OS_ARCH" == "MINGW32_NT" ]]; then + OS_ARCH="WINNT" +fi + # Virtually all Linux versions are identical. # Any distinctions are handled in linux.h diff --git a/testing/sisyphus/bin/build.sh b/testing/sisyphus/bin/build.sh index 30efbde8beb..5212707f999 100755 --- a/testing/sisyphus/bin/build.sh +++ b/testing/sisyphus/bin/build.sh @@ -44,16 +44,16 @@ case $product in firefox|thunderbird|fennec) cd $BUILDTREE/mozilla - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla; make -f client.mk build" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla; make -f client.mk build" 2>&1; then if [[ -z "$TEST_FORCE_CLOBBER_ON_ERROR" ]]; then error "error during build" $LINENO else echo "error occured during build. attempting a clobber build" $LINENO - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla; make -f client.mk distclean" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla; make -f client.mk distclean" 2>&1; then error "error during forced clobber" $LINENO fi - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla; make -f client.mk build" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla; make -f client.mk build" 2>&1; then error "error during forced build" $LINENO fi fi @@ -117,31 +117,27 @@ case $product in TEST_JSDIR=${TEST_JSDIR:-$TEST_DIR/tests/mozilla.org/js} source $TEST_JSDIR/config.sh - mkdir -p "$BUILDTREE/mozilla/js/src/$JS_OBJDIR" - - # run autoconf everytime instead of only when configure - # needs to be initially generated in order to pick up - # configure.in changes. - - if findprogram autoconf-2.13; then - AUTOCONF=autoconf-2.13 - elif findprogram autoconf213; then - AUTOCONF=autoconf213 - else - error "autoconf 2.13 not detected" - fi - cd "$BUILDTREE/mozilla/js/src" - eval "$AUTOCONF" + mkdir -p "$JS_OBJDIR" - cd "$BUILDTREE/mozilla/js/src/$JS_OBJDIR" + # run autoconf when configure.in is newer than configure + if [[ configure.in -nt configure ]]; then + if [[ "$OSID" == "nt" ]]; then + AUTOCONF=autoconf-2.13 + elif findprogram autoconf-2.13; then + AUTOCONF=autoconf-2.13 + elif findprogram autoconf213; then + AUTOCONF=autoconf213 + else + error "autoconf 2.13 not detected" + fi - if [[ -e "Makefile" ]]; then - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; make clean" 2>&1; then - error "during js/src clean" $LINENO + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla/js/src; eval \"$AUTOCONF\";" 2>&1; then + error "during js/src autoconf" $LINENO fi fi + # XXX: Todo # This reproduces the limited approach which previously existed with Makefile.ref but # does not provide the full functionality provided by the available configure options. @@ -150,21 +146,23 @@ case $product in # specify arbitrary configure options. # - if [[ "$buildtype" == "debug" ]]; then - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; ../configure --prefix=$BUILDTREE/mozilla/js/src/$JS_OBJDIR --disable-optimize --enable-debug"; then - error "during js/src/$JS_OBJDIR configure" $LINENO - fi - else - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; ../configure --prefix=$BUILDTREE/mozilla/js/src/$JS_OBJDIR --enable-optimize --disable-debug"; then - error "during js/src/$JS_OBJDIR configure" $LINENO + if [[ "configure" -nt "$JS_OBJDIR/Makefile" ]]; then + if [[ "$buildtype" == "debug" ]]; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; ../configure --prefix=$BUILDTREE/mozilla/js/src/$JS_OBJDIR --disable-optimize --enable-debug"; then + error "during js/src/$JS_OBJDIR configure" $LINENO + fi + else + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; ../configure --prefix=$BUILDTREE/mozilla/js/src/$JS_OBJDIR --enable-optimize --disable-debug"; then + error "during js/src/$JS_OBJDIR configure" $LINENO + fi fi fi - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; make" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; make" 2>&1; then error "during js/src build" $LINENO fi - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; make install" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla/js/src/$JS_OBJDIR; make install" 2>&1; then error "during js/src install" $LINENO fi @@ -178,11 +176,11 @@ case $product in export JSBUILDOPT=BUILD_OPT=1 fi - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla/js/src; make -f Makefile.ref ${JSBUILDOPT} clean" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla/js/src; make -f Makefile.ref ${JSBUILDOPT} clean" 2>&1; then error "during js/src clean" $LINENO fi - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla/js/src; make -f Makefile.ref ${JSBUILDOPT}" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla/js/src; make -f Makefile.ref ${JSBUILDOPT}" 2>&1; then error "during js/src build" $LINENO fi diff --git a/testing/sisyphus/bin/checkout.sh b/testing/sisyphus/bin/checkout.sh index afa23633908..6b89f20268c 100755 --- a/testing/sisyphus/bin/checkout.sh +++ b/testing/sisyphus/bin/checkout.sh @@ -122,7 +122,7 @@ case $product in error "during checkout of $project mozconfig" $LINENO fi fi - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla; make -f client.mk checkout" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla; make -f client.mk checkout" 2>&1; then error "during checkout of $project tree" $LINENO fi ;; @@ -165,7 +165,7 @@ case $product in fi fi - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla; make -f client.mk checkout" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla; make -f client.mk checkout" 2>&1; then error "during checkout of $project tree" $LINENO fi ;; diff --git a/testing/sisyphus/bin/clobber.sh b/testing/sisyphus/bin/clobber.sh index e1b91d55b4f..caf37da5020 100755 --- a/testing/sisyphus/bin/clobber.sh +++ b/testing/sisyphus/bin/clobber.sh @@ -53,7 +53,7 @@ case $product in exit fi - if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla; make -f client.mk clobber" 2>&1; then + if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla; make -f client.mk clobber" 2>&1; then echo "error during client.mk clobber" $LINENO echo "Forcing clobber" $LINENO rm -fR $BUILDTREE/mozilla/$product-$buildtype/ diff --git a/testing/sisyphus/bin/install-extensions.sh b/testing/sisyphus/bin/install-extensions.sh index e88ebbca85b..05f63de1bed 100755 --- a/testing/sisyphus/bin/install-extensions.sh +++ b/testing/sisyphus/bin/install-extensions.sh @@ -49,7 +49,7 @@ function usage() { cat < $extensiondir/$extensionuuid + if [[ ! -e $executableextensiondir/$extensionuuid ]]; then + echo $extensionosinstalldir > $executableextensiondir/$extensionuuid fi done diff --git a/testing/sisyphus/bin/library.sh b/testing/sisyphus/bin/library.sh index 4732047afce..807ff21f38a 100755 --- a/testing/sisyphus/bin/library.sh +++ b/testing/sisyphus/bin/library.sh @@ -397,7 +397,7 @@ if [[ -z "$LIBRARYSH" ]]; then if [[ $kernel_name == 'Linux' ]]; then OSID=linux EXE_EXT= - TEST_KERNEL=`uname -r | sed 's|\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[-.0-9]*\.\([a-zA-Z0-9]*\)|\1.\2.\3|'` + TEST_KERNEL=`uname -r | sed 's|\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*|\1.\2.\3|'` TEST_PROCESSORTYPE=`cat /proc/cpuinfo | grep vendor | uniq | sed 's|vendor.* : \(.*\)|\1|'` TIMECOMMAND='/usr/bin/time -f "Elapsed time %e seconds, User %U seconds, System %S seconds, CPU %P, Memory: %M"' diff --git a/testing/sisyphus/bin/set-build-env.sh b/testing/sisyphus/bin/set-build-env.sh index 563df4a9940..deef8646644 100755 --- a/testing/sisyphus/bin/set-build-env.sh +++ b/testing/sisyphus/bin/set-build-env.sh @@ -147,54 +147,160 @@ for step in step1; do # dummy loop for handling exits fi fi - case $OSID in + # use BUILDPATH to record the PATH to be used during build + # related scripts. This is used to pass MSYS specific PATHs + # to mozilla-build on Windows. + export BUILDPATH="$PATH" + case $OSID in nt) # On Windows, Sisyphus is run under Cygwin, so the OS will be CYGWIN # regardless. Check if mozilla-build has been installed to the default # location, and if so, set up to call mozilla-build to perform the actual # build steps. - # + # # To make life simpler, change the mount point of the C: drive in cygwin from # /cygdrive/c to /c via mount -c / # which will make paths to non cygwin and non msys locations identical between cygwin # and msys, e.g. /c/work will work in both to point to c:\work - # + # + # It is also necessary to set the /tmp path in cygwin and msys to point to the + # same physical directory. + # # Note that all commands *except* make client.mk will be performed in cygwin. # # Note that when calling a command string of the form $buildbash --login -c "command", - # you must cd to the desired directory as part of "command" since msys will set the + # 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" && $branch != "1.8.0" ]]; then - export PYTHON=/c/mozilla-build/python25/python - export BUILDDIR=${BUILDDIR:-/c/work/mozilla/builds} - export buildbash="/c/mozilla-build/msys/bin/bash" - export bashlogin=--login # this is for msys' bash. + export mozillabuild=${mozillabuild:-/c/mozilla-build} + export PYTHON=$mozillabuild/python25/python + export BUILDDIR=${BUILDDIR:-/c/work/mozilla/builds} + export buildbash="$mozillabuild/msys/bin/bash" + export bashlogin=--login # this is for msys' bash. - if echo $branch | egrep -q '^1\.8'; then - 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=${MOZ_TOOLS:-"/c/mozilla-build/moztools"} - export SET_MSVC_ENV=${SET_MSVC_ENV:-${TEST_DIR}/bin/set-msvc8-env.sh} - fi + # determine installed compilers + export MSVCROOTKEY="/machine/SOFTWARE/Microsoft/VisualStudio" + export MSVC6KEY="$MSVCROOTKEY/6.0/Setup/Microsoft Visual C++" + export MSVC71KEY="$MSVCROOTKEY/7.1/Setup/VC" + export MSVC8KEY="$MSVCROOTKEY/8.0/Setup/VC" + export MSVC8EXPRESSKEY="/machine/SOFTWARE/Microsoft/VCExpress/8.0/Setup/VC" + export MSVC9KEY="$MSVCROOTKEY/9.0/Setup/VC" + export MSVC9EXPRESSKEY="/machine/SOFTWARE/Microsoft/VCExpress/9.0/Setup/VC" - 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=${MOZ_TOOLS:-"$BUILDDIR/moztools"} - export SET_MSVC_ENV=${SET_MSVC_ENV:-${TEST_DIR}/bin/set-msvc6-env.sh} - else - export MOZ_TOOLS=${MOZ_TOOLS:-"$BUILDDIR/moztools-static"} - export SET_MSVC_ENV=${SET_MSVC_ENV:-${TEST_DIR}/bin/set-msvc8-env.sh} - fi + if [[ -z "$VC6DIR" ]]; then + export VC6DIR=`regtool get "$MSVC6KEY/ProductDir" 2> /dev/null` fi - source $SET_MSVC_ENV + if [[ -z "$VC71DIR" ]]; then + export VC71DIR=`regtool get "$MSVC71KEY/ProductDir" 2> /dev/null` + fi + + if [[ -z "$VC8DIR" ]]; then + export VC8DIR=`regtool get "$MSVC8KEY/ProductDir" 2> /dev/null` + fi + + if [[ -z "$VC8EXPRESSDIR" ]]; then + export VC8EXPRESSDIR=`regtool get "$MSVC8EXPRESSKEY/ProductDir" 2> /dev/null` + fi + + if [[ -z "$VC9DIR" ]]; then + export VC9DIR=`regtool get "$MSVC9KEY/ProductDir" 2> /dev/null` + fi + + if [[ -z "$VC9EXPRESSDIR" ]]; then + export VC9EXPRESSDIR=`regtool get "$MSVC9EXPRESSKEY/ProductDir" 2> /dev/null` + fi + + case $branch in + 1.8.0) + # only msvc6 supported + if [[ -n "$VC6DIR" ]]; then + startbat=start-msvc6.bat + fi + ;; + 1.8.1) + # msvc6 official, vc7.1 (2003) supported + if [[ -n "$VC6DIR" ]]; then + startbat=start-msvc6.bat + elif [[ -n "$VC71DIR" ]]; then + startbat=start-msvc71.bat + fi + ;; + 1.9.0|1.9.1|1.9.2) + # msvc8 official, vc7.1, (2003), vc9 (2009) supported + if [[ -n "$VC8DIR" ]]; then + startbat=start-msvc8.bat + # set VCINSTALLDIR for use in detecting the MS CRT + # source when building jemalloc. + VCINSTALLDIR=$VC8DIR + elif [[ -n "$VC8EXPRESSDIR" ]]; then + startbat=start-msvc8.bat + elif [[ -n "$VC71DIR" ]]; then + startbat=start-msvc71.bat + elif [[ -n "$VC9DIR" || -n "$VC9EXPRESSDIR" ]]; then + startbat=start-msvc9.bat + fi + ;; + *) + ;; + esac + + if [[ -z "$startbat" ]]; then + myexit 2 + fi + + startbat="$mozillabuild/$startbat" + + # The start batch file changes directory and starts an msys bash shell + # which will block its execution. Create a working copy without the + # bash invocation to just set the environment variables and save them + # to ~/mozilla-build-env.dat. + varsbat=`echo $startbat | sed 's|start|vars|'`; + if [[ ! -e "$varsbat" ]]; then + sed 's|\(^cd.*USERPROFILE.*\)|rem \1|; s|\(^.*MOZILLABUILD.*bash.*\)|\1 -c "set > ~/mozilla-build-env.dat"|' $startbat > $varsbat + fi + + # call the windows command line to execute the new batch file + varsbat=`cygpath -w "$varsbat"` + cmd /c "$varsbat" + # escape the windows path delimiter \ in the mozilla-build-env.dat + sed -i.bak 's|\\|\\\\\\\\|g' ~/mozilla-build-env.dat + # set IFS to bel in order to read full line including leading whitespace. + saveIFS=$IFS + IFS=`echo -e '\007'` + # read from ~/mozilla-build-env.dat without forking a process + # see "Advanced Bash-Scripting Guide" 19-4. Avoiding a subshell + exec 3< ~/mozilla-build-env.dat + while read line <&3; do + if ! echo "$line" | grep -q '^[a-zA-Z_0-9]*=[^(]'; then + # skip function definitions + continue + fi + name="`echo $line | sed 's|\(^[a-zA-Z_0-9]*\)=.*|\1|'`" + if [[ "$name" == "_" ]]; then + continue + fi + if [[ "$name" == "BASH_EXECUTION_STRING" ]]; then + continue + fi + eval "var=\$$name" + # remove any single quotes around the value + value="`echo $line | sed \"s|^[a-zA-Z_0-9]*='*\([^']*\)'*|\1|\"`" + if [[ -z "$var" ]]; then + # variable is not defined, i.e. was defined by the batch file. + # export it into the current process. + eval "export $name=\"$value\"" + elif [[ "$name" == "PATH" ]]; then + # convert msys relative paths to paths relative to /c/. + value=`echo "$value" | sed 's|/local/bin|/c/mozilla-build/msys/local/bin|' | sed 's|:/usr/local/bin:/mingw/bin:/bin:|:/c/mozilla-build/msys/usr/local/bin:/c/mozilla-build/msys/mingw/bin:/c/mozilla-build/msys/bin:|'` + eval "export BUILDPATH=\"$value:$PATH\"" + fi + done + IFS=$saveIFS + # close mozilla-build-env.dat + exec 3>&- + echo moztools Location: $MOZ_TOOLS # now convert TEST_DIR and BUILDDIR to cross compatible paths using @@ -218,8 +324,8 @@ for step in step1; do # dummy loop for handling exits export PATH=/tools/gcc/bin:$PATH ;; esac - ;; + darwin) export BUILDDIR=${BUILDDIR:-/work/mozilla/builds} export buildbash="/bin/bash" diff --git a/testing/sisyphus/bin/set-msvc6-env.sh b/testing/sisyphus/bin/set-msvc6-env.sh deleted file mode 100755 index de942728234..00000000000 --- a/testing/sisyphus/bin/set-msvc6-env.sh +++ /dev/null @@ -1,78 +0,0 @@ -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is -# Mozilla Corporation. -# Portions created by the Initial Developer are Copyright (C) 2006. -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Bob Clary -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** 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="$VS6INSTALLDIR\\Common" -export VSCommonDir_cyg=`cygpath -u "$VSCommonDir"` - -# Root of Visual Developer Studio installed files. -export MSDevDir="$VSCommonDir\\MSDev98" -export MSDevDir_cyg=`cygpath -u "$MSDevDir"` - -# Root of Visual C++ installed files. -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. -export VcOsDir=WIN95 -if [[ "$OS" == "Windows_NT" ]]; then - export VcOsDir=WINNT -fi - -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 - export PATH="$MSDevDir_cyg/Bin":"MSVCDir_cyg/Bin":"$VSCommonDir_cyg/Tools/$VcOsDir":"$VSCommonDir_cyg/Tools":"$windir/SYSTEM":$MOZ_TOOLS/bin:"$PATH" -fi - -export INCLUDE="$MSVCDir\\ATL\\Include;$MSVCDir\\Include;$MSVCDir\\MFC\\Include;$INCLUDE" -export LIB="$MSVCDir\\Lib;$MSVCDir\\MFC\\Lib;$LIB" - -unset VcOsDir -unset VSCommonDir - -# necessary for msys' /etc/profile.d/profile-extrapaths.sh to set properly -if [[ -d "/c/mozilla-build" ]]; then - export MOZILLABUILD='C:\\mozilla-build\\' -fi - - diff --git a/testing/sisyphus/bin/set-msvc8-env.sh b/testing/sisyphus/bin/set-msvc8-env.sh deleted file mode 100755 index 9d15e7536cd..00000000000 --- a/testing/sisyphus/bin/set-msvc8-env.sh +++ /dev/null @@ -1,126 +0,0 @@ -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is -# Mozilla Corporation. -# Portions created by the Initial Developer are Copyright (C) 2006. -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Bob Clary -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -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=${WindowsSDK6:-'c:\Program Files\Microsoft SDKs\Windows\v6.0'} -export WindowsSDK6_cyg=`cygpath -u "$WindowsSDK6"` - -if [[ ! -d "$WindowsSDK6_cyg" ]]; then - export WindowsSDK6='c:\Program Files\Microsoft SDKs\Windows\v6.1' - export WindowsSDK6_cyg=`cygpath -u "$WindowsSDK6"` -fi - -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"` -export MSVCDir_cyg=`cygpath -u "$VCINSTALLDIR"` -export PlatformSDKDir_cyg=`cygpath -u "$PlatformSDKDir"` - -if [ ! -d "$PlatformSDKDir_cyg" ] ; then - echo "Can not find Platform SDK at $PlatformSDKDir_cyg" - break 2 -fi - -echo Platform SDK Location: $PlatformSDKDir_cyg - -if [ ! -d "$WindowsSDK6_cyg" ] ; then - echo "Can not find Windows SDK 6 at $WindowsSDK6_cyg" - break 2 -fi - -echo Windows SDK Location: $WindowsSDK6_cyg - -if [ ! -f "$MOZ_TOOLS"/lib/libIDL-0.6_s.lib ] ; then - echo "Can not find moztools at $MOZ_TOOLS" - break 2 -fi - -export PATH="\ -$WindowsSDK6_cyg/bin:\ -$DevEnvDir_cyg:\ -$MSVCDir_cyg/bin:\ -$VS8COMNTOOLS_cyg:\ -$VS8COMNTOOLS_cyg/bin:\ -$PlatformSDKDir_cyg/bin:\ -$FrameworkSDKDir_cyg/bin:\ -$FrameworkDir_cyg/$FrameworkVersion:\ -$MSVCDir/VCPackages:\ -$MOZ_TOOLS/bin:\ -$PATH" - -export INCLUDE="\ -$WindowsSDK6\\include;\ -$WindowsSDK6\\include\\atl;\ -$MSVCDir\\ATLMFC\\INCLUDE;\ -$MSVCDir\\INCLUDE;\ -$PlatformSDKDir\\include;\ -$FrameworkSDKDir\\include;\ -$INCLUDE" - -export LIB="\ -$WindowsSDK6\\lib;\ -$MSVCDir\\ATLMFC\\LIB;\ -$MSVCDir\\LIB;\ -$PlatformSDKDir\\lib;\ -$FrameworkSDKDir\\lib;\ -$LIB" - -export LIBPATH="\ -$FrameworkDir\\$FrameworkVersion;\ -$MSVCDir\\ATLMFC\\LIB\ -" -# necessary for msys' /etc/profile.d/profile-extrapaths.sh to set properly -if [[ -d "/c/mozilla-build" ]]; then - export MOZILLABUILD='C:\\mozilla-build\\' -fi -