fix: Sparkle Version Comparator (#5263)

* fix: Sparkle Version Comparator

* Code review: Reducing CFBundleVersion to three components and avoiding versionComparatorForUpdater

* adding +99 when it's a non-beta release

* code review: set CFBUNDLE_VERSION and unset components

* re-adding support for ignoring beta
This commit is contained in:
Cœur
2024-03-18 05:23:39 +08:00
committed by GitHub
parent 0749300090
commit c63c66c737
11 changed files with 96 additions and 22 deletions

View File

@@ -178,8 +178,6 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
[_fDefaults removeObjectForKey:@"CheckForUpdates"];
}
[self setAutoUpdateToBeta:nil];
_fDefaultAppHelper = [[DefaultAppHelper alloc] init];
}
@@ -409,17 +407,6 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
[self.window setFrame:windowRect display:YES animate:NO];
}
//for a beta release, always use the beta appcast
#if defined(TR_BETA_RELEASE)
#define SPARKLE_TAG YES
#else
#define SPARKLE_TAG [fDefaults boolForKey:@"AutoUpdateBeta"]
#endif
- (void)setAutoUpdateToBeta:(id)sender
{
// TODO: Support beta releases (if/when necessary)
}
- (void)setPort:(id)sender
{
uint16_t const port = [sender intValue];