This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Fetchetch's profile picture

Lyte - File downloader with options! (Update 2)

Started by Fetchetch, 13 June 2015 - 08:06 PM
Fetchetch #1
Posted 13 June 2015 - 10:06 PM
Lyte (Update 2)

File downloader with options!


Lyte is a file downloader that is easy to use and everything is packed in one file.

Features:
  • Simple to config.
  • Has options like "RunFileAfterDone" and "RunFile"
  • Look mom, no hands! (User does not have to do anything after running because Lyte takes control.(Unless you edit so you have to do something, of course))
  • GitHub support (Added by Monthkiller in U2)
  • Auto-clean when pressing CTRL+T (Added by Monthkiller in U2)
Screenshots
SpoilerTesting Lyte by downloading Format.


All of the code. Powered by Atom

So, if you want to make your own installer,
  1. Download a programmer text editor such as Atom or Notepad++ or simply use the ingame editor.
  2. Download the program via pastebin get zTQ3qnp0 lyte
  3. Open the program in the editor. To open it from ingame, im pretty sure you can google it (no offence intended).
  4. Change the files table to include the files you want it to download. e.g:
    
    
local files = {
–Add your files here, as many as you want.
–Example: [1] = {name = "format"; url = "pastebin.com/raw.php?i=Pj9LQzfE"},
–Gets format.
[1] = {name = "format"; url = "pastebin.com/raw.php?i=Pj9LQzfE"},
}

5. Change the settings table to what you want. e.g:

		  local Settings = {			
  CurrentTitle = "Format", -- Change this to your programs name.
					
  CurrentSubTitle = "Wipes your computer!", -- That can be used for a short description, but it will only display for 5 seconds.
					
  RunFile = false,
					
  RunFileAfterDone = nil, --Change this if you want to run a file after done. Requires RunFile to be true.
					
  UseGit = false, -- Change if you want to use GitHub *Monthkiller*
					
  GitUsername = "", -- Change to your username if you want to use GitHub. Needs UseGit to be true. *Monthkiller*
					
  GitRepo = "", -- Change to your program's repo if using git. Needs a GitUsername and UseGit is true. *Monthkiller*
					
}
									
6. Save and exit and well, if you want to, test it and it should work. Then if you like it, post it (Make sure you credit me!)
Edited on 13 June 2015 - 09:49 PM
Monthkiller #2
Posted 13 June 2015 - 10:14 PM
First impressions: It isnt all as bad as i thought it be. (why because of the hate storm on Format.)

Pros:
  • Nice GUI.
  • Easy config.
  • One file rules them all.
Cons:
  • No GitHub mode (well it doesn't have a GitUserName and GitRepo and UseGit option. I might be able to improve that.)
  • Not preventing CTRL+T.
Other than that, its basically good.
Fetchetch #3
Posted 13 June 2015 - 10:23 PM
First impressions: It isnt all as bad as i thought it be. (why because of the hate storm on Format.)

Pros:
  • Nice GUI.
  • Easy config.
  • One file rules them all.
Cons:
  • No GitHub mode (well it doesn't have a GitUserName and GitRepo and UseGit option. I might be able to improve that.)
  • Not preventing CTRL+T.
Other than that, its basically good.

Sure, go ahead and improve it. Just tell me in a pm. Ill probably update it the next day once I get the time because its the weekend.
//offtopic: Why only the weekend? Well lets just say i work as a computer tech guy (because i do)
Creator #4
Posted 13 June 2015 - 10:24 PM
Why would it need to prevent CTRL+T? It ain't an OS? And even then.
biggest yikes #5
Posted 13 June 2015 - 10:34 PM
Why would it need to prevent CTRL+T? It ain't an OS? And even then.
The author Monthkiller is saying that the installer doesn't prevent terminating; which, I agree, should never be done (let's say the user suddenly doesn't want to install it. Boom, terminate)
Edited on 14 June 2015 - 09:51 PM
Monthkiller #6
Posted 13 June 2015 - 10:43 PM
Why would it need to prevent CTRL+T? It ain't an OS? And even then.
The author is saying that the installer doesn't prevent terminating; which, I agree, should never be done (let's say the user suddenly doesn't want to install it. Boom, terminate)
Well, what I was trying to get at was, if the user suddenly doesn't want to install it (like Atenefyr said) pressing CTRL+T would cancel the installation and then starts deleting the files it downloaded (if they exist) instead of the user cleaning it up themself just like the crash function that for some reason will never call because the program just ends with a error.
Edited on 13 June 2015 - 08:46 PM
Fetchetch #7
Posted 14 June 2015 - 01:05 PM
Why would it need to prevent CTRL+T? It ain't an OS? And even then.
The author is saying that the installer doesn't prevent terminating; which, I agree, should never be done (let's say the user suddenly doesn't want to install it. Boom, terminate)
Well, what I was trying to get at was, if the user suddenly doesn't want to install it (like Atenefyr said) pressing CTRL+T would cancel the installation and then starts deleting the files it downloaded (if they exist) instead of the user cleaning it up themself just like the crash function that for some reason will never call because the program just ends with a error.

Got the pm. Updated the script yesterday.