summaryrefslogtreecommitdiff
path: root/etc/build-ms.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/build-ms.sh')
-rwxr-xr-xetc/build-ms.sh30
1 files changed, 23 insertions, 7 deletions
diff --git a/etc/build-ms.sh b/etc/build-ms.sh
index 4a70b35..8567eac 100755
--- a/etc/build-ms.sh
+++ b/etc/build-ms.sh
@@ -4,22 +4,38 @@
set -e
+vs64=
+sdk64=
+
+while [ $# -gt 0 ] ; do
+ case $1 in
+ --enable-64-bit)
+ vs64=/amd64
+ sdk64=/x64
+ ;;
+ *)
+ echo "Usage: build-ms.sh [ --enable-64-bit ]" 1>&2
+ exit 1
+ esac
+ shift
+done
+
# Locate the necessary lib and include directories
drive=$(echo "$SYSTEMDRIVE" | sed 's|^\([A-Za-z]\):$|/\1|')
for vsvers in 10.0 9.0 8 ; do
vsdir="$drive/Program Files/Microsoft Visual Studio $vsvers"
- [ -x "$vsdir/VC/bin/cl.exe" ] && break
+ [ -x "$vsdir/VC/bin$vs64/cl.exe" ] && break
vsdir="$drive/Program Files (x86)/Microsoft Visual Studio $vsvers"
- [ -x "$vsdir/VC/bin/cl.exe" ] && break
+ [ -x "$vsdir/VC/bin$vs64/cl.exe" ] && break
vsdir=
done
if [ -z "$vsdir" ] ; then
- echo "Couldn't find suitable Visual Studio installation"
+ echo "Couldn't find a suitable Visual Studio installation"
exit 1
fi
@@ -27,10 +43,10 @@ echo "Using Visual Studio install at $vsdir"
for sdkpath in "Microsoft SDKs/Windows/"{v7.0A,v6.0A} "Microsoft Visual Studio 8/VC/PlatformSDK" ; do
sdkdir="$drive/Program Files/$sdkpath"
- [ -d "$sdkdir/lib" -a -d "$sdkdir/include" ] && break
+ [ -d "$sdkdir/lib$sdk64" -a -d "$sdkdir/include" ] && break
sdkdir="$drive/Program Files (x86)/$sdkpath"
- [ -d "$sdkdir/lib" -a -d "$sdkdir/include" ] && break
+ [ -d "$sdkdir/lib$sdk64" -a -d "$sdkdir/include" ] && break
sdkdir=
done
@@ -42,8 +58,8 @@ fi
echo "Using Windows SDK install at $sdkdir"
-PATH="$PATH:$vsdir/VC/bin:$vsdir/Common7/IDE"
-LIB="$vsdir/VC/lib:$sdkdir/lib"
+PATH="$PATH:$vsdir/VC/bin$vs64:$vsdir/Common7/IDE"
+LIB="$vsdir/VC/lib$vs64:$sdkdir/lib$sdk64"
INCLUDE="$vsdir/VC/include:$sdkdir/include"
export PATH LIB INCLUDE