aboutsummaryrefslogtreecommitdiff
path: root/install.bat
diff options
context:
space:
mode:
Diffstat (limited to 'install.bat')
-rw-r--r--install.bat25
1 files changed, 17 insertions, 8 deletions
diff --git a/install.bat b/install.bat
index 6dc8cd02..85ef73f6 100644
--- a/install.bat
+++ b/install.bat
@@ -1,6 +1,6 @@
1rem=rem --[[ 1rem=rem --[[
2@setlocal& set luafile="%~f0" & if exist "%~f0.bat" set luafile="%~f0.bat" 2@setlocal& set luafile="%~f0" & if exist "%~f0.bat" set luafile="%~f0.bat"
3@lua5.1\bin\lua5.1.exe %luafile% %*& exit /b ]] 3@win32\lua5.1\bin\lua5.1.exe %luafile% %*& exit /b ]]
4 4
5local vars = {} 5local vars = {}
6 6
@@ -38,7 +38,7 @@ local SELFCONTAINED = false
38-- Some helpers 38-- Some helpers
39-- 39--
40 40
41local pe = assert(loadfile(".\\bin\\pe-parser.lua"))() 41local pe = assert(loadfile(".\\win32\\pe-parser.lua"))()
42 42
43local function die(message) 43local function die(message)
44 if message then print(message) end 44 if message then print(message) end
@@ -80,12 +80,12 @@ local function exec(cmd)
80end 80end
81 81
82local function exists(filename) 82local function exists(filename)
83 local cmd = [[.\bin\bin\test -e "]]..filename..[["]] 83 local cmd = [[.\win32\tools\test -e "]]..filename..[["]]
84 return exec(cmd) 84 return exec(cmd)
85end 85end
86 86
87local function mkdir (dir) 87local function mkdir (dir)
88 return exec([[.\bin\bin\mkdir -p "]]..dir..[[" >NUL]]) 88 return exec([[.\win32\tools\mkdir -p "]]..dir..[[" >NUL]])
89end 89end
90 90
91-- does the current user have admin priviledges ( = elevated) 91-- does the current user have admin priviledges ( = elevated)
@@ -666,13 +666,22 @@ if INSTALL_LUA then
666 if not exists(vars.LUA_INCDIR) then 666 if not exists(vars.LUA_INCDIR) then
667 mkdir(vars.LUA_INCDIR) 667 mkdir(vars.LUA_INCDIR)
668 end 668 end
669 exec(S[[COPY lua5.1\bin\*.* "$LUA_BINDIR" >NUL]]) 669 exec(S[[COPY win32\lua5.1\bin\*.* "$LUA_BINDIR" >NUL]])
670 exec(S[[COPY lua5.1\include\*.* "$LUA_INCDIR" >NUL]]) 670 exec(S[[COPY win32\lua5.1\include\*.* "$LUA_INCDIR" >NUL]])
671 print(S"Installed the LuaRocks bundled Lua interpreter in $LUA_BINDIR") 671 print(S"Installed the LuaRocks bundled Lua interpreter in $LUA_BINDIR")
672end 672end
673 673
674-- Copy the LuaRocks binaries 674-- Copy the LuaRocks binaries
675if not exec(S[[XCOPY /S bin\*.* "$BINDIR" >NUL]]) then 675if not exists(S[[$BINDIR\tools]]) then
676 if not mkdir(S[[$BINDIR\tools]]) then
677 die()
678 end
679end
680if not exec(S[[COPY win32\tools\*.* "$BINDIR\tools" >NUL]]) then
681 die()
682end
683-- Copy LR bin helper files
684if not exec(S[[COPY win32\*.* "$BINDIR" >NUL]]) then
676 die() 685 die()
677end 686end
678-- Copy the LuaRocks lua source files 687-- Copy the LuaRocks lua source files
@@ -870,7 +879,7 @@ if REGISTRY then
870 -- expand template with correct path information 879 -- expand template with correct path information
871 print() 880 print()
872 print([[Loading registry information for ".rockspec" files]]) 881 print([[Loading registry information for ".rockspec" files]])
873 exec( S[[lua5.1\bin\lua5.1.exe "$FULL_PREFIX\LuaRocks.reg.lua" "$FULL_PREFIX\LuaRocks.reg.template"]] ) 882 exec( S[[win32\lua5.1\bin\lua5.1.exe "$FULL_PREFIX\LuaRocks.reg.lua" "$FULL_PREFIX\LuaRocks.reg.template"]] )
874 exec( S[[regedit /S "$FULL_PREFIX\\LuaRocks.reg"]] ) 883 exec( S[[regedit /S "$FULL_PREFIX\\LuaRocks.reg"]] )
875end 884end
876 885