This project has moved. For the latest updates, please go here.

Every app deserves a HappyBin!

Pages: Documentation, Updater Workflow


Implementation
All the worker code is in Updater.cs. The design is API-like, so one can implement a custom workflow around checking for and installing updates. The dialogs implement a common workflow, such as found in Firefox/Chrome. The dialogs themselves don't do any work - it's all calls to an Updater instance. Also, Updater also serves as a view model of sorts, so one can bind it directly to WPF UIs for easy ux management.

Updater public methods:
/// <summary>
/// Downloads config from specified Uri and compares version to runtime exe version.
/// Starts update if update is marked as 'Mandatory'.
/// </summary>
/// <returns>The initialized PatchStatus (current and download version info)</returns>
public PatchStatus InitializePatchStatus()

/// <summary>
/// Load the configuration file specified in this exe's config "UpdateConfigUri" setting.
/// </summary>
/// <returns>The initialized UpdateConfig.  Values will be empty if the a load failure occurs.</returns>
public UpdateConfig LoadConfig()

/// <summary>
/// Clears existing instances of the application from memory and installs patches in order of folder CreationTime
/// </summary>
/// <param name="processName">Name of exe to Kill</param>
/// <param name="rootUnzipPath">Root path where files will be unzipped</param>
public void InstallExistingPatches(string processName, string rootUnzipPath)

Last edited Nov 3, 2013 at 5:34 AM by steveshortt, version 2