Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this program installs the CSP
- local InstallOptions = {false,false,false,false}
- local InstallCodes = {"8C3BsY2J","rBEfV6Gt","k6aAwARg"}
- local InstallPaths = {"os/os_Programs/TextEditor","os/os_Programs/os_BetaMenu","os/os_Programs/bankingClient_public1"}
- local InstallType = {"Client","Menu","Client"}
- local InstallItems = {"Text Editor","Beta Menu","Banking v1","exit"}
- local w, h = term.getSize()
- function CUI(m) --declare function
- n=1
- local l = #m
- while true do
- term.setCursorPos(1,4)
- for i=1, #m, 1 do --traverse the table of options
- if i==n then term.clearLine() print(i, " ["..m[i].."]") else term.clearLine() print(i, " ", m[i]) end --print them
- end
- a, b= os.pullEvent("key") --wait for keypress
- if b==keys.w and n>1 then n=n-1 end
- if b==keys.s and n<l then n=n+1 end
- if b==keys.enter then break end
- end
- return n --return the value
- end
- local Version = "1.0.0"
- local IncludedApps = {"os/os_Programs/os_AccountPgTxT"}
- term.setBackgroundColor(colors.cyan)
- term.clear()
- term.setCursorPos(1,1)
- print("Installer Version "..Version)
- print("Downloading Base Programs")
- fs.makeDir("os/os_Programs")
- fs.makeDir("os/os_Programs/os/os_SearchEngine")
- fs.makeDir("os/os_Programs/ClientApps")
- fs.makeDir("os/os_Programs/BootItems")
- fs.makeDir("os/os_Programs/Scripts")
- fs.makeDir("os/os_Programs/Launchers")
- fs.makeDir("os/os_UserFiles")
- fs.makeDir("os/os_SystemFiles")
- fs.makeDir("os/os_SystemFiles/Audio")
- fs.makeDir("os/os_SystemFiles/Images")
- fs.makeDir("os/os_Programs/SecurityHandler")
- fs.makeDir("os/os_TempFiles/Archive")--for file of no more use, but is saved just incase
- fs.makeDir("os/os_TempFiles/Cache")--files saved during a process that can be reused, but if deleted the parent Script replaces it with no problem
- fs.makeDir("os/os_TempFiles/WebSearch")--used by web engines to store Files until exit
- fs.makeDir("os/os_TempFiles/SingleRun")--file that are deleted apon shutting down or on startup
- --Update scripts
- shell.run("pastebin","get","wSMk1RSb","os/os_Programs/os_UpdateController")
- shell.run("pastebin","get","yQfiQLSm","os/os_Programs/os_Updater")
- --security scripts
- shell.run("pastebin","get","E5pQFmBu","os/os_Programs/SecurityHandler/CrashMenu")
- --online browsing scripts
- shell.run("pastebin","get","K1XFJ4ED","os/os_Programs/os_LinksProvider")
- --images
- shell.run("pastebin","get","EDeuKQHr","os/os_SystemFiles/Images/MenuBackground")
- shell.run("pastebin","get","PP1ZWMjm","os/os_SystemFiles/Images/NationalFlag01_Small")
- --Main OS
- shell.run("pastebin","get","HCeGcNRm","os/os_Programs/os_BootScript")
- shell.run("pastebin","get","8zek1eez","os/os_Programs/os_MainScript")
- shell.run("pastebin","get","dH4fY0Wp","os/os_Programs/os_SettingsMenu")
- shell.run("pastebin","get","Nssb4Lez","os/os_Programs/os_BgManager_A")
- shell.run("pastebin","get","yzAABUB0","os/os_Programs/os_startScreen")
- shell.run("pastebin","get","fuj8nqwF","startup")
- --scripts
- shell.run("pastebin","get","CnW1svLM","os/os_Programs/Scripts/AudioPlayer")
- shell.run("pastebin","get","xLz60TjG","os/os_Programs/Scripts/ProvidedInstaller")
- shell.run("pastebin","get","1whr5N2t","os/os_Programs/Scripts/ClientAppSetup")
- --external scripts(scripts not made by me, and are place holders until i make my own)
- --Client Scripts
- shell.run("pastebin","get","uvMPphNp","os/os_Programs/ClientApps/os_ApplicationInstaller")
- shell.run("pastebin","get","TcncRKix","os/os_Programs/ClientApps/Client_AppStore")
- shell.run("pastebin","get","rMHdqVe8","os/os_Programs/ClientApps/os_AccountPgScript")
- shell.run("pastebin","get","uZb9gL4y","os/os_Programs/os_SearchEngine/Base")
- shell.run("pastebin","get","02tHaSyf","os/os_Programs/os_SearchEngine/ExitScript")
- shell.run("pastebin","get","q0rJqitx","os/os_Programs/ClientApps/Painter")
- term.clear()
- term.setCursorPos(1,1)
- local AccountTxTFile = fs.open("os/os_Programs/os_AccountPgTxT","w")
- AccountTxTFile.writeLine("User Account")
- AccountTxTFile.writeLine("os/os_Programs/os_AccountPgScript")
- AccountTxTFile.close()
- settings.load(".settings")
- settings.clear()
- settings.define("OperatingSystem",{ description = "the OS"})
- settings.define("os_NetworkConnect",{ description = "if the OS is allowed to use Wireless functions"})
- settings.define("os_Version",{ description = "the os version"})
- settings.define("os_BootMode",{ description = "boot method", default = true})
- settings.define("Allow_OsUpdates",{ description = "Wither to allow Updates to os", default = false})
- settings.define("os_DesktopLoc", { description = "the Desktop script for the os", default = "os/os_Programs/os_MainScript"})
- settings.define("os_Username", { description = "the clients Username", default = "guest"})
- settings.define("os_LockScreenPassword", { description = "the clients Username", default = "n"})
- settings.define("os_startApps", { description = "Apps started after Boot"})
- settings.define("os_BetaTest", { description = "beta test features on or off"})
- settings.define("ClientApps_Names", { description = "Client Apps"})
- settings.define("ClientApps_Paths", { description = "ClientApps Paths"})
- settings.set("os_NetworkConnect", true)
- settings.set("os_Version","1.1.0")
- settings.set("OperatingSystem","CCSPS")
- settings.set("banking_System","n")
- settings.set("os_LockScreenPassword","n")
- settings.set("os_startApps","example")
- settings.set("os_DesktopLoc","os/os_Programs/os_MainScript")
- settings.set("os_BootMode",false)
- settings.set("os_Username","guest")
- settings.set("Allow_OsUpdates",false)
- settings.set("os_BetaTest",false)
- settings.set("ClientApps_Names",{"Account Page", "Online Apps","App Store","Painter","Settings"})
- settings.set("ClientApps_Paths",{"os/os_Programs/ClientApps/os_AccountPgScript","os/os_Programs/os_LinksProvider","os/os_Programs/ClientApps/Client_AppStore","os/os_Programs/ClientApps/Painter","os/os_Programs/os_SettingsMenu"})
- settings.save(".settings")
- function EndInstall()
- print("Download Complete!")
- print("Rebooting to Install")
- os.sleep(3)
- os.reboot()
- end
- EndInstall()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement