Chronos Posted December 12, 2016 Share Posted December 12, 2016 I've recently been working on a patcher that allows users to very easily add new updates in a drag and drop manner. Because when you're developing a game, the last thing you want to do is think about what you changed in your files since last time right? You want to be able to just drag and drop your files into a folder and be done with it.  Well, that's what this updater is all about! Set it up and forget about setting up new updates. All you need to do beyond the initial setup is drop your client files into a folder and run a simple webpage to update the database with all your recent changes. Anything that hasn't been changed will not be copied nor downloaded to your users!  The provided patcher application is just a basic patcher with little to nothing special about it, but it's generic enough to do the job for the majority of projects. Of course since the source is provided you're more than welcome to change it to anything you'd like.. or write your own with the provided Api library. Everything in the project is written in C#, and compatible with Mono so it can and will run on a Linux or MacOSX box.  Git Repository: https://source.vanharberden.eu/silvester/auto-updater Latest version: https://source.vanharberden.eu/silvester/auto-updater/tags  If you have any problems with the updater, please let me know or create an issue on the repository for me to look at. Basic How-To (Optional) Install MySQL Server and import https://source.vanharberden.eu/silvester/auto-updater/blob/master/Database.sql Upload the WebApi to either a linux box running Mono or IIS. Configure WebApi's Web.Config file for SQLite or your MySql database. Configure the UpdaterApplication project's files to point to your webserver. Upload all client files to a folder called NewFiles in the WebApi directory. Go to http:///ProcessNewFiles.aspx and wait for it to tell you it's done. Open your updater and watch it go! KingFluffyBuns, hra, Giligis and 2 others 5 Link to comment Share on other sites More sharing options...
Phenomenal Posted December 12, 2016 Share Posted December 12, 2016 @Chronos Gj on this Link to comment Share on other sites More sharing options...
Cheshire Posted December 13, 2016 Share Posted December 13, 2016 Any particular reason why it uses mysql instead of sqlite? That would drastically cut down on how hard it is to set up. Link to comment Share on other sites More sharing options...
Chronos Posted December 13, 2016 Author Share Posted December 13, 2016 2 hours ago, Joyce said: Any particular reason why it uses mysql instead of sqlite? That would drastically cut down on how hard it is to set up. Mainly because it's easier to get my TSQL Query transitioned to MySql than to SQLite seeing how it's fairly basic. MySql already doesn't support what I use in my personal version, and SQLite would have me resort to pulling the entire table and running a Linq query against it to get the latest versions of each individual file, whereas in MySql I can simple let the Database engine handle this through the following query:  SELECT  id, version, file, hash FROM ( SELECT  @row_num := IF(@prev_value=f.file,@row_num+1,1) AS RowNumber, f.id, f.file, f.version, f.hash, @prev_value := f.file FROM files f, (SELECT @row_num := 1) x, (SELECT @prev_value := '') y WHERE f.version > {0} AND f.version <= {1} ORDER BY f.file, f.version DESC ) x WHERE RowNumber = 1 I suppose I can whip up an SQLite version (Possibly have it as a setting?) as well should people want me to, it's not a very hard thing to do.  Anyhow, I might end up making a more detailed guide on how to get this running at some point today, if I get the time to do so. KingFluffyBuns 1 Link to comment Share on other sites More sharing options...
Chronos Posted December 14, 2016 Author Share Posted December 14, 2016 I've started work on supporting SQLite as well. Mind you, this means that all queries need to be written in a generic fashion supported by both MySql and SQLite. But since there's not all that many queries going around that shouldn't be too hard to do. I'll push all these changes to a new branch over here: https://source.vanharberden.eu/silvester/auto-updater/tree/SQLite_Addition  I've also started filling up the project Wiki, though this is not yet in a state where it can be used as a guide.  EDIT: SQLite support has been added. Link to comment Share on other sites More sharing options...
Chronos Posted December 15, 2016 Author Share Posted December 15, 2016 I've just fixed a rather glaring problem I overlooked in supporting SQLite, and changed how the Api works. Going to add configurable storage/newfile locations next. 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