UPDATE
======

HXE has a built-in updater which allows assets in a specified manifest
to be updated.

Assets are conditionally updated by comparing file sizes. If the size of
the asset found on the file system matches the one declared in the
asset's entry in the manifest, then it will be skipped.

Manifest files can be imported from a filesystem or HTTP resource:

    .\hxe.exe -update "http://domain.tld/manifest.xml" # or path to file

An update manifest should conform to the following schema:

    <?xml version="1.0" encoding="utf-8"?>
    <Update xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Assets>
        <Asset>
          <URL>https://github.com/yumiris/SPV3/releases/download/2019-05-08.02/chimera.zip</URL>
          <Name>chimera.dll</Name>
          <Path>controls</Path>
          <Size>8192</Size>
        </Asset>
        <Asset>
          <URL>https://github.com/yumiris/SPV3/releases/download/2019-05-08.02/ui.zip</URL>
          <Name>ui.map</Name>
          <Path>maps</Path>
          <Size>8192</Size>
        </Asset>
      </Assets>
    </Update>

The manifest can be programmatically created using the following code:

    new Update
    {
      Assets = new List<Update.Asset>
      {
        new Update.Asset /* asset 01 */
        {
          Name = "chimera.dll",                                                                 /* asset to update */
          URL  = "https://github.com/yumiris/SPV3/releases/download/2019-05-08.02/chimera.zip", /* download url    */
          Path = "controls",                                                                    /* path in folder  */
          Size = 8192                                                                           /* asset size      */
        },
        new Update.Asset /* asset 02 */
        {
          Name = "ui.map",                                                                      /* asset to update */
          URL  = "https://github.com/yumiris/SPV3/releases/download/2019-05-08.02/gui.map.zip", /* download url    */
          Path = "maps",                                                                        /* path in folder  */
          Size = 16384                                                                          /* asset size      */
        }
      }
    }.Export("manifest.xml");
