diff --git a/atom.gyp b/atom.gyp index c586fc011..6213a4eaa 100644 --- a/atom.gyp +++ b/atom.gyp @@ -269,6 +269,13 @@ 'native/mac/English.lproj/AtomWindow.xib', 'native/mac/English.lproj/MainMenu.xib', ], + 'conditions': [ + ['CODE_SIGN', { + 'defines': [ + 'CODE_SIGNING_ENABLED=1', + ], + }], + ], 'postbuilds': [ { 'postbuild_name': 'Copy Static Files', diff --git a/native/atom_application.mm b/native/atom_application.mm index 55d7f971d..9c9824579 100644 --- a/native/atom_application.mm +++ b/native/atom_application.mm @@ -254,12 +254,14 @@ } else { _backgroundWindowController = [[AtomWindowController alloc] initInBackground]; - if (![self.arguments objectForKey:@"dev"]) { - SUUpdater.sharedUpdater.delegate = self; - SUUpdater.sharedUpdater.automaticallyChecksForUpdates = YES; - SUUpdater.sharedUpdater.automaticallyDownloadsUpdates = YES; - [SUUpdater.sharedUpdater checkForUpdatesInBackground]; - } + +#if defined(CODE_SIGNING_ENABLED) + SUUpdater.sharedUpdater.delegate = self; + SUUpdater.sharedUpdater.automaticallyChecksForUpdates = YES; + SUUpdater.sharedUpdater.automaticallyDownloadsUpdates = YES; + [SUUpdater.sharedUpdater checkForUpdatesInBackground]; +#endif + } }