Sparkle: Disable automatic updates when debugging

Disable automatic update checking on startup for debug builds. Prevents
a crash from occurring when it attempts to retrieve the version number.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-01-29 17:01:51 -08:00
parent 7e5107d431
commit 5184c8e48b
3 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,7 @@
@class PlaylistController;
@class PlaylistView;
@class PlaylistLoader;
@class SUUpdater;
@interface AppController : NSObject
{
@ -47,12 +48,16 @@
IBOutlet NSWindowController *spotlightWindowController;
IBOutlet FileTreeViewController *fileTreeViewController;
IBOutlet SUUpdater *updater;
NSOperationQueue *queue; // Since we are the app delegate, we take care of the op queue
NSMutableSet* expandedNodes;
BOOL miniMode;
}
@property (strong) IBOutlet NSButton *infoButton;

View File

@ -22,6 +22,8 @@
#import <MASShortcut/Shortcut.h>
#import "Shortcuts.h"
#import <Sparkle/Sparkle.h>
void* kAppControllerContext = &kAppControllerContext;
@ -139,6 +141,11 @@ void* kAppControllerContext = &kAppControllerContext;
- (void)awakeFromNib
{
#ifdef DEBUG
// Prevent updates automatically in debug builds
[updater setAutomaticallyChecksForUpdates:NO];
#endif
[[totalTimeField cell] setBackgroundStyle:NSBackgroundStyleRaised];
[self.infoButton setToolTip:NSLocalizedString(@"InfoButtonTooltip", @"")];

View File

@ -1853,6 +1853,7 @@ Gw
<outlet property="shuffleButton" destination="1637" id="Nzr-Mw-z9P"/>
<outlet property="spotlightWindowController" destination="1675" id="1677"/>
<outlet property="totalTimeField" destination="778" id="1659"/>
<outlet property="updater" destination="1303" id="gDn-jb-V0R"/>
</connections>
</customObject>
<menu title="Menu" autoenablesItems="NO" id="513" userLabel="DockMenu">