OC-Tsuki/ksrc/exec.lua
Jane Roxanne e44d6177a0 kio++
2020-06-02 01:14:26 -05:00

34 lines
576 B
Lua

local velx = (function()
--#include "ksrc/execs/velx_spec/init.lua"
end)()
local zlua = (function()
--#include "ksrc/execs/zlua/init.lua"
end)
local lua = (function()
--#include "ksrc/execs/lua/init.lua"
end)
-- Executable loading process:
-- - Link
-- - Load
-- - Execute
function exec.loadfile(path, env, runinfo)
local stat = vfs.stat(path)
if (stat & 0x400 > 0) then
runinfo.gid = stat.gid
end
if (stat & 0x800 > 0) then
runinfo.uid = stat.uid
end
if (velx.identify(path)) then
elseif (zlua.identify(path)) then
else -- Load Lua...if we can.
end
end