diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2013-10-07 11:24:59 +0200 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2013-10-07 11:24:59 +0200 |
commit | 8580df1a98ba200e9a7b0ae9c08c667b738bd7f6 (patch) | |
tree | 43862745815a544ef0f6eb41a2f2845681ae4098 | |
parent | 44a397f4e0b3e2d802104706b84a8ecc6473d4ed (diff) | |
download | luarocks-8580df1a98ba200e9a7b0ae9c08c667b738bd7f6.tar.gz luarocks-8580df1a98ba200e9a7b0ae9c08c667b738bd7f6.tar.bz2 luarocks-8580df1a98ba200e9a7b0ae9c08c667b738bd7f6.zip |
make installer find interpreter by short versioned name, eg. lua52.exe instead of lua5.2.exe
-rw-r--r-- | install.bat | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/install.bat b/install.bat index 99dc7fa7..87c7b5a2 100644 --- a/install.bat +++ b/install.bat | |||
@@ -16,7 +16,7 @@ vars.LUA_INCDIR = nil | |||
16 | vars.LUA_LIBDIR = nil | 16 | vars.LUA_LIBDIR = nil |
17 | vars.LUA_LIBNAME = nil | 17 | vars.LUA_LIBNAME = nil |
18 | vars.LUA_VERSION = "5.1" | 18 | vars.LUA_VERSION = "5.1" |
19 | vars.LUA_SHORTV = nil | 19 | vars.LUA_SHORTV = nil -- "51" |
20 | vars.LUA_LIB_NAMES = "lua5.1.lib lua51.dll liblua.dll.a" | 20 | vars.LUA_LIB_NAMES = "lua5.1.lib lua51.dll liblua.dll.a" |
21 | vars.LUA_RUNTIME = nil | 21 | vars.LUA_RUNTIME = nil |
22 | 22 | ||
@@ -180,6 +180,10 @@ local function look_for_interpreter (directory) | |||
180 | vars.LUA_INTERPRETER = S"lua$LUA_VERSION.exe" | 180 | vars.LUA_INTERPRETER = S"lua$LUA_VERSION.exe" |
181 | print(S" Found $LUA_BINDIR\\$LUA_INTERPRETER") | 181 | print(S" Found $LUA_BINDIR\\$LUA_INTERPRETER") |
182 | return true | 182 | return true |
183 | elseif exists( S"$LUA_BINDIR\\lua$LUA_SHORTV.exe" ) then | ||
184 | vars.LUA_INTERPRETER = S"lua$LUA_SHORTV.exe" | ||
185 | print(S" Found $LUA_BINDIR\\$LUA_INTERPRETER") | ||
186 | return true | ||
183 | elseif exists(S"$LUA_BINDIR\\lua.exe") then | 187 | elseif exists(S"$LUA_BINDIR\\lua.exe") then |
184 | vars.LUA_INTERPRETER = "lua.exe" | 188 | vars.LUA_INTERPRETER = "lua.exe" |
185 | print(S" Found $LUA_BINDIR\\$LUA_INTERPRETER") | 189 | print(S" Found $LUA_BINDIR\\$LUA_INTERPRETER") |
@@ -199,6 +203,12 @@ local function look_for_interpreter (directory) | |||
199 | print(" Found ."..e..vars.LUA_INTERPRETER) | 203 | print(" Found ."..e..vars.LUA_INTERPRETER) |
200 | return true | 204 | return true |
201 | 205 | ||
206 | elseif exists(directory..e.."\\lua"..vars.LUA_SHORTV..".exe") then | ||
207 | vars.LUA_INTERPRETER = S"lua$LUA_SHORTV.exe" | ||
208 | vars.LUA_BINDIR = directory .. e | ||
209 | print(" Found ."..e..vars.LUA_INTERPRETER) | ||
210 | return true | ||
211 | |||
202 | elseif exists(directory..e.."\\lua.exe") then | 212 | elseif exists(directory..e.."\\lua.exe") then |
203 | vars.LUA_INTERPRETER = "lua.exe" | 213 | vars.LUA_INTERPRETER = "lua.exe" |
204 | vars.LUA_BINDIR = directory..e | 214 | vars.LUA_BINDIR = directory..e |