FANDOM


--Install.lua print('Checking for Install File...')

local directory = "." installstring = ""

local function requireFromRoot(File) local Handle, err = io.open("../"..File..".lua") local String, Funct = "", nil if Handle then String = "require = requireFromRoot\n"..Handle:read("*a") Handle:close() Funct = load(String) end --local Funct, err = loadfile(".."..File..".lua") if Funct then local var1 = Funct() require = Require return var1 or true else oldrequire(File) end end

lfs = require "lfs"

local files = sys.dir(directory) if files then if #files > 4 then JSON = require("JSON") print(#files - 5 .. " stub(s) found!") local installstring = "" local file = io.open("InstallStub.lua") if type(file) ~= "string" then installstring = installstring..file:read("*a") file:close()

local Table = JSON.DecodeJSON(installstring) print("Installing…") local InstallDir = "" lfs.mkdir("Applications") lfs.mkdir("Applications/ScriptEditor") lfs.mkdir("Applications/FileBrowser") lfs.mkdir("Applications/Help") lfs.mkdir("Applications/SampleApp") lfs.mkdir("Applications/RegistryEditor") lfs.mkdir("LAMAPI") for k, v in pairs(Table) do print(k) local file = io.open(k, "w") file:write(v) file:close() end require "main" end end end

print("Error Installing File")

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.