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

Updaters - How Would I Make One?

Started by Dave-ee Jones, 22 August 2013 - 12:37 AM
Dave-ee Jones #1
Posted 22 August 2013 - 02:37 AM
So as some of you might know I have uploaded my own OS and am constantly updating it. But I wanted to know something that I have seen in most programs and OS's.

They have an update-checker.

I would love to know how to make one as it would really help my OS. I was also wondering if there is a way to let people download the Updater/Installer once so they dont have to keep downloading the new installer every single time there is an update. So I am really interested in these things.

Would love some answers.
Lyqyd #2
Posted 23 August 2013 - 11:10 AM
Missed this at first. Posting to bump it to the top since I just now approved it.
Zudo #3
Posted 23 August 2013 - 02:23 PM
Have a package (see [member='oeed']'s program) on a web server that you update every release, and have a program download that.
albrat #4
Posted 23 August 2013 - 07:32 PM
Have a single file online with a version number… Have each version of your program try and download that file near the beggining of your load up.. run a check against the version of the file and the version of your current program… Voila a quick and easy way of version checking. (do a error handler to set the version to the same as the current version if your online file is not available, just to avoid a value compared to nil… err. )

Doing the single Version file, means you use less bandwidth to check online for new versions and that the program can start running faster instead of downloading everything every time.

I have not played around with online files… But I guess having a patebin account would mean you could update the files there… then just have your check run a program to download from the pastebin links. (all you do is add a new version to your pastebin and use the same link address).

pastebin get .... startup	 -- // for example
Dave-ee Jones #5
Posted 24 August 2013 - 02:55 AM
Have a package (see [member='oeed']'s program) on a web server that you update every release, and have a program download that.

That is probably the best option…Thanks.

@albrat

So, say I wanted to check for an update, and I went 'check for update' in the installer. It would refer to the pastebin id code and read the first line which is the version variable. So if it was the same as the current version variable then there would be no update, otherwise if it is not the same there is a new update. I would still have to make a package to edit every update, wouldn't I?