Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- MODIFY AREA
- -- BEGIN NO MODIFY! && END MODIFY AREA --
- --License:
- -- ©opyright COOLGAMETUBE 2015 - 2200
- -- REUPLOAD ONLY BY INCLUDING IN YOUR PROJECT!
- -- REUPLOAD ONLY WITH NO MODIFICATION IN "NO MODIFY" AREA
- -- REUPLOAD ONLY WITH COOLGAMETUBE COPYRIGHT MARKER (IN THIS FILE)
- -- CREDIT ME IN YOUR CREDITS (Wicows Startup - COOLGAMETUBE)
- -- You are able to modify and reupload this Programm (BUT NOT IN MODIFY AREA) if respecting the points
- ---------------------
- -- Additional Software:
- --- Wicows Alias Manager: Cooming Soon!
- --- FileType Manager: Cooming Soon!
- ---------------------
- local helpDir = "1"
- print("Preparing! Please wait...")
- term.setCursorBlink(true)
- if fs.exists("/system32/cfg/helpDir.cfg") then
- local f1 = fs.open("/system32/cfg/helpDir.cfg", "r")
- helpDir = f1.readAll()
- f1.close()
- else
- write("Creating Config")
- local f4 = fs.open("/system32/cfg/helpDir.cfg", "w")
- f4.write("/system32/help")
- f4.close()
- helpDir = "/system32/help/"
- os.reboot()
- end
- if fs.isDir(helpDir) then
- if fs.exists(helpDir.."startup") then
- fs.delete(helpDir.."startup")
- end
- local helpText = "startup (Wicows Startup) is a booting program, that setting up your System"
- local helpFile = fs.open(helpDir.."startup","w")
- helpFile.write(helpText)
- helpFile.close()
- else
- fs.makeDir(helpDir)
- end
- for _, hlpFile in ipairs(fs.list("/rom/help/")) do
- if not fs.exists(helpDir.."/"..hlpFile) then
- write(",-------,\n|Install|\n'-------'\n\nCopying "..hlpFile.."\n")
- fs.copy("/rom/help/"..hlpFile, helpDir.."/"..hlpFile)
- shell.run("clear")
- end
- end
- help.setPath(helpDir)
- term.setCursorBlink(false)
- shell.run("clear")
- print(",------------------,")
- print("|Wicows Startup 2.0|")
- print("'------------------'")
- print("Starting RedNet...")
- for i,p in ipairs(peripheral.getNames()) do
- sleep(0)
- if peripheral.getType(p) == "modem" then
- rednet.open(p)
- end
- end
- sleep(0)
- print("Loading API's!")
- sleep(0.5)
- function l(file)
- os.loadAPI(file)
- print("API "..file.." loaded!")
- sleep(0.1)
- end
- function s(p)
- if fs.isDir(p.."/apis") then
- for _, file in ipairs(fs.list(p.."/apis")) do
- l(file)
- end
- end
- if fs.isDir(p.."/api") then
- for _, file in ipairs(fs.list(p.."/api")) do
- l(file)
- end
- end
- if fs.isDir(p.."/APIS") then
- for _, file in ipairs(fs.list(p.."/APIS")) do
- l(file)
- end
- end
- if fs.isDir(p.."/API") then
- for _, file in ipairs(fs.list(p.."/API")) do
- l(file)
- end
- end
- if fs.isDir(p.."/APIs") then
- for _, file in ipairs(fs.list(p.."/APIs")) do
- l(file)
- end
- end
- if fs.isDir(p.."/Apis") then
- for _, file in ipairs(fs.list(p.."/Apis")) do
- l(file)
- end
- end
- if fs.isDir(p.."/Api") then
- for _, file in ipairs(fs.list(p.."/Api")) do
- l(file)
- end
- end
- end
- s("") -- Searching in main Folder
- s(".") --Searching in current Folder
- s("/os") -- Searching in os folder
- s("/OS") -- Searching in OS folder
- s("/Os") -- Searching in Os folder
- shell.run("clear")
- if fs.exists("autorun.cfg") then
- local f5 = fs.open("autorun.cfg", "r")
- local autorun = f5.readAll()
- f5.close()
- shell.run(autorun)
- else
- if term.isColor() then
- term.setTextColor(colors.yellow)
- end
- print(os.version())
- if term.isColor() then
- term.setTextColor(colors.white)
- end
- end
- -- END NO MODIFY! --
- -- MODIFY AREA!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement