So, I’ve been working on this project for a very long time and I’m now happy to announce that it is finally released! SimplePatchTool is a C# library for patching standalone applications with binary diff and self patching support.
does not request admin permissions unless necessary
supports encrypting/signing important patch files as an additional layer of security
Currently, this library is only tested on a 64-bit Windows 10 installment. Please note that SimplePatchTool is not yet battle tested thoroughly, so you may encounter unknown issues while integrating it into your projects. Don’t hesitate to open an Issue on GitHub when you encounter one!
Although patching another app (launcher logic) is very similar to self patching an app (the major difference is to call the patcher.Run function with parameter false), I do plan to add a tutorial for launchers, as well. In the meantime, feel free to ask any questions you have.
I’m trying to use your SimplePatchTool for a project, but I’m not really understanding how the different files correspond to each other. What exactly goes in the VersionInfo.info file? It’s also not really clear how the patches are referenced. Are they referenced in the VersionInfo.info file?
I’m trying to write a stand-alone application with WPF for this and it’s a bit confusing how the different files are supposed to be set up.
It would help a lot if you had an example somewhere.
VersionInfo is the heart of the system. Metadata (download links, filesizes, hashes) about all the files in the version as well as metadata about all the incremental patches are stored there; open it with Notepad and you will see. Detailed information about each incremental patch is stored in a separate file called PatchInfo (named version1_version2.info). Before applying an incremental patch, SimplePatchTool downloads the corresponding PatchInfo via the download link found in VersionInfo.
Basically, you upload all the generated patch files to the server of your choice, update the download links in VersionInfo and then reupload the updated VersionInfo to the server. At runtime, your WPF app downloads VersionInfo from the server, checks for updates and downloads any necessary files via the download links in the VersionInfo, if there is an update.
Detailed information about all these steps can be found at: Home · yasirkula/SimplePatchTool Wiki · GitHub. Please let me know if you get stuck at a point so that I can clarify that point.
Thanks for the response. I think I understand it now.
Can I request for a method in PatchUpdater that’s the equivalent of UpdateDownloadLinks( string downloadLinksPath ), but by passing in your own Dictionary?
Also, does this only do incremental patches? Are all repair patches incremental patches? The way the glossary is worded makes it seem like they are two different types of patches. The repair being one that is just a binary containing the update and incremental being a binary of the diff…
Thanks for this library. It’s saved me hours upon hours of work.
@hopeful I’ll try to create a simple example, thank you for the feedback.
@ExpensiveKoala Will add the requested method in the next update. Repair patch checks each file one by one and downloads each out-of-date file from the server. There is only one repair patch. Incremental patch stores the changes between two versions of the app, e.g. from version 1.0 to version 1.1. There can be multiple incremental patches, e.g. 1.0->1.1 and 1.1->1.2. Incremental patches are usually cheaper (sometimes much cheaper) than repair patch.
@ExpensiveKoala The requested function is now available at the GitHub repository. I’ve also tried to clarify some of the confusing parts of the wiki. I’ll see what else I can do.
I am looking to use this tool for mobile to not only patch a game when i need to but also on first install load the majority of assets like in an asset bundle - can this be done with this? From the tutorial it mentions changing the scene objects and im going to be changing multiple scene info and adding removing assets from the asset bundles /etc
im just trying to piece it altogether
create assetbundles and remove them from the game (Scene/Scripts/sprites/prefabs/and all except for the first scene which ill just make a patcher Scene First which calls the simple patch tool then load the next scene which would be another loader scene )
build game with simple patch tool - v1.0 - publish to play store or w.e
add asset bundles and scripts and all other scenes - v1.1
then it should patch?
This would mean that basically that the game would basically be crap all except a dumb scene maybe a logo or something and the patcher UI prefab and a scenemanager probably and then it downloads EVERYTHING else - (actually this would be an easy thing to code and be a very basic script for ANY project)
the question is if someone has v1.0 and im on v5.0 will the patch tool be able to update that persons client? if i do incremental patches i dont think it will cause as you state in the tutorial you remove the previous patch files. Which means i would have to do a repair patch for ALL patches just in case someone isnt going from v1.0 to v1.2…know what i mean - let me know your thoughts and if i am totally wrong on this one
@duartedd The only big issue here is that, SimplePatchTool supports only standalone platforms, so you can’t use it on mobile platforms. But if it was a standalone platform, you could patch the app from any version to the latest version with repair patch (SimplePatchTool uses repair patch automatically if incremental patches don’t/can’t patch the application to the latest version).
Hello, I’m trying the Launcher demo and the patches succeed but I can’t download the patches as it throws downloaded file […] is corrupt. Anyone having the same issue?