aboutsummaryrefslogtreecommitdiff
path: root/install.bat
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2025-12-26 22:30:36 +1100
committerdaurnimator <quae@daurnimator.com>2025-12-26 22:30:36 +1100
commit6b7b6c2506f9abef059794663a8598a736837cc4 (patch)
tree4630dac80568c9377ff4cc1bcadef2c5fe9f7a6b /install.bat
parentddb1c93bf93c9774cb9d854a665d51c369ea5acd (diff)
parent24a9abaf330daf6882292a55256cf81dbdc5b622 (diff)
downloadluarocks-6b7b6c2506f9abef059794663a8598a736837cc4.tar.gz
luarocks-6b7b6c2506f9abef059794663a8598a736837cc4.tar.bz2
luarocks-6b7b6c2506f9abef059794663a8598a736837cc4.zip
Merge remote-tracking branch 'origin/refs/pull/1844/head'
Diffstat (limited to 'install.bat')
-rw-r--r--install.bat20
1 files changed, 13 insertions, 7 deletions
diff --git a/install.bat b/install.bat
index 6dd71125..25fc697e 100644
--- a/install.bat
+++ b/install.bat
@@ -136,7 +136,7 @@ Configuring the destinations:
136 if you create a self contained installation. 136 if you create a self contained installation.
137 137
138Configuring the Lua interpreter: 138Configuring the Lua interpreter:
139/LV [version] Lua version to use; either 5.1, 5.2, 5.3, or 5.4. 139/LV [version] Lua version to use; either 5.1, 5.2, 5.3, 5.4 or 5.5.
140 Default is auto-detected. 140 Default is auto-detected.
141/LUA [dir] Location where Lua is installed - e.g. c:\lua\5.1\ 141/LUA [dir] Location where Lua is installed - e.g. c:\lua\5.1\
142 If not provided, the installer will search the system 142 If not provided, the installer will search the system
@@ -258,8 +258,8 @@ local function check_flags()
258 die("Bundled Lua version is 5.1, cannot install "..vars.LUA_VERSION) 258 die("Bundled Lua version is 5.1, cannot install "..vars.LUA_VERSION)
259 end 259 end
260 end 260 end
261 if not vars.LUA_VERSION:match("^5%.[1234]$") then 261 if not vars.LUA_VERSION:match("^5%.[12345]$") then
262 die("Bad argument: /LV must either be 5.1, 5.2, 5.3, or 5.4") 262 die("Bad argument: /LV must either be 5.1, 5.2, 5.3, 5.4 or 5.5")
263 end 263 end
264 if USE_MSVC_MANUAL and USE_MINGW then 264 if USE_MSVC_MANUAL and USE_MINGW then
265 die("Cannot combine option /MSVC and /MW") 265 die("Cannot combine option /MSVC and /MW")
@@ -277,7 +277,7 @@ local function detect_lua_version(interpreter_path)
277 local full_version = handler:read("*a") 277 local full_version = handler:read("*a")
278 handler:close() 278 handler:close()
279 279
280 local version = full_version:match(" (5%.[1234])$") 280 local version = full_version:match(" (5%.[12345])$")
281 if not version then 281 if not version then
282 return nil, "unknown interpreter version '" .. full_version .. "'" 282 return nil, "unknown interpreter version '" .. full_version .. "'"
283 end 283 end
@@ -289,7 +289,7 @@ local function look_for_interpreter(directory)
289 if lua_version_set then 289 if lua_version_set then
290 names = {S"lua$LUA_VERSION.exe", S"lua$LUA_SHORTV.exe"} 290 names = {S"lua$LUA_VERSION.exe", S"lua$LUA_SHORTV.exe"}
291 else 291 else
292 names = {"lua5.4.exe", "lua54.exe", "lua5.3.exe", "lua53.exe", "lua5.2.exe", "lua52.exe", "lua5.1.exe", "lua51.exe"} 292 names = {"lua5.5.exe", "lua55.exe", "lua5.4.exe", "lua54.exe", "lua5.3.exe", "lua53.exe", "lua5.2.exe", "lua52.exe", "lua5.1.exe", "lua51.exe"}
293 end 293 end
294 table.insert(names, "lua.exe") 294 table.insert(names, "lua.exe")
295 table.insert(names, "luajit.exe") 295 table.insert(names, "luajit.exe")
@@ -622,7 +622,7 @@ local function get_possible_lua_directories()
622 local directories = {} 622 local directories = {}
623 for dir in path:gmatch("[^;]+") do 623 for dir in path:gmatch("[^;]+") do
624 -- Remove trailing backslashes, but not from a drive letter like `C:\`. 624 -- Remove trailing backslashes, but not from a drive letter like `C:\`.
625 dir = dir:gsub("([^:])\\+$", "%1") 625 local dir = dir:gsub("([^:])\\+$", "%1")
626 -- Remove trailing `bin` subdirectory, the searcher will check there anyway. 626 -- Remove trailing `bin` subdirectory, the searcher will check there anyway.
627 if dir:upper():match("[:\\]BIN$") then 627 if dir:upper():match("[:\\]BIN$") then
628 dir = dir:sub(1, -5) 628 dir = dir:sub(1, -5)
@@ -1024,7 +1024,7 @@ end
1024if not exec(S[[XCOPY /S src\luarocks\*.* "$LUADIR\luarocks" >NUL]]) then 1024if not exec(S[[XCOPY /S src\luarocks\*.* "$LUADIR\luarocks" >NUL]]) then
1025 die() 1025 die()
1026end 1026end
1027if vars.LUA_VERSION ~= "5.3" or vars.LUA_VERSION ~= "5.4" then 1027if vars.LUA_VERSION ~= "5.3" or vars.LUA_VERSION ~= "5.4" or vars.LUA_VERSION ~= "5.5" then
1028 -- Copy the vendored lua-copmat53 source files 1028 -- Copy the vendored lua-copmat53 source files
1029 if not exists(S[[$LUADIR\compat53]]) then 1029 if not exists(S[[$LUADIR\compat53]]) then
1030 if not mkdir(S[[$LUADIR\compat53]]) then 1030 if not mkdir(S[[$LUADIR\compat53]]) then
@@ -1058,6 +1058,12 @@ IF NOT "%LUA_PATH_5_2%"=="" (
1058IF NOT "%LUA_PATH_5_3%"=="" ( 1058IF NOT "%LUA_PATH_5_3%"=="" (
1059 SET "LUA_PATH_5_3=$LUADIR\?.lua;$LUADIR\?\init.lua;%LUA_PATH_5_3%" 1059 SET "LUA_PATH_5_3=$LUADIR\?.lua;$LUADIR\?\init.lua;%LUA_PATH_5_3%"
1060) 1060)
1061IF NOT "%LUA_PATH_5_4%"=="" (
1062 SET "LUA_PATH_5_4=$LUADIR\?.lua;$LUADIR\?\init.lua;%LUA_PATH_5_4%"
1063)
1064IF NOT "%LUA_PATH_5_5%"=="" (
1065 SET "LUA_PATH_5_5=$LUADIR\?.lua;$LUADIR\?\init.lua;%LUA_PATH_5_5%"
1066)
1061SET "PATH=$BINDIR;%PATH%" 1067SET "PATH=$BINDIR;%PATH%"
1062"$LUA" "$BINDIR\]]..c..[[.lua" %* 1068"$LUA" "$BINDIR\]]..c..[[.lua" %*
1063SET EXITCODE=%ERRORLEVEL% 1069SET EXITCODE=%ERRORLEVEL%