diff options
| author | Hisham <hisham@gobolinux.org> | 2016-08-23 15:59:45 -0300 |
|---|---|---|
| committer | Hisham <hisham@gobolinux.org> | 2016-08-23 15:59:45 -0300 |
| commit | 0e6b922d2618fc90195299e2f944110c4ffe5600 (patch) | |
| tree | de6bd75a18ce98ff4c40c52a165fa065e14d9298 | |
| parent | 043c656a11140df8411f0635dc9b79700040d37d (diff) | |
| download | luarocks-0e6b922d2618fc90195299e2f944110c4ffe5600.tar.gz luarocks-0e6b922d2618fc90195299e2f944110c4ffe5600.tar.bz2 luarocks-0e6b922d2618fc90195299e2f944110c4ffe5600.zip | |
Remove Appveyor scripts replaced by Hererocks
| -rw-r--r-- | .appveyor/build.bat | 111 | ||||
| -rw-r--r-- | .appveyor/install.bat | 154 |
2 files changed, 0 insertions, 265 deletions
diff --git a/.appveyor/build.bat b/.appveyor/build.bat deleted file mode 100644 index a4ff6378..00000000 --- a/.appveyor/build.bat +++ /dev/null | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | @echo off | ||
| 2 | Setlocal EnableDelayedExpansion EnableExtensions | ||
| 3 | |||
| 4 | cd %APPVEYOR_BUILD_FOLDER% | ||
| 5 | |||
| 6 | :: ========================================================= | ||
| 7 | :: Make sure some environment variables are set | ||
| 8 | if not defined LUA_VER call :die LUA_VER is not defined | ||
| 9 | if not defined LUA call :die LUA is not defined | ||
| 10 | if not defined LUA_SHORTV call :die LUA_SHORTV is not defined | ||
| 11 | if not defined LUA_DIR call :die LUA_DIR is not defined | ||
| 12 | |||
| 13 | :: ========================================================= | ||
| 14 | :: Set some defaults. Infer some variables. | ||
| 15 | :: | ||
| 16 | if not defined LUAROCKS_VER set LUAROCKS_VER=2.2.1 | ||
| 17 | |||
| 18 | set LUAROCKS_SHORTV=%LUAROCKS_VER:~0,3% | ||
| 19 | |||
| 20 | if not defined LR_EXTERNAL set LR_EXTERNAL=c:\external | ||
| 21 | if not defined LR_ROOT set LR_ROOT=%LUA_DIR%\LuaRocks | ||
| 22 | if not defined LR_SYSTREE set LR_SYSTREE=%LR_ROOT%\systree | ||
| 23 | |||
| 24 | :: | ||
| 25 | :: ========================================================= | ||
| 26 | |||
| 27 | |||
| 28 | if not exist %LUA_DIR%\bin\%LUA%.exe call :die "Missing Lua interpreter at %LUA_DIR%\bin\%LUA%.exe" | ||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | :: ========================================================= | ||
| 33 | :: LuaRocks | ||
| 34 | :: ========================================================= | ||
| 35 | |||
| 36 | cd %APPVEYOR_BUILD_FOLDER% | ||
| 37 | call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P "%LR_ROOT%" /TREE "%LR_SYSTREE%" | ||
| 38 | |||
| 39 | if not exist "%LR_ROOT%" call :die "LuaRocks not found at %LR_ROOT%" | ||
| 40 | |||
| 41 | set PATH=%LR_ROOT%;%LR_SYSTREE%\bin;%PATH% | ||
| 42 | |||
| 43 | :: Lua will use just the system rocks | ||
| 44 | set LUA_PATH=%LR_ROOT%\lua\?.lua;%LR_ROOT%\lua\?\init.lua | ||
| 45 | set LUA_PATH=%LUA_PATH%;%LR_SYSTREE%\share\lua\%LUA_SHORTV%\?.lua | ||
| 46 | set LUA_PATH=%LUA_PATH%;%LR_SYSTREE%\share\lua\%LUA_SHORTV%\?\init.lua | ||
| 47 | set LUA_CPATH=%LR_SYSTREE%\lib\lua\%LUA_SHORTV%\?.dll | ||
| 48 | |||
| 49 | call luarocks --version || call :die "Error with LuaRocks installation" | ||
| 50 | call luarocks list | ||
| 51 | |||
| 52 | |||
| 53 | if not exist "%LR_EXTERNAL%" ( | ||
| 54 | mkdir "%LR_EXTERNAL%" | ||
| 55 | mkdir "%LR_EXTERNAL%\lib" | ||
| 56 | mkdir "%LR_EXTERNAL%\include" | ||
| 57 | ) | ||
| 58 | |||
| 59 | set PATH=%LR_EXTERNAL%;%PATH% | ||
| 60 | |||
| 61 | :: Exports the following variables: | ||
| 62 | :: (beware of whitespace between & and ^ below) | ||
| 63 | endlocal & set PATH=%PATH%&^ | ||
| 64 | set LR_SYSTREE=%LR_SYSTREE%&^ | ||
| 65 | set LUA_PATH=%LUA_PATH%&^ | ||
| 66 | set LUA_CPATH=%LUA_CPATH%&^ | ||
| 67 | set LR_EXTERNAL=%LR_EXTERNAL% | ||
| 68 | |||
| 69 | echo. | ||
| 70 | echo ====================================================== | ||
| 71 | echo Installation of LuaRocks %LUAROCKS_VER% done. | ||
| 72 | echo . | ||
| 73 | echo LUA_PATH - %LUA_PATH% | ||
| 74 | echo LUA_CPATH - %LUA_CPATH% | ||
| 75 | echo. | ||
| 76 | echo LR_EXTERNAL - %LR_EXTERNAL% | ||
| 77 | echo ====================================================== | ||
| 78 | echo. | ||
| 79 | |||
| 80 | goto :eof | ||
| 81 | |||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | |||
| 99 | :: This blank space is intentional. If you see errors like "The system cannot find the batch label specified 'foo'" | ||
| 100 | :: then try adding or removing blank lines lines above. | ||
| 101 | :: Yes, really. | ||
| 102 | :: http://stackoverflow.com/questions/232651/why-the-system-cannot-find-the-batch-label-specified-is-thrown-even-if-label-e | ||
| 103 | |||
| 104 | :: helper functions: | ||
| 105 | |||
| 106 | :: for bailing out when an error occurred | ||
| 107 | :die %1 | ||
| 108 | echo %1 | ||
| 109 | exit /B 1 | ||
| 110 | goto :eof | ||
| 111 | |||
diff --git a/.appveyor/install.bat b/.appveyor/install.bat deleted file mode 100644 index a2aefdd2..00000000 --- a/.appveyor/install.bat +++ /dev/null | |||
| @@ -1,154 +0,0 @@ | |||
| 1 | @echo off | ||
| 2 | |||
| 3 | cd %APPVEYOR_BUILD_FOLDER% | ||
| 4 | |||
| 5 | :: ========================================================= | ||
| 6 | :: Set some defaults. Infer some variables. | ||
| 7 | :: | ||
| 8 | :: These are set globally | ||
| 9 | if "%LUA_VER%" NEQ "" ( | ||
| 10 | set LUA=lua | ||
| 11 | set LUA_SHORTV=%LUA_VER:~0,3% | ||
| 12 | ) else ( | ||
| 13 | set LUA=luajit | ||
| 14 | set LJ_SHORTV=%LJ_VER:~0,3% | ||
| 15 | set LUA_SHORTV=5.1 | ||
| 16 | ) | ||
| 17 | |||
| 18 | :: unless we specify a platform on appveyor.yaml, we won't get this variable | ||
| 19 | if not defined platform set platform=x86 | ||
| 20 | |||
| 21 | :: defines LUA_DIR so Cmake can find this Lua install | ||
| 22 | if "%LUA%"=="luajit" ( | ||
| 23 | set LUA_DIR=c:\lua\%platform%\lj%LJ_SHORTV% | ||
| 24 | ) else ( | ||
| 25 | set LUA_DIR=c:\lua\%platform%\%LUA_VER% | ||
| 26 | ) | ||
| 27 | |||
| 28 | :: Now we declare a scope | ||
| 29 | Setlocal EnableDelayedExpansion EnableExtensions | ||
| 30 | |||
| 31 | if not defined LUA_URL set LUA_URL=http://www.lua.org/ftp | ||
| 32 | if not defined LUAJIT_GIT_REPO set LUAJIT_GIT_REPO=http://luajit.org/git/luajit-2.0.git | ||
| 33 | if not defined LUAJIT_URL set LUAJIT_URL=http://luajit.org/download | ||
| 34 | |||
| 35 | if not defined SEVENZIP set SEVENZIP=7z | ||
| 36 | :: | ||
| 37 | :: ========================================================= | ||
| 38 | |||
| 39 | :: first create some necessary directories: | ||
| 40 | mkdir downloads 2>NUL | ||
| 41 | |||
| 42 | :: Download and compile Lua (or LuaJIT) | ||
| 43 | if "%LUA%"=="luajit" ( | ||
| 44 | if not exist %LUA_DIR% ( | ||
| 45 | if "%LJ_SHORTV%"=="2.1" ( | ||
| 46 | :: Clone repository and checkout 2.1 branch | ||
| 47 | set lj_source_folder=%APPVEYOR_BUILD_FOLDER%\downloads\luajit-%LJ_VER% | ||
| 48 | if not exist !lj_source_folder! ( | ||
| 49 | echo Cloning git repo %LUAJIT_GIT_REPO% !lj_source_folder! | ||
| 50 | git clone %LUAJIT_GIT_REPO% !lj_source_folder! || call :die "Failed to clone repository" | ||
| 51 | ) | ||
| 52 | cd !lj_source_folder!\src | ||
| 53 | git checkout v2.1 || call :die | ||
| 54 | ) else ( | ||
| 55 | set lj_source_folder=%APPVEYOR_BUILD_FOLDER%\downloads\luajit-%LJ_VER% | ||
| 56 | if not exist !lj_source_folder! ( | ||
| 57 | echo Downloading... %LUAJIT_URL%/LuaJIT-%LJ_VER%.tar.gz | ||
| 58 | curl --silent --fail --max-time 120 --connect-timeout 30 %LUAJIT_URL%/LuaJIT-%LJ_VER%.tar.gz | %SEVENZIP% x -si -so -tgzip | %SEVENZIP% x -si -ttar -aoa -odownloads | ||
| 59 | ) | ||
| 60 | cd !lj_source_folder!\src | ||
| 61 | ) | ||
| 62 | :: Compiles LuaJIT | ||
| 63 | call msvcbuild.bat | ||
| 64 | |||
| 65 | mkdir %LUA_DIR% 2> NUL | ||
| 66 | for %%a in (bin include lib) do ( mkdir "%LUA_DIR%\%%a" ) | ||
| 67 | |||
| 68 | for %%a in (luajit.exe lua51.dll) do ( move "!lj_source_folder!\src\%%a" "%LUA_DIR%\bin" ) | ||
| 69 | |||
| 70 | move "!lj_source_folder!\src\lua51.lib" "%LUA_DIR%\lib" | ||
| 71 | for %%a in (lauxlib.h lua.h lua.hpp luaconf.h lualib.h luajit.h) do ( | ||
| 72 | copy "!lj_source_folder!\src\%%a" "%LUA_DIR%\include" | ||
| 73 | ) | ||
| 74 | |||
| 75 | ) else ( | ||
| 76 | echo LuaJIT %LJ_VER% already installed at %LUA_DIR% | ||
| 77 | ) | ||
| 78 | ) else ( | ||
| 79 | if not exist %LUA_DIR% ( | ||
| 80 | :: Download and compile Lua | ||
| 81 | if not exist downloads\lua-%LUA_VER% ( | ||
| 82 | curl --silent --fail --max-time 120 --connect-timeout 30 %LUA_URL%/lua-%LUA_VER%.tar.gz | %SEVENZIP% x -si -so -tgzip | %SEVENZIP% x -si -ttar -aoa -odownloads | ||
| 83 | ) | ||
| 84 | |||
| 85 | mkdir downloads\lua-%LUA_VER%\etc 2> NUL | ||
| 86 | if not exist downloads\lua-%LUA_VER%\etc\winmake.bat ( | ||
| 87 | curl --silent --location --insecure --fail --max-time 120 --connect-timeout 30 https://github.com/Tieske/luawinmake/archive/master.tar.gz | %SEVENZIP% x -si -so -tgzip | %SEVENZIP% e -si -ttar -aoa -odownloads\lua-%LUA_VER%\etc luawinmake-master\etc\winmake.bat | ||
| 88 | ) | ||
| 89 | |||
| 90 | cd downloads\lua-%LUA_VER% | ||
| 91 | call etc\winmake | ||
| 92 | call etc\winmake install %LUA_DIR% | ||
| 93 | ) else ( | ||
| 94 | echo Lua %LUA_VER% already installed at %LUA_DIR% | ||
| 95 | ) | ||
| 96 | ) | ||
| 97 | |||
| 98 | if not exist %LUA_DIR%\bin\%LUA%.exe call :die "Missing Lua interpreter at %LUA_DIR%\bin\%LUA%.exe" | ||
| 99 | |||
| 100 | set PATH=%LUA_DIR%\bin;%PATH% | ||
| 101 | call %LUA% -v | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | :: Exports the following variables: | ||
| 106 | endlocal & set PATH=%PATH% | ||
| 107 | |||
| 108 | echo. | ||
| 109 | echo ====================================================== | ||
| 110 | if "%LUA%"=="luajit" ( | ||
| 111 | echo Installation of LuaJIT %LJ_VER% done. | ||
| 112 | ) else ( | ||
| 113 | echo Installation of Lua %LUA_VER% done. | ||
| 114 | ) | ||
| 115 | echo Platform - %platform% | ||
| 116 | echo LUA - %LUA% | ||
| 117 | echo LUA_SHORTV - %LUA_SHORTV% | ||
| 118 | echo LJ_SHORTV - %LJ_SHORTV% | ||
| 119 | echo. | ||
| 120 | echo ====================================================== | ||
| 121 | echo. | ||
| 122 | |||
| 123 | goto :eof | ||
| 124 | |||
| 125 | |||
| 126 | |||
| 127 | |||
| 128 | |||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | |||
| 133 | |||
| 134 | |||
| 135 | |||
| 136 | |||
| 137 | |||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | |||
| 142 | :: This blank space is intentional. If you see errors like "The system cannot find the batch label specified 'foo'" | ||
| 143 | :: then try adding or removing blank lines lines above. | ||
| 144 | :: Yes, really. | ||
| 145 | :: http://stackoverflow.com/questions/232651/why-the-system-cannot-find-the-batch-label-specified-is-thrown-even-if-label-e | ||
| 146 | |||
| 147 | :: helper functions: | ||
| 148 | |||
| 149 | :: for bailing out when an error occurred | ||
| 150 | :die %1 | ||
| 151 | echo %1 | ||
| 152 | exit /B 1 | ||
| 153 | goto :eof | ||
| 154 | |||
