SimpleUpdater icon indicating copy to clipboard operation
SimpleUpdater copied to clipboard

Handling multiple updates

Open b2k opened this issue 9 years ago • 1 comments

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());
                }
            }

b2k avatar May 26 '15 22:05 b2k

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

okoetter avatar Jan 18 '16 11:01 okoetter