-
Notifications
You must be signed in to change notification settings - Fork 24
Patch System API
Wesley Haws edited this page Nov 2, 2016
·
23 revisions
####How to use
using GameDevRepo;
PatchSystem patch = new PatchSystem();
patch.InitializeVariables();
###Here is a list available API calls
Function | Returns | Description |
---|---|---|
InitializeVariables() | nothing | This is used to simply initialize your starting variable to their correct values. |
downloadFromURL() | nothing | Downloads contents from a url link to a desired save location. |
getResponseFromURL() | string | This will get the contents from a url and return it as a string. |
GetLocalVersion() | string | Reads your designated local "version" file and returns it's contents. |
generateProjectPatches() | nothing | Scans project and generates delta files. It optionally will save all files to a desired location. |
generateSignatureFile() | "Success" or Error Message | Generates a "signature" file used to later generate delta files. |
generateDeltaFile() | "Success" or Error Message | Generates a delta file based of previously generated signature file. |
applyPatch() | "Success" or Error Message | Applies the delta file to a target file. Essentially updating it to the new file. Appends a ".new" to the updated files (does not delete the old file) |
removeOldFiles() | "Success" | Removes all *.delta and *.sig files from a directory. Also replaces all files with their similar named *.new files. |
CheckForUpdates() | boolean | Compares a local "version" file with a remote "version" file to see if updates are available. |
The following is a list of github repositories that made all of this possible:
delta patches: https://github.com/OctopusDeploy/Octodiff
.net 4 implemented in Monodevelop: https://github.com/mono/mono
Tuples In Unity: https://gist.github.com/michaelbartnett/5652076
Octodiff: https://github.com/OctopusDeploy/Octodiff
Input Manager: https://github.com/daemon3000/InputManager