From 11b65a6c324359134bd75bad37f102ea98337d3e Mon Sep 17 00:00:00 2001 From: Xpol Wan Date: Mon, 23 May 2016 11:51:20 +0800 Subject: Fallback to vcvarsall.bat if compiler specific bat not found. --- install.bat | 8 ++++++++ 1 file changed, 8 insertions(+) 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() return ('call "%s"'):format(full_path) end end + + -- try vcvarsall.bat in case MS changes the undocumented bat files above. + -- but this way we don't konw if specified compiler is installed... + local vcvarsall = vcdir .. 'vcvarsall.bat' + if exists(vcvarsall) then + local vcvarsall_args = { x86 = "", x86_64 = " amd64" } + return ('call "%s"%s'):format(vcvarsall, vcvarsall_args[vars.UNAME_M]) + end end -- 2. try for Windows SDKs command line tools. -- cgit v1.2.3-55-g6feb