macos: setup the standard sparkle driver for no-window scenario

If there are no windows, we use the standard sparkle driver to drive
the standard window-based update UI.
This commit is contained in:
Mitchell Hashimoto
2025-10-09 08:57:48 -07:00
parent bbf875216f
commit f2e5b8fb2d
2 changed files with 6 additions and 2 deletions

View File

@@ -4,9 +4,11 @@ import Sparkle
/// Implement the SPUUserDriver to modify our UpdateViewModel for custom presentation.
class UpdateDriver: NSObject, SPUUserDriver {
let viewModel: UpdateViewModel
let standard: SPUStandardUserDriver
init(viewModel: UpdateViewModel) {
init(viewModel: UpdateViewModel, hostBundle: Bundle) {
self.viewModel = viewModel
self.standard = SPUStandardUserDriver(hostBundle: hostBundle, delegate: nil)
super.init()
}