Jump to content




How to create an automatic updating program?


  • You cannot reply to this topic
3 replies to this topic

#1 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 23 April 2014 - 07:30 PM

Hi!
I want to crate an automatic updating program, I don't know anything about http API, only I know, that it exists :-) .
Can you help me please?

#2 flaghacker

  • Members
  • 655 posts

Posted 23 April 2014 - 08:00 PM

Can you be a little more specific?

#3 flaghacker

  • Members
  • 655 posts

Posted 23 April 2014 - 08:09 PM

Ok, nevermind, I assume you want to make a program install a fresh copy of himself when you tell him there is an update...

You can do two things:
1) Update every time the program starts
Make a pastebin account, make a new paste and put your program there. Now, instead of running your program directly, you make a "runner file":
shell.run("pastebin get <code> <name>")
shell.run("<name>")
Note that it will take a few seconds for your program to start, because it has to download itself every time it starts.
2)You could make a separate paste, with the update code in it. I'll explain that tomorrow, because typing on my phone is not the best ;)

Edited by flaghacker, 23 April 2014 - 08:11 PM.


#4 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 23 April 2014 - 08:16 PM

It's really a bad idea to do automatic "updating" every time the program starts. The user should have to initiate an update, since most of the time, the program would download a completely identical version of itself anyway.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users