From 9633677bcc77df0fcb1bb384eaa7bbe7a1ea1b1f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 5 Apr 2013 10:16:56 -0700 Subject: [PATCH] Only check for updates on code signed builds --- atom.gyp | 7 +++++++ native/atom_application.mm | 14 ++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) 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 + } }