aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxpol <xpolife@gmail.com>2015-11-03 11:42:35 +0800
committerxpol <xpolife@gmail.com>2015-11-03 11:42:35 +0800
commitc8459585c9cb0f52d3a117125b537bd98f5515ab (patch)
treedfe1594703113f6c15ef5495989ee7136d56700f
parentc9ed3e1e72d0a58f26692b2dab84b6b0cec382a1 (diff)
downloadluarocks-c8459585c9cb0f52d3a117125b537bd98f5515ab.tar.gz
luarocks-c8459585c9cb0f52d3a117125b537bd98f5515ab.tar.bz2
luarocks-c8459585c9cb0f52d3a117125b537bd98f5515ab.zip
User assertion for required condition check.
-rw-r--r--install.bat6
1 files changed, 3 insertions, 3 deletions
diff --git a/install.bat b/install.bat
index 79b71645..ab8618b9 100644
--- a/install.bat
+++ b/install.bat
@@ -431,8 +431,8 @@ local function get_registry(key, value)
431 return nil 431 return nil
432end 432end
433 433
434-- requires vars.LUA_RUNTIME to be set before calling this function.
435local function get_visual_studio_directory() 434local function get_visual_studio_directory()
435 assert(type(vars.LUA_RUNTIME)=="string", "requires vars.LUA_RUNTIME to be set before calling this function.")
436 local major, minor = vars.LUA_RUNTIME:match('VCR%u*(%d+)(%d)$') -- MSVCR<x><y> or VCRUNTIME<x><y> 436 local major, minor = vars.LUA_RUNTIME:match('VCR%u*(%d+)(%d)$') -- MSVCR<x><y> or VCRUNTIME<x><y>
437 if not major then return nil end 437 if not major then return nil end
438 local keys = { 438 local keys = {
@@ -446,8 +446,8 @@ local function get_visual_studio_directory()
446 return nil 446 return nil
447end 447end
448 448
449-- requires vars.LUA_RUNTIME to be set before calling this function.
450local function get_windows_sdk_directory() 449local function get_windows_sdk_directory()
450 assert(type(vars.LUA_RUNTIME) == "string", "requires vars.LUA_RUNTIME to be set before calling this function.")
451 -- Only v7.1 and v6.1 shipped with compilers 451 -- Only v7.1 and v6.1 shipped with compilers
452 -- Other versions requires a separate installation of Visual Studio. 452 -- Other versions requires a separate installation of Visual Studio.
453 -- see https://github.com/keplerproject/luarocks/pull/443#issuecomment-152792516 453 -- see https://github.com/keplerproject/luarocks/pull/443#issuecomment-152792516
@@ -464,8 +464,8 @@ local function get_windows_sdk_directory()
464 return get_registry(key, "InstallationFolder") 464 return get_registry(key, "InstallationFolder")
465end 465end
466-- returns the batch command to setup msvc compiler path. 466-- returns the batch command to setup msvc compiler path.
467-- requires vars.LUA_RUNTIME and vars.UNAME_M to be set before calling this function.
468local function get_msvc_env_setup_cmd() 467local function get_msvc_env_setup_cmd()
468 assert(type(vars.UNAME_M) == "string", "requires vars.UNAME_M to be set before calling this function.")
469 local x64 = vars.UNAME_M=="x86_64" 469 local x64 = vars.UNAME_M=="x86_64"
470 470
471 -- 1. try visual studio command line tools 471 -- 1. try visual studio command line tools