glava-config build process and initial widget layout

This commit is contained in:
Jarcode
2019-09-04 10:46:56 -07:00
parent a38f79e279
commit 7d6d7e2987
11 changed files with 663 additions and 26681 deletions

31
glava-config/main.lua Normal file
View File

@@ -0,0 +1,31 @@
local window = require("glava-config.window")
local function dependency(name)
if package.loaded[name] then
return
else
for _, searcher in ipairs(package.searchers or package.loaders) do
local loader = searcher(name)
if type(loader) == 'function' then
package.preload[name] = loader
return
end
end
print("Dependency \"" .. name .. "\" is not installed.")
print("Please install it through your package manager or Lua distribution.")
os.exit(1)
end
end
local main = {}
function main.entry(prog, ...)
dependency("lgi")
dependency("lfs")
if glava.resource_path:sub(glava.resource_path:len()) ~= "/" then
glava.resource_path = glava.resource_path .. "/"
end
window()
end
return main