Advertisement
Guest User

Cydia

a guest
Jan 27th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.89 KB | None | 0 0
  1. --[[
  2.     PC version of Cydia, compatible with the
  3.     Evasi0n8 jailbreak
  4. --]]
  5.  
  6. x, y = term.getSize()
  7.  
  8. function printc(text, yp)
  9. cx = math.ceil((x/2)-(string.len(text)/2))
  10. term.setCursorPos(cx, yp)
  11. print(text)
  12. end
  13.  
  14. function installerD()
  15. term.setBackgroundColour(colours.black)
  16. term.clear()
  17. term.setCursorPos(1, 1)
  18. printc("Preparing system", 4)
  19. term.setTextColour(0x8000)
  20. sleep(1)
  21. end
  22.  
  23. function installerF()
  24. term.setTextColour(128)
  25. printc("Download completed", 5)
  26. sleep(2)
  27. printc("  ", 6)
  28. printc("Moving files", 6)
  29. sleep(0.3)
  30. printc("  ", 8)
  31. printc("Finishing Operation", 7)
  32. sleep(1.3)
  33. printc("  ", 10)
  34. printc("checking for startup", 8)
  35. sleep(0.7)
  36. if fs.exists("startup") then
  37.  printc("startup exists", 9)
  38. else
  39.  printc("startup doesn't exist", 9)
  40. end
  41. term.setTextColour(1)
  42. sleep(1)
  43. printc("Finishing process", 10)
  44. sleep(2)
  45. term.clear()
  46. term.setCursorPos(1, 1)
  47. end
  48.  
  49. function Uninstall1()
  50.  term.setTextColour(128)
  51.  sleep(1)
  52.  print ("Removed files")
  53.  sleep(2)
  54.  term.clear()
  55.  term.setCursorPos(1, 1)
  56. end
  57.  
  58. if pocket then
  59. term.setBackgroundColour(colours.black)
  60. term.clear()
  61. term.setCursorPos(1, 1)
  62. term.setTextColour(colours.black)
  63. term.setBackgroundColour(colours.red)
  64. print ("Please note that none     ")
  65. print ("(or not many) tweaks or   ")
  66. print ("themes work with OSCM     ")
  67. print ("as of yet, this will      ")
  68. print ("improve over time.        ")
  69. term.setBackgroundColour(colours.black)
  70. term.setTextColour(colours.white)
  71. launch = read()
  72. if launch == "" then
  73. else
  74. end
  75. end
  76.  
  77. term.setTextColour(colours.white)
  78. term.setBackgroundColour(256)
  79. term.clear()
  80. term.setCursorPos(1, 1)
  81. if fs.exists("UI/statusbar") then
  82.  shell.run("UI/statusbar")
  83. elseif fs.exists("System/UI/statusbar") then
  84.  term.setBackgroundColour(128)
  85.  term.setCursorPos(1, 1)
  86.  term.clearLine()
  87.  write ("Cydia installer")
  88.  shell.run("System/UI/statusbar")
  89. else
  90.  term.setBackgroundColour(128)
  91.  print ("Running in compatibility mode for other firmware   ")
  92. end
  93. term.setBackgroundColour(256)
  94. term.setCursorPos(1, 2)
  95.  
  96.  if pocket then
  97.   print("Cydia 1.1.12")
  98.   print("  ")
  99.   print("Type a name to download it")
  100.   print("type 'desc' at the end")
  101.   print("for information")
  102.   print("  ")
  103.   print("Available:")
  104.   print("  ")
  105.   print("CydiaInstaller")
  106.   print("Classic Terminal")
  107.   print("Verdict")
  108.   term.setCursorPos(1, 20)
  109.  else
  110.  print (" Cydia PC 1.1.12")
  111.  print ("  ")
  112.  print (" Type a name to download the tweak")
  113.  print (" Tweaks:")
  114.  print ("        CydiaInstaller")
  115.  print ("        Verdict")
  116.  print ("        Classic Terminal")
  117.  print ("        ClearBoard")
  118.  term.setCursorPos(1, 16)
  119.  print (" For tweak descriptions type the name and 'desc'")
  120.  print ("  ")
  121.  end
  122.  
  123. answer = read ()
  124. if answer == "classic terminal" then
  125.  installerD()
  126.  shell.run("move CC CraftOS/CC")
  127.  shell.run("move NC CraftOS/NC")
  128.  shell.run("move MPlayer CraftOS/MPlayer")
  129.  shell.run("pastebin get GyR4vC7D CC")
  130.  shell.run("pastebin get STm9SzAV NC")
  131.  shell.run("pastebin get xPUEYSmC MPlayer")
  132.  installerF()
  133. end
  134.  
  135. if answer == "classic terminal desc" then
  136.  term.clear()
  137.  term.setCursorPos(1, 1)
  138.  shell.run("CraftOS/StatusBar")
  139.  term.setCursorPos(1, 2)
  140.  print ("This brings you back the old Terminal by bypassing the Login screen and the Terminal options screen, this may be a little slow at first. Only manual uninstallation (rename files to original name)")
  141.  close = read ()
  142. end
  143.  
  144. if answer == "uninstall classic terminal" then
  145.  installerD()
  146.  shell.run("delete NC")
  147.  shell.run("delete CC")
  148.  shell.run("delete MPlayer")
  149.  shell.run("move CraftOS/MPlayer MPlayer")
  150.  shell.run("move CraftOS/NC NC")
  151.  shell.run("move CraftOS/CC CC")
  152.  Uninstaller1()
  153. end
  154.  
  155. if answer == "verdict" then
  156.  installerD()
  157.  shell.run("pastebin get B5m6dnfD Verdict")
  158.  installerF()
  159. end
  160.  
  161. if answer == "verdict desc" then
  162.  print ("Verdict is the safest way to edit your system version to anything you want without any errors occouring. On compatible versions you can edit the StatVer file (The file showing the version on the StatusBar) on versions below you will only be able to edit the version file, not both.")
  163.  close = read ()
  164. end
  165.  
  166. if answer == "uninstall verdict" then
  167.  installerD()
  168.  fs.delete("Verdict")
  169.  Uninstaller1()
  170. end
  171.  
  172. if answer == "cydiainstaller" then
  173.  installerD()
  174.  if fs.exists("Cydia") then
  175.   fs.delete("Cydia")
  176.  else
  177.  end
  178.  shell.run("pastebin get 45tc50kH Cydia")
  179.  installerF()
  180. end
  181.  
  182. if answer == "cydiainstaller desc" then
  183.  print ("Cydia Installer is the downloaded version of the new online Cydia app for Jailbroken Computers, to refresh or update this you will need to download the app again from the online version of Cydia. Host app used to install System modifications and themes.")
  184.  print ("  ")
  185.  print ("Update 1.1.12:")
  186.  print ("  ")
  187.  print ("- Refreshed Cydia, now only shows tweaks compatible")
  188.  print ("  with OS C 10 and later.")
  189.  close = read ()
  190. end
  191.  
  192. if answer == "uninstall cydiainstaller" then
  193.  installerD()
  194.  fs.delete("Cydia")
  195.  Uninstaller1()
  196. end
  197.  
  198. if answer == "clearboard" then
  199.  installerD()
  200.  print ("Downloading installer...")
  201.  shell.run("pastebin get AVNUuJ5m ClearInstall")
  202.  print ("Downloading Resources...")
  203.  shell.run("pastebin get qVrZWhGC ClearBoard")
  204.  shell.run("pastebin get HU9t8UXW ClearUI")
  205.  installerF()
  206.  shell.run("ClearInstall")
  207. end
  208.  
  209. if answer == "clearboard desc" then
  210.  print ("ClearBoard is the first tweak that has compatibility with OS C 10 and takes advantage of the new desktop, for those who have used the desktop they will notice it has different UI colours to the rest of the system, not anymore, ClearBoard changes that by giving the desktop the same UI colours as the Terminal (grey and white), this makes the desktop fit into the system like it was supposed to!")
  211.  print ("  ")
  212.  print ("Update 1.1:")
  213.  print ("  ")
  214.  print ("- Compatible with Cydia on OS C 10")
  215.  close = read ()
  216. end
  217.  
  218. term.setBackgroundColour(colours.black)
  219. term.clear()
  220. term.setCursorPos(1, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement