diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-09-29 06:11:42 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-09-29 06:11:42 +0000 |
commit | a32c6d91402329adb769c4fe8bbb24f0d4e99051 (patch) | |
tree | 8b3f574b479e84bd9fe086db49cbab551eac75c8 /doc | |
parent | 773e35ced30fa2c03ddb2a332bf8a9aebb56aa44 (diff) | |
download | luasocket-a32c6d91402329adb769c4fe8bbb24f0d4e99051.tar.gz luasocket-a32c6d91402329adb769c4fe8bbb24f0d4e99051.tar.bz2 luasocket-a32c6d91402329adb769c4fe8bbb24f0d4e99051.zip |
Almost ready to release.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/installation.html | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/doc/installation.html b/doc/installation.html index 62604ed..d30e919 100644 --- a/doc/installation.html +++ b/doc/installation.html | |||
@@ -63,24 +63,28 @@ the package scheme will likely already have been answered. | |||
63 | 63 | ||
64 | <h3>Directory structure</h3> | 64 | <h3>Directory structure</h3> |
65 | 65 | ||
66 | <p> The standard distribution reserves a directory to be the root of | 66 | <p> On Unix systems, the standard distribution uses two base |
67 | the libraries installed | 67 | directories, one for system dependent files, and another for system |
68 | on a given system. Let's call this directory <tt><ROOT></tt>. | 68 | independent files. Let's call these directories <tt><LIB></tt> |
69 | On my system, this is the <tt>/usr/local/share/lua/5.0</tt> directory. | 69 | and <tt><SHARE></tt>, respectively. |
70 | Here is the standard LuaSocket distribution directory structure:</p> | 70 | For instance, in my laptop, I use '<tt>/usr/local/lib/lua/5.0</tt>' for |
71 | <tt><LIB></tt> and '<tt>/usr/local/share/lua/5.0</tt>' for | ||
72 | <tt><SHARE></tt>. On Windows, only one directory is used, say | ||
73 | '<tt>c:\program files\lua\5.0</tt>'. Here is the standard LuaSocket | ||
74 | distribution directory structure:</p> | ||
71 | 75 | ||
72 | <pre class=example> | 76 | <pre class=example> |
73 | <ROOT>/compat-5.1.lua | 77 | <SHARE>/compat-5.1.lua |
74 | <ROOT>/ltn12.lua | 78 | <SHARE>/ltn12.lua |
75 | <ROOT>/mime/init.lua | 79 | <SHARE>/mime/init.lua |
76 | <ROOT>/mime/core.dll | 80 | <LIB>/mime/core.dll |
77 | <ROOT>/socket/init.lua | 81 | <SHARE>/socket/init.lua |
78 | <ROOT>/socket/core.dll | 82 | <LIB>/socket/core.dll |
79 | <ROOT>/socket/http.lua | 83 | <SHARE>/socket/http.lua |
80 | <ROOT>/socket/tp.lua | 84 | <SHARE>/socket/tp.lua |
81 | <ROOT>/socket/ftp.lua | 85 | <SHARE>/socket/ftp.lua |
82 | <ROOT>/socket/smtp.lua | 86 | <SHARE>/socket/smtp.lua |
83 | <ROOT>/socket/url.lua | 87 | <SHARE>/socket/url.lua |
84 | </pre> | 88 | </pre> |
85 | 89 | ||
86 | <p> Naturally, on Unix systems, <tt>core.dll</tt> | 90 | <p> Naturally, on Unix systems, <tt>core.dll</tt> |
@@ -91,7 +95,7 @@ environment variables need to be set. The first environment variable tells | |||
91 | the interpreter to load the <tt>compat-5.1.lua</tt> module at startup: </p> | 95 | the interpreter to load the <tt>compat-5.1.lua</tt> module at startup: </p> |
92 | 96 | ||
93 | <pre class=example> | 97 | <pre class=example> |
94 | LUA_INIT=@<ROOT>/compat-5.1.lua | 98 | LUA_INIT=@<SHARE>/compat-5.1.lua |
95 | </pre> | 99 | </pre> |
96 | 100 | ||
97 | <p> | 101 | <p> |
@@ -101,13 +105,12 @@ directories and with the appropriate filename extensions. | |||
101 | </p> | 105 | </p> |
102 | 106 | ||
103 | <pre class=example> | 107 | <pre class=example> |
104 | LUA_PATH=<ROOT>/?.lua;?.lua | 108 | LUA_PATH=<SHARE>/?.lua;?.lua |
105 | LUA_CPATH=<ROOT>/?.dll;?.dll | 109 | LUA_CPATH=<LIB>/?.dll;?.dll |
106 | </pre> | 110 | </pre> |
107 | 111 | ||
108 | <p> Again, naturally, in Unix the shared library extension would be | 112 | <p> Again, naturally, on Unix systmems the shared library extension would be |
109 | <tt>.so</tt> instead of <tt>.dll</tt> and on Mac OS X it would be | 113 | <tt>.so</tt> instead of <tt>.dll</tt></p> |
110 | <tt>.dylib</tt></p> | ||
111 | 114 | ||
112 | <h3>Using LuaSocket</h3> | 115 | <h3>Using LuaSocket</h3> |
113 | 116 | ||
@@ -118,8 +121,8 @@ it should be easy to use LuaSocket. Just fire the interpreter and use the | |||
118 | <pre class=example> | 121 | <pre class=example> |
119 | Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio | 122 | Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio |
120 | > socket = require("socket") | 123 | > socket = require("socket") |
121 | > print(socket.VERSION) | 124 | > print(socket._VERSION) |
122 | --> LuaSocket 2.0 (beta3) | 125 | --> LuaSocket 2.0 |
123 | </pre> | 126 | </pre> |
124 | 127 | ||
125 | <p> Each module loads their dependencies automatically, so you only need to | 128 | <p> Each module loads their dependencies automatically, so you only need to |
@@ -128,7 +131,8 @@ load the modues you directly depend upon: <p> | |||
128 | <pre class=example> | 131 | <pre class=example> |
129 | Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio | 132 | Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio |
130 | > http = require("socket.http") | 133 | > http = require("socket.http") |
131 | > print(http.request("http://www.tecgraf.puc-rio.br/luasocket")) | 134 | > |
135 | print(http.request("http://www.cs.princeton.edu/~diego/professional/luasocket")) | ||
132 | --> homepage gets dumped to terminal | 136 | --> homepage gets dumped to terminal |
133 | </pre> | 137 | </pre> |
134 | 138 | ||