|
|
@ -19,7 +19,7 @@ function PluginLoader:loadPlugins()
|
|
|
|
local package_cpath = package.cpath
|
|
|
|
local package_cpath = package.cpath
|
|
|
|
package.path = path.."/?.lua;"..package.path
|
|
|
|
package.path = path.."/?.lua;"..package.path
|
|
|
|
package.cpath = path.."/lib/?.so;"..package.cpath
|
|
|
|
package.cpath = path.."/lib/?.so;"..package.cpath
|
|
|
|
local ok, module = pcall(require, "main")
|
|
|
|
local ok, module = pcall(dofile, mainfile)
|
|
|
|
if not ok then
|
|
|
|
if not ok then
|
|
|
|
DEBUG("Error when loading", mainfile, module)
|
|
|
|
DEBUG("Error when loading", mainfile, module)
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -37,6 +37,8 @@ function PluginLoader:loadPlugins()
|
|
|
|
package.cpath = package.cpath..";"..plugin.path.."/lib/?.so"
|
|
|
|
package.cpath = package.cpath..";"..plugin.path.."/lib/?.so"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
table.sort(self.plugins, function(v1,v2) return v1.path < v2.path end)
|
|
|
|
|
|
|
|
|
|
|
|
return self.plugins
|
|
|
|
return self.plugins
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|