diff options
28 files changed, 2 insertions, 1471 deletions
diff --git a/lfw/7z.dll b/lfw/7z.dll deleted file mode 100644 index c0ff7fbe..00000000 --- a/lfw/7z.dll +++ /dev/null | |||
Binary files differ | |||
diff --git a/lfw/7z.exe b/lfw/7z.exe deleted file mode 100644 index 5e3d6f9c..00000000 --- a/lfw/7z.exe +++ /dev/null | |||
Binary files differ | |||
diff --git a/lfw/lua/luarocks/config.lua b/lfw/lua/luarocks/config.lua deleted file mode 100644 index fd0e2fb9..00000000 --- a/lfw/lua/luarocks/config.lua +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | local os = os | ||
2 | |||
3 | module("luarocks.config") | ||
4 | LFW_ROOT = os.getenv("LUA_DEV") | ||
5 | LUA_INCDIR=LFW_ROOT..[[\include]] | ||
6 | LUA_LIBDIR=LFW_ROOT..[[\lib]] | ||
7 | LUA_BINDIR=LFW_ROOT | ||
8 | LUA_INTERPRETER=[[lua]] | ||
9 | LUAROCKS_UNAME_S=[[WindowsNT]] | ||
10 | LUAROCKS_UNAME_M=[[x86]] | ||
11 | LUAROCKS_SYSCONFIG=LFW_ROOT..[[\luarocks_config.lua]] | ||
12 | LUAROCKS_ROCKS_TREE=LFW_ROOT | ||
13 | LUAROCKS_PREFIX=LFW_ROOT | ||
14 | LUAROCKS_DOWNLOADER=[[wget]] | ||
15 | LUAROCKS_MD5CHECKER=[[md5sum]] | ||
16 | |||
diff --git a/lfw/luarocks-admin.bat b/lfw/luarocks-admin.bat deleted file mode 100644 index fb95d0fa..00000000 --- a/lfw/luarocks-admin.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @ECHO OFF | ||
2 | SETLOCAL | ||
3 | "%LUA_DEV%\lua" "%LUA_DEV%\luarocks-admin.lua" %* | ||
4 | ENDLOCAL | ||
diff --git a/lfw/luarocks-admin.lua b/lfw/luarocks-admin.lua deleted file mode 100644 index 4f7a9a2f..00000000 --- a/lfw/luarocks-admin.lua +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #!/usr/local/bin/lua | ||
2 | |||
3 | local command_line = require("luarocks.command_line") | ||
4 | |||
5 | program_name = "luarocks-admin" | ||
6 | program_description = "LuaRocks repository administration interface" | ||
7 | |||
8 | commands = { | ||
9 | } | ||
10 | |||
11 | commands.help = require("luarocks.help") | ||
12 | commands.make_manifest = require("luarocks.make_manifest") | ||
13 | commands.add = require("luarocks.add") | ||
14 | commands.refresh_cache = require("luarocks.refresh_cache") | ||
15 | |||
16 | command_line.run_command(...) | ||
diff --git a/lfw/luarocks.bat b/lfw/luarocks.bat deleted file mode 100644 index 44360aa5..00000000 --- a/lfw/luarocks.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @ECHO OFF | ||
2 | SETLOCAL | ||
3 | "%LUA_DEV%\lua" "%LUA_DEV%\luarocks.lua" %* | ||
4 | ENDLOCAL | ||
diff --git a/lfw/luarocks.lua b/lfw/luarocks.lua deleted file mode 100644 index 1c781254..00000000 --- a/lfw/luarocks.lua +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #!/usr/local/bin/lua | ||
2 | |||
3 | local command_line = require("luarocks.command_line") | ||
4 | |||
5 | program_name = "luarocks" | ||
6 | program_description = "LuaRocks main command-line interface" | ||
7 | |||
8 | commands = {} | ||
9 | commands.help = require("luarocks.help") | ||
10 | commands.pack = require("luarocks.pack") | ||
11 | commands.unpack = require("luarocks.unpack") | ||
12 | commands.build = require("luarocks.build") | ||
13 | commands.install = require("luarocks.install") | ||
14 | commands.search = require("luarocks.search") | ||
15 | commands.list = require("luarocks.list") | ||
16 | commands.remove = require("luarocks.remove") | ||
17 | commands.make = require("luarocks.make") | ||
18 | commands.download = require("luarocks.download") | ||
19 | |||
20 | command_line.run_command(...) | ||
diff --git a/lfw/luarocks_config.lua b/lfw/luarocks_config.lua deleted file mode 100644 index 557890f4..00000000 --- a/lfw/luarocks_config.lua +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | local LFW_ROOT = config.LFW_ROOT | ||
2 | rocks_servers = { | ||
3 | [[http://luarocks.org/repositories/rocks]] | ||
4 | } | ||
5 | rocks_trees = { | ||
6 | { root = LFW_ROOT, rocks_dir = LFW_ROOT..[[\rocks]], | ||
7 | bin_dir = LFW_ROOT, lua_dir = LFW_ROOT..[[\lua]], | ||
8 | lib_dir = LFW_ROOT..[[\clibs]] } | ||
9 | } | ||
10 | variables.WRAPPER = LFW_ROOT..[[\rclauncher.c]] | ||
diff --git a/lfw/rclauncher.o b/lfw/rclauncher.o deleted file mode 100644 index 0fe5d95f..00000000 --- a/lfw/rclauncher.o +++ /dev/null | |||
Binary files differ | |||
diff --git a/lfw/rclauncher.obj b/lfw/rclauncher.obj deleted file mode 100644 index 86a32795..00000000 --- a/lfw/rclauncher.obj +++ /dev/null | |||
Binary files differ | |||
diff --git a/lfw/rocks/index.html b/lfw/rocks/index.html deleted file mode 100644 index d6baff47..00000000 --- a/lfw/rocks/index.html +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Available rocks</title> | ||
5 | <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> | ||
6 | <style> | ||
7 | body { | ||
8 | background-color: white; | ||
9 | font-family: "bitstream vera sans", "verdana", "sans"; | ||
10 | font-size: 14px; | ||
11 | } | ||
12 | a { | ||
13 | color: #0000c0; | ||
14 | text-decoration: none; | ||
15 | } | ||
16 | a:hover { | ||
17 | text-decoration: underline; | ||
18 | } | ||
19 | td.main { | ||
20 | border-style: none; | ||
21 | } | ||
22 | blockquote { | ||
23 | font-size: 12px; | ||
24 | } | ||
25 | td.package { | ||
26 | background-color: #f0f0f0; | ||
27 | vertical-align: top; | ||
28 | } | ||
29 | td.spacer { | ||
30 | height: 5px; | ||
31 | } | ||
32 | td.version { | ||
33 | background-color: #d0d0d0; | ||
34 | vertical-align: top; | ||
35 | text-align: left; | ||
36 | padding: 5px; | ||
37 | width: 100px; | ||
38 | } | ||
39 | p.manifest { | ||
40 | font-size: 8px; | ||
41 | } | ||
42 | </style> | ||
43 | </head> | ||
44 | <body> | ||
45 | <h1>Available rocks</h1> | ||
46 | <p> | ||
47 | Lua modules available from this location for use with <a href="http://www.luarocks.org">LuaRocks</a>: | ||
48 | </p> | ||
49 | <table class="main"> | ||
50 | <td class="package"> | ||
51 | <p><a name="luafilesystem"></a><b>luafilesystem</b> - <br/> | ||
52 | </p><blockquote><p><br/> | ||
53 | <font size="-1"><a href="">latest sources</a> | License: </font></p> | ||
54 | </blockquote></a></td> | ||
55 | <td class="version"> | ||
56 | 1.5.0-1: <a href="luafilesystem-1.5.0-1.installed.rock">installed</a><br/></td></tr> | ||
57 | <tr><td colspan="2" class="spacer"></td></tr> | ||
58 | <td class="package"> | ||
59 | <p><a name="luasocket"></a><b>luasocket</b> - <br/> | ||
60 | </p><blockquote><p><br/> | ||
61 | <font size="-1"><a href="">latest sources</a> | License: </font></p> | ||
62 | </blockquote></a></td> | ||
63 | <td class="version"> | ||
64 | 2.0.2-3: <a href="luasocket-2.0.2-3.installed.rock">installed</a><br/></td></tr> | ||
65 | <tr><td colspan="2" class="spacer"></td></tr> | ||
66 | <td class="package"> | ||
67 | <p><a name="luazip"></a><b>luazip</b> - <br/> | ||
68 | </p><blockquote><p><br/> | ||
69 | <font size="-1"><a href="">latest sources</a> | License: </font></p> | ||
70 | </blockquote></a></td> | ||
71 | <td class="version"> | ||
72 | 1.2.3-2: <a href="luazip-1.2.3-2.installed.rock">installed</a><br/></td></tr> | ||
73 | <tr><td colspan="2" class="spacer"></td></tr> | ||
74 | <td class="package"> | ||
75 | <p><a name="md5"></a><b>md5</b> - <br/> | ||
76 | </p><blockquote><p><br/> | ||
77 | <font size="-1"><a href="">latest sources</a> | License: </font></p> | ||
78 | </blockquote></a></td> | ||
79 | <td class="version"> | ||
80 | 1.1.2-1: <a href="md5-1.1.2-1.installed.rock">installed</a><br/></td></tr> | ||
81 | <tr><td colspan="2" class="spacer"></td></tr> | ||
82 | </table> | ||
83 | <p class="manifest"> | ||
84 | <a href="manifest">manifest file</a> | ||
85 | </p> | ||
86 | </body> | ||
87 | </html> | ||
diff --git a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/examples.html b/lfw/rocks/luafilesystem/1.5.0-1/doc/us/examples.html deleted file mode 100644 index 746df62b..00000000 --- a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/examples.html +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
4 | <head> | ||
5 | <title>LuaFileSystem</title> | ||
6 | <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> | ||
7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
8 | </head> | ||
9 | |||
10 | <body> | ||
11 | |||
12 | <div id="container"> | ||
13 | |||
14 | <div id="product"> | ||
15 | <div id="product_logo"> | ||
16 | <a href="http://www.keplerproject.org"> | ||
17 | <img alt="LuaFileSystem" src="luafilesystem.png"/> | ||
18 | </a> | ||
19 | </div> | ||
20 | <div id="product_name"><big><strong>LuaFileSystem</strong></big></div> | ||
21 | <div id="product_description">File System Library for the Lua Programming Language</div> | ||
22 | </div> <!-- id="product" --> | ||
23 | |||
24 | <div id="main"> | ||
25 | |||
26 | <div id="navigation"> | ||
27 | <h1>LuaFileSystem</h1> | ||
28 | <ul> | ||
29 | <li><a href="index.html">Home</a> | ||
30 | <ul> | ||
31 | <li><a href="index.html#overview">Overview</a></li> | ||
32 | <li><a href="index.html#status">Status</a></li> | ||
33 | <li><a href="index.html#download">Download</a></li> | ||
34 | <li><a href="index.html#history">History</a></li> | ||
35 | <li><a href="index.html#credits">Credits</a></li> | ||
36 | <li><a href="index.html#contact">Contact us</a></li> | ||
37 | </ul> | ||
38 | </li> | ||
39 | <li><a href="manual.html">Manual</a> | ||
40 | <ul> | ||
41 | <li><a href="manual.html#introduction">Introduction</a></li> | ||
42 | <li><a href="manual.html#building">Building</a></li> | ||
43 | <li><a href="manual.html#installation">Installation</a></li> | ||
44 | <li><a href="manual.html#reference">Reference</a></li> | ||
45 | </ul> | ||
46 | </li> | ||
47 | <li><strong>Examples</strong></li> | ||
48 | <li><a href="http://luaforge.net/projects/luafilesystem/">Project</a> | ||
49 | <ul> | ||
50 | <li><a href="http://luaforge.net/tracker/?group_id=66">Bug Tracker</a></li> | ||
51 | <li><a href="http://luaforge.net/scm/?group_id=66">CVS</a></li> | ||
52 | </ul> | ||
53 | </li> | ||
54 | <li><a href="license.html">License</a></li> | ||
55 | </ul> | ||
56 | </div> <!-- id="navigation" --> | ||
57 | |||
58 | <div id="content"> | ||
59 | |||
60 | <h2><a name="example"></a>Examples</h2> | ||
61 | |||
62 | <h3>Directory iterator</h3> | ||
63 | |||
64 | <p>The following example iterates over a directory and recursively lists the | ||
65 | attributes for each file inside it.</p> | ||
66 | |||
67 | <pre class="example"> | ||
68 | require"lfs" | ||
69 | |||
70 | function attrdir (path) | ||
71 | for file in lfs.dir(path) do | ||
72 | if file ~= "." and file ~= ".." then | ||
73 | local f = path..'/'..file | ||
74 | print ("\t "..f) | ||
75 | local attr = lfs.attributes (f) | ||
76 | assert (type(attr) == "table") | ||
77 | if attr.mode == "directory" then | ||
78 | attrdir (f) | ||
79 | else | ||
80 | for name, value in pairs(attr) do | ||
81 | print (name, value) | ||
82 | end | ||
83 | end | ||
84 | end | ||
85 | end | ||
86 | end | ||
87 | |||
88 | attrdir (".") | ||
89 | </pre> | ||
90 | |||
91 | </div> <!-- id="content" --> | ||
92 | |||
93 | </div> <!-- id="main" --> | ||
94 | |||
95 | <div id="about"> | ||
96 | <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p> | ||
97 | <p><small>$Id: examples.html,v 1.8 2007/12/14 15:28:04 carregal Exp $</small></p> | ||
98 | </div> <!-- id="about" --> | ||
99 | |||
100 | </div> <!-- id="container" --> | ||
101 | |||
102 | </body> | ||
103 | </html> | ||
diff --git a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/index.html b/lfw/rocks/luafilesystem/1.5.0-1/doc/us/index.html deleted file mode 100644 index 43edefc5..00000000 --- a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/index.html +++ /dev/null | |||
@@ -1,192 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
4 | <head> | ||
5 | <title>LuaFileSystem</title> | ||
6 | <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> | ||
7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
8 | </head> | ||
9 | |||
10 | <body> | ||
11 | |||
12 | <div id="container"> | ||
13 | |||
14 | <div id="product"> | ||
15 | <div id="product_logo"> | ||
16 | <a href="http://www.keplerproject.org"> | ||
17 | <img alt="LuaFileSystem" src="luafilesystem.png"/> | ||
18 | </a> | ||
19 | </div> | ||
20 | <div id="product_name"><big><strong>LuaFileSystem</strong></big></div> | ||
21 | <div id="product_description">File System Library for the Lua Programming Language</div> | ||
22 | </div> <!-- id="product" --> | ||
23 | |||
24 | <div id="main"> | ||
25 | |||
26 | <div id="navigation"> | ||
27 | <h1>LuaFileSystem</h1> | ||
28 | <ul> | ||
29 | <li><strong>Home</strong> | ||
30 | <ul> | ||
31 | <li><a href="index.html#overview">Overview</a></li> | ||
32 | <li><a href="index.html#status">Status</a></li> | ||
33 | <li><a href="index.html#download">Download</a></li> | ||
34 | <li><a href="index.html#history">History</a></li> | ||
35 | <li><a href="index.html#credits">Credits</a></li> | ||
36 | <li><a href="index.html#contact">Contact us</a></li> | ||
37 | </ul> | ||
38 | </li> | ||
39 | <li><a href="manual.html">Manual</a> | ||
40 | <ul> | ||
41 | <li><a href="manual.html#introduction">Introduction</a></li> | ||
42 | <li><a href="manual.html#building">Building</a></li> | ||
43 | <li><a href="manual.html#installation">Installation</a></li> | ||
44 | <li><a href="manual.html#reference">Reference</a></li> | ||
45 | </ul> | ||
46 | </li> | ||
47 | <li><a href="examples.html">Examples</a></li> | ||
48 | <li><a href="http://luaforge.net/projects/luafilesystem/">Project</a> | ||
49 | <ul> | ||
50 | <li><a href="http://luaforge.net/tracker/?group_id=66">Bug Tracker</a></li> | ||
51 | <li><a href="http://luaforge.net/scm/?group_id=66">CVS</a></li> | ||
52 | </ul> | ||
53 | </li> | ||
54 | <li><a href="license.html">License</a></li> | ||
55 | </ul> | ||
56 | </div> <!-- id="navigation" --> | ||
57 | |||
58 | <div id="content"> | ||
59 | |||
60 | <h2><a name="overview"></a>Overview</h2> | ||
61 | |||
62 | <p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library | ||
63 | developed to complement the set of functions related to file | ||
64 | systems offered by the standard Lua distribution.</p> | ||
65 | |||
66 | <p>LuaFileSystem offers a portable way to access | ||
67 | the underlying directory structure and file attributes.</p> | ||
68 | |||
69 | <p>LuaFileSystem is free software and uses the same | ||
70 | <a href="license.html">license</a> as Lua 5.1.</p> | ||
71 | |||
72 | <h2><a name="status"></a>Status</h2> | ||
73 | |||
74 | <p>Current version is 1.5.0. It was developed for Lua 5.1.</p> | ||
75 | |||
76 | <h2><a name="download"></a>Download</h2> | ||
77 | |||
78 | <p>LuaFileSystem source can be downloaded from its | ||
79 | <a href="http://github.com/keplerproject/luafilesystem">Github</a> | ||
80 | page.</p> | ||
81 | |||
82 | <h2><a name="history"></a>History</h2> | ||
83 | |||
84 | <dl class="history"> | ||
85 | <dt><strong>Version 1.5.0</strong> [20/Oct/2009]</dt> | ||
86 | <li>Added explicit next and close methods to second return value of lfs.dir | ||
87 | (the directory object), for explicit iteration or explicit closing.</li> | ||
88 | <li>Added directory locking via lfs.lock_dir function (see the <a href="manual.html">manual</a>).</li> | ||
89 | <dt><strong>Version 1.4.2</strong> [03/Feb/2009]</dt> | ||
90 | <dd> | ||
91 | <ul> | ||
92 | <li>fixed bug [<a href="http://luaforge.net/tracker/?func=detail&group_id=66&aid=13198&atid=356">#13198</a>] | ||
93 | lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).</li> | ||
94 | <li>fixed bug [<a href="http://luaforge.net/tracker/?group_id=66&atid=356&func=detail&aid=39794">#39794</a>] | ||
95 | Compile error on Solaris 10 (bug report and patch by Aaron B).</li> | ||
96 | <li>fixed compilation problems with Borland C.</li> | ||
97 | </ul> | ||
98 | </dd> | ||
99 | |||
100 | <dt><strong>Version 1.4.1</strong> [07/May/2008]</dt> | ||
101 | <dd> | ||
102 | <ul> | ||
103 | <li>documentation review</li> | ||
104 | <li>fixed Windows compilation issues</li> | ||
105 | <li>fixed bug in the Windows tests (patch by Shmuel Zeigerman)</li> | ||
106 | <li>fixed bug [<a href="http://luaforge.net/tracker/?func=detail&group_id=66&aid=2185&atid=356">#2185</a>] | ||
107 | <code>lfs.attributes(filename, 'size')</code> overflow on files > 2 Gb | ||
108 | </li> | ||
109 | </ul> | ||
110 | </dd> | ||
111 | |||
112 | <dt><strong>Version 1.4.0</strong> [13/Feb/2008]</dt> | ||
113 | <dd> | ||
114 | <ul> | ||
115 | <li>added function | ||
116 | <a href="manual.html#setmode"><code>lfs.setmode</code></a> | ||
117 | (works only in Windows systems).</li> | ||
118 | <li><a href="manual.html#attributes"><code>lfs.attributes</code></a> | ||
119 | raises an error if attribute does not exist</li> | ||
120 | </ul> | ||
121 | </dd> | ||
122 | |||
123 | <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.3/">Version 1.3.0</a></strong> [26/Oct/2007]</dt> | ||
124 | <dd> | ||
125 | <ul> | ||
126 | <li>added function | ||
127 | <a href="manual.html#symlinkattributes"><code>lfs.symlinkattributes</code></a> | ||
128 | (works only in non Windows systems).</li> | ||
129 | </ul> | ||
130 | </dd> | ||
131 | |||
132 | <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.2/">Version 1.2.1</a></strong> [08/May/2007]</dt> | ||
133 | <dd> | ||
134 | <ul> | ||
135 | <li>compatible only with Lua 5.1 (Lua 5.0 support was dropped)</li> | ||
136 | </ul> | ||
137 | </dd> | ||
138 | |||
139 | <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.2/">Version 1.2</a></strong> [15/Mar/2006]</dt> | ||
140 | <dd> | ||
141 | <ul> | ||
142 | <li>added optional argument to | ||
143 | <a href="manual.html#attributes"><code>lfs.attributes</code></a></li> | ||
144 | <li>added function | ||
145 | <a href="manual.html#rmdir"><code>lfs.rmdir</code></a></li> | ||
146 | <li>bug correction on <a href="manual.html#dir"><code>lfs.dir</code></a></li> | ||
147 | </ul> | ||
148 | </dd> | ||
149 | |||
150 | <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.1/">Version 1.1</a></strong> [30/May/2005]</dt> | ||
151 | <dd> | ||
152 | <ul> | ||
153 | <li>added function <a href="manual.html#touch"><code>lfs.touch</code></a>.</li> | ||
154 | </ul> | ||
155 | </dd> | ||
156 | |||
157 | <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.0/">Version 1.0</a></strong> [21/Jan/2005]</dt> | ||
158 | <dd /> | ||
159 | |||
160 | <dt><strong>Version 1.0 Beta</strong> [10/Nov/2004]</dt> | ||
161 | <dd /> | ||
162 | </dl> | ||
163 | |||
164 | <h2><a name="credits"></a>Credits</h2> | ||
165 | |||
166 | <p>LuaFileSystem was designed by Roberto Ierusalimschy, | ||
167 | André Carregal and Tomás Guisasola as part of the | ||
168 | <a href="http://www.keplerproject.org">Kepler Project</a>, | ||
169 | which holds its copyright. LuaFileSystem is currently maintained by Fábio Mascarenhas.</p> | ||
170 | |||
171 | <h2><a name="contact"></a>Contact us</h2> | ||
172 | |||
173 | <p>For more information please | ||
174 | <a href="mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>. | ||
175 | Comments are welcome!</p> | ||
176 | |||
177 | <p>You can also reach other Kepler developers and users on the Kepler Project | ||
178 | <a href="http://luaforge.net/mail/?group_id=104">mailing list</a>.</p> | ||
179 | |||
180 | </div> <!-- id="content" --> | ||
181 | |||
182 | </div> <!-- id="main" --> | ||
183 | |||
184 | <div id="about"> | ||
185 | <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p> | ||
186 | <p><small>$Id: index.html,v 1.44 2009/02/04 21:21:33 carregal Exp $</small></p> | ||
187 | </div> <!-- id="about" --> | ||
188 | |||
189 | </div> <!-- id="container" --> | ||
190 | |||
191 | </body> | ||
192 | </html> | ||
diff --git a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/license.html b/lfw/rocks/luafilesystem/1.5.0-1/doc/us/license.html deleted file mode 100644 index 4ecad4bd..00000000 --- a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/license.html +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
4 | <head> | ||
5 | <title>LuaFileSystem</title> | ||
6 | <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> | ||
7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
8 | </head> | ||
9 | |||
10 | <body> | ||
11 | |||
12 | <div id="container"> | ||
13 | |||
14 | <div id="product"> | ||
15 | <div id="product_logo"> | ||
16 | <a href="http://www.keplerproject.org"> | ||
17 | <img alt="LuaFileSystem" src="luafilesystem.png"/> | ||
18 | </a> | ||
19 | </div> | ||
20 | <div id="product_name"><big><strong>LuaFileSystem</strong></big></div> | ||
21 | <div id="product_description">File System Library for the Lua Programming Language</div> | ||
22 | </div> <!-- id="product" --> | ||
23 | |||
24 | <div id="main"> | ||
25 | |||
26 | <div id="navigation"> | ||
27 | <h1>LuaFileSystem</h1> | ||
28 | <ul> | ||
29 | <li><a href="index.html">Home</a> | ||
30 | <ul> | ||
31 | <li><a href="index.html#overview">Overview</a></li> | ||
32 | <li><a href="index.html#status">Status</a></li> | ||
33 | <li><a href="index.html#download">Download</a></li> | ||
34 | <li><a href="index.html#history">History</a></li> | ||
35 | <li><a href="index.html#credits">Credits</a></li> | ||
36 | <li><a href="index.html#contact">Contact us</a></li> | ||
37 | </ul> | ||
38 | </li> | ||
39 | <li><a href="manual.html">Manual</a> | ||
40 | <ul> | ||
41 | <li><a href="manual.html#introduction">Introduction</a></li> | ||
42 | <li><a href="manual.html#building">Building</a></li> | ||
43 | <li><a href="manual.html#installation">Installation</a></li> | ||
44 | <li><a href="manual.html#reference">Reference</a></li> | ||
45 | </ul> | ||
46 | </li> | ||
47 | <li><a href="examples.html">Examples</a></li> | ||
48 | <li><a href="http://luaforge.net/projects/luafilesystem/">Project</a> | ||
49 | <ul> | ||
50 | <li><a href="http://luaforge.net/tracker/?group_id=66">Bug Tracker</a></li> | ||
51 | <li><a href="http://luaforge.net/scm/?group_id=66">CVS</a></li> | ||
52 | </ul> | ||
53 | </li> | ||
54 | <li><strong>License</strong></li> | ||
55 | </ul> | ||
56 | </div> <!-- id="navigation" --> | ||
57 | |||
58 | <div id="content"> | ||
59 | |||
60 | <h1>License</h1> | ||
61 | |||
62 | <p> | ||
63 | LuaFileSystem is free software: it can be used for both academic | ||
64 | and commercial purposes at absolutely no cost. There are no | ||
65 | royalties or GNU-like "copyleft" restrictions. LuaFileSystem | ||
66 | qualifies as | ||
67 | <a href="http://www.opensource.org/docs/definition.html">Open Source</a> | ||
68 | software. | ||
69 | Its licenses are compatible with | ||
70 | <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. | ||
71 | LuaFileSystem is not in the public domain and the | ||
72 | <a href="http://www.keplerproject.org">Kepler Project</a> | ||
73 | keep its copyright. | ||
74 | The legal details are below. | ||
75 | </p> | ||
76 | |||
77 | <p>The spirit of the license is that you are free to use | ||
78 | LuaFileSystem for any purpose at no cost without having to ask us. | ||
79 | The only requirement is that if you do use LuaFileSystem, then you | ||
80 | should give us credit by including the appropriate copyright notice | ||
81 | somewhere in your product or its documentation.</p> | ||
82 | |||
83 | <p>The LuaFileSystem library is designed and implemented by Roberto | ||
84 | Ierusalimschy, André Carregal and Tomás Guisasola. | ||
85 | The implementation is not derived from licensed software.</p> | ||
86 | |||
87 | <hr/> | ||
88 | <p>Copyright © 2003 Kepler Project.</p> | ||
89 | |||
90 | <p>Permission is hereby granted, free of charge, to any person | ||
91 | obtaining a copy of this software and associated documentation | ||
92 | files (the "Software"), to deal in the Software without | ||
93 | restriction, including without limitation the rights to use, copy, | ||
94 | modify, merge, publish, distribute, sublicense, and/or sell copies | ||
95 | of the Software, and to permit persons to whom the Software is | ||
96 | furnished to do so, subject to the following conditions:</p> | ||
97 | |||
98 | <p>The above copyright notice and this permission notice shall be | ||
99 | included in all copies or substantial portions of the Software.</p> | ||
100 | |||
101 | <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
102 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
103 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
104 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
105 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
106 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
107 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
108 | SOFTWARE.</p> | ||
109 | |||
110 | </div> <!-- id="content" --> | ||
111 | |||
112 | </div> <!-- id="main" --> | ||
113 | |||
114 | <div id="about"> | ||
115 | <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p> | ||
116 | <p><small>$Id: license.html,v 1.13 2008/02/11 22:42:21 carregal Exp $</small></p> | ||
117 | </div><!-- id="about" --> | ||
118 | |||
119 | </div><!-- id="container" --> | ||
120 | |||
121 | </body> | ||
122 | </html> | ||
diff --git a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/luafilesystem.png b/lfw/rocks/luafilesystem/1.5.0-1/doc/us/luafilesystem.png deleted file mode 100644 index e1dd8c65..00000000 --- a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/luafilesystem.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/manual.html b/lfw/rocks/luafilesystem/1.5.0-1/doc/us/manual.html deleted file mode 100644 index 1409c404..00000000 --- a/lfw/rocks/luafilesystem/1.5.0-1/doc/us/manual.html +++ /dev/null | |||
@@ -1,271 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
4 | <head> | ||
5 | <title>LuaFileSystem</title> | ||
6 | <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> | ||
7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
8 | </head> | ||
9 | |||
10 | <body> | ||
11 | |||
12 | <div id="container"> | ||
13 | |||
14 | <div id="product"> | ||
15 | <div id="product_logo"> | ||
16 | <a href="http://www.keplerproject.org"><img alt="LuaFileSystem" src="luafilesystem.png"/></a> | ||
17 | </div> | ||
18 | <div id="product_name"><big><strong>LuaFileSystem</strong></big></div> | ||
19 | <div id="product_description">File System Library for the Lua Programming Language</div> | ||
20 | </div> <!-- id="product" --> | ||
21 | |||
22 | <div id="main"> | ||
23 | |||
24 | <div id="navigation"> | ||
25 | <h1>LuaFileSystem</h1> | ||
26 | <ul> | ||
27 | <li><a href="index.html">Home</a> | ||
28 | <ul> | ||
29 | <li><a href="index.html#overview">Overview</a></li> | ||
30 | <li><a href="index.html#status">Status</a></li> | ||
31 | <li><a href="index.html#download">Download</a></li> | ||
32 | <li><a href="index.html#history">History</a></li> | ||
33 | <li><a href="index.html#credits">Credits</a></li> | ||
34 | <li><a href="index.html#contact">Contact us</a></li> | ||
35 | </ul> | ||
36 | </li> | ||
37 | <li><strong>Manual</strong> | ||
38 | <ul> | ||
39 | <li><a href="manual.html#introduction">Introduction</a></li> | ||
40 | <li><a href="manual.html#building">Building</a></li> | ||
41 | <li><a href="manual.html#installation">Installation</a></li> | ||
42 | <li><a href="manual.html#reference">Reference</a></li> | ||
43 | </ul> | ||
44 | </li> | ||
45 | <li><a href="examples.html">Examples</a></li> | ||
46 | <li><a href="http://luaforge.net/projects/luafilesystem/">Project</a> | ||
47 | <ul> | ||
48 | <li><a href="http://luaforge.net/tracker/?group_id=66">Bug Tracker</a></li> | ||
49 | <li><a href="http://luaforge.net/scm/?group_id=66">CVS</a></li> | ||
50 | </ul> | ||
51 | </li> | ||
52 | <li><a href="license.html">License</a></li> | ||
53 | </ul> | ||
54 | </div> <!-- id="navigation" --> | ||
55 | |||
56 | <div id="content"> | ||
57 | |||
58 | <h2><a name="introduction"></a>Introduction</h2> | ||
59 | |||
60 | <p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library | ||
61 | developed to complement the set of functions related to file | ||
62 | systems offered by the standard Lua distribution.</p> | ||
63 | |||
64 | <p>LuaFileSystem offers a portable way to access | ||
65 | the underlying directory structure and file attributes.</p> | ||
66 | |||
67 | <h2><a name="building"></a>Building</h2> | ||
68 | |||
69 | <p> | ||
70 | LuaFileSystem should be built with Lua 5.1 so the language library | ||
71 | and header files for the target version must be installed properly. | ||
72 | </p> | ||
73 | |||
74 | <p> | ||
75 | LuaFileSystem offers a Makefile and a separate configuration file, | ||
76 | <code>config</code>, | ||
77 | which should be edited to suit your installation before running | ||
78 | <code>make</code>. | ||
79 | The file has some definitions like paths to the external libraries, | ||
80 | compiler options and the like. | ||
81 | </p> | ||
82 | |||
83 | <p>On Windows, the C runtime used to compile LuaFileSystem must be the same | ||
84 | runtime that Lua uses, or some LuaFileSystem functions will not work.</p> | ||
85 | |||
86 | <h2><a name="installation"></a>Installation</h2> | ||
87 | |||
88 | <p>The easiest way to install LuaFileSystem is to use LuaRocks:</p> | ||
89 | |||
90 | <pre class="example"> | ||
91 | luarocks install luafilesystem | ||
92 | </pre> | ||
93 | |||
94 | <p>If you prefer to install LuaFileSystem manually, the compiled binary should be copied to a directory in your | ||
95 | <a href="http://www.lua.org/manual/5.1/manual.html#pdf-package.cpath">C path</a>.</p> | ||
96 | |||
97 | <h2><a name="reference"></a>Reference</h2> | ||
98 | |||
99 | <p> | ||
100 | LuaFileSystem offers the following functions: | ||
101 | </p> | ||
102 | |||
103 | <dl class="reference"> | ||
104 | <dt><a name="attributes"></a><strong><code>lfs.attributes (filepath [, aname])</code></strong></dt> | ||
105 | <dd>Returns a table with the file attributes corresponding to | ||
106 | <code>filepath</code> (or <code>nil</code> followed by an error message | ||
107 | in case of error). | ||
108 | If the second optional argument is given, then only the value of the | ||
109 | named attribute is returned (this use is equivalent to | ||
110 | <code>lfs.attributes(filepath).aname</code>, but the table is not created | ||
111 | and only one attribute is retrieved from the O.S.). | ||
112 | The attributes are described as follows; | ||
113 | attribute <code>mode</code> is a string, all the others are numbers, | ||
114 | and the time related attributes use the same time reference of | ||
115 | <a href="http://www.lua.org/manual/5.1/manual.html#pdf-os.time"><code>os.time</code></a>: | ||
116 | <dl> | ||
117 | <dt><strong><code>dev</code></strong></dt> | ||
118 | <dd>on Unix systems, this represents the device that the inode resides on. On Windows systems, | ||
119 | represents the drive number of the disk containing the file</dd> | ||
120 | |||
121 | <dt><strong><code>ino</code></strong></dt> | ||
122 | <dd>on Unix systems, this represents the inode number. On Windows systems this has no meaning</dd> | ||
123 | |||
124 | <dt><strong><code>mode</code></strong></dt> | ||
125 | <dd>string representing the associated protection mode (the values could be | ||
126 | <code>file</code>, <code>directory</code>, <code>link</code>, <code>socket</code>, | ||
127 | <code>named pipe</code>, <code>char device</code>, <code>block device</code> or | ||
128 | <code>other</code>)</dd> | ||
129 | |||
130 | <dt><strong><code>nlink</code></strong></dt> | ||
131 | <dd>number of hard links to the file</dd> | ||
132 | |||
133 | <dt><strong><code>uid</code></strong></dt> | ||
134 | <dd>user-id of owner (Unix only, always 0 on Windows)</dd> | ||
135 | |||
136 | <dt><strong><code>gid</code></strong></dt> | ||
137 | <dd>group-id of owner (Unix only, always 0 on Windows)</dd> | ||
138 | |||
139 | <dt><strong><code>rdev</code></strong></dt> | ||
140 | <dd>on Unix systems, represents the device type, for special file inodes. | ||
141 | On Windows systems represents the same as <code>dev</code></dd> | ||
142 | |||
143 | <dt><strong><code>access</code></strong></dt> | ||
144 | <dd>time of last access</dd> | ||
145 | |||
146 | <dt><strong><code>modification</code></strong></dt> | ||
147 | <dd>time of last data modification</dd> | ||
148 | |||
149 | <dt><strong><code>change</code></strong></dt> | ||
150 | <dd>time of last file status change</dd> | ||
151 | |||
152 | <dt><strong><code>size</code></strong></dt> | ||
153 | <dd>file size, in bytes</dd> | ||
154 | |||
155 | <dt><strong><code>blocks</code></strong></dt> | ||
156 | <dd>block allocated for file; (Unix only)</dd> | ||
157 | |||
158 | <dt><strong><code>blksize</code></strong></dt> | ||
159 | <dd>optimal file system I/O blocksize; (Unix only)</dd> | ||
160 | </dl> | ||
161 | This function uses <code>stat</code> internally thus if the given | ||
162 | <code>filepath</code> is a symbolic link, it is followed (if it points to | ||
163 | another link the chain is followed recursively) and the information | ||
164 | is about the file it refers to. | ||
165 | To obtain information about the link itself, see function | ||
166 | <a href="#symlinkattributes">lfs.symlinkattributes</a>. | ||
167 | </dd> | ||
168 | |||
169 | <dt><a name="chdir"></a><strong><code>lfs.chdir (path)</code></strong></dt> | ||
170 | <dd>Changes the current working directory to the given | ||
171 | <code>path</code>.<br /> | ||
172 | Returns <code>true</code> in case of success or <code>nil</code> plus an | ||
173 | error string.</dd> | ||
174 | |||
175 | <dt><a name="chdir"></a><strong><code>lfs.lock_dir(path, [seconds_stale])</code></strong></dt> | ||
176 | <dd>Creates a lockfile (called lockfile.lfs) in <code>path</code> if it does not | ||
177 | exist and returns the lock. If the lock already exists checks it | ||
178 | it's stale, using the second parameter (default for the second | ||
179 | parameter is <code>INT_MAX</code>, which in practice means the lock will never | ||
180 | be stale. To free the the lock call <code>lock:free()</code>. <br/> | ||
181 | In case of any errors it returns nil and the error message. In | ||
182 | particular, if the lock exists and is not stale it returns the | ||
183 | "File exists" message.</dd> | ||
184 | |||
185 | <dt><a name="getcwd"></a><strong><code>lfs.currentdir ()</code></strong></dt> | ||
186 | <dd>Returns a string with the current working directory or <code>nil</code> | ||
187 | plus an error string.</dd> | ||
188 | |||
189 | <dt><a name="dir"></a><strong><code>iter, dir_obj = lfs.dir (path)</code></strong></dt> | ||
190 | <dd> | ||
191 | Lua iterator over the entries of a given directory. | ||
192 | Each time the iterator is called with <code>dir_obj</code> it returns a directory entry's name as a string, or | ||
193 | <code>nil</code> if there are no more entries. You can also iterate by calling <code>dir_obj:next()</code>, and | ||
194 | explicitly close the directory before the iteration finished with <code>dir_obj:close()</code>. | ||
195 | Raises an error if <code>path</code> is not a directory. | ||
196 | </dd> | ||
197 | |||
198 | <dt><a name="lock"></a><strong><code>lfs.lock (filehandle, mode[, start[, length]])</code></strong></dt> | ||
199 | <dd>Locks a file or a part of it. This function works on <em>open files</em>; the | ||
200 | file handle should be specified as the first argument. | ||
201 | The string <code>mode</code> could be either | ||
202 | <code>r</code> (for a read/shared lock) or <code>w</code> (for a | ||
203 | write/exclusive lock). The optional arguments <code>start</code> | ||
204 | and <code>length</code> can be used to specify a starting point and | ||
205 | its length; both should be numbers.<br /> | ||
206 | Returns <code>true</code> if the operation was successful; in | ||
207 | case of error, it returns <code>nil</code> plus an error string. | ||
208 | </dd> | ||
209 | |||
210 | <dt><a name="mkdir"></a><strong><code>lfs.mkdir (dirname)</code></strong></dt> | ||
211 | <dd>Creates a new directory. The argument is the name of the new | ||
212 | directory.<br /> | ||
213 | Returns <code>true</code> if the operation was successful; | ||
214 | in case of error, it returns <code>nil</code> plus an error string. | ||
215 | </dd> | ||
216 | |||
217 | <dt><a name="rmdir"></a><strong><code>lfs.rmdir (dirname)</code></strong></dt> | ||
218 | <dd>Removes an existing directory. The argument is the name of the directory.<br /> | ||
219 | Returns <code>true</code> if the operation was successful; | ||
220 | in case of error, it returns <code>nil</code> plus an error string.</dd> | ||
221 | |||
222 | <dt><a name="setmode"></a><strong><code>lfs.setmode (file, mode)</code></strong></dt> | ||
223 | <dd>Sets the writing mode for a file. The mode string can be either <code>binary</code> or <code>text</code>. | ||
224 | Returns the previous mode string for the file. This function is only available in Windows, so you may want to make sure that | ||
225 | <code>lfs.setmode</code> exists before using it. | ||
226 | </dd> | ||
227 | |||
228 | <dt><a name="symlinkattributes"></a><strong><code>lfs.symlinkattributes (filepath [, aname])</code></strong></dt> | ||
229 | <dd>Identical to <a href="#attributes">lfs.attributes</a> except that | ||
230 | it obtains information about the link itself (not the file it refers to). | ||
231 | This function is not available in Windows so you may want to make sure that | ||
232 | <code>lfs.symlinkattributes</code> exists before using it. | ||
233 | </dd> | ||
234 | |||
235 | <dt><a name="touch"></a><strong><code>lfs.touch (filepath [, atime [, mtime]])</code></strong></dt> | ||
236 | <dd>Set access and modification times of a file. This function is | ||
237 | a bind to <code>utime</code> function. The first argument is the | ||
238 | filename, the second argument (<code>atime</code>) is the access time, | ||
239 | and the third argument (<code>mtime</code>) is the modification time. | ||
240 | Both times are provided in seconds (which should be generated with | ||
241 | Lua standard function <code>os.time</code>). | ||
242 | If the modification time is omitted, the access time provided is used; | ||
243 | if both times are omitted, the current time is used.<br /> | ||
244 | Returns <code>true</code> if the operation was successful; | ||
245 | in case of error, it returns <code>nil</code> plus an error string. | ||
246 | </dd> | ||
247 | |||
248 | <dt><a name="unlock"></a><strong><code>lfs.unlock (filehandle[, start[, length]])</code></strong></dt> | ||
249 | <dd>Unlocks a file or a part of it. This function works on | ||
250 | <em>open files</em>; the file handle should be specified as the first | ||
251 | argument. The optional arguments <code>start</code> and | ||
252 | <code>length</code> can be used to specify a starting point and its | ||
253 | length; both should be numbers.<br /> | ||
254 | Returns <code>true</code> if the operation was successful; | ||
255 | in case of error, it returns <code>nil</code> plus an error string. | ||
256 | </dd> | ||
257 | </dl> | ||
258 | |||
259 | </div> <!-- id="content" --> | ||
260 | |||
261 | </div> <!-- id="main" --> | ||
262 | |||
263 | <div id="about"> | ||
264 | <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p> | ||
265 | <p><small>$Id: manual.html,v 1.45 2009/06/03 20:53:55 mascarenhas Exp $</small></p> | ||
266 | </div> <!-- id="about" --> | ||
267 | |||
268 | </div> <!-- id="container" --> | ||
269 | |||
270 | </body> | ||
271 | </html> | ||
diff --git a/lfw/rocks/luafilesystem/1.5.0-1/luafilesystem-1.5.0-1.rockspec b/lfw/rocks/luafilesystem/1.5.0-1/luafilesystem-1.5.0-1.rockspec deleted file mode 100644 index 1170ad25..00000000 --- a/lfw/rocks/luafilesystem/1.5.0-1/luafilesystem-1.5.0-1.rockspec +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | package = "LuaFileSystem" | ||
2 | |||
3 | version = "1.5.0-1" | ||
4 | |||
5 | source = { | ||
6 | url = "http://cloud.github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.5.0.tar.gz", | ||
7 | } | ||
8 | |||
9 | description = { | ||
10 | summary = "File System Library for the Lua Programming Language", | ||
11 | detailed = [[ | ||
12 | LuaFileSystem is a Lua library developed to complement the set of | ||
13 | functions related to file systems offered by the standard Lua | ||
14 | distribution. LuaFileSystem offers a portable way to access the | ||
15 | underlying directory structure and file attributes. | ||
16 | ]] | ||
17 | } | ||
18 | |||
19 | dependencies = { | ||
20 | "lua >= 5.1" | ||
21 | } | ||
22 | |||
23 | build = { | ||
24 | type = "module", | ||
25 | modules = { lfs = "src/lfs.c" }, | ||
26 | copy_directories = { "doc", "tests" } | ||
27 | } | ||
diff --git a/lfw/rocks/luafilesystem/1.5.0-1/rock_manifest b/lfw/rocks/luafilesystem/1.5.0-1/rock_manifest deleted file mode 100644 index f04415b7..00000000 --- a/lfw/rocks/luafilesystem/1.5.0-1/rock_manifest +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | rock_manifest = { | ||
2 | doc={ | ||
3 | us={ | ||
4 | ['examples.html']='bc2c38e7bb14ee8a2c7dfde31d847589', | ||
5 | ['license.html']='d6b3b3fc89fc8e2632120161dbccb91c', | ||
6 | ['luafilesystem.png']='81e923e976e99f894ea0aa8b52baff29', | ||
7 | ['index.html']='3280eecd8a8213280ea6fc63aeca85d3', | ||
8 | ['manual.html']='4ce5fbcb073538cb5509c20e7fa4b13b' | ||
9 | } | ||
10 | }, | ||
11 | ['luafilesystem-1.5.0-1.rockspec']='f24df0bf7653276bcff6e80c53b45cb0', | ||
12 | lib={ | ||
13 | ['lfs.dll']='e0500be912db2d07f08b4c4de202046e' | ||
14 | }, | ||
15 | tests={ | ||
16 | ['test.lua']='ce1edc52d74c6d9a28aefb73c80c6f29' | ||
17 | } | ||
18 | } | ||
diff --git a/lfw/rocks/luafilesystem/1.5.0-1/tests/test.lua b/lfw/rocks/luafilesystem/1.5.0-1/tests/test.lua deleted file mode 100644 index 71110749..00000000 --- a/lfw/rocks/luafilesystem/1.5.0-1/tests/test.lua +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | #!/usr/local/bin/lua5.1 | ||
2 | |||
3 | local tmp = "/tmp" | ||
4 | local sep = "/" | ||
5 | local upper = ".." | ||
6 | |||
7 | require"lfs" | ||
8 | print (lfs._VERSION) | ||
9 | |||
10 | function attrdir (path) | ||
11 | for file in lfs.dir(path) do | ||
12 | if file ~= "." and file ~= ".." then | ||
13 | local f = path..sep..file | ||
14 | print ("\t=> "..f.." <=") | ||
15 | local attr = lfs.attributes (f) | ||
16 | assert (type(attr) == "table") | ||
17 | if attr.mode == "directory" then | ||
18 | attrdir (f) | ||
19 | else | ||
20 | for name, value in pairs(attr) do | ||
21 | print (name, value) | ||
22 | end | ||
23 | end | ||
24 | end | ||
25 | end | ||
26 | end | ||
27 | |||
28 | -- Checking changing directories | ||
29 | local current = assert (lfs.currentdir()) | ||
30 | local reldir = string.gsub (current, "^.*%"..sep.."([^"..sep.."])$", "%1") | ||
31 | assert (lfs.chdir (upper), "could not change to upper directory") | ||
32 | assert (lfs.chdir (reldir), "could not change back to current directory") | ||
33 | assert (lfs.currentdir() == current, "error trying to change directories") | ||
34 | assert (lfs.chdir ("this couldn't be an actual directory") == nil, "could change to a non-existent directory") | ||
35 | |||
36 | -- Changing creating and removing directories | ||
37 | local tmpdir = current..sep.."lfs_tmp_dir" | ||
38 | local tmpfile = tmpdir..sep.."tmp_file" | ||
39 | -- Test for existence of a previous lfs_tmp_dir | ||
40 | -- that may have resulted from an interrupted test execution and remove it | ||
41 | if lfs.chdir (tmpdir) then | ||
42 | assert (lfs.chdir (upper), "could not change to upper directory") | ||
43 | assert (os.remove (tmpfile), "could not remove file from previous test") | ||
44 | assert (lfs.rmdir (tmpdir), "could not remove directory from previous test") | ||
45 | end | ||
46 | |||
47 | -- tries to create a directory | ||
48 | assert (lfs.mkdir (tmpdir), "could not make a new directory") | ||
49 | local attrib, errmsg = lfs.attributes (tmpdir) | ||
50 | if not attrib then | ||
51 | error ("could not get attributes of file `"..tmpdir.."':\n"..errmsg) | ||
52 | end | ||
53 | local f = io.open(tmpfile, "w") | ||
54 | f:close() | ||
55 | |||
56 | -- Change access time | ||
57 | local testdate = os.time({ year = 2007, day = 10, month = 2, hour=0}) | ||
58 | assert (lfs.touch (tmpfile, testdate)) | ||
59 | local new_att = assert (lfs.attributes (tmpfile)) | ||
60 | assert (new_att.access == testdate, "could not set access time") | ||
61 | assert (new_att.modification == testdate, "could not set modification time") | ||
62 | |||
63 | -- Change access and modification time | ||
64 | local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0}) | ||
65 | local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0}) | ||
66 | |||
67 | assert (lfs.touch (tmpfile, testdate2, testdate1)) | ||
68 | local new_att = assert (lfs.attributes (tmpfile)) | ||
69 | assert (new_att.access == testdate2, "could not set access time") | ||
70 | assert (new_att.modification == testdate1, "could not set modification time") | ||
71 | |||
72 | local res, err = lfs.symlinkattributes(tmpfile) | ||
73 | if err ~= "symlinkattributes not supported on this platform" then | ||
74 | -- Checking symbolic link information (does not work in Windows) | ||
75 | assert (os.execute ("ln -s "..tmpfile.." _a_link_for_test_")) | ||
76 | assert (lfs.attributes"_a_link_for_test_".mode == "file") | ||
77 | assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") | ||
78 | assert (os.remove"_a_link_for_test_") | ||
79 | end | ||
80 | |||
81 | if lfs.setmode then | ||
82 | -- Checking text/binary modes (works only in Windows) | ||
83 | local f = io.open(tmpfile, "w") | ||
84 | local result, mode = lfs.setmode(f, "binary") | ||
85 | assert((result and mode == "text") or (not result and mode == "setmode not supported on this platform")) | ||
86 | result, mode = lfs.setmode(f, "text") | ||
87 | assert((result and mode == "binary") or (not result and mode == "setmode not supported on this platform")) | ||
88 | f:close() | ||
89 | end | ||
90 | |||
91 | -- Restore access time to current value | ||
92 | assert (lfs.touch (tmpfile, attrib.access, attrib.modification)) | ||
93 | new_att = assert (lfs.attributes (tmpfile)) | ||
94 | assert (new_att.access == attrib.access) | ||
95 | assert (new_att.modification == attrib.modification) | ||
96 | |||
97 | -- Remove new file and directory | ||
98 | assert (os.remove (tmpfile), "could not remove new file") | ||
99 | assert (lfs.rmdir (tmpdir), "could not remove new directory") | ||
100 | assert (lfs.mkdir (tmpdir..sep.."lfs_tmp_dir") == nil, "could create a directory inside a non-existent one") | ||
101 | |||
102 | -- Trying to get attributes of a non-existent file | ||
103 | assert (lfs.attributes ("this couldn't be an actual file") == nil, "could get attributes of a non-existent file") | ||
104 | assert (type(lfs.attributes (upper)) == "table", "couldn't get attributes of upper directory") | ||
105 | |||
106 | -- Stressing directory iterator | ||
107 | count = 0 | ||
108 | for i = 1, 4000 do | ||
109 | for file in lfs.dir (tmp) do | ||
110 | count = count + 1 | ||
111 | end | ||
112 | end | ||
113 | |||
114 | -- Stressing directory iterator, explicit version | ||
115 | count = 0 | ||
116 | for i = 1, 4000 do | ||
117 | local iter, dir = lfs.dir(tmp) | ||
118 | local file = dir:next() | ||
119 | while file do | ||
120 | count = count + 1 | ||
121 | file = dir:next() | ||
122 | end | ||
123 | assert(not pcall(dir.next, dir)) | ||
124 | end | ||
125 | |||
126 | -- directory explicit close | ||
127 | local iter, dir = lfs.dir(tmp) | ||
128 | dir:close() | ||
129 | assert(not pcall(dir.next, dir)) | ||
130 | print"Ok!" | ||
diff --git a/lfw/rocks/luasocket/2.0.2-3/luasocket-2.0.2-3.rockspec b/lfw/rocks/luasocket/2.0.2-3/luasocket-2.0.2-3.rockspec deleted file mode 100644 index aa1fa918..00000000 --- a/lfw/rocks/luasocket/2.0.2-3/luasocket-2.0.2-3.rockspec +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | package = "LuaSocket" | ||
2 | version = "2.0.2-3" | ||
3 | source = { | ||
4 | url = "http://luaforge.net/frs/download.php/2664/luasocket-2.0.2.tar.gz", | ||
5 | md5 = "41445b138deb7bcfe97bff957503da8e" | ||
6 | } | ||
7 | description = { | ||
8 | summary = "Network support for the Lua language", | ||
9 | detailed = [[ | ||
10 | LuaSocket is a Lua extension library that is composed by two parts: a C core | ||
11 | that provides support for the TCP and UDP transport layers, and a set of Lua | ||
12 | modules that add support for functionality commonly needed by applications | ||
13 | that deal with the Internet. | ||
14 | ]] | ||
15 | } | ||
16 | build = { | ||
17 | type = "make", | ||
18 | build_variables = { | ||
19 | CFLAGS = "$(CFLAGS) -DLUASOCKET_DEBUG -I$(LUA_INCDIR)", | ||
20 | LDFLAGS = "$(LIBFLAG) -O -fpic", | ||
21 | LD = "$(CC)" | ||
22 | }, | ||
23 | install_variables = { | ||
24 | INSTALL_TOP_SHARE = "$(LUADIR)", | ||
25 | INSTALL_TOP_LIB = "$(LIBDIR)" | ||
26 | }, | ||
27 | platforms = { | ||
28 | macosx = { | ||
29 | build_variables = { | ||
30 | CFLAGS = "$(CFLAGS) -DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN -fno-common -I$(LUA_INCDIR)" | ||
31 | } | ||
32 | } | ||
33 | } | ||
34 | } | ||
diff --git a/lfw/rocks/luasocket/2.0.2-3/rock_manifest b/lfw/rocks/luasocket/2.0.2-3/rock_manifest deleted file mode 100644 index 08776c0a..00000000 --- a/lfw/rocks/luasocket/2.0.2-3/rock_manifest +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | rock_manifest = { | ||
2 | ['luasocket-2.0.2-3.rockspec']='eb546dbbd806881232d4164ac2121d1a', | ||
3 | lua={ | ||
4 | ['ltn12.lua']='3dfc54ef5c4d74c9558b503ea5595d0d', | ||
5 | socket={ | ||
6 | ['ftp.lua']='a8fbe980f396bccfdaa5671a981e60cd', | ||
7 | ['url.lua']='2bb6b15f77e9fcf4fc028435d41ad748', | ||
8 | ['http.lua']='811e12534358f97907079ec49db9d753', | ||
9 | ['smtp.lua']='1d32e3dc5060e7e2f67b59e8f8376c63', | ||
10 | ['tp.lua']='b98814d6a43aa13dd01f78f3b573f4f6' | ||
11 | }, | ||
12 | ['mime.lua']='6042de20ee4cacb2089388f1038bb92b', | ||
13 | ['socket.lua']='f8d9f766ce71816a68c90bb12a29eed9' | ||
14 | }, | ||
15 | lib={ | ||
16 | socket={ | ||
17 | ['core.dll']='58a9887fb51f92e707c80f9ce4196d5c' | ||
18 | }, | ||
19 | mime={ | ||
20 | ['core.dll']='05efb07488c0ba45f35230b0066422f4' | ||
21 | } | ||
22 | } | ||
23 | } | ||
diff --git a/lfw/rocks/luazip/1.2.3-2/luazip-1.2.3-2.rockspec b/lfw/rocks/luazip/1.2.3-2/luazip-1.2.3-2.rockspec deleted file mode 100644 index 92a99872..00000000 --- a/lfw/rocks/luazip/1.2.3-2/luazip-1.2.3-2.rockspec +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | package = "LuaZip" | ||
2 | version = "1.2.3-2" | ||
3 | source = { | ||
4 | url = "http://luaforge.net/frs/download.php/2493/luazip-1.2.3.tar.gz" | ||
5 | } | ||
6 | description = { | ||
7 | summary = "Library for reading files inside zip files", | ||
8 | detailed = [[ | ||
9 | LuaZip is a lightweight Lua extension library used to read files | ||
10 | stored inside zip files. The API is very similar to the standard | ||
11 | Lua I/O library API. | ||
12 | ]], | ||
13 | license = "MIT/X11", | ||
14 | homepage = "http://www.keplerproject.org/luaexpat/" | ||
15 | } | ||
16 | dependencies = { | ||
17 | "lua >= 5.1" | ||
18 | } | ||
19 | external_dependencies = { | ||
20 | ZZIP = { | ||
21 | header = "zzip.h" | ||
22 | } | ||
23 | } | ||
24 | build = { | ||
25 | type = "make", | ||
26 | variables = { | ||
27 | LUA_VERSION_NUM="501", | ||
28 | }, | ||
29 | build_variables = { | ||
30 | LIB_OPTION = "$(LIBFLAG) -L$(ZZIP_LIBDIR)", | ||
31 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(ZZIP_INCDIR)", | ||
32 | }, | ||
33 | install_variables = { | ||
34 | LUA_LIBDIR = "$(LIBDIR)", | ||
35 | LUA_DIR = "$(LUADIR)" | ||
36 | } | ||
37 | } | ||
diff --git a/lfw/rocks/luazip/1.2.3-2/rock_manifest b/lfw/rocks/luazip/1.2.3-2/rock_manifest deleted file mode 100644 index 8b71eec7..00000000 --- a/lfw/rocks/luazip/1.2.3-2/rock_manifest +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | rock_manifest = { | ||
2 | lib={ | ||
3 | ['zip.dll']='2d450eb4b48a5d6fd8a7ce99f3e24e8e' | ||
4 | }, | ||
5 | ['luazip-1.2.3-2.rockspec']='b0086cd00fa9693c0083199e9b57e717' | ||
6 | } | ||
diff --git a/lfw/rocks/manifest b/lfw/rocks/manifest deleted file mode 100644 index 8f462a9c..00000000 --- a/lfw/rocks/manifest +++ /dev/null | |||
@@ -1,159 +0,0 @@ | |||
1 | modules = { | ||
2 | ['socket.http']={ | ||
3 | 'luasocket/2.0.2-3' | ||
4 | }, | ||
5 | socket={ | ||
6 | 'luasocket/2.0.2-3' | ||
7 | }, | ||
8 | ['des56']={ | ||
9 | 'md5/1.1.2-1' | ||
10 | }, | ||
11 | ['md5.core']={ | ||
12 | 'md5/1.1.2-1' | ||
13 | }, | ||
14 | lfs={ | ||
15 | 'luafilesystem/1.5.0-1' | ||
16 | }, | ||
17 | ['md5']={ | ||
18 | 'md5/1.1.2-1' | ||
19 | }, | ||
20 | ['socket.ftp']={ | ||
21 | 'luasocket/2.0.2-3' | ||
22 | }, | ||
23 | ['socket.url']={ | ||
24 | 'luasocket/2.0.2-3' | ||
25 | }, | ||
26 | ['socket.smtp']={ | ||
27 | 'luasocket/2.0.2-3' | ||
28 | }, | ||
29 | ['mime.core']={ | ||
30 | 'luasocket/2.0.2-3' | ||
31 | }, | ||
32 | zip={ | ||
33 | 'luazip/1.2.3-2' | ||
34 | }, | ||
35 | ['ltn12']={ | ||
36 | 'luasocket/2.0.2-3' | ||
37 | }, | ||
38 | mime={ | ||
39 | 'luasocket/2.0.2-3' | ||
40 | }, | ||
41 | ['socket.tp']={ | ||
42 | 'luasocket/2.0.2-3' | ||
43 | }, | ||
44 | ['socket.core']={ | ||
45 | 'luasocket/2.0.2-3' | ||
46 | } | ||
47 | } | ||
48 | commands = {} | ||
49 | dependencies = { | ||
50 | luazip={ | ||
51 | ['1.2.3-2']={ | ||
52 | { | ||
53 | name='lua', | ||
54 | constraints={ | ||
55 | { | ||
56 | op='>=', | ||
57 | version={ | ||
58 | 5, 1, string='5.1' | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | } | ||
64 | }, | ||
65 | luafilesystem={ | ||
66 | ['1.5.0-1']={ | ||
67 | { | ||
68 | name='lua', | ||
69 | constraints={ | ||
70 | { | ||
71 | op='>=', | ||
72 | version={ | ||
73 | 5, 1, string='5.1' | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | }, | ||
80 | luasocket={ | ||
81 | ['2.0.2-3']={} | ||
82 | }, | ||
83 | ['md5']={ | ||
84 | ['1.1.2-1']={ | ||
85 | { | ||
86 | name='lua', | ||
87 | constraints={ | ||
88 | { | ||
89 | op='>=', | ||
90 | version={ | ||
91 | 5, 1, string='5.1' | ||
92 | } | ||
93 | } | ||
94 | } | ||
95 | } | ||
96 | } | ||
97 | } | ||
98 | } | ||
99 | repository = { | ||
100 | luafilesystem={ | ||
101 | ['1.5.0-1']={ | ||
102 | { | ||
103 | modules={ | ||
104 | lfs='lfs.dll' | ||
105 | }, | ||
106 | commands={}, | ||
107 | dependencies={}, | ||
108 | arch='installed' | ||
109 | } | ||
110 | } | ||
111 | }, | ||
112 | luazip={ | ||
113 | ['1.2.3-2']={ | ||
114 | { | ||
115 | modules={ | ||
116 | zip='zip.dll' | ||
117 | }, | ||
118 | commands={}, | ||
119 | dependencies={}, | ||
120 | arch='installed' | ||
121 | } | ||
122 | } | ||
123 | }, | ||
124 | luasocket={ | ||
125 | ['2.0.2-3']={ | ||
126 | { | ||
127 | modules={ | ||
128 | ['socket.http']='socket/http.lua', | ||
129 | socket='socket.lua', | ||
130 | ['socket.url']='socket/url.lua', | ||
131 | ['socket.smtp']='socket/smtp.lua', | ||
132 | ['socket.ftp']='socket/ftp.lua', | ||
133 | ['socket.core']='socket/core.dll', | ||
134 | ['ltn12']='ltn12.lua', | ||
135 | mime='mime.lua', | ||
136 | ['mime.core']='mime/core.dll', | ||
137 | ['socket.tp']='socket/tp.lua' | ||
138 | }, | ||
139 | commands={}, | ||
140 | dependencies={}, | ||
141 | arch='installed' | ||
142 | } | ||
143 | } | ||
144 | }, | ||
145 | ['md5']={ | ||
146 | ['1.1.2-1']={ | ||
147 | { | ||
148 | modules={ | ||
149 | ['md5.core']='md5/core.dll', | ||
150 | ['des56']='des56.dll', | ||
151 | ['md5']='md5.lua' | ||
152 | }, | ||
153 | commands={}, | ||
154 | dependencies={}, | ||
155 | arch='installed' | ||
156 | } | ||
157 | } | ||
158 | } | ||
159 | } | ||
diff --git a/lfw/rocks/md5/1.1.2-1/md5-1.1.2-1.rockspec b/lfw/rocks/md5/1.1.2-1/md5-1.1.2-1.rockspec deleted file mode 100644 index 66267018..00000000 --- a/lfw/rocks/md5/1.1.2-1/md5-1.1.2-1.rockspec +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | package = "MD5" | ||
2 | version = "1.1.2-1" | ||
3 | source = { | ||
4 | url = "" | ||
5 | } | ||
6 | description = { | ||
7 | summary = "Basic cryptographic library", | ||
8 | detailed = [[ | ||
9 | MD5 offers basic cryptographic facilities for Lua 5.1: | ||
10 | a hash (digest) function, a pair crypt/decrypt based on MD5 and CFB, | ||
11 | and a pair crypt/decrypt based on DES with 56-bit keys. | ||
12 | ]], | ||
13 | license = "MIT/X11", | ||
14 | homepage = "http://www.keplerproject.org/md5/" | ||
15 | } | ||
16 | dependencies = { | ||
17 | "lua >= 5.1" | ||
18 | } | ||
19 | build = { | ||
20 | type = "make", | ||
21 | variables = { | ||
22 | LUA_VERSION_NUM="501", | ||
23 | }, | ||
24 | build_variables = { | ||
25 | LIB_OPTION = "$(LIBFLAG)", | ||
26 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR)", | ||
27 | }, | ||
28 | install_variables = { | ||
29 | LUA_LIBDIR = "$(LIBDIR)", | ||
30 | LUA_DIR = "$(LUADIR)" | ||
31 | }, | ||
32 | platforms = { | ||
33 | win32 = { | ||
34 | build_variables = { | ||
35 | LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib" | ||
36 | } | ||
37 | } | ||
38 | } | ||
39 | } | ||
diff --git a/lfw/rocks/md5/1.1.2-1/rock_manifest b/lfw/rocks/md5/1.1.2-1/rock_manifest deleted file mode 100644 index 120edb5c..00000000 --- a/lfw/rocks/md5/1.1.2-1/rock_manifest +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | rock_manifest = { | ||
2 | ['md5-1.1.2-1.rockspec']='a3953425b9c63515ae647a874fc07f96', | ||
3 | lua={ | ||
4 | ['md5.lua']='d4cd3727e9968f1cddbbe02d85288a9c' | ||
5 | }, | ||
6 | lib={ | ||
7 | ['des56.dll']='13ffbb58e4b1685d5d27b41840b88d43', | ||
8 | ['md5']={ | ||
9 | ['core.dll']='b925346324ca57f32d8c42541f881119' | ||
10 | } | ||
11 | } | ||
12 | } | ||
@@ -108,14 +108,14 @@ mkdir "release-windows" | |||
108 | mv "$out" "release-windows/$out-win32" | 108 | mv "$out" "release-windows/$out-win32" |
109 | 109 | ||
110 | cd "release-unix/$out" | 110 | cd "release-unix/$out" |
111 | rm -rf makedist install.bat win32 lfw .travis.yml .gitignore appveyor* .appveyor | 111 | rm -rf makedist install.bat win32 .travis.yml .gitignore appveyor* .appveyor |
112 | cd .. | 112 | cd .. |
113 | tar czvpf ../"$out.tar.gz" "$out" | 113 | tar czvpf ../"$out.tar.gz" "$out" |
114 | cd .. | 114 | cd .. |
115 | rm -rf "release-unix" | 115 | rm -rf "release-unix" |
116 | 116 | ||
117 | cd "release-windows/$out-win32" | 117 | cd "release-windows/$out-win32" |
118 | rm -rf makedist Makefile* configure lfw .travis.yml .gitignore test appveyor* .appveyor | 118 | rm -rf makedist Makefile* configure .travis.yml .gitignore test appveyor* .appveyor |
119 | cd .. | 119 | cd .. |
120 | zip -r ../"$out-win32.zip" "$out-win32" | 120 | zip -r ../"$out-win32.zip" "$out-win32" |
121 | cd .. | 121 | cd .. |
diff --git a/win32/rclauncher.c b/win32/rclauncher.c deleted file mode 100644 index 77459f46..00000000 --- a/win32/rclauncher.c +++ /dev/null | |||
@@ -1,139 +0,0 @@ | |||
1 | |||
2 | /* | ||
3 | ** Simple Lua interpreter. | ||
4 | ** This program is used to run a Lua file embedded as a resource. | ||
5 | ** It creates a Lua state, opens all its standard libraries, and run | ||
6 | ** the Lua file in a protected environment just to redirect the error | ||
7 | ** messages to stdout and stderr. | ||
8 | ** | ||
9 | ** $Id: rclauncher.c,v 1.1 2008/06/30 14:29:59 carregal Exp $ | ||
10 | */ | ||
11 | |||
12 | #include <string.h> | ||
13 | #include <stdlib.h> | ||
14 | |||
15 | #include "lua.h" | ||
16 | #include "lauxlib.h" | ||
17 | #include "lualib.h" | ||
18 | #include <windows.h> | ||
19 | #include <io.h> | ||
20 | #include <fcntl.h> | ||
21 | |||
22 | /* | ||
23 | ** Report error message. | ||
24 | ** Assumes that the error message is on top of the stack. | ||
25 | */ | ||
26 | static int report (lua_State *L) { | ||
27 | fprintf (stderr, "lua: fatal error: `%s'\n", lua_tostring (L, -1)); | ||
28 | fflush (stderr); | ||
29 | printf ("Content-type: text/plain\n\nConfiguration fatal error: see error log!\n"); | ||
30 | printf ("%s", lua_tostring(L, -1)); | ||
31 | return 1; | ||
32 | } | ||
33 | |||
34 | static int runlua (lua_State *L, const char *lua_string, int argc, char *argv[]) { | ||
35 | int err_func; | ||
36 | int err; | ||
37 | |||
38 | lua_getglobal(L, "debug"); | ||
39 | lua_pushliteral(L, "traceback"); | ||
40 | lua_gettable(L, -2); | ||
41 | err_func = lua_gettop (L); | ||
42 | err = luaL_loadstring (L, lua_string); | ||
43 | if(!err) { | ||
44 | int i; | ||
45 | // fill global arg table | ||
46 | lua_getglobal(L, "arg"); | ||
47 | for(i = 1; i < argc; i++) | ||
48 | { | ||
49 | lua_pushstring(L, argv[i]); | ||
50 | lua_rawseti(L, -2, i); | ||
51 | } | ||
52 | lua_pop(L, 1); | ||
53 | // fill parameters (in vararg '...') | ||
54 | for(i = 1; i < argc; i++) | ||
55 | lua_pushstring(L, argv[i]); | ||
56 | return lua_pcall (L, argc - 1, LUA_MULTRET, err_func); | ||
57 | } else return err; | ||
58 | } | ||
59 | |||
60 | static DWORD GetModulePath( HINSTANCE hInst, LPTSTR pszBuffer, DWORD dwSize ) | ||
61 | // | ||
62 | // Return the size of the path in bytes. | ||
63 | { | ||
64 | DWORD dwLength = GetModuleFileName( hInst, pszBuffer, dwSize ); | ||
65 | if( dwLength ) | ||
66 | { | ||
67 | while( dwLength && pszBuffer[ dwLength ] != '.' ) | ||
68 | { | ||
69 | dwLength--; | ||
70 | } | ||
71 | |||
72 | if( dwLength ) | ||
73 | pszBuffer[ dwLength ] = '\000'; | ||
74 | } | ||
75 | return dwLength; | ||
76 | } | ||
77 | |||
78 | |||
79 | /* | ||
80 | ** MAIN | ||
81 | */ | ||
82 | int main (int argc, char *argv[]) { | ||
83 | char name[ MAX_PATH ]; | ||
84 | DWORD dwLength; | ||
85 | int size; | ||
86 | luaL_Buffer b; | ||
87 | int i; | ||
88 | #ifdef UNICODE | ||
89 | TCHAR lua_wstring[4098]; | ||
90 | #endif | ||
91 | char lua_string[4098]; | ||
92 | lua_State *L = luaL_newstate(); | ||
93 | (void)argc; /* avoid "unused parameter" warning */ | ||
94 | luaL_openlibs(L); | ||
95 | lua_newtable(L); // create arg table | ||
96 | lua_pushstring(L, argv[0]); // add interpreter to arg table | ||
97 | lua_rawseti(L, -2, -1); | ||
98 | dwLength = GetModulePath( NULL, name, MAX_PATH ); | ||
99 | if(dwLength) { /* Optional bootstrap */ | ||
100 | strcat(name, ".lua"); | ||
101 | lua_pushstring(L, name); // add lua script to arg table | ||
102 | lua_rawseti(L, -2, 0); | ||
103 | lua_setglobal(L,"arg"); // set global arg table | ||
104 | if(!luaL_loadfile (L, name)) { | ||
105 | if(lua_pcall (L, 0, LUA_MULTRET, 0)) { | ||
106 | report (L); | ||
107 | lua_close (L); | ||
108 | return EXIT_FAILURE; | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | else | ||
113 | { | ||
114 | lua_pushstring(L, argv[0]); // no lua script, so add interpreter again, now as lua script | ||
115 | lua_rawseti(L, -2, 0); | ||
116 | lua_setglobal(L,"arg"); // set global arg table | ||
117 | } | ||
118 | |||
119 | luaL_buffinit(L, &b); | ||
120 | for(i = 1; ; i++) { | ||
121 | #ifdef UNICODE | ||
122 | size = LoadString(GetModuleHandle(NULL), i, lua_wstring, | ||
123 | sizeof(lua_string)/sizeof(TCHAR)); | ||
124 | if(size > 0) wcstombs(lua_string, lua_wstring, size + 1); | ||
125 | #else | ||
126 | size = LoadString(GetModuleHandle(NULL), i, lua_string, | ||
127 | sizeof(lua_string)/sizeof(char)); | ||
128 | #endif | ||
129 | if(size) luaL_addlstring(&b, lua_string, size); else break; | ||
130 | } | ||
131 | luaL_pushresult(&b); | ||
132 | if (runlua (L, lua_tostring(L, -1), argc, argv)) { | ||
133 | report (L); | ||
134 | lua_close (L); | ||
135 | return EXIT_FAILURE; | ||
136 | } | ||
137 | lua_close (L); | ||
138 | return EXIT_SUCCESS; | ||
139 | } | ||