Skip to content

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.
Clone this wiki locally