SimpleUpdater
SimpleUpdater copied to clipboard
Handling multiple updates
I added a bit of code to the update process to handle multiple pending updates.
In the server manifest I added
<manifests>
<manifest>
....
</manifest>
<manifest>
...
</manifest>
</manifests>
// download manifest
XDocument doc = XDocument.Load(Settings.Default.RemoteManifest);
// b2k -- look for multiple versions in the file.
var versions = doc.Descendants("version");
if (versions.Count() > 1)
{
var nextVersion =
versions.SkipWhile(node => new Version(node.Value) <= appVersion ).FirstOrDefault();
if (nextVersion != null && nextVersion.Parent != null)
{
doc = new XDocument(nextVersion.Parent.ToString());
}
}
Hi b2k, I used parts of your above code in my fork here: https://github.com/okoetter/SimpleUpdater
This fork changes some parts of this project to better reflect my needs.
Best regards Oliver