Add GitHub update checker and installer

This commit is contained in:
世界
2026-03-30 23:02:42 +08:00
parent 6b790c7a80
commit 63d1d0fe3f
15 changed files with 1663 additions and 2 deletions
+10
View File
@@ -121,6 +121,16 @@ public enum SharedPreferences {
try await batchDelete([alwaysOn.name, onDemandEnabled.name, onDemandRules.name])
}
// Update (macOS standalone)
#if os(macOS)
public static let checkUpdateEnabled = Preference<Bool>("check_update_enabled", defaultValue: false)
public static let updateCheckPrompted = Preference<Bool>("update_check_prompted", defaultValue: false)
public static let updateTrack = Preference<String>("update_track", defaultValue: "")
public static let cachedUpdateInfo = Preference<String>("cached_update_info", defaultValue: "")
public static let lastShownUpdateVersion = Preference<String>("last_shown_update_version", defaultValue: "")
#endif
// Core
public static let disableDeprecatedWarnings = Preference<Bool>("disable_deprecated_warnings", defaultValue: false)