Bug 509164 - Sisyphus - support mozilla-build start*.bat environment settings, r=ctalbert.

This commit is contained in:
Bob Clary 2009-08-18 00:29:59 -07:00
Родитель 4eb27023a0
Коммит 3147b1f440
10 изменённых файлов: 199 добавлений и 282 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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
;;

Просмотреть файл

@ -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/

Просмотреть файл

@ -49,7 +49,7 @@ function usage()
{
cat <<EOF
usage:
$SCRIPT -p product -b branch -x executablepath -N profilename -E extensions
$SCRIPT -p product -b branch -x executablepath -N profilename -E extensiondir
[-d datafiles]
variable description
@ -59,7 +59,7 @@ variable description
-x executablepath required. directory-tree containing executable named
'product'
-N profilename required. profile name
-E extensions required. path to directory containing xpis to be installed
-E extensiondir required. path to directory containing xpis to be installed
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
@ -70,7 +70,7 @@ EOF
exit 1
}
unset product branch executablepath profilename extensions datafiles
unset product branch executablepath profilename extensiondir datafiles
while getopts $options optname ;
do
@ -79,7 +79,7 @@ do
b) branch=$OPTARG;;
x) executablepath=$OPTARG;;
N) profilename=$OPTARG;;
E) extensions=$OPTARG;;
E) extensiondir=$OPTARG;;
d) datafiles=$OPTARG;;
esac
done
@ -88,7 +88,7 @@ done
loaddata $datafiles
if [[ -z "$product" || -z "$branch" || \
-z "$executablepath" || -z "$profilename" || -z "$extensions" ]]; then
-z "$executablepath" || -z "$profilename" || -z "$extensiondir" ]]; then
usage
fi
@ -99,18 +99,18 @@ if echo $profilename | egrep -qiv '[a-z0-9_]'; then
fi
executable=`get_executable $product $branch $executablepath`
extensiondir=`dirname $executable`/extensions
executableextensiondir=`dirname $executable`/extensions
# create directory to contain installed extensions
if [[ ! -d /tmp/sisyphus/extensions ]]; then
create-directory.sh -n -d /tmp/sisyphus/extensions
fi
for extensionloc in $extensions/all/*.xpi $extensions/$OSID/*.xpi; do
if [[ $extensionloc == "$extensions/all/*.xpi" ]]; then
for extensionloc in $extensiondir/all/*.xpi $extensiondir/$OSID/*.xpi; do
if [[ $extensionloc == "$extensiondir/all/*.xpi" ]]; then
continue
fi
if [[ $extensionloc == "$extensions/$OSID/*.xpi" ]]; then
if [[ $extensionloc == "$extensiondir/$OSID/*.xpi" ]]; then
continue
fi
@ -131,8 +131,8 @@ for extensionloc in $extensions/all/*.xpi $extensions/$OSID/*.xpi; do
fi
extensionuuid=`perl $TEST_DIR/bin/get-extension-uuid.pl $extensioninstalldir/install.rdf`
if [[ ! -e $extensiondir/$extensionuuid ]]; then
echo $extensionosinstalldir > $extensiondir/$extensionuuid
if [[ ! -e $executableextensiondir/$extensionuuid ]]; then
echo $extensionosinstalldir > $executableextensiondir/$extensionuuid
fi
done

Просмотреть файл

@ -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"'

Просмотреть файл

@ -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"

Просмотреть файл

@ -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 <bob@bclary.com>
#
# 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

Просмотреть файл

@ -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 <bob@bclary.com>
#
# 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