diff options
Diffstat (limited to 'doc/install.html')
| -rw-r--r-- | doc/install.html | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/doc/install.html b/doc/install.html index b7211d21..3aa60f1c 100644 --- a/doc/install.html +++ b/doc/install.html | |||
| @@ -58,17 +58,15 @@ application under x64-based systems, too. | |||
| 58 | <h2>Configuring LuaJIT</h2> | 58 | <h2>Configuring LuaJIT</h2> |
| 59 | <p> | 59 | <p> |
| 60 | The standard configuration should work fine for most installations. | 60 | The standard configuration should work fine for most installations. |
| 61 | Usually there is no need to tweak the settings, except when you want to | 61 | Usually there is no need to tweak the settings. The following files |
| 62 | install to a non-standard path. The following three files hold all | 62 | hold all user-configurable settings: |
| 63 | user-configurable settings: | ||
| 64 | </p> | 63 | </p> |
| 65 | <ul> | 64 | <ul> |
| 66 | <li><tt>src/luaconf.h</tt> sets some configuration variables, in | 65 | <li><tt>src/luaconf.h</tt> sets some configuration variables.</li> |
| 67 | particular the default paths for loading modules.</li> | 66 | <li><tt>Makefile</tt> has settings for <b>installing</b> LuaJIT (POSIX |
| 68 | <li><tt>Makefile</tt> has settings for installing LuaJIT (POSIX | ||
| 69 | only).</li> | 67 | only).</li> |
| 70 | <li><tt>src/Makefile</tt> has settings for compiling LuaJIT under POSIX, | 68 | <li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT |
| 71 | MinGW and Cygwin.</li> | 69 | under POSIX, MinGW and Cygwin.</li> |
| 72 | <li><tt>src/msvcbuild.bat</tt> has settings for compiling LuaJIT with | 70 | <li><tt>src/msvcbuild.bat</tt> has settings for compiling LuaJIT with |
| 73 | MSVC.</li> | 71 | MSVC.</li> |
| 74 | </ul> | 72 | </ul> |
| @@ -97,9 +95,8 @@ terminal window and change to this directory. Now unpack the archive | |||
| 97 | and change to the newly created directory: | 95 | and change to the newly created directory: |
| 98 | </p> | 96 | </p> |
| 99 | <pre class="code"> | 97 | <pre class="code"> |
| 100 | tar zxf LuaJIT-2.0.0-beta1.tar.gz | 98 | tar zxf LuaJIT-2.0.0-beta2.tar.gz |
| 101 | cd LuaJIT-2.0.0-beta1 | 99 | cd LuaJIT-2.0.0-beta2</pre> |
| 102 | </pre> | ||
| 103 | <h3>Building LuaJIT</h3> | 100 | <h3>Building LuaJIT</h3> |
| 104 | <p> | 101 | <p> |
| 105 | The supplied Makefiles try to auto-detect the settings needed for your | 102 | The supplied Makefiles try to auto-detect the settings needed for your |
| @@ -109,6 +106,18 @@ which is probably the default on your system, anyway. Simply run: | |||
| 109 | <pre class="code"> | 106 | <pre class="code"> |
| 110 | make | 107 | make |
| 111 | </pre> | 108 | </pre> |
| 109 | <p> | ||
| 110 | By default modules are only searched under the prefix <tt>/usr/local</tt>. | ||
| 111 | You can add an extra prefix to the search paths by appending the | ||
| 112 | <tt>PREFIX</tt> option, e.g.: | ||
| 113 | </p> | ||
| 114 | <pre class="code"> | ||
| 115 | make PREFIX=/home/myself/lj2 | ||
| 116 | </pre> | ||
| 117 | <p> | ||
| 118 | Note for OSX: <tt>MACOSX_DEPLOYMENT_TARGET</tt> is set to <tt>10.4</tt> | ||
| 119 | in <tt>src/Makefile</tt>. Change it, if you want to build on an older version. | ||
| 120 | </p> | ||
| 112 | <h3>Installing LuaJIT</h3> | 121 | <h3>Installing LuaJIT</h3> |
| 113 | <p> | 122 | <p> |
| 114 | The top-level Makefile installs LuaJIT by default under | 123 | The top-level Makefile installs LuaJIT by default under |
| @@ -124,20 +133,19 @@ sudo make install | |||
| 124 | Otherwise specify the directory prefix as an absolute path, e.g.: | 133 | Otherwise specify the directory prefix as an absolute path, e.g.: |
| 125 | </p> | 134 | </p> |
| 126 | <pre class="code"> | 135 | <pre class="code"> |
| 127 | sudo make install PREFIX=/opt/lj2 | 136 | make install PREFIX=/home/myself/lj2 |
| 128 | </pre> | 137 | </pre> |
| 129 | <p> | 138 | <p> |
| 130 | But note that the installation prefix and the prefix for the module paths | 139 | Obviously the prefixes given during build and installation need to be the same. |
| 131 | (configured in <tt>src/luaconf.h</tt>) must match. | ||
| 132 | </p> | 140 | </p> |
| 133 | <p style="color: #c00000;"> | 141 | <p style="color: #c00000;"> |
| 134 | Note: to avoid overwriting a previous version, the beta test releases | 142 | Note: to avoid overwriting a previous version, the beta test releases |
| 135 | only install the LuaJIT executable under the versioned name (i.e. | 143 | only install the LuaJIT executable under the versioned name (i.e. |
| 136 | <tt>luajit-2.0.0-beta1</tt>). You probably want to create a symlink | 144 | <tt>luajit-2.0.0-beta2</tt>). You probably want to create a symlink |
| 137 | for convenience, with a command like this: | 145 | for convenience, with a command like this: |
| 138 | </p> | 146 | </p> |
| 139 | <pre class="code" style="color: #c00000;"> | 147 | <pre class="code" style="color: #c00000;"> |
| 140 | sudo ln -sf luajit-2.0.0-beta1 /usr/local/bin/luajit | 148 | sudo ln -sf luajit-2.0.0-beta2 /usr/local/bin/luajit |
| 141 | </pre> | 149 | </pre> |
| 142 | 150 | ||
| 143 | <h2 id="windows">Windows Systems</h2> | 151 | <h2 id="windows">Windows Systems</h2> |
| @@ -145,8 +153,8 @@ sudo ln -sf luajit-2.0.0-beta1 /usr/local/bin/luajit | |||
| 145 | <p> | 153 | <p> |
| 146 | Either install one of the open source SDKs | 154 | Either install one of the open source SDKs |
| 147 | (<a href="http://mingw.org/"><span class="ext">»</span> MinGW</a> or | 155 | (<a href="http://mingw.org/"><span class="ext">»</span> MinGW</a> or |
| 148 | <a href="http://www.cygwin.com/"><span class="ext">»</span> Cygwin</a>) which come with modified | 156 | <a href="http://www.cygwin.com/"><span class="ext">»</span> Cygwin</a>), which come with a modified |
| 149 | versions of GCC plus the required development headers. | 157 | GCC plus the required development headers. |
| 150 | </p> | 158 | </p> |
| 151 | <p> | 159 | <p> |
| 152 | Or install Microsoft's Visual C++ (MSVC) — the freely downloadable | 160 | Or install Microsoft's Visual C++ (MSVC) — the freely downloadable |
| @@ -159,8 +167,8 @@ Next, download the source package and unpack it using an archive manager | |||
| 159 | </p> | 167 | </p> |
| 160 | <h3>Building with MSVC</h3> | 168 | <h3>Building with MSVC</h3> |
| 161 | <p> | 169 | <p> |
| 162 | Open a "Visual Studio .NET Command Prompt" and <tt>cd</tt> to the | 170 | Open a "Visual Studio .NET Command Prompt", <tt>cd</tt> to the |
| 163 | directory where you've unpacked the sources. Then run this command: | 171 | directory where you've unpacked the sources and run these commands: |
| 164 | </p> | 172 | </p> |
| 165 | <pre class="code"> | 173 | <pre class="code"> |
| 166 | cd src | 174 | cd src |
| @@ -176,14 +184,12 @@ are in your path. Then <tt>cd</tt> to the directory where | |||
| 176 | you've unpacked the sources and run this command for MinGW: | 184 | you've unpacked the sources and run this command for MinGW: |
| 177 | </p> | 185 | </p> |
| 178 | <pre class="code"> | 186 | <pre class="code"> |
| 179 | cd src | ||
| 180 | mingw32-make | 187 | mingw32-make |
| 181 | </pre> | 188 | </pre> |
| 182 | <p> | 189 | <p> |
| 183 | Or this command for Cygwin: | 190 | Or this command for Cygwin: |
| 184 | </p> | 191 | </p> |
| 185 | <pre class="code"> | 192 | <pre class="code"> |
| 186 | cd src | ||
| 187 | make | 193 | make |
| 188 | </pre> | 194 | </pre> |
| 189 | <p> | 195 | <p> |
| @@ -191,10 +197,11 @@ Then follow the installation instructions below. | |||
| 191 | </p> | 197 | </p> |
| 192 | <h3>Installing LuaJIT</h3> | 198 | <h3>Installing LuaJIT</h3> |
| 193 | <p> | 199 | <p> |
| 194 | Copy <tt>luajit.exe</tt> and <tt>lua51.dll</tt> | 200 | Copy <tt>luajit.exe</tt> and <tt>lua51.dll</tt> (built in the <tt>src</tt> |
| 195 | to a newly created directory (any location is ok). Add <tt>lua</tt> | 201 | directory) to a newly created directory (any location is ok). |
| 196 | and <tt>lua\jit</tt> directories below it and copy all Lua files | 202 | Add <tt>lua</tt> and <tt>lua\jit</tt> directories below it and copy |
| 197 | from the <tt>lib</tt> directory of the distribution to the latter directory. | 203 | all Lua files from the <tt>lib</tt> directory of the distribution |
| 204 | to the latter directory. | ||
| 198 | </p> | 205 | </p> |
| 199 | <p> | 206 | <p> |
| 200 | There are no hardcoded | 207 | There are no hardcoded |
