NetSparkleUpdater / NetSparkle

NetSparkle is a C#, cross-platform, highly-configurable software update framework with pre-built UI for .NET developers compatible with .NET 4.6.2/.NET 6+, WinForms, WPF, and Avalonia; uses Ed25519 signatures. View basic usage here in the README and try the samples for yourself.
https://netsparkleupdater.github.io/NetSparkle/
MIT License
609 stars 84 forks source link

Help with release lists #120

Closed brutalzinn closed 4 years ago

brutalzinn commented 4 years ago

Hello. Thank you very much for this library. I am trying to implement this in my application .. and I am very confused on some points.

I'm trying to follow the guidelines answered question in this: https://github.com/NetSparkleUpdater/NetSparkle/issues/118#issue-660694626

but I’m stuck on creating the custom form. I need to list all the versions available for download .. but the await mySparkleinstance.CheckForUpdatesQuietly() returns null when the user skips an update.

 var _updateInfo = await _sparkle.CheckForUpdatesQuietly();
                if (_updateInfo != null)
                {

                    var form = _sparkle.UIFactory.CreateUpdateAvailableWindow(_sparkle, _updateInfo.Updates);

                    //form.HideRemindMeLaterButton();
                    //  form.HideSkipButton();

                    form.Show(true);
                }
Deadpikle commented 4 years ago

Hi @brutalzinn!

I'm so sorry I haven't replied. Things are just slipping past me right now, and I apologize. Thank you for reporting the issue. I hope to take a look at it before the end of my day today (23 August), but if not, I hope within a few days I can take a look.

This is happening because of these lines here:

https://github.com/NetSparkleUpdater/NetSparkle/blob/d7c86cc1898661c72405fb5a35d4c57315732c0f/src/NetSparkle/SparkleUpdater.cs#L573-L577

Basically, if getting the latest update was skipped, the list of updates isn't sent back. This is clearly an issue for your use-case, and I will think of a solution soon.

Thank you!

Deadpikle commented 4 years ago

@brutalzinn This should now be working in 2.0.0-preview20200823002, which is rolling out via CI now.

var _updateInfo = await _sparkle.CheckForUpdatesQuietly(); should now return some updates if some are available. You can always compare the versions in the list of updates with the config's LastVersionSkipped to see if one was skipped manually.

My apologies again for this taking so long for even a response. Thank you for participating in the NetSparkleUpdater community!