-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
50 lines (35 loc) · 1001 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
local packagePath = package.path
local packageCPath = package.cpath
local localDir = debug.getinfo(1, 'S').source:sub(2):match('(.*'..'\\'..')')
package.path = localDir..'?.lua'..';'..packagePath
package.cpath = localDir..'?.dll'..';'..packageCPath
require 'bit'
require 'rings'
local t = {}
function expose(name, val)
local base = _G[name]
if (base == nil) then
_G[name] = val
else
for k, v in pairs(val) do
base[k] = v
end
end
end
t.expose = expose
expose('moduleLib', t)
require 'orient'
require 'localio'
require 'configParser'
require 'dataStructures'
require 'mathLib'
require 'osLib'
require 'stringLib'
require 'tableLib'
package.path = packagePath
package.cpath = packageCPath
package.cpath = package.cpath..';'..localDir..'luaSocket\\?.dll'
package.path = package.path..';'..localDir..'luaSocket\\?.lua'
package.cpath = package.cpath..';'..localDir..'luaSocket\\lua\\?.dll'
package.path = package.path..';'..localDir..'luaSocket\\lua\\?.lua'
--error(package.path)