aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install.bat54
-rw-r--r--src/luarocks/build.lua4
-rw-r--r--src/luarocks/install.lua4
-rw-r--r--src/luarocks/make.lua4
-rw-r--r--src/luarocks/remove.lua4
5 files changed, 61 insertions, 9 deletions
diff --git a/install.bat b/install.bat
index ed2a49ff..03ec7c94 100644
--- a/install.bat
+++ b/install.bat
@@ -519,6 +519,14 @@ end
519 519
520print(S"LuaRocks $VERSION.x installer.\n") 520print(S"LuaRocks $VERSION.x installer.\n")
521 521
522print([[
523
524========================
525== Checking system... ==
526========================
527
528]])
529
522parse_options(config) 530parse_options(config)
523check_flags() 531check_flags()
524 532
@@ -593,6 +601,10 @@ end
593 601
594print(S[[ 602print(S[[
595 603
604==========================
605== System check results ==
606==========================
607
596Will configure LuaRocks with the following paths: 608Will configure LuaRocks with the following paths:
597LuaRocks : $FULL_PREFIX 609LuaRocks : $FULL_PREFIX
598Config file : $SYSCONFDIR\config.lua 610Config file : $SYSCONFDIR\config.lua
@@ -613,6 +625,14 @@ if PROMPT then
613 io.read() 625 io.read()
614end 626end
615 627
628print([[
629
630============================
631== Installing LuaRocks... ==
632============================
633
634]])
635
616-- *********************************************************** 636-- ***********************************************************
617-- Install LuaRocks files 637-- Install LuaRocks files
618-- *********************************************************** 638-- ***********************************************************
@@ -680,6 +700,35 @@ IF NOT "%LUA_PATH_5_2%"=="" (
680) 700)
681SET "PATH=$BINDIR;%PATH%" 701SET "PATH=$BINDIR;%PATH%"
682"$LUA_INTERPRETER" "$BINDIR\]]..c..[[.lua" %* 702"$LUA_INTERPRETER" "$BINDIR\]]..c..[[.lua" %*
703IF NOT "%ERRORLEVEL%"=="2" GOTO EXITLR
704
705REM Permission denied error, try and auto elevate...
706REM already an admin? (checking to prevent loops)
707NET SESSION >NUL 2>&1
708IF "%ERRORLEVEL%"=="0" GOTO EXITLR
709
710REM Do we have PowerShell available?
711PowerShell /? >NUL 2>&1
712IF NOT "%ERRORLEVEL%"=="0" GOTO EXITLR
713
714:GETTEMPNAME
715SET TMPFILE=%TEMP%\LuaRocks-Elevator-%RANDOM%.bat
716IF EXIST "%TMPFILE%" GOTO :GETTEMPNAME
717
718ECHO @ECHO OFF > "%TMPFILE%"
719ECHO CHDIR /D %CD% >> "%TMPFILE%"
720ECHO ECHO %0 %* >> "%TMPFILE%"
721ECHO ECHO. >> "%TMPFILE%"
722ECHO CALL %0 %* >> "%TMPFILE%"
723ECHO ECHO. >> "%TMPFILE%"
724ECHO ECHO Press any key to close this window... >> "%TMPFILE%"
725ECHO PAUSE ^> NUL >> "%TMPFILE%"
726ECHO DEL "%TMPFILE%" >> "%TMPFILE%"
727
728ECHO Now trying to run again elevated...
729PowerShell -Command (New-Object -com 'Shell.Application').ShellExecute('%TMPFILE%', '', '', 'runas')
730
731:EXITLR
683ENDLOCAL 732ENDLOCAL
684]]) 733]])
685 f:close() 734 f:close()
@@ -833,7 +882,10 @@ exec( S[[del "$FULL_PREFIX\pe-parser.lua" >NUL]] )
833 882
834print(S[[ 883print(S[[
835 884
836*** LuaRocks is installed! *** 885============================
886== LuaRocks is installed! ==
887============================
888
837 889
838You may want to add the following elements to your paths; 890You may want to add the following elements to your paths;
839Lua interpreter; 891Lua interpreter;
diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua
index cee65781..ec269023 100644
--- a/src/luarocks/build.lua
+++ b/src/luarocks/build.lua
@@ -351,8 +351,8 @@ end
351-- if returned a result, installs the matching rock. 351-- if returned a result, installs the matching rock.
352-- @param version string: When passing a package name, a version number may 352-- @param version string: When passing a package name, a version number may
353-- also be given. 353-- also be given.
354-- @return boolean or (nil, string): True if build was successful; nil and an 354-- @return boolean or (nil, string, exitcode): True if build was successful; nil and an
355-- error message otherwise. 355-- error message otherwise. exitcode is optionally returned.
356function run(...) 356function run(...)
357 local flags, name, version = util.parse_flags(...) 357 local flags, name, version = util.parse_flags(...)
358 if type(name) ~= "string" then 358 if type(name) ~= "string" then
diff --git a/src/luarocks/install.lua b/src/luarocks/install.lua
index 041d8ca2..b28e6282 100644
--- a/src/luarocks/install.lua
+++ b/src/luarocks/install.lua
@@ -120,8 +120,8 @@ end
120-- if returned a result, installs the matching rock. 120-- if returned a result, installs the matching rock.
121-- @param version string: When passing a package name, a version number 121-- @param version string: When passing a package name, a version number
122-- may also be given. 122-- may also be given.
123-- @return boolean or (nil, string): True if installation was 123-- @return boolean or (nil, string, exitcode): True if installation was
124-- successful, nil and an error message otherwise. 124-- successful, nil and an error message otherwise. exitcode is optionally returned.
125function run(...) 125function run(...)
126 local flags, name, version = util.parse_flags(...) 126 local flags, name, version = util.parse_flags(...)
127 if type(name) ~= "string" then 127 if type(name) ~= "string" then
diff --git a/src/luarocks/make.lua b/src/luarocks/make.lua
index aff4f93c..3999e39f 100644
--- a/src/luarocks/make.lua
+++ b/src/luarocks/make.lua
@@ -40,8 +40,8 @@ To install rocks, you'll normally want to use the "install" and
40 40
41--- Driver function for "make" command. 41--- Driver function for "make" command.
42-- @param name string: A local rockspec. 42-- @param name string: A local rockspec.
43-- @return boolean or (nil, string): True if build was successful; nil and an 43-- @return boolean or (nil, string, exitcode): True if build was successful; nil and an
44-- error message otherwise. 44-- error message otherwise. exitcode is optionally returned.
45function run(...) 45function run(...)
46 local flags, rockspec = util.parse_flags(...) 46 local flags, rockspec = util.parse_flags(...)
47 assert(type(rockspec) == "string" or not rockspec) 47 assert(type(rockspec) == "string" or not rockspec)
diff --git a/src/luarocks/remove.lua b/src/luarocks/remove.lua
index 9ab6d11f..f2f6997b 100644
--- a/src/luarocks/remove.lua
+++ b/src/luarocks/remove.lua
@@ -132,8 +132,8 @@ end
132-- a specific version; otherwise, try to remove all versions. 132-- a specific version; otherwise, try to remove all versions.
133-- @param version string: When passing a package name, a version number 133-- @param version string: When passing a package name, a version number
134-- may also be given. 134-- may also be given.
135-- @return boolean or (nil, string): True if removal was 135-- @return boolean or (nil, string, exitcode): True if removal was
136-- successful, nil and an error message otherwise. 136-- successful, nil and an error message otherwise. exitcode is optionally returned.
137function run(...) 137function run(...)
138 local flags, name, version = util.parse_flags(...) 138 local flags, name, version = util.parse_flags(...)
139 139