aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-28 13:22:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-28 13:22:08 +0200
commit6513bb7b269ea8b39dfed0e86a2df9a01ee23416 (patch)
tree18869207bab0ea24611f179a41f75739598b9109
parent0e2b7b99f9cc769cf4b094dca39b5d452f1de32b (diff)
Add infrastructure for Windows 10 SDK discovery
-rw-r--r--INSTALL8
-rwxr-xr-xmsvc-14/msvc-14u0-327
-rwxr-xr-xmsvc-common/msvc-cl-common6
-rwxr-xr-xmsvc-common/msvc-lib-common6
-rwxr-xr-xmsvc-common/msvc-link-common6
-rwxr-xr-xmsvc-common/msvc-mt-common6
-rwxr-xr-xmsvc-common/msvc-rc-common6
-rwxr-xr-xmsvc-common/msvc-sdk-common12
-rwxr-xr-xmsvc-dispatch3
9 files changed, 26 insertions, 34 deletions
diff --git a/INSTALL b/INSTALL
index 7e0d035..b8f0232 100644
--- a/INSTALL
+++ b/INSTALL
@@ -51,8 +51,8 @@ over updates will be tedious. As a result, there are several environment
variables that you can set (e.g., in your .bashrc) to adjust some of the
common configuration values.
-Currently you can override WINEPREFIX and INSTALLDIR via the following
-environment variable hierarchy (from highest to lowest precedence):
+Currently you can override WINEPREFIX, INSTALLDIR, and SDKVERSION via the
+following environment variable hierarchy (from highest to lowest precedence):
MSVC_<MAJOR><MINOR>_* # MSVC_14U2_INSTALLDIR
MSVC_<MAJOR>_* # MSVC_14_INSTALLDIR
@@ -70,6 +70,10 @@ strategy by installing them in the same Wine root but in different
directories. For details on how this value is used refer to the configuration
scripts.
+The SDKVERSION value can be used to specify the Windows 10 SDK version to use.
+It should be in the 10.0.NNNNN form. If it is not specified, then the latest
+installed is used. Note that this value does not apply to Windows 8.1 and
+earlier SDKs; those versions are hardcoded in the confguration scripts.
Install Wine
------------
diff --git a/msvc-14/msvc-14u0-32 b/msvc-14/msvc-14u0-32
index ec7b82b..2d101cd 100755
--- a/msvc-14/msvc-14u0-32
+++ b/msvc-14/msvc-14u0-32
@@ -8,6 +8,11 @@ if [ -z "$MSVC_INSTALLDIR" ]; then
MSVC_INSTALLDIR="Microsoft Visual Studio 14.0"
fi
+if [ -z "$MSVC_SDKVERSION" ]; then
+ source "$src_dir/msvc-common/msvc-sdk"
+ MSVC_SDKVERSION="$(windows10_sdkversion)"
+fi
+
# SDK
#
SDK="C:\\Program Files (x86)\\Windows Kits\\8.1"
@@ -19,7 +24,7 @@ LIB="$SDK\\lib\\winv6.3\\um\\x86"
# CRT
#
CRT="C:\\Program Files (x86)\\Windows Kits\\10"
-CRTVER="10.0.10150.0"
+CRTVER="$MSVC_SDKVERSION.0" # Originally "10.0.10150".
INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE"
LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB"
diff --git a/msvc-common/msvc-cl-common b/msvc-common/msvc-cl-common
index 57d389e..833baec 100755
--- a/msvc-common/msvc-cl-common
+++ b/msvc-common/msvc-cl-common
@@ -6,12 +6,6 @@
# linker, SDKBIN, LIB variables to be set for the specific MSVC
# version/configuration.
-trap "{ exit 1; }" ERR
-set -o errtrace # Trap in functions.
-
-function info () { echo "$*" 1>&2; }
-function error () { info "$*"; exit 1; }
-
source "$src_dir/msvc-common/msvc-common"
# File descriptor where the diagnostics will be sent. Unless STDOUT is used
diff --git a/msvc-common/msvc-lib-common b/msvc-common/msvc-lib-common
index a38bcd3..5f8295a 100755
--- a/msvc-common/msvc-lib-common
+++ b/msvc-common/msvc-lib-common
@@ -8,12 +8,6 @@
# It's not clear/documented why we need LIB or what the /LIBPATH option is
# for. Perhaps for link-time code generation (/LTCG).
-trap "{ exit 1; }" ERR
-set -o errtrace # Trap in functions.
-
-function info () { echo "$*" 1>&2; }
-function error () { info "$*"; exit 1; }
-
source "$src_dir/msvc-common/msvc-common"
# Translate absolute paths from POSIX to Windows. Use bash array to store
diff --git a/msvc-common/msvc-link-common b/msvc-common/msvc-link-common
index 931a251..04f37d6 100755
--- a/msvc-common/msvc-link-common
+++ b/msvc-common/msvc-link-common
@@ -5,12 +5,6 @@
# Common link.exe driver that expects the VCBIN, SDKBIN, and LIB variables to
# be set for the specific MSVC version/configuration.
-trap "{ exit 1; }" ERR
-set -o errtrace # Trap in functions.
-
-function info () { echo "$*" 1>&2; }
-function error () { info "$*"; exit 1; }
-
source "$src_dir/msvc-common/msvc-common"
# Translate absolute paths from POSIX to Windows. Use bash array to store
diff --git a/msvc-common/msvc-mt-common b/msvc-common/msvc-mt-common
index 305d98e..7a452bc 100755
--- a/msvc-common/msvc-mt-common
+++ b/msvc-common/msvc-mt-common
@@ -5,12 +5,6 @@
# Common mt.exe driver that expects the SDKBIN variable to be set for the
# specific MSVC version/configuration.
-trap "{ exit 1; }" ERR
-set -o errtrace # Trap in functions.
-
-function info () { echo "$*" 1>&2; }
-function error () { info "$*"; exit 1; }
-
source "$src_dir/msvc-common/msvc-common"
# Translate absolute paths from POSIX to Windows. Use bash array to store
diff --git a/msvc-common/msvc-rc-common b/msvc-common/msvc-rc-common
index ca986b4..b406bac 100755
--- a/msvc-common/msvc-rc-common
+++ b/msvc-common/msvc-rc-common
@@ -5,12 +5,6 @@
# Common rc.exe driver that expects the SDKBIN and INCLUDE variables to be set
# for the specific MSVC version/configuration.
-trap "{ exit 1; }" ERR
-set -o errtrace # Trap in functions.
-
-function info () { echo "$*" 1>&2; }
-function error () { info "$*"; exit 1; }
-
source "$src_dir/msvc-common/msvc-common"
# Translate absolute paths from POSIX to Windows. Use bash array to store
diff --git a/msvc-common/msvc-sdk-common b/msvc-common/msvc-sdk-common
new file mode 100755
index 0000000..b29777e
--- /dev/null
+++ b/msvc-common/msvc-sdk-common
@@ -0,0 +1,12 @@
+#! /usr/bin/env bash
+
+# Figure out the latest Windows 10 SDK version. Fail if none is found.
+#
+function windows10_sdkversion ()
+{
+ # This path will probably always be the same (VC never asks for the SDK
+ # installation location).
+ #
+ local sdk_root="C:\\Program Files (x86)\\Windows Kits\\10"
+
+}
diff --git a/msvc-dispatch b/msvc-dispatch
index 945710b..4c2bf2d 100755
--- a/msvc-dispatch
+++ b/msvc-dispatch
@@ -31,7 +31,7 @@ if [ -z "$tool" -o -z "$major" -o -z "$target" ]; then
error "invalid top-level script name"
fi
-# Calculate MSVC_WINEPREFIX and MSVC_INSTALLDIR.
+# Calculate MSVC_{WINEPREFIX,INSTALLDIR,SDKVERSION}.
#
# We have the following environment variable name hierarchy:
#
@@ -61,6 +61,7 @@ function lookup_value() # <name>
MSVC_WINEPREFIX="$(lookup_value "WINEPREFIX")"
MSVC_INSTALLDIR="$(lookup_value "INSTALLDIR")"
+MSVC_SDKVERSION="$(lookup_value "SDKVERSION")"
# Load the configuration.
#