author | hseigel |
Mon, 08 Jul 2013 16:44:03 -0700 | |
changeset 18691 | 1a77ea5eaf6b |
parent 14277 | e03d509a553e |
permissions | -rw-r--r-- |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
1 |
#!/bin/sh |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
2 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
3 |
# |
14069 | 4 |
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
5 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
6 |
# |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
7 |
# This code is free software; you can redistribute it and/or modify it |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
8 |
# under the terms of the GNU General Public License version 2 only, as |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
9 |
# published by the Free Software Foundation. |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
10 |
# |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
16 |
# |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
20 |
# |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
23 |
# questions. |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
24 |
# |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
25 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
26 |
# This file should be used to set the Visual Studio environment |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
27 |
# variables normally set by the vcvars32.bat or vcvars64.bat file or |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
28 |
# SetEnv.cmd for older SDKs. |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
29 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
30 |
######################################################################## |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
31 |
# Error functions |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
32 |
msg() # message |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
33 |
{ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
34 |
echo "$1" 1>&2 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
35 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
36 |
error() # message |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
37 |
{ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
38 |
msg "ERROR: $1" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
39 |
exit 1 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
40 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
41 |
warning() # message |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
42 |
{ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
43 |
msg "WARNING: $1" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
44 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
45 |
envpath() # path |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
46 |
{ |
14069 | 47 |
if [ "${fixpath}" != "" -a -d "$1" ] ; then |
48 |
${fixpath} "$1" |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
49 |
else |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
50 |
echo "$1" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
51 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
52 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
53 |
######################################################################## |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
54 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
55 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
56 |
# Defaults settings |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
57 |
debug="false" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
58 |
verbose="false" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
59 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
60 |
set -e |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
61 |
|
14069 | 62 |
CYGWIN="nodosfilewarning ntsec" |
63 |
export CYGWIN |
|
64 |
||
65 |
# pathsepIn is always ; because the input strings are coming from |
|
66 |
# vcvarsxx.bat. This is true under all of MKS, Cygwin, MINGW/msys |
|
67 |
pathsepIn=';' |
|
68 |
||
69 |
OS="`uname -s`" |
|
70 |
case "${OS}" in |
|
71 |
CYGWIN*) |
|
72 |
pathflag='-c' |
|
73 |
devnull=/dev/null |
|
74 |
pathsepOut=':' |
|
75 |
;; |
|
76 |
||
77 |
MINGW*) |
|
78 |
pathflag='-m' |
|
79 |
devnull=/dev/null |
|
80 |
pathsepOut=':' |
|
81 |
;; |
|
82 |
||
83 |
*) |
|
84 |
# MKS? |
|
85 |
# Continue using dosname -s |
|
86 |
pathflag='-s' |
|
87 |
fixpath="dosname ${pathflag}" |
|
88 |
fixpath_windows="${fixpath}" |
|
89 |
fixpath_path="echo" |
|
90 |
devnull=NUL |
|
91 |
pathsepOut=';' |
|
92 |
;; |
|
93 |
esac |
|
94 |
||
95 |
case "${OS}" in |
|
96 |
CYGWIN*|MINGW*) |
|
97 |
t=`dirname ${0}` |
|
98 |
wd=`cd ${t} 2> ${devnull} && pwd` |
|
99 |
fixpath_script="${wd}/fixpath.pl" |
|
100 |
if [ ! -f "${fixpath_script}" ] ; then |
|
101 |
error "Does not exist: ${fixpath_script}" |
|
102 |
fi |
|
103 |
fixpath="perl ${fixpath_script} ${pathflag}" |
|
104 |
fixpath_windows="perl ${fixpath_script} -d" |
|
105 |
fixpath_path="${fixpath_windows}" |
|
106 |
;; |
|
107 |
esac |
|
108 |
||
109 |
shellStyle="sh" |
|
110 |
## As far as I can tell from hg history, this has not worked |
|
111 |
## for a long time because PPID is unset. When run under Cygwin |
|
112 |
## the script quits due to the 1 return from grep. |
|
113 |
##parentCsh="` ps -p ${PPID} 2> ${devnull} | grep csh `" |
|
114 |
##if [ "${parentCsh}" != "" ] ; then |
|
115 |
## shellStyle="csh" |
|
116 |
##fi |
|
117 |
||
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
118 |
# Check environment first |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
119 |
if [ "${PROGRAMFILES}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
120 |
progfiles=`envpath "${PROGRAMFILES}"` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
121 |
elif [ "${ProgramFiles}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
122 |
progfiles=`envpath "${ProgramFiles}"` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
123 |
elif [ "${SYSTEMDRIVE}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
124 |
progfiles=`envpath "${SYSTEMDRIVE}/Program Files"` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
125 |
elif [ "${SystemDrive}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
126 |
progfiles=`envpath "${SystemDrive}/Program Files"` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
127 |
else |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
128 |
error "No PROGRAMFILES or SYSTEMDRIVE defined in environment" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
129 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
130 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
131 |
# Arch data model |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
132 |
if [ "${PROCESSOR_IDENTIFIER}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
133 |
arch=`echo "${PROCESSOR_IDENTIFIER}" | cut -d' ' -f1` |
14069 | 134 |
else |
135 |
if [ "${MACHTYPE}" != "" ] ; then |
|
136 |
if [ "`echo ${MACHTYPE} | grep 64`" != "" ] ; then |
|
137 |
# Assume this is X64, not IA64 |
|
138 |
arch="x64" |
|
139 |
else |
|
140 |
arch="x86" |
|
141 |
fi |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
142 |
else |
14069 | 143 |
arch="`uname -m`" |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
144 |
fi |
14069 | 145 |
PROCESSOR_IDENTIFIER="${arch}" |
146 |
export PROCESSOR_IDENTIFIER |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
147 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
148 |
if [ "${arch}" = "X86" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
149 |
"${arch}" = "386" -o "${arch}" = "i386" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
150 |
"${arch}" = "486" -o "${arch}" = "i486" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
151 |
"${arch}" = "586" -o "${arch}" = "i586" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
152 |
"${arch}" = "686" -o "${arch}" = "i686" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
153 |
"${arch}" = "86" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
154 |
arch="x86" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
155 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
156 |
if [ "${arch}" = "X64" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
157 |
"${arch}" = "8664" -o "${arch}" = "i8664" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
158 |
"${arch}" = "amd64" -o "${arch}" = "AMD64" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
159 |
"${arch}" = "EM64T" -o "${arch}" = "emt64t" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
160 |
"${arch}" = "intel64" -o "${arch}" = "Intel64" -o \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
161 |
"${arch}" = "64" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
162 |
arch="x64" |
14069 | 163 |
binarch64="\\amd64" |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
164 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
165 |
if [ "${arch}" = "IA64" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
166 |
arch="ia64" |
14069 | 167 |
binarch64="\\ia64" |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
168 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
169 |
if [ "${arch}" != "x86" -a "${arch}" != "x64" -a "${arch}" != "ia64" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
170 |
error "No PROCESSOR_IDENTIFIER or MACHTYPE environment variables and uname -m is not helping" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
171 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
172 |
if [ "${arch}" = "x86" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
173 |
arch_data_model=32 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
174 |
progfiles32="${progfiles}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
175 |
progfiles64="${progfiles}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
176 |
else |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
177 |
arch_data_model=64 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
178 |
progfiles32="${progfiles}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
179 |
if [ "${PROGRAMW6432}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
180 |
progfiles64=`envpath "${PROGRAMW6432}"` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
181 |
else |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
182 |
progfiles64=`envpath "C:/Program Files"` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
183 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
184 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
185 |
|
14276 | 186 |
# VS2012 (VC11) |
187 |
if [ "${VS110COMNTOOLS}" = "" ] ; then |
|
188 |
VS110COMNTOOLS="${progfiles32}/Microsoft Visual Studio 11.0/Common7/Tools/" |
|
189 |
export VS110COMNTOOLS |
|
190 |
fi |
|
191 |
vc11Bin32Dir=`envpath "${VS110COMNTOOLS}"`/../../VC/Bin |
|
192 |
vc11Bin64Dir="${vc11Bin32Dir}" |
|
193 |
vc11vars32Bat="vcvars32.bat" |
|
194 |
vc11vars64Bat="vcvars64.bat" |
|
195 |
||
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
196 |
# VS2010 (VC10) |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
197 |
if [ "${VS100COMNTOOLS}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
198 |
VS100COMNTOOLS="${progfiles32}/Microsoft Visual Studio 10.0/Common7/Tools/" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
199 |
export VS100COMNTOOLS |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
200 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
201 |
vc10Bin32Dir=`envpath "${VS100COMNTOOLS}"`/../../VC/Bin |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
202 |
vc10Bin64Dir="${vc10Bin32Dir}${binarch64}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
203 |
vc10vars32Bat="vcvars32.bat" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
204 |
vc10vars64Bat="vcvars64.bat" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
205 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
206 |
# VS2008 (VC9) |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
207 |
if [ "${VS90COMNTOOLS}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
208 |
VS90COMNTOOLS="${progfiles32}/Microsoft Visual Studio 9.0/Common7/Tools/" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
209 |
export VS90COMNTOOLS |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
210 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
211 |
vc9Bin32Dir=`envpath "${VS90COMNTOOLS}"`/../../VC/Bin |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
212 |
vc9Bin64Dir="${vc9Bin32Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
213 |
vc9vars32Bat="vcvars32.bat" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
214 |
vc9vars64Bat="vcvars64.bat" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
215 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
216 |
# VS2005 (VC8) |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
217 |
if [ "${VS80COMNTOOLS}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
218 |
VS80COMNTOOLS="${progfiles32}/Microsoft Visual Studio 8.0/Common7/Tools/" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
219 |
export VS80COMNTOOLS |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
220 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
221 |
vc8Bin32Dir=`envpath "${VS80COMNTOOLS}"`/../../VC/Bin |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
222 |
vc8Bin64Dir="${progfiles64}/Microsoft Platform SDK" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
223 |
vc8vars32Bat="vcvars32.bat" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
224 |
vc8vars64Bat="SetEnv.cmd /X64" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
225 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
226 |
# VS2003 (VC7) |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
227 |
if [ "${VS71COMNTOOLS}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
228 |
VS71COMNTOOLS="${progfiles32}/Microsoft Visual Studio .NET 2003/Common7/Tools/" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
229 |
export VS71COMNTOOLS |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
230 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
231 |
vc7Bin32Dir=`envpath "${VS71COMNTOOLS}"`/../../VC7/Bin |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
232 |
vc7Bin64Dir="${progfiles64}/Microsoft Platform SDK" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
233 |
vc7vars32Bat="vcvars32.bat" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
234 |
vc7vars64Bat="SetEnv.cmd /X64" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
235 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
236 |
# Force user to select |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
237 |
vcSelection="" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
238 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
239 |
# Parse options |
14276 | 240 |
usage="Usage: $0 [-help] [-debug] [-v] [-c] [-s] [-p] [-v11] [-v10] [-v9] [-v8] [-v7] [-32] [-64]" |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
241 |
while [ $# -gt 0 ] ; do |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
242 |
if [ "$1" = "-help" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
243 |
msg "${usage}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
244 |
msg " -help Print out this help message" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
245 |
msg " -debug Print out extra env variables to help debug this script" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
246 |
msg " -v Verbose output warns about missing directories" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
247 |
msg " -c Print out csh style output" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
248 |
msg " -s Print out sh style output" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
249 |
msg " -p Print out properties style output" |
14276 | 250 |
msg " -v11 Use Visual Studio 11 VS2012" |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
251 |
msg " -v10 Use Visual Studio 10 VS2010" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
252 |
msg " -v9 Use Visual Studio 9 VS2008" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
253 |
msg " -v8 Use Visual Studio 8 VS2005" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
254 |
msg " -v7 Use Visual Studio 7 VS2003" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
255 |
msg " -32 Force 32bit" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
256 |
msg " -64 Force 64bit" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
257 |
exit 0 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
258 |
elif [ "$1" = "-debug" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
259 |
debug="true" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
260 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
261 |
elif [ "$1" = "-v" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
262 |
verbose="true" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
263 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
264 |
elif [ "$1" = "-c" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
265 |
shellStyle="csh" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
266 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
267 |
elif [ "$1" = "-s" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
268 |
shellStyle="sh" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
269 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
270 |
elif [ "$1" = "-p" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
271 |
shellStyle="props" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
272 |
shift |
14276 | 273 |
elif [ "$1" = "-v11" ] ; then |
274 |
vcBin32Dir="${vc11Bin32Dir}" |
|
275 |
vcBin64Dir="${vc11Bin64Dir}" |
|
276 |
vcvars32Bat="${vc11vars32Bat}" |
|
277 |
vcvars64Bat="${vc11vars64Bat}" |
|
278 |
vcSelection="11" |
|
279 |
shift |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
280 |
elif [ "$1" = "-v10" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
281 |
vcBin32Dir="${vc10Bin32Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
282 |
vcBin64Dir="${vc10Bin64Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
283 |
vcvars32Bat="${vc10vars32Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
284 |
vcvars64Bat="${vc10vars64Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
285 |
vcSelection="10" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
286 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
287 |
elif [ "$1" = "-v9" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
288 |
vcBin32Dir="${vc9Bin32Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
289 |
vcBin64Dir="${vc9Bin64Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
290 |
vcvars32Bat="${vc9vars32Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
291 |
vcvars64Bat="${vc9vars64Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
292 |
vcSelection="9" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
293 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
294 |
elif [ "$1" = "-v8" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
295 |
vcBin32Dir="${vc8Bin32Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
296 |
vcBin64Dir="${vc8Bin64Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
297 |
vcvars32Bat="${vc8vars32Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
298 |
vcvars64Bat="${vc8vars64Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
299 |
vcSelection="8" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
300 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
301 |
elif [ "$1" = "-v7" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
302 |
vcBin32Dir="${vc7Bin32Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
303 |
vcBin64Dir="${vc7Bin64Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
304 |
vcvars32Bat="${vc7vars32Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
305 |
vcvars64Bat="${vc7vars64Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
306 |
vcSelection="7" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
307 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
308 |
elif [ "$1" = "-32" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
309 |
arch_data_model=32 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
310 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
311 |
elif [ "$1" = "-64" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
312 |
arch_data_model=64 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
313 |
shift |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
314 |
else |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
315 |
msg "${usage}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
316 |
error "Unknown option: $1" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
317 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
318 |
done |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
319 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
320 |
# Need to pick |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
321 |
if [ "${vcSelection}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
322 |
msg "${usage}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
323 |
error "You must pick the version" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
324 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
325 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
326 |
# Which vcvars bat file to run |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
327 |
if [ "${arch_data_model}" = "32" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
328 |
vcBinDir="${vcBin32Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
329 |
vcvarsBat="${vcvars32Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
330 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
331 |
if [ "${arch_data_model}" = "64" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
332 |
vcBinDir="${vcBin64Dir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
333 |
vcvarsBat="${vcvars64Bat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
334 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
335 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
336 |
# Do not allow any error returns |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
337 |
set -e |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
338 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
339 |
# Different systems have different awk's |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
340 |
if [ -f /usr/bin/nawk ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
341 |
awk="nawk" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
342 |
elif [ -f /usr/bin/gawk ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
343 |
awk="gawk" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
344 |
else |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
345 |
awk="awk" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
346 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
347 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
348 |
if [ "${verbose}" = "true" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
349 |
echo "# Welcome to verbose mode" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
350 |
set -x |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
351 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
352 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
353 |
if [ "${debug}" = "true" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
354 |
echo "# Welcome to debug mode" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
355 |
set -x |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
356 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
357 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
358 |
# Temp file area |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
359 |
tmp="/tmp/vsvars.$$" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
360 |
rm -f -r ${tmp} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
361 |
mkdir -p ${tmp} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
362 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
363 |
# Check paths |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
364 |
checkPaths() # var path sep |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
365 |
{ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
366 |
set -e |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
367 |
sep="$3" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
368 |
checklist="${tmp}/checklist" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
369 |
printf "%s\n" "$2" | \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
370 |
sed -e 's@\\@/@g' | \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
371 |
sed -e 's@//@/@g' | \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
372 |
${awk} -F"${sep}" '{for(i=1;i<=NF;i++){printf "%s\n",$i;}}' \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
373 |
> ${checklist} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
374 |
cat ${checklist} | while read orig; do |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
375 |
if [ "${orig}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
376 |
if [ ! -d "${orig}" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
377 |
warning "Directory in $1 does not exist: ${orig}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
378 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
379 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
380 |
done |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
381 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
382 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
383 |
# Remove all duplicate entries |
14069 | 384 |
removeDeadDups() # string sepIn sepOut |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
385 |
{ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
386 |
set -e |
14069 | 387 |
sepIn="$2" |
388 |
sepOut="$3" |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
389 |
pathlist="${tmp}/pathlist" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
390 |
printf "%s\n" "$1" | \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
391 |
sed -e 's@\\@/@g' | \ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
392 |
sed -e 's@//@/@g' | \ |
14069 | 393 |
${awk} -F"${sepIn}" '{for(i=1;i<=NF;i++){printf "%s\n",$i;}}' \ |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
394 |
> ${pathlist} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
395 |
upaths="${tmp}/upaths" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
396 |
cat ${pathlist} | while read orig; do |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
397 |
p="${orig}" |
14069 | 398 |
if [ "${fixpath}" != "" ] ; then |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
399 |
if [ "${p}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
400 |
if [ -d "${p}" ] ; then |
14069 | 401 |
short=`${fixpath} "${p}"` |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
402 |
if [ "${short}" != "" -a -d "${short}" ] ; then |
14069 | 403 |
p="${short}" |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
404 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
405 |
echo "${p}" >> ${upaths} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
406 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
407 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
408 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
409 |
done |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
410 |
newpaths="" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
411 |
for i in `cat ${upaths}` ; do |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
412 |
# For some reason, \r characters can get into this |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
413 |
i=`echo "${i}" | tr -d '\r' | sed -e 's@/$@@'` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
414 |
if [ "${newpaths}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
415 |
newpaths="${i}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
416 |
else |
14069 | 417 |
newpaths="${newpaths}${sepOut}${i}" |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
418 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
419 |
done |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
420 |
printf "%s\n" "${newpaths}" | \ |
14069 | 421 |
${awk} -F"${sepOut}" \ |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
422 |
'{a[$1];printf "%s",$1;for(i=2;i<=NF;i++){if(!($i in a)){a[$i];printf "%s%s",FS,$i;}};printf "\n";}' |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
423 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
424 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
425 |
# Create bat file to process Visual Studio vcvars*.bat files |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
426 |
createBat() # batfile bindir command |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
427 |
{ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
428 |
bat="$1" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
429 |
bindir="$2" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
430 |
command="$3" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
431 |
stdout="${bat}.stdout" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
432 |
rm -f ${bat} ${stdout} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
433 |
echo "Output from: ${command}" > ${stdout} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
434 |
bdir=`envpath "${bindir}"` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
435 |
cat > ${bat} << EOF |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
436 |
REM Pick the right vcvars bat file |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
437 |
REM Empty these out so we only get the additions we want |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
438 |
set INCLUDE= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
439 |
set LIB= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
440 |
set LIBPATH= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
441 |
set MSVCDIR= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
442 |
set MSSdk= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
443 |
set Mstools= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
444 |
set DevEnvDir= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
445 |
set VCINSTALLDIR= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
446 |
set VSINSTALLDIR= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
447 |
set WindowsSdkDir= |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
448 |
REM Run the vcvars bat file, send all output to stderr |
14069 | 449 |
call `${fixpath_windows} ${bdir}`\\${command} > `${fixpath_windows} "${stdout}"` |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
450 |
REM Echo out env var settings |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
451 |
echo VS_VS71COMNTOOLS="%VS71COMNTOOLS%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
452 |
echo export VS_VS71COMNTOOLS |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
453 |
echo VS_VS80COMNTOOLS="%VS80COMNTOOLS%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
454 |
echo export VS_VS80COMNTOOLS |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
455 |
echo VS_VS90COMNTOOLS="%VS90COMNTOOLS%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
456 |
echo export VS_VS90COMNTOOLS |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
457 |
echo VS_VS100COMNTOOLS="%VS100COMNTOOLS%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
458 |
echo export VS_VS100COMNTOOLS |
14276 | 459 |
echo VS_VS110COMNTOOLS="%VS110COMNTOOLS%" |
460 |
echo export VS_VS110COMNTOOLS |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
461 |
echo VS_VCINSTALLDIR="%VCINSTALLDIR%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
462 |
echo export VS_VCINSTALLDIR |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
463 |
echo VS_VSINSTALLDIR="%VSINSTALLDIR%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
464 |
echo export VS_VSINSTALLDIR |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
465 |
echo VS_DEVENVDIR="%DevEnvDir%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
466 |
echo export VS_DEVENVDIR |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
467 |
echo VS_MSVCDIR="%MSVCDIR%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
468 |
echo export VS_MSVCDIR |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
469 |
echo VS_MSSDK="%MSSdk%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
470 |
echo export VS_MSSDK |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
471 |
echo VS_MSTOOLS="%Mstools%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
472 |
echo export VS_MSTOOLS |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
473 |
echo VS_WINDOWSSDKDIR="%WindowsSdkDir%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
474 |
echo export VS_WINDOWSSDKDIR |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
475 |
echo VS_INCLUDE="%INCLUDE%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
476 |
echo export VS_INCLUDE |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
477 |
echo VS_LIB="%LIB%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
478 |
echo export VS_LIB |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
479 |
echo VS_LIBPATH="%LIBPATH%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
480 |
echo export VS_LIBPATH |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
481 |
echo VS_WPATH="%PATH%" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
482 |
echo export VS_WPATH |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
483 |
EOF |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
484 |
chmod a+x ${bat} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
485 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
486 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
487 |
# Create env file |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
488 |
createEnv() # batfile envfile |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
489 |
{ |
14069 | 490 |
rm -f ${1}.stdout ${1}.temp1 ${1}.temp2 |
491 |
batfile=`${fixpath} ${1}` |
|
492 |
cmd.exe -Q -C < "$batfile" 1> ${1}.temp1 2> ${1}.temp2 |
|
493 |
cat ${1}.temp1 | \ |
|
494 |
sed -e 's@^Microsoft.*@@' \ |
|
495 |
-e 's@^.*Copyright.*@@' \ |
|
496 |
-e 's@^.*>REM.*@@' \ |
|
497 |
-e 's@^.*>set.*@@' \ |
|
498 |
-e 's@^.*>echo.*@@' \ |
|
499 |
-e 's@^.*>call.*@@' \ |
|
500 |
-e 's@^.*>$@@' \ |
|
501 |
-e 's@\\@/@g' | \ |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
502 |
sed -e 's@//@/@g' > $2 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
503 |
if [ -f "${1}.stdout" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
504 |
cat ${1}.stdout 1>&2 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
505 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
506 |
chmod a+x $2 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
507 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
508 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
509 |
printEnv() # name pname vsname val |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
510 |
{ |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
511 |
name="$1" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
512 |
pname="$2" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
513 |
vsname="$3" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
514 |
val="$4" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
515 |
if [ "${val}" != "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
516 |
if [ "${shellStyle}" = "csh" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
517 |
if [ "${debug}" = "true" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
518 |
echo "setenv ${vsname} \"${val}\";" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
519 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
520 |
echo "setenv ${name} \"${val}\";" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
521 |
elif [ "${shellStyle}" = "sh" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
522 |
if [ "${debug}" = "true" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
523 |
echo "${vsname}=\"${val}\";" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
524 |
echo "export ${vsname};" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
525 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
526 |
echo "${name}=\"${val}\";" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
527 |
echo "export ${name};" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
528 |
elif [ "${shellStyle}" = "props" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
529 |
echo "vs.${pname}=${val}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
530 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
531 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
532 |
} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
533 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
534 |
############################################################################# |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
535 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
536 |
# Get Visual Studio settings |
14069 | 537 |
if [ "${fixpath}" != "" ] ; then |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
538 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
539 |
# Create bat file to run |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
540 |
batfile="${tmp}/vs-to-env.bat" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
541 |
if [ ! -d "${vcBinDir}" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
542 |
error "Does not exist: ${vcBinDir}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
543 |
elif [ "${vcvarsBat}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
544 |
error "No vcvars script: ${vcvarsBat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
545 |
else |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
546 |
createBat "${batfile}" "${vcBinDir}" "${vcvarsBat}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
547 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
548 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
549 |
# Run bat file to create environment variable settings |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
550 |
envfile="${tmp}/env.sh" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
551 |
createEnv "${batfile}" "${envfile}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
552 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
553 |
# Read in the VS_* settings |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
554 |
. ${envfile} |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
555 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
556 |
# Derive unix style path, save old, and define new (remove dups) |
14069 | 557 |
VS_UPATH=`${fixpath_path} "${VS_WPATH}"` |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
558 |
export VS_UPATH |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
559 |
VS_OPATH=`printf "%s" "${PATH}" | sed -e 's@\\\\@/@g'` |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
560 |
export VS_OPATH |
14069 | 561 |
VS_PATH=`removeDeadDups "${VS_UPATH}${pathsepIn}${VS_OPATH}" "${pathsepIn}" "${pathsepOut}"` |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
562 |
export VS_PATH |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
563 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
564 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
565 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
566 |
# Adjustments due to differences in vcvars*bat files |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
567 |
if [ "${VS_MSVCDIR}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
568 |
VS_MSVCDIR="${VS_VCINSTALLDIR}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
569 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
570 |
if [ "${VS_DEVENVDIR}" = "" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
571 |
VS_DEVENVDIR="${VS_VSINSTALLDIR}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
572 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
573 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
574 |
# Print env settings |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
575 |
# env vs.prop vs env value |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
576 |
# ------- ------- ---------- ----- |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
577 |
printEnv INCLUDE include VS_INCLUDE "${VS_INCLUDE}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
578 |
printEnv LIB lib VS_LIB "${VS_LIB}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
579 |
printEnv LIBPATH libpath VS_LIBPATH "${VS_LIBPATH}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
580 |
if [ "${debug}" = "true" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
581 |
printEnv UPATH upath VS_UPATH "${VS_UPATH}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
582 |
printEnv WPATH wpath VS_WPATH "${VS_WPATH}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
583 |
printEnv OPATH opath VS_OPATH "${VS_OPATH}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
584 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
585 |
printEnv PATH path VS_PATH "${VS_PATH}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
586 |
printEnv VCINSTALLDIR vcinstalldir VS_VCINSTALLDIR "${VS_VCINSTALLDIR}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
587 |
printEnv VSINSTALLDIR vsinstalldir VS_VSINSTALLDIR "${VS_VSINSTALLDIR}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
588 |
printEnv MSVCDIR msvcdir VS_MSVCDIR "${VS_MSVCDIR}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
589 |
printEnv MSSDK mssdk VS_MSSDK "${VS_MSSDK}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
590 |
printEnv MSTOOLS mstools VS_MSTOOLS "${VS_MSTOOLS}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
591 |
printEnv DEVENVDIR devenvdir VS_DEVENVDIR "${VS_DEVENVDIR}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
592 |
printEnv WINDOWSSDKDIR windowssdkdir VS_WINDOWSSDKDIR "${VS_WINDOWSSDKDIR}" |
14276 | 593 |
if [ "${vcSelection}" = "11" ] ; then |
594 |
printEnv VS110COMNTOOLS vs110comntools VS_VS110COMNTOOLS "${VS_VS110COMNTOOLS}" |
|
595 |
elif [ "${vcSelection}" = "10" ] ; then |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
596 |
printEnv VS100COMNTOOLS vs100comntools VS_VS100COMNTOOLS "${VS_VS100COMNTOOLS}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
597 |
elif [ "${vcSelection}" = "9" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
598 |
printEnv VS90COMNTOOLS vs90comntools VS_VS90COMNTOOLS "${VS_VS90COMNTOOLS}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
599 |
elif [ "${vcSelection}" = "7" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
600 |
printEnv VS71COMNTOOLS vs71comntools VS_VS71COMNTOOLS "${VS_VS71COMNTOOLS}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
601 |
elif [ "${vcSelection}" = "8" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
602 |
printEnv VS80COMNTOOLS vs80comntools VS_VS80COMNTOOLS "${VS_VS80COMNTOOLS}" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
603 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
604 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
605 |
# Check final settings |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
606 |
if [ "${verbose}" = "true" ] ; then |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
607 |
checkPaths "Windows PATH" "${VS_WPATH}" ";" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
608 |
checkPaths LIB "${VS_LIB}" ";" |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
609 |
checkPaths INCLUDE "${VS_INCLUDE}" ";" |
14069 | 610 |
checkPaths PATH "${VS_PATH}" "${pathsepIn}" |
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
611 |
fi |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
612 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
613 |
# Remove all temp files |
14069 | 614 |
if [ "${debug}" != "true" ] ; then |
615 |
rm -f -r ${tmp} |
|
616 |
fi |
|
7361
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
617 |
|
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
618 |
exit 0 |
f412b1d9549b
6909331: Add vsvars.sh to the jdk repository (handy cygwin way to get vcvars32.bat run)
ohair
parents:
diff
changeset
|
619 |