ohair@263: #!/bin/sh ohair@263: ohair@263: # ohair@263: # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. ohair@263: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ohair@263: # ohair@263: # This code is free software; you can redistribute it and/or modify it ohair@263: # under the terms of the GNU General Public License version 2 only, as ohair@263: # published by the Free Software Foundation. ohair@263: # ohair@263: # This code is distributed in the hope that it will be useful, but WITHOUT ohair@263: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ohair@263: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ohair@263: # version 2 for more details (a copy is included in the LICENSE file that ohair@263: # accompanied this code). ohair@263: # ohair@263: # You should have received a copy of the GNU General Public License version ohair@263: # 2 along with this work; if not, write to the Free Software Foundation, ohair@263: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ohair@263: # ohair@263: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@263: # or visit www.oracle.com if you need additional information or have any ohair@263: # questions. ohair@263: # ohair@263: ohair@263: # This file should be used to set the Visual Studio environment ohair@263: # variables normally set by the vcvars32.bat or vcvars64.bat file or ohair@263: # SetEnv.cmd for older SDKs. ohair@263: ohair@263: # Use cygpath? ohair@263: isCygwin="`uname -s | grep CYGWIN`" ohair@263: if [ "${isCygwin}" != "" ] ; then ohair@263: cygpath="/usr/bin/cygpath" ohair@263: cygpath_short="${cygpath} -m -s" ohair@263: cygpath_windows="${cygpath} -w -s" ohair@263: cygpath_path="${cygpath} -p" ohair@263: pathsep=':' ohair@263: else ohair@263: cygpath="dosname" ohair@263: cygpath_short="${cygpath} -s" ohair@263: cygpath_windows="${cygpath} -s" ohair@263: cygpath_path="echo" ohair@263: pathsep=';' ohair@263: fi ohair@263: ohair@263: ######################################################################## ohair@263: # Error functions ohair@263: msg() # message ohair@263: { ohair@263: echo "$1" 1>&2 ohair@263: } ohair@263: error() # message ohair@263: { ohair@263: msg "ERROR: $1" ohair@263: exit 1 ohair@263: } ohair@263: warning() # message ohair@263: { ohair@263: msg "WARNING: $1" ohair@263: } ohair@263: envpath() # path ohair@263: { ohair@263: if [ "${cygpath_short}" != "" -a -d "$1" ] ; then ohair@263: ${cygpath_short} "$1" ohair@263: else ohair@263: echo "$1" ohair@263: fi ohair@263: } ohair@263: ######################################################################## ohair@263: ohair@263: ohair@263: # Defaults settings ohair@263: debug="false" ohair@263: verbose="false" ohair@263: shellStyle="sh" ohair@263: parentCsh="` ps -p ${PPID} 2> /dev/null | grep csh `" ohair@263: if [ "${parentCsh}" != "" ] ; then ohair@263: shellStyle="csh" ohair@263: fi ohair@263: ohair@263: set -e ohair@263: ohair@263: # Check environment first ohair@263: if [ "${PROGRAMFILES}" != "" ] ; then ohair@263: progfiles=`envpath "${PROGRAMFILES}"` ohair@263: elif [ "${ProgramFiles}" != "" ] ; then ohair@263: progfiles=`envpath "${ProgramFiles}"` ohair@263: elif [ "${SYSTEMDRIVE}" != "" ] ; then ohair@263: progfiles=`envpath "${SYSTEMDRIVE}/Program Files"` ohair@263: elif [ "${SystemDrive}" != "" ] ; then ohair@263: progfiles=`envpath "${SystemDrive}/Program Files"` ohair@263: else ohair@263: error "No PROGRAMFILES or SYSTEMDRIVE defined in environment" ohair@263: fi ohair@263: ohair@263: # Arch data model ohair@263: if [ "${PROCESSOR_IDENTIFIER}" != "" ] ; then ohair@263: arch=`echo "${PROCESSOR_IDENTIFIER}" | cut -d' ' -f1` ohair@263: elif [ "${MACHTYPE}" != "" ] ; then ohair@263: if [ "`echo ${MACHTYPE} | grep 64`" != "" ] ; then ohair@263: # Assume this is X64, not IA64 ohair@263: arch="x64" ohair@263: else ohair@263: arch="x86" ohair@263: fi ohair@263: else ohair@263: arch="`uname -m`" ohair@263: fi ohair@263: if [ "${arch}" = "X86" -o \ ohair@263: "${arch}" = "386" -o "${arch}" = "i386" -o \ ohair@263: "${arch}" = "486" -o "${arch}" = "i486" -o \ ohair@263: "${arch}" = "586" -o "${arch}" = "i586" -o \ ohair@263: "${arch}" = "686" -o "${arch}" = "i686" -o \ ohair@263: "${arch}" = "86" ] ; then ohair@263: arch="x86" ohair@263: fi ohair@263: if [ "${arch}" = "X64" -o \ ohair@263: "${arch}" = "8664" -o "${arch}" = "i8664" -o \ ohair@263: "${arch}" = "amd64" -o "${arch}" = "AMD64" -o \ ohair@263: "${arch}" = "EM64T" -o "${arch}" = "emt64t" -o \ ohair@263: "${arch}" = "intel64" -o "${arch}" = "Intel64" -o \ ohair@263: "${arch}" = "64" ] ; then ohair@263: arch="x64" ohair@263: binarch64="/amd64" ohair@263: fi ohair@263: if [ "${arch}" = "IA64" ] ; then ohair@263: arch="ia64" ohair@263: binarch64="/ia64" ohair@263: fi ohair@263: if [ "${arch}" != "x86" -a "${arch}" != "x64" -a "${arch}" != "ia64" ] ; then ohair@263: error "No PROCESSOR_IDENTIFIER or MACHTYPE environment variables and uname -m is not helping" ohair@263: fi ohair@263: if [ "${arch}" = "x86" ] ; then ohair@263: arch_data_model=32 ohair@263: progfiles32="${progfiles}" ohair@263: progfiles64="${progfiles}" ohair@263: else ohair@263: arch_data_model=64 ohair@263: progfiles32="${progfiles}" ohair@263: if [ "${PROGRAMW6432}" != "" ] ; then ohair@263: progfiles64=`envpath "${PROGRAMW6432}"` ohair@263: else ohair@263: progfiles64=`envpath "C:/Program Files"` ohair@263: fi ohair@263: fi ohair@263: ohair@263: # VS2010 (VC10) ohair@263: if [ "${VS100COMNTOOLS}" = "" ] ; then ohair@263: VS100COMNTOOLS="${progfiles32}/Microsoft Visual Studio 10.0/Common7/Tools/" ohair@263: export VS100COMNTOOLS ohair@263: fi ohair@263: vc10Bin32Dir=`envpath "${VS100COMNTOOLS}"`/../../VC/Bin ohair@263: vc10Bin64Dir="${vc10Bin32Dir}${binarch64}" ohair@263: vc10vars32Bat="vcvars32.bat" ohair@263: vc10vars64Bat="vcvars64.bat" ohair@263: ohair@263: # VS2008 (VC9) ohair@263: if [ "${VS90COMNTOOLS}" = "" ] ; then ohair@263: VS90COMNTOOLS="${progfiles32}/Microsoft Visual Studio 9.0/Common7/Tools/" ohair@263: export VS90COMNTOOLS ohair@263: fi ohair@263: vc9Bin32Dir=`envpath "${VS90COMNTOOLS}"`/../../VC/Bin ohair@263: vc9Bin64Dir="${vc9Bin32Dir}" ohair@263: vc9vars32Bat="vcvars32.bat" ohair@263: vc9vars64Bat="vcvars64.bat" ohair@263: ohair@263: # VS2005 (VC8) ohair@263: if [ "${VS80COMNTOOLS}" = "" ] ; then ohair@263: VS80COMNTOOLS="${progfiles32}/Microsoft Visual Studio 8.0/Common7/Tools/" ohair@263: export VS80COMNTOOLS ohair@263: fi ohair@263: vc8Bin32Dir=`envpath "${VS80COMNTOOLS}"`/../../VC/Bin ohair@263: vc8Bin64Dir="${progfiles64}/Microsoft Platform SDK" ohair@263: vc8vars32Bat="vcvars32.bat" ohair@263: vc8vars64Bat="SetEnv.cmd /X64" ohair@263: ohair@263: # VS2003 (VC7) ohair@263: if [ "${VS71COMNTOOLS}" = "" ] ; then ohair@263: VS71COMNTOOLS="${progfiles32}/Microsoft Visual Studio .NET 2003/Common7/Tools/" ohair@263: export VS71COMNTOOLS ohair@263: fi ohair@263: vc7Bin32Dir=`envpath "${VS71COMNTOOLS}"`/../../VC7/Bin ohair@263: vc7Bin64Dir="${progfiles64}/Microsoft Platform SDK" ohair@263: vc7vars32Bat="vcvars32.bat" ohair@263: vc7vars64Bat="SetEnv.cmd /X64" ohair@263: ohair@263: # Force user to select ohair@263: vcSelection="" ohair@263: ohair@263: # Parse options ohair@263: usage="Usage: $0 [-help] [-debug] [-v] [-c] [-s] [-p] [-v10] [-v9] [-v8] [-v7] [-32] [-64]" ohair@263: while [ $# -gt 0 ] ; do ohair@263: if [ "$1" = "-help" ] ; then ohair@263: msg "${usage}" ohair@263: msg " -help Print out this help message" ohair@263: msg " -debug Print out extra env variables to help debug this script" ohair@263: msg " -v Verbose output warns about missing directories" ohair@263: msg " -c Print out csh style output" ohair@263: msg " -s Print out sh style output" ohair@263: msg " -p Print out properties style output" ohair@263: msg " -v10 Use Visual Studio 10 VS2010" ohair@263: msg " -v9 Use Visual Studio 9 VS2008" ohair@263: msg " -v8 Use Visual Studio 8 VS2005" ohair@263: msg " -v7 Use Visual Studio 7 VS2003" ohair@263: msg " -32 Force 32bit" ohair@263: msg " -64 Force 64bit" ohair@263: exit 0 ohair@263: elif [ "$1" = "-debug" ] ; then ohair@263: debug="true" ohair@263: shift ohair@263: elif [ "$1" = "-v" ] ; then ohair@263: verbose="true" ohair@263: shift ohair@263: elif [ "$1" = "-c" ] ; then ohair@263: shellStyle="csh" ohair@263: shift ohair@263: elif [ "$1" = "-s" ] ; then ohair@263: shellStyle="sh" ohair@263: shift ohair@263: elif [ "$1" = "-p" ] ; then ohair@263: shellStyle="props" ohair@263: shift ohair@263: elif [ "$1" = "-v10" ] ; then ohair@263: vcBin32Dir="${vc10Bin32Dir}" ohair@263: vcBin64Dir="${vc10Bin64Dir}" ohair@263: vcvars32Bat="${vc10vars32Bat}" ohair@263: vcvars64Bat="${vc10vars64Bat}" ohair@263: vcSelection="10" ohair@263: shift ohair@263: elif [ "$1" = "-v9" ] ; then ohair@263: vcBin32Dir="${vc9Bin32Dir}" ohair@263: vcBin64Dir="${vc9Bin64Dir}" ohair@263: vcvars32Bat="${vc9vars32Bat}" ohair@263: vcvars64Bat="${vc9vars64Bat}" ohair@263: vcSelection="9" ohair@263: shift ohair@263: elif [ "$1" = "-v8" ] ; then ohair@263: vcBin32Dir="${vc8Bin32Dir}" ohair@263: vcBin64Dir="${vc8Bin64Dir}" ohair@263: vcvars32Bat="${vc8vars32Bat}" ohair@263: vcvars64Bat="${vc8vars64Bat}" ohair@263: vcSelection="8" ohair@263: shift ohair@263: elif [ "$1" = "-v7" ] ; then ohair@263: vcBin32Dir="${vc7Bin32Dir}" ohair@263: vcBin64Dir="${vc7Bin64Dir}" ohair@263: vcvars32Bat="${vc7vars32Bat}" ohair@263: vcvars64Bat="${vc7vars64Bat}" ohair@263: vcSelection="7" ohair@263: shift ohair@263: elif [ "$1" = "-32" ] ; then ohair@263: arch_data_model=32 ohair@263: shift ohair@263: elif [ "$1" = "-64" ] ; then ohair@263: arch_data_model=64 ohair@263: shift ohair@263: else ohair@263: msg "${usage}" ohair@263: error "Unknown option: $1" ohair@263: fi ohair@263: done ohair@263: ohair@263: # Need to pick ohair@263: if [ "${vcSelection}" = "" ] ; then ohair@263: msg "${usage}" ohair@263: error "You must pick the version" ohair@263: fi ohair@263: ohair@263: # Which vcvars bat file to run ohair@263: if [ "${arch_data_model}" = "32" ] ; then ohair@263: vcBinDir="${vcBin32Dir}" ohair@263: vcvarsBat="${vcvars32Bat}" ohair@263: fi ohair@263: if [ "${arch_data_model}" = "64" ] ; then ohair@263: vcBinDir="${vcBin64Dir}" ohair@263: vcvarsBat="${vcvars64Bat}" ohair@263: fi ohair@263: ohair@263: # Do not allow any error returns ohair@263: set -e ohair@263: ohair@263: # Different systems have different awk's ohair@263: if [ -f /usr/bin/nawk ] ; then ohair@263: awk="nawk" ohair@263: elif [ -f /usr/bin/gawk ] ; then ohair@263: awk="gawk" ohair@263: else ohair@263: awk="awk" ohair@263: fi ohair@263: ohair@263: if [ "${verbose}" = "true" ] ; then ohair@263: echo "# Welcome to verbose mode" ohair@263: set -x ohair@263: fi ohair@263: ohair@263: if [ "${debug}" = "true" ] ; then ohair@263: echo "# Welcome to debug mode" ohair@263: set -x ohair@263: fi ohair@263: ohair@263: # Temp file area ohair@263: tmp="/tmp/vsvars.$$" ohair@263: rm -f -r ${tmp} ohair@263: mkdir -p ${tmp} ohair@263: ohair@263: # Check paths ohair@263: checkPaths() # var path sep ohair@263: { ohair@263: set -e ohair@263: sep="$3" ohair@263: checklist="${tmp}/checklist" ohair@263: printf "%s\n" "$2" | \ ohair@263: sed -e 's@\\@/@g' | \ ohair@263: sed -e 's@//@/@g' | \ ohair@263: ${awk} -F"${sep}" '{for(i=1;i<=NF;i++){printf "%s\n",$i;}}' \ ohair@263: > ${checklist} ohair@263: cat ${checklist} | while read orig; do ohair@263: if [ "${orig}" != "" ] ; then ohair@263: if [ ! -d "${orig}" ] ; then ohair@263: warning "Directory in $1 does not exist: ${orig}" ohair@263: fi ohair@263: fi ohair@263: done ohair@263: } ohair@263: ohair@263: # Remove all duplicate entries ohair@263: removeDeadDups() # string sep ohair@263: { ohair@263: set -e ohair@263: sep="$2" ohair@263: pathlist="${tmp}/pathlist" ohair@263: printf "%s\n" "$1" | \ ohair@263: sed -e 's@\\@/@g' | \ ohair@263: sed -e 's@//@/@g' | \ ohair@263: ${awk} -F"${sep}" '{for(i=1;i<=NF;i++){printf "%s\n",$i;}}' \ ohair@263: > ${pathlist} ohair@263: upaths="${tmp}/upaths" ohair@263: cat ${pathlist} | while read orig; do ohair@263: p="${orig}" ohair@263: if [ "${cygpath_short}" != "" ] ; then ohair@263: if [ "${p}" != "" ] ; then ohair@263: if [ -d "${p}" ] ; then ohair@263: short=`${cygpath_short} "${p}"` ohair@263: if [ "${short}" != "" -a -d "${short}" ] ; then ohair@263: p=`${cygpath} "${short}"` ohair@263: fi ohair@263: echo "${p}" >> ${upaths} ohair@263: fi ohair@263: fi ohair@263: fi ohair@263: done ohair@263: newpaths="" ohair@263: for i in `cat ${upaths}` ; do ohair@263: # For some reason, \r characters can get into this ohair@263: i=`echo "${i}" | tr -d '\r' | sed -e 's@/$@@'` ohair@263: if [ "${newpaths}" = "" ] ; then ohair@263: newpaths="${i}" ohair@263: else ohair@263: newpaths="${newpaths}${sep}${i}" ohair@263: fi ohair@263: done ohair@263: printf "%s\n" "${newpaths}" | \ ohair@263: ${awk} -F"${sep}" \ ohair@263: '{a[$1];printf "%s",$1;for(i=2;i<=NF;i++){if(!($i in a)){a[$i];printf "%s%s",FS,$i;}};printf "\n";}' ohair@263: } ohair@263: ohair@263: # Create bat file to process Visual Studio vcvars*.bat files ohair@263: createBat() # batfile bindir command ohair@263: { ohair@263: bat="$1" ohair@263: bindir="$2" ohair@263: command="$3" ohair@263: stdout="${bat}.stdout" ohair@263: rm -f ${bat} ${stdout} ohair@263: echo "Output from: ${command}" > ${stdout} ohair@263: bdir=`envpath "${bindir}"` ohair@263: cat > ${bat} << EOF ohair@263: REM Pick the right vcvars bat file ohair@263: REM Empty these out so we only get the additions we want ohair@263: set INCLUDE= ohair@263: set LIB= ohair@263: set LIBPATH= ohair@263: set MSVCDIR= ohair@263: set MSSdk= ohair@263: set Mstools= ohair@263: set DevEnvDir= ohair@263: set VCINSTALLDIR= ohair@263: set VSINSTALLDIR= ohair@263: set WindowsSdkDir= ohair@263: REM Run the vcvars bat file, send all output to stderr ohair@263: call `${cygpath_windows} ${bdir}`\\${command} > `${cygpath_windows} "${stdout}"` ohair@263: REM Echo out env var settings ohair@263: echo VS_VS71COMNTOOLS="%VS71COMNTOOLS%" ohair@263: echo export VS_VS71COMNTOOLS ohair@263: echo VS_VS80COMNTOOLS="%VS80COMNTOOLS%" ohair@263: echo export VS_VS80COMNTOOLS ohair@263: echo VS_VS90COMNTOOLS="%VS90COMNTOOLS%" ohair@263: echo export VS_VS90COMNTOOLS ohair@263: echo VS_VS100COMNTOOLS="%VS100COMNTOOLS%" ohair@263: echo export VS_VS100COMNTOOLS ohair@263: echo VS_VCINSTALLDIR="%VCINSTALLDIR%" ohair@263: echo export VS_VCINSTALLDIR ohair@263: echo VS_VSINSTALLDIR="%VSINSTALLDIR%" ohair@263: echo export VS_VSINSTALLDIR ohair@263: echo VS_DEVENVDIR="%DevEnvDir%" ohair@263: echo export VS_DEVENVDIR ohair@263: echo VS_MSVCDIR="%MSVCDIR%" ohair@263: echo export VS_MSVCDIR ohair@263: echo VS_MSSDK="%MSSdk%" ohair@263: echo export VS_MSSDK ohair@263: echo VS_MSTOOLS="%Mstools%" ohair@263: echo export VS_MSTOOLS ohair@263: echo VS_WINDOWSSDKDIR="%WindowsSdkDir%" ohair@263: echo export VS_WINDOWSSDKDIR ohair@263: echo VS_INCLUDE="%INCLUDE%" ohair@263: echo export VS_INCLUDE ohair@263: echo VS_LIB="%LIB%" ohair@263: echo export VS_LIB ohair@263: echo VS_LIBPATH="%LIBPATH%" ohair@263: echo export VS_LIBPATH ohair@263: echo VS_WPATH="%PATH%" ohair@263: echo export VS_WPATH ohair@263: EOF ohair@263: chmod a+x ${bat} ohair@263: } ohair@263: ohair@263: # Create env file ohair@263: createEnv() # batfile envfile ohair@263: { ohair@263: rm -f ${1}.stdout ohair@263: cmd.exe /Q /C `${cygpath_short} $1` | \ ohair@263: sed -e 's@\\@/@g' | \ ohair@263: sed -e 's@//@/@g' > $2 ohair@263: if [ -f "${1}.stdout" ] ; then ohair@263: cat ${1}.stdout 1>&2 ohair@263: fi ohair@263: chmod a+x $2 ohair@263: } ohair@263: ohair@263: printEnv() # name pname vsname val ohair@263: { ohair@263: name="$1" ohair@263: pname="$2" ohair@263: vsname="$3" ohair@263: val="$4" ohair@263: if [ "${val}" != "" ] ; then ohair@263: if [ "${shellStyle}" = "csh" ] ; then ohair@263: if [ "${debug}" = "true" ] ; then ohair@263: echo "setenv ${vsname} \"${val}\";" ohair@263: fi ohair@263: echo "setenv ${name} \"${val}\";" ohair@263: elif [ "${shellStyle}" = "sh" ] ; then ohair@263: if [ "${debug}" = "true" ] ; then ohair@263: echo "${vsname}=\"${val}\";" ohair@263: echo "export ${vsname};" ohair@263: fi ohair@263: echo "${name}=\"${val}\";" ohair@263: echo "export ${name};" ohair@263: elif [ "${shellStyle}" = "props" ] ; then ohair@263: echo "vs.${pname}=${val}" ohair@263: fi ohair@263: fi ohair@263: } ohair@263: ohair@263: ############################################################################# ohair@263: ohair@263: # Get Visual Studio settings ohair@263: if [ "${cygpath}" != "" ] ; then ohair@263: ohair@263: # Create bat file to run ohair@263: batfile="${tmp}/vs-to-env.bat" ohair@263: if [ ! -d "${vcBinDir}" ] ; then ohair@263: error "Does not exist: ${vcBinDir}" ohair@263: elif [ "${vcvarsBat}" = "" ] ; then ohair@263: error "No vcvars script: ${vcvarsBat}" ohair@263: else ohair@263: createBat "${batfile}" "${vcBinDir}" "${vcvarsBat}" ohair@263: fi ohair@263: ohair@263: # Run bat file to create environment variable settings ohair@263: envfile="${tmp}/env.sh" ohair@263: createEnv "${batfile}" "${envfile}" ohair@263: ohair@263: # Read in the VS_* settings ohair@263: . ${envfile} ohair@263: ohair@263: # Derive unix style path, save old, and define new (remove dups) ohair@263: VS_UPATH=`${cygpath_path} "${VS_WPATH}"` ohair@263: export VS_UPATH ohair@263: VS_OPATH=`printf "%s" "${PATH}" | sed -e 's@\\\\@/@g'` ohair@263: export VS_OPATH ohair@263: VS_PATH=`removeDeadDups "${VS_UPATH}${pathsep}${VS_OPATH}" "${pathsep}"` ohair@263: export VS_PATH ohair@263: ohair@263: fi ohair@263: ohair@263: # Adjustments due to differences in vcvars*bat files ohair@263: if [ "${VS_MSVCDIR}" = "" ] ; then ohair@263: VS_MSVCDIR="${VS_VCINSTALLDIR}" ohair@263: fi ohair@263: if [ "${VS_DEVENVDIR}" = "" ] ; then ohair@263: VS_DEVENVDIR="${VS_VSINSTALLDIR}" ohair@263: fi ohair@263: ohair@263: # Print env settings ohair@263: # env vs.prop vs env value ohair@263: # ------- ------- ---------- ----- ohair@263: printEnv INCLUDE include VS_INCLUDE "${VS_INCLUDE}" ohair@263: printEnv LIB lib VS_LIB "${VS_LIB}" ohair@263: printEnv LIBPATH libpath VS_LIBPATH "${VS_LIBPATH}" ohair@263: if [ "${debug}" = "true" ] ; then ohair@263: printEnv UPATH upath VS_UPATH "${VS_UPATH}" ohair@263: printEnv WPATH wpath VS_WPATH "${VS_WPATH}" ohair@263: printEnv OPATH opath VS_OPATH "${VS_OPATH}" ohair@263: fi ohair@263: printEnv PATH path VS_PATH "${VS_PATH}" ohair@263: printEnv VCINSTALLDIR vcinstalldir VS_VCINSTALLDIR "${VS_VCINSTALLDIR}" ohair@263: printEnv VSINSTALLDIR vsinstalldir VS_VSINSTALLDIR "${VS_VSINSTALLDIR}" ohair@263: printEnv MSVCDIR msvcdir VS_MSVCDIR "${VS_MSVCDIR}" ohair@263: printEnv MSSDK mssdk VS_MSSDK "${VS_MSSDK}" ohair@263: printEnv MSTOOLS mstools VS_MSTOOLS "${VS_MSTOOLS}" ohair@263: printEnv DEVENVDIR devenvdir VS_DEVENVDIR "${VS_DEVENVDIR}" ohair@263: printEnv WINDOWSSDKDIR windowssdkdir VS_WINDOWSSDKDIR "${VS_WINDOWSSDKDIR}" ohair@263: if [ "${vcSelection}" = "10" ] ; then ohair@263: printEnv VS100COMNTOOLS vs100comntools VS_VS100COMNTOOLS "${VS_VS100COMNTOOLS}" ohair@263: elif [ "${vcSelection}" = "9" ] ; then ohair@263: printEnv VS90COMNTOOLS vs90comntools VS_VS90COMNTOOLS "${VS_VS90COMNTOOLS}" ohair@263: elif [ "${vcSelection}" = "7" ] ; then ohair@263: printEnv VS71COMNTOOLS vs71comntools VS_VS71COMNTOOLS "${VS_VS71COMNTOOLS}" ohair@263: elif [ "${vcSelection}" = "8" ] ; then ohair@263: printEnv VS80COMNTOOLS vs80comntools VS_VS80COMNTOOLS "${VS_VS80COMNTOOLS}" ohair@263: fi ohair@263: ohair@263: # Check final settings ohair@263: if [ "${verbose}" = "true" ] ; then ohair@263: checkPaths "Windows PATH" "${VS_WPATH}" ";" ohair@263: checkPaths LIB "${VS_LIB}" ";" ohair@263: checkPaths INCLUDE "${VS_INCLUDE}" ";" ohair@263: checkPaths PATH "${VS_PATH}" "${pathsep}" ohair@263: fi ohair@263: ohair@263: # Remove all temp files ohair@263: rm -f -r ${tmp} ohair@263: ohair@263: exit 0 ohair@263: