NetSparkle
NetSparkle copied to clipboard
How to set mandatory updates and miniversion
It is my first time to use this library. When the update program is started, the update window does not seem to have the focus and can be closed alone. How can I set the forced update? In addition, can I set the minimum update version? Thank you.
@howzew Thanks for your questions.
How can I set the forced update?
This is intentional behavior. You can do a few things if you want to try to get the user to update their software:
- Set the app cast version as critical. You can use this via the app cast generator via the
--critical-versions
flag, e.g.--critical-versions 1.0.1
. - Use the
UIFactory.ProcessWindowAfterInit
function to make any modifications to the window you want to make after it's been created. - Use your own
UIFactory
implementation to do what you want and show windows how you want to show them (e.g. as a dialog, etc.) - Don't use a built-in UI at all and run your own UI. There's a sample called
HandleEventsYourself
that will help you know how to do this.
In addition, can I set the minimum update version?
This is not a built-in feature, but you can filter app cast items yourself based on the version of the software you're using and the versions in the app cast. Implement the IAppCastFilter
XMLAppCast.AppCastFilter
class member and run your own filtering.
In other words, for both of your questions, you can implement things in a custom way to get things running just as you'd like them. :-)
@Deadpikle Thanks for your reply. It seems that I need to implement it myself. These two functions are commonly used functions. so it would be very convenient if they can be built-in in 3.x. However, thank you for the method you provided, I will test it.