Quipex

Disk/setup

Apr 22nd, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. function reading()
  2. sleep(0.5)
  3. write "."
  4. end
  5.  
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. shell.run('disk/mem/redworks/apis/redworks')
  9. print(" _ \\ | | ")
  10. print(" / -_) _' | \\ \\ \\ / _ \\ _| | / (_-< ")
  11. print(" _|_\\ \\___| \\__,_| \\_/\\_/ \\___/ _| _\\_\\ ___/ ")
  12. print(" Development Team at http://redworksos.com")
  13.  
  14. --Pre-Install
  15. term.setCursorPos(1,5)
  16. print"+________________________________________________+"
  17. term.setCursorPos(20,7)
  18. sprint("CAUTION!!!")
  19. term.setCursorPos(1,8)
  20. print"+------------------------------------------------+"
  21. print("\nThis will remove any previous installation\nof Redworks on this Terminal.\nPlease make Backups if necessary.")
  22. term.setCursorPos(1,17)
  23. print("To proceed press ENTER. To Cancel Press BACKSPACE")
  24. while true do
  25. fault, event, param1, param2, param3 = pcall(os.pullEvent)
  26. if fault == false then
  27. elseif event == "key" and param1 == 14 then
  28. shell.run("disk/startup")
  29. elseif event == "key" and param1 == 28 then
  30. break end
  31. end
  32. fs.delete("startup")
  33. fs.delete("logic/")
  34. fs.delete("mem/")
  35. fs.delete("ACCOUNTS.F")
  36.  
  37. --Installation
  38. term.clear()
  39. term.setCursorPos(1,2)
  40. write "Preparing files"
  41. for n=1,5 do
  42. reading()
  43. end
  44. write "\n\nInstalling Redworks core files"
  45. for n=1,4 do
  46. reading()
  47. end
  48. print"Done."
  49. write "\nInstalling Redworks libraries"
  50. for n=1,3 do
  51. reading()
  52. end
  53. print"Done."
  54. write "\nInstalling Redworks programs"
  55. for n=1,2 do
  56. reading()
  57. end
  58. print"Done."
  59. write "\nChecking for broken files"
  60. for n=1,2 do
  61. reading()
  62. end
  63. print"Done."
  64.  
  65. fs.copy("disk/launcher", "startup")
  66. fs.makeDir("logic/")
  67. fs.copy("disk/mem/autorun/", "mem/autorun")
  68. fs.copy("disk/mem/redworks/apis/", "mem/redworks/apis")
  69. fs.copy("disk/mem/redworks/help/", "mem/redworks/help")
  70. fs.copy("disk/mem/redworks/libs/", "mem/redworks/libs")
  71. fs.copy("disk/mem/redworks/minepedia/", "mem/redworks/minepedia")
  72. fs.copy("disk/mem/redworks/programs/", "mem/redworks/programs")
  73. sleep(2)
  74.  
  75. --Exit
  76. term.clear()
  77. term.setCursorPos(1,1)
  78. print(" +---------------+")
  79. term.setCursorPos(18,2)
  80. print("!Congratulations!")
  81. term.setCursorPos(1,3)
  82. print(" +---------------+")
  83. term.setCursorPos(1,5)
  84. sprint("You've successfully installed Redworks\non Terminal # " ..os.getComputerID()..".")
  85. print("\nPut your floppy away, or use it to install Redworks on another Terminal.")
  86. print("\nBe sure to stop by the forums for updates, suggestions and technical support.\n Take the floppy out and reboot the Terminal.\n\nThank You for choosing Redworks!")
  87. term.setCursorPos(1,17)
  88. print("Press BACKSPACE to return.")
  89. while true do
  90. fault, event, param1, param2, param3 = pcall(os.pullEvent)
  91. if fault == false then
  92. elseif event == "key" and param1 == 14 then
  93. shell.run("disk/startup")
  94. break end
  95. end
Add Comment
Please, Sign In to add comment