diff options
author | Xpol Wan <xpolife@gmail.com> | 2016-05-23 11:51:20 +0800 |
---|---|---|
committer | Xpol Wan <xpolife@gmail.com> | 2016-05-23 11:51:20 +0800 |
commit | 11b65a6c324359134bd75bad37f102ea98337d3e (patch) | |
tree | 91402671a0142cdd7807d276e5703a2567b8a766 | |
parent | 58c492d6dafb4592c863a11565ab7ad53c9c7537 (diff) | |
download | luarocks-11b65a6c324359134bd75bad37f102ea98337d3e.tar.gz luarocks-11b65a6c324359134bd75bad37f102ea98337d3e.tar.bz2 luarocks-11b65a6c324359134bd75bad37f102ea98337d3e.zip |
Fallback to vcvarsall.bat if compiler specific bat not found.
-rw-r--r-- | install.bat | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/install.bat b/install.bat index 8e89aafe..46308eb1 100644 --- a/install.bat +++ b/install.bat | |||
@@ -525,6 +525,14 @@ local function get_msvc_env_setup_cmd() | |||
525 | return ('call "%s"'):format(full_path) | 525 | return ('call "%s"'):format(full_path) |
526 | end | 526 | end |
527 | end | 527 | end |
528 | |||
529 | -- try vcvarsall.bat in case MS changes the undocumented bat files above. | ||
530 | -- but this way we don't konw if specified compiler is installed... | ||
531 | local vcvarsall = vcdir .. 'vcvarsall.bat' | ||
532 | if exists(vcvarsall) then | ||
533 | local vcvarsall_args = { x86 = "", x86_64 = " amd64" } | ||
534 | return ('call "%s"%s'):format(vcvarsall, vcvarsall_args[vars.UNAME_M]) | ||
535 | end | ||
528 | end | 536 | end |
529 | 537 | ||
530 | -- 2. try for Windows SDKs command line tools. | 538 | -- 2. try for Windows SDKs command line tools. |