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
606 stars 84 forks source link

Version rollback needs investigating and sample; app cast filtering needs sample #294

Open Deadpikle opened 2 years ago

Deadpikle commented 2 years ago

From @johncclayton on Gitter:

I took a good look at the Configuration code along with debugging it before realizing that the InstalledVersion value is the trick here - it's held in RAM only and driven by the Assembly version, on Init of the Configuration object. This value cannot be influenced by client code since it's protected set. At present I don't see how an app can revert it's version without these changes - specifically the one that forces the NetSparkle code to believe that a different version is in play during the call to GetAvailableUpdates - but I'm all ears if I missed something, if that's the case and I managed to completely miss the point and see the solution - do let me know :-)

Need to investigate whether or not rollback to an old version of the app(s) is working as intended. Initially, the intent was that a user could always do this by loading the app cast into app cast items and then just manually choosing the version to load, but if the configuration setup with the current version is not allowing you to see old versions or versions less than the current binary, than we have a problem. Obviously, default behavior should be to only view newer versions.

Deadpikle commented 2 years ago

Applicable code:

https://github.com/NetSparkleUpdater/NetSparkle/blob/e2eacf9681ddd0c70e72bf6ee545b3cd3261e1f4/src/NetSparkle/Configurations/Configuration.cs#L26-L29

https://github.com/NetSparkleUpdater/NetSparkle/blob/e2eacf9681ddd0c70e72bf6ee545b3cd3261e1f4/src/NetSparkle/AppCastHandlers/XMLAppCast.cs#L172-L178

Might be just as easy as adding a public setter (don't want to break things by changing protected set; to set;) or some other method to adjust this. But, I want to get a full sample going for version rollback. The more samples, the easier it will be for others to implement things.

Deadpikle commented 2 years ago

Really need to also add a sample for how to use the new filtering process on beta/stable channels along with this, as version rollback and a beta/stable channel feature can both use the new filtering process.

johncclayton commented 1 year ago

Oh, and also please look at MainWindow.xaml.cs in the NetSparkle.Samples.HandleEventsYourself - I started with an implementation there, I could just extend that.

-- John Clayton

On Mon, 6 Jun 2022 at 00:06, Deadpikle @.***> wrote:

Really need to also add a sample for how to use the new filtering process on beta/stable channels along with this, as version rollback and a beta/stable channel feature can both use the new filtering process.

— Reply to this email directly, view it on GitHub https://github.com/NetSparkleUpdater/NetSparkle/issues/294#issuecomment-1146891224, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKXDUU7FYMLVBDVT72XV53VNUQEPANCNFSM5PPS74NQ . You are receiving this because you were mentioned.Message ID: @.***>