aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-09-29 06:11:42 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-09-29 06:11:42 +0000
commita32c6d91402329adb769c4fe8bbb24f0d4e99051 (patch)
tree8b3f574b479e84bd9fe086db49cbab551eac75c8 /doc
parent773e35ced30fa2c03ddb2a332bf8a9aebb56aa44 (diff)
downloadluasocket-a32c6d91402329adb769c4fe8bbb24f0d4e99051.tar.gz
luasocket-a32c6d91402329adb769c4fe8bbb24f0d4e99051.tar.bz2
luasocket-a32c6d91402329adb769c4fe8bbb24f0d4e99051.zip
Almost ready to release.
Diffstat (limited to 'doc')
-rw-r--r--doc/installation.html54
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
67the libraries installed 67directories, one for system dependent files, and another for system
68on a given system. Let's call this directory <tt>&lt;ROOT&gt;</tt>. 68independent files. Let's call these directories <tt>&lt;LIB&gt;</tt>
69On my system, this is the <tt>/usr/local/share/lua/5.0</tt> directory. 69and <tt>&lt;SHARE&gt;</tt>, respectively.
70Here is the standard LuaSocket distribution directory structure:</p> 70For instance, in my laptop, I use '<tt>/usr/local/lib/lua/5.0</tt>' for
71<tt>&lt;LIB&gt;</tt> and '<tt>/usr/local/share/lua/5.0</tt>' for
72<tt>&lt;SHARE&gt;</tt>. On Windows, only one directory is used, say
73'<tt>c:\program files\lua\5.0</tt>'. Here is the standard LuaSocket
74distribution directory structure:</p>
71 75
72<pre class=example> 76<pre class=example>
73&lt;ROOT&gt;/compat-5.1.lua 77&lt;SHARE&gt;/compat-5.1.lua
74&lt;ROOT&gt;/ltn12.lua 78&lt;SHARE&gt;/ltn12.lua
75&lt;ROOT&gt;/mime/init.lua 79&lt;SHARE&gt;/mime/init.lua
76&lt;ROOT&gt;/mime/core.dll 80&lt;LIB&gt;/mime/core.dll
77&lt;ROOT&gt;/socket/init.lua 81&lt;SHARE&gt;/socket/init.lua
78&lt;ROOT&gt;/socket/core.dll 82&lt;LIB&gt;/socket/core.dll
79&lt;ROOT&gt;/socket/http.lua 83&lt;SHARE&gt;/socket/http.lua
80&lt;ROOT&gt;/socket/tp.lua 84&lt;SHARE&gt;/socket/tp.lua
81&lt;ROOT&gt;/socket/ftp.lua 85&lt;SHARE&gt;/socket/ftp.lua
82&lt;ROOT&gt;/socket/smtp.lua 86&lt;SHARE&gt;/socket/smtp.lua
83&lt;ROOT&gt;/socket/url.lua 87&lt;SHARE&gt;/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
91the interpreter to load the <tt>compat-5.1.lua</tt> module at startup: </p> 95the interpreter to load the <tt>compat-5.1.lua</tt> module at startup: </p>
92 96
93<pre class=example> 97<pre class=example>
94LUA_INIT=@&lt;ROOT&gt;/compat-5.1.lua 98LUA_INIT=@&lt;SHARE&gt;/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>
104LUA_PATH=&lt;ROOT&gt;/?.lua;?.lua 108LUA_PATH=&lt;SHARE&gt;/?.lua;?.lua
105LUA_CPATH=&lt;ROOT&gt;/?.dll;?.dll 109LUA_CPATH=&lt;LIB&gt;/?.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>
119Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio 122Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
120&gt; socket = require("socket") 123&gt; socket = require("socket")
121&gt; print(socket.VERSION) 124&gt; print(socket._VERSION)
122--&gt; LuaSocket 2.0 (beta3) 125--&gt; 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>
129Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio 132Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
130&gt; http = require("socket.http") 133&gt; http = require("socket.http")
131&gt; print(http.request("http://www.tecgraf.puc-rio.br/luasocket")) 134&gt;
135print(http.request("http://www.cs.princeton.edu/~diego/professional/luasocket"))
132--&gt; homepage gets dumped to terminal 136--&gt; homepage gets dumped to terminal
133</pre> 137</pre>
134 138