Joyce Posted August 20, 2012 Author Share Posted August 20, 2012 * * ***Setting up a proper autoupdater*** * *As many of you guys know, I've modified Robin's old boring updater several times now.. And updated and fixed it a few times, this time around I fixed every bug I could find and rewrote a few pieces of it to work much more fluently, removed a ton of unessecary junk and made it a lot easier to configure.So then, let's get started shall we?**Prerequisites*** FTP Knowledge* A website with FTP Access* An FTP Client* WinRAR* MSINET.OCX (From the Visual Basic 6 Service Pack 6)Note that you will need to include MSINET.OCX in your installer or runtime file installer and have them register the file for your game if you want everyone to be able to use this patcher. OR try shipping it alongside your executable, although I wouldn't really recommend doing this.**Download The Updater**Seems like a fairly important step right? Just download the file linked below and extract it anywhere on your computer.[[Download]](http://prothesys.com/downloads/Updater.zip)**Logging into your FTP Account**First thing you'll need to do is pull up your FTP client and log into your website, go to where you want your patch folder to be located,and make a new folder.. In my case, I will use /updates/.**Getting the files on there**Now, go make a news page. Dooo eeeeet.Done? Good, upload it to your update folder, or anywhere else on your website if you prefer it to be elsewhere. After this, go into the location you extracted the updater files to, go into the **Server** folder and upload these files to your update folder.Yes, the file is called **update.txt**, why you ask? Why not *.ini? Well, most webhosts do not have a MIME filter addition for *.ini files, and thus do not allow them to be downloaded. a *.txt is fairly universal and will work on just about any webhost, so I changed it around. :]_Do note that Version1 is not empty, you can put your entire game client in here if you wish, and only install the updater on someone's computer with version=0 in the local config file, this will then download the client through the updater. you can't have empty *.rar files sadly._**Setting up the client side**Hopefully you know the URL of your own site, as you'll need this! Head into the **Client** folder of your extracted files, and copy the following files and folders to your game client's folder:* Launcher.exe* Unrar.dll* Data FilesThe other files are not needed by the compiled binary, note that **Data Files\graphics\gui\updater** contain the graphic files used by the launcher. Update,jpg is used when the game is updating, and Launch.jpg when it's done and ready to launch.Now then, let's go into **Data Files** and edit **UpdateConfig.ini**.. You'll notice the following lines:**GameWebsite=**The URL to your website, it's really not used right now.. But I never removed the option. :]**updateURL=**The URL that points to your update directory we made before, make sure it ends with a / to have it function!**NewsURL=**The URL that points to your news page, for patch information and whatnot.**Version=**The version of your local client.**ClientName=**The name of your client's executable to launch when a player hits the Launch button.Configure them appropriately, and if you're lost here's an example:```[UPDATER]GameWebsite=http://www.touchofdeathforums.com/updateURL=http://81.169.138.9/updates/NewsURL=http://81.169.138.9/updates/news.htmlVersion= 1ClientName= Client.exe```It points to my testing server. :] It should be up for the most part, but I added it on here to just allow you to see what needs to have what entered.**Uploading an Update**Well, now you have an updater.. But no idea how to make updates! No worries, just make sure you keep track of what you updated. You simply need to put ALL the files you changed with their file hierarchy* in a new versionX.rar file, where X is your new version number(So if we're going from Version 1, make it 2).Done? Alright, let's upload it to our webserver's update folder next to the other version rar files. Once the upload has been completed, open up update.txt and change the version number to your latest version you just uploaded, the next time you run your patcher it will update your game files with the new patch! It's that simple. :]Note that you can NOT EVER include unRAR.dll or Launcher.exe in your version.rar files, this will cause errors with extracting the files.(*= If a file is in Data Files\Graphics on the client, it has to be in Data Files\Graphics in the *.rar file as well)* * ***F.A.Q.*** * ***Do my players need WinRAR installed?**No, they do not. unrar.dll handles this for them. :]**Can I use this on XXX webhost?**Don't know nor care, it's your responsibility to find out if your host allows hotlinking or not.**OMG IT CRASHES!!!!!!1111ONEONEONE**Congratulations for handing me the most useless report ever. Here's a hammer to pound your skull in.**Can I use this with XXXXX Program?**Yup, this isn't bound to just Eclipse.. It can pretty much update anything you want to really. Link to comment Share on other sites More sharing options...
help Posted August 21, 2012 Share Posted August 21, 2012 I have a problem with this. Look when I update it downloads like a whole file called version1 . Like I haveData Files , Version1 , Launcher , Unrar. Why is this ? Here is my config[UPDATER]GameWebsite=http://www.warofgames.x10.mx/updateURL=http://warofgames.x10.mx/updates/NewsURL=http://warofgames.x10.mx/updates/news.htmlVersion= 1ClientName= Play.exeAlso why doesn't the updater let u download the thing again like example if it already downloaded version 1 and u delete it . You can't redownload.Thanks For Your PatienceP.S where do I upload the news? I made a folder in my public html. Called Updates then uploaded all the files etc And I uploaded the news.html but when I go to http://warofgames.x10.mx/updates/news.html It won't work  . Link to comment Share on other sites More sharing options...
Joyce Posted August 21, 2012 Author Share Posted August 21, 2012 I don't get the problem? An updater is supposed to download the updates once isn't it? It downloads a patch, extracts it and adjusts the value of version= in your local *.ini file so your client knows it has been updated and doesn't need to download that version again.As for your news, you're running a Linux box, all filenames are case sensitive.. And you called it News.html, not news.html. ;] Link to comment Share on other sites More sharing options...
Vus Posted August 21, 2012 Share Posted August 21, 2012 Nice updater, this will be handy. Link to comment Share on other sites More sharing options...
Likestodraw Posted August 21, 2012 Share Posted August 21, 2012 Ooh! You finally fixed this! Link to comment Share on other sites More sharing options...
Joyce Posted August 21, 2012 Author Share Posted August 21, 2012 Yup, it should function without always downloading two versions and on just about any webhost now. :] And some other minor changes, like cleaning up parts of the code, adding some comments here and there.. It's still a bit messy, and could use some changes here and there I guess. But alas, it's not hard to make sense of. :] Link to comment Share on other sites More sharing options...
abhi2011 Posted August 21, 2012 Share Posted August 21, 2012 GUI please!This would be 100% usable if there was a good GUI! Or if it was a bit more structured. Link to comment Share on other sites More sharing options...
Joyce Posted August 21, 2012 Author Share Posted August 21, 2012 Erm, I don't think it looks that bad? And look in the Graphic Files folder, and open the project I distributed along with it.. It's Open Source .__. Besides, you really shouldn't use a standard interface for your own game, just make one that suits your game and adjust the UI accordingly, I just made this because by default, Robin's updater is confusing and doesn't work similar to a more standard updater. Link to comment Share on other sites More sharing options...
help Posted August 21, 2012 Share Posted August 21, 2012 Well I found the problem to my updater not working correctly well in my version 1 i had another version1 inside it. Also is there a way I can make it like for example if the player deletes the files . Then the updater can redownload them is this possible? I would love it if the updater did that.P.S my news didn't work cause I forgot to put and xD Also I don't know what a linux box is all I know is that I used my webhost. Link to comment Share on other sites More sharing options...
Joyce Posted August 21, 2012 Author Share Posted August 21, 2012 Well, as long as it's fixed.. Changing your url to News.html fixed it as well though And no, this will not download removed files, it's a very basic setup. Not a full on checksum/bit updater. Link to comment Share on other sites More sharing options...
Marsh Posted August 21, 2012 Share Posted August 21, 2012 Looks nice and clean, good job. Link to comment Share on other sites More sharing options...
PVJsquad Posted August 22, 2012 Share Posted August 22, 2012 you know where I can download MSINET.OCX Link to comment Share on other sites More sharing options...
Vus Posted August 22, 2012 Share Posted August 22, 2012 > you know where I can download MSINET.OCXTook me 3 secs on googlehttp://www.ocxdump.com/download-ocx-files_new.php/ocxfiles/M/MSINET.OCX/6.01.9782/download.html for example. Link to comment Share on other sites More sharing options...
Joyce Posted August 22, 2012 Author Share Posted August 22, 2012 Right, edited the tutorial to include that file as a pre-requisite. I completely forgot about it. Also added where it comes from, and that it has to be registered. Link to comment Share on other sites More sharing options...
Wins Posted August 23, 2012 Share Posted August 23, 2012 Here's the HQ button for your Launch button, this is what I mean't. Link to comment Share on other sites More sharing options...
Joyce Posted August 23, 2012 Author Share Posted August 23, 2012 That makes sense, hardly a bug though. :]I tossed the UI together real quick, it was never intended to be used as is. More to show what the UI images do.. People will need to change the entire thing to suit their game anyway. :] Link to comment Share on other sites More sharing options...
tslusny Posted August 23, 2012 Share Posted August 23, 2012 AUtoupdater is giving me mismatch errorHere is my ini-[UPDATER]GameWebsite=http://www.prospektonline.tk/UpdateURL=http://www.prospektonline.tk/updateNewsURL=http://www.prospektonline.tk/news.htmlVersion=1ClientName=Prospekt Online.exe Link to comment Share on other sites More sharing options...
Joyce Posted August 23, 2012 Author Share Posted August 23, 2012 ```UpdateURL=http://www.prospektonline.tk/update```Should be```UpdateURL=http://www.prospektonline.tk/update/``` Link to comment Share on other sites More sharing options...
tslusny Posted August 23, 2012 Share Posted August 23, 2012 > ```> UpdateURL=http://www.prospektonline.tk/update> ```> > Should be> > ```> UpdateURL=http://www.prospektonline.tk/update/> ```before in tmpUpdate was some html code and now its just empty and still throws same error Link to comment Share on other sites More sharing options...
Joyce Posted August 23, 2012 Author Share Posted August 23, 2012 Your update.txt is empty.  Link to comment Share on other sites More sharing options...
tslusny Posted August 23, 2012 Share Posted August 23, 2012 > Your update.txt is empty. No it isnt i think my webhost dont support txt files  try - [http://prospektonline.tk/update/](http://prospektonline.tk/update/) Link to comment Share on other sites More sharing options...
Joyce Posted August 23, 2012 Author Share Posted August 23, 2012 Yes it is, look at this file:http://www.prospektonline.tk/update/update.txt Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2012 Share Posted August 23, 2012 put this```[FILES]Version1 = version1.rar```in tmpUpdate.ini Link to comment Share on other sites More sharing options...
Joyce Posted August 23, 2012 Author Share Posted August 23, 2012 That won't do much in his case, or anyone's. As it downloads that file. ;] Link to comment Share on other sites More sharing options...
Justn Posted August 25, 2012 Share Posted August 25, 2012 Download link seems to be down =/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now