Advertisement
Marlingaming

CC Tweaked Personal Device Installer V1

Jan 5th, 2022 (edited)
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.94 KB | None | 0 0
  1. --this program installs the CSP
  2. local InstallOptions = {false,false,false,false}
  3. local InstallCodes = {"8C3BsY2J","rBEfV6Gt","k6aAwARg"}
  4. local InstallPaths = {"os/os_Programs/TextEditor","os/os_Programs/os_BetaMenu","os/os_Programs/bankingClient_public1"}
  5. local InstallType = {"Client","Menu","Client"}
  6. local InstallItems = {"Text Editor","Beta Menu","Banking v1","exit"}
  7. local w, h = term.getSize()
  8.  
  9. function CUI(m) --declare function
  10. n=1
  11. local l = #m
  12. while true do
  13.  
  14. term.setCursorPos(1,4)
  15.  
  16. for i=1, #m, 1 do --traverse the table of options
  17. if i==n then term.clearLine() print(i, " ["..m[i].."]") else term.clearLine() print(i, " ", m[i]) end --print them
  18. end
  19. a, b= os.pullEvent("key") --wait for keypress
  20. if b==keys.w and n>1 then n=n-1 end
  21. if b==keys.s and n<l then n=n+1 end
  22. if b==keys.enter then break end
  23. end
  24. return n --return the value
  25. end
  26.  
  27.  
  28.  
  29.  
  30. local Version = "1.0.0"
  31. local IncludedApps = {"os/os_Programs/os_AccountPgTxT"}
  32. term.setBackgroundColor(colors.cyan)
  33. term.clear()
  34. term.setCursorPos(1,1)
  35. print("Installer Version "..Version)
  36. print("Downloading Base Programs")
  37. fs.makeDir("os/os_Programs")
  38.  
  39. fs.makeDir("os/os_Programs/os/os_SearchEngine")
  40. fs.makeDir("os/os_Programs/ClientApps")
  41. fs.makeDir("os/os_Programs/BootItems")
  42. fs.makeDir("os/os_Programs/Scripts")
  43. fs.makeDir("os/os_Programs/Launchers")
  44. fs.makeDir("os/os_UserFiles")
  45. fs.makeDir("os/os_SystemFiles")
  46. fs.makeDir("os/os_SystemFiles/Audio")
  47. fs.makeDir("os/os_SystemFiles/Images")
  48. fs.makeDir("os/os_Programs/SecurityHandler")
  49. fs.makeDir("os/os_TempFiles/Archive")--for file of no more use, but is saved just incase
  50. 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
  51.  
  52. fs.makeDir("os/os_TempFiles/WebSearch")--used by web engines to store Files until exit
  53.  
  54. fs.makeDir("os/os_TempFiles/SingleRun")--file that are deleted apon shutting down or on startup
  55.  
  56. --Update scripts
  57. shell.run("pastebin","get","wSMk1RSb","os/os_Programs/os_UpdateController")
  58. shell.run("pastebin","get","yQfiQLSm","os/os_Programs/os_Updater")
  59. --security scripts
  60. shell.run("pastebin","get","E5pQFmBu","os/os_Programs/SecurityHandler/CrashMenu")
  61. --online browsing scripts
  62. shell.run("pastebin","get","K1XFJ4ED","os/os_Programs/os_LinksProvider")
  63. --images
  64. shell.run("pastebin","get","EDeuKQHr","os/os_SystemFiles/Images/MenuBackground")
  65. shell.run("pastebin","get","PP1ZWMjm","os/os_SystemFiles/Images/NationalFlag01_Small")
  66. --Main OS
  67. shell.run("pastebin","get","HCeGcNRm","os/os_Programs/os_BootScript")
  68. shell.run("pastebin","get","8zek1eez","os/os_Programs/os_MainScript")
  69. shell.run("pastebin","get","dH4fY0Wp","os/os_Programs/os_SettingsMenu")
  70. shell.run("pastebin","get","Nssb4Lez","os/os_Programs/os_BgManager_A")
  71. shell.run("pastebin","get","yzAABUB0","os/os_Programs/os_startScreen")
  72. shell.run("pastebin","get","fuj8nqwF","startup")
  73. --scripts
  74. shell.run("pastebin","get","CnW1svLM","os/os_Programs/Scripts/AudioPlayer")
  75. shell.run("pastebin","get","xLz60TjG","os/os_Programs/Scripts/ProvidedInstaller")
  76. shell.run("pastebin","get","1whr5N2t","os/os_Programs/Scripts/ClientAppSetup")
  77. --external scripts(scripts not made by me, and are place holders until i make my own)
  78. --Client Scripts
  79. shell.run("pastebin","get","uvMPphNp","os/os_Programs/ClientApps/os_ApplicationInstaller")
  80. shell.run("pastebin","get","TcncRKix","os/os_Programs/ClientApps/Client_AppStore")
  81. shell.run("pastebin","get","rMHdqVe8","os/os_Programs/ClientApps/os_AccountPgScript")
  82. shell.run("pastebin","get","uZb9gL4y","os/os_Programs/os_SearchEngine/Base")
  83. shell.run("pastebin","get","02tHaSyf","os/os_Programs/os_SearchEngine/ExitScript")
  84. shell.run("pastebin","get","q0rJqitx","os/os_Programs/ClientApps/Painter")
  85.  
  86. term.clear()
  87. term.setCursorPos(1,1)
  88. local AccountTxTFile = fs.open("os/os_Programs/os_AccountPgTxT","w")
  89. AccountTxTFile.writeLine("User Account")
  90. AccountTxTFile.writeLine("os/os_Programs/os_AccountPgScript")
  91. AccountTxTFile.close()
  92. settings.load(".settings")
  93. settings.clear()
  94.  
  95. settings.define("OperatingSystem",{ description = "the OS"})
  96.  
  97. settings.define("os_NetworkConnect",{ description = "if the OS is allowed to use Wireless functions"})
  98.  
  99. settings.define("os_Version",{ description = "the os version"})
  100.  
  101. settings.define("os_BootMode",{ description = "boot method", default = true})
  102.  
  103. settings.define("Allow_OsUpdates",{ description = "Wither to allow Updates to os", default = false})
  104.  
  105. settings.define("os_DesktopLoc", { description = "the Desktop script for the os", default = "os/os_Programs/os_MainScript"})
  106.  
  107. settings.define("os_Username", { description = "the clients Username", default = "guest"})
  108.  
  109. settings.define("os_LockScreenPassword", { description = "the clients Username", default = "n"})
  110.  
  111. settings.define("os_startApps", { description = "Apps started after Boot"})
  112.  
  113. settings.define("os_BetaTest", { description = "beta test features on or off"})
  114.  
  115. settings.define("ClientApps_Names", { description = "Client Apps"})
  116.  
  117. settings.define("ClientApps_Paths", { description = "ClientApps Paths"})
  118. settings.set("os_NetworkConnect", true)
  119. settings.set("os_Version","1.1.0")
  120. settings.set("OperatingSystem","CCSPS")
  121. settings.set("banking_System","n")
  122.  
  123. settings.set("os_LockScreenPassword","n")
  124. settings.set("os_startApps","example")
  125. settings.set("os_DesktopLoc","os/os_Programs/os_MainScript")
  126.  
  127. settings.set("os_BootMode",false)
  128.  
  129. settings.set("os_Username","guest")
  130.  
  131. settings.set("Allow_OsUpdates",false)
  132.  
  133. settings.set("os_BetaTest",false)
  134.  
  135. settings.set("ClientApps_Names",{"Account Page", "Online Apps","App Store","Painter","Settings"})
  136.  
  137. 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"})
  138.  
  139. settings.save(".settings")
  140.  
  141. function EndInstall()
  142. print("Download Complete!")
  143. print("Rebooting to Install")
  144. os.sleep(3)
  145. os.reboot()
  146. end
  147.  
  148. EndInstall()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement