Hello everyone...
For those of you that don't know me, and those that do and don't recognize the username... I go by Montesboogey, previously on Epvp as Urusendayo. I've lost my account info and unfortunately had to re-register. I've been away for quite some time as I've been caring for my brother in the cancer hospital. (Still fighting strong, the brave bastard) Anyway...
I've done a bit of development recently and since I cannot currently afford to have my server running again any time soon I thought I'd share my stuff around.
I haven't seen a launcher/updater on here and I've seen people in the past asking for one, not to mention countless servers operating without one, so i thought I'd release mine.
It was made in Visual Studio 2012 Ultimate RC (Tested and works fine in VS-2010) in C#. Details are as follows:
- Checks for local version in client folder
- If version file does not exist it assumes the version is "1.0" and creates a version file
- Checks xml file on server for updates
- Downloads updates for all greater versions than the client's current version (updates all in zip file format only)
- Delete's zip files after extraction
- Updates version file in client folder
- And, finally, unlocks the "START GAME" button
How to edit
Open up the sln file in "VS Project" folder with Visual Studio 2010 or Visual Studio 2012 RC:
Look for:
Code:
string Server = "http://127.0.0.1/Updates/";
Change

to whichever url you will be hosting your updates.
Important to note: the url must end with a "/".
Example:
Wrong way:
Code:
http://127.0.0.1/Updates
Right way:
Code:
http://127.0.0.1/Updates/
Open the "Upload to Webserver" folder:
Upload the contents of this folder to wherever you will be hosting your updates. (With exception of the html folder all other files are required or updating will
NOT work.)
In Visual Studio, select the WebBrowser Control (In this case named "patchNotes") and change the url from "http://127.0.0.1/" to whichever url you will be displaying in your launcher:
I have provided a page, located in "Upload to Webserver\html". (Based on Luis Zuno's "Zen" template as a boilerplate.) There is also a psd file located in "Resources" which contains the background and logo source. You may use these however you like.
Next you will want to edit you xml file (Updates.xml) to represent your downloads.
Code:
<?xml version="1.0" encoding="utf-8" ?>
<theupdates>
<update>
* * <version>1.1</version>
* * <file>V1-1.zip</file>
* </update>
<update>
* * <version>1.2</version>
* * <file>V1-2.zip</file>
* </update>
<update>
* * <version>1.3</version>
* * <file>V1-3.zip</file>
* </update>
</theupdates>
This is quite straight forward. Please note, you cannot use decimals "." in the file name or it will return an error. Also note the update
MUST be a zip file. The entire program is dependent on this.
To add an update, simply add it to the "Update.xml"-
Code:
<update>
* * <version>1.4.1</version>
* * <file>V1-4-1.zip</file>
* </update>
And change the version in the "version.txt" on the server.
I have provided a sample launcher in the "Sample Launcher" directory. You can open this up to see it in action. I recommend running it from there rather than using it in a client folder as it will download some "dummy files". if it works correctly you should see it download 3 zip folders, extract them, delete them, then create a "version" file. Inside the "Resource" folder you will then see a "1", "2", and "3" file.
(Also note the launcher
NEEDS the provided dll file to function)
And that about covers it. If you have any questions or comments, feel free to post them here or pm me. If you decide to use my launcher, proper credits are appreciated.
Please, please, please do not flame. I may not be the most gifted C# programmer, but I'm making the effort.
Enjoy
