diff --git a/.travis.yml b/.travis.yml index 830570e2e..446c714eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,22 +4,29 @@ xcode_project: App/BitBar.xcodeproj xcode_scheme: BitBar xcode_sdk: macosx10.11 before_install: - - brew update - - brew outdated xctool || brew upgrade xctool -script: if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then xctool -project $TRAVIS_XCODE_PROJECT -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze; else xctool -project $TRAVIS_XCODE_PROJECT -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze -failOnWarnings; fi +- brew update +- brew outdated xctool || brew upgrade xctool +script: if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then xctool -project $TRAVIS_XCODE_PROJECT + -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build + SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze; else xctool -project $TRAVIS_XCODE_PROJECT + -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build + SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze -failOnWarnings; fi before_deploy: - - OUTPUTDIR="$PWD/build/Release" - - cd $OUTPUTDIR - - zip -r "BitBar-$TRAVIS_TAG.zip" "BitBar.app" - - zip -r "BitBarDistro-$TRAVIS_TAG.zip" "BitBarDistro.app" +- OUTPUTDIR="$PWD/build/Release" +- cd $OUTPUTDIR +- zip -r "BitBar-$TRAVIS_TAG.zip" "BitBar.app" +- zip -r "BitBarDistro-$TRAVIS_TAG.zip" "BitBarDistro.app" deploy: provider: releases api_key: secure: VB7wqPRAmwRxX1ugTss4lWdcCjMO4+9yYuvkSKIhRz5PcKFTdgIE5Ol29wssYSlEnk1D5ZqeCJBe3t2qowrxOKHWKJRxH5r4fbgYAYnbk9/nWsMLgWDn1mo4nYa0sD4GyMUDY9JqqmtBY3nZ2pYcJ0L1LmxUU+EHViwcBQz6G4Y= file: - - "$OUTPUTDIR/BitBar-$TRAVIS_TAG.zip" - - "$OUTPUTDIR/BitBarDistro-$TRAVIS_TAG.zip" + - $OUTPUTDIR/BitBar-$TRAVIS_TAG.zip + - $OUTPUTDIR/BitBarDistro-$TRAVIS_TAG.zip skip_cleanup: true on: repo: matryer/bitbar tags: true +notifications: + slack: + secure: TpJVJf/NWxDvHxPjaQJnVg4vlW6JeLQ7eWadzFo7sUNSdB7Tui703AvYjG8tZTlk2lJ/4bV4jKgz8+rSElkeGsfPLTgDU33IDmG3V9o6MrAeV/ZQL37793bj+zJFxNuOkoIBaBQt1aNDTuIDUB97MNv02Vklb1M7Yd44NRVXdHk= diff --git a/App/BitBar/AppDelegate.m b/App/BitBar/AppDelegate.m index 97f24cbfd..1c2cee91d 100644 --- a/App/BitBar/AppDelegate.m +++ b/App/BitBar/AppDelegate.m @@ -29,6 +29,11 @@ @implementation AppDelegate - (NSArray*) otherCopies { return [NSRunningApplication runningApplicationsWithBundleIdentifier:NSBundle.mainBundle.bundleIdentifier]; } - (void)applicationWillFinishLaunching:(NSNotification *)n { + // register custom url scheme handler + [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self + andSelector:@selector(handleGetURLEvent:withReplyEvent:) + forEventClass:kInternetEventClass + andEventID:kAEGetURL]; if (self.otherCopies.count <= 1) return; NSModalResponse runm = [[NSAlert alertWithMessageText:[NSString stringWithFormat:@"Another copy of %@ is already running.", NSBundle.mainBundle.infoDictionary[(NSString *)kCFBundleNameKey]] @@ -60,12 +65,6 @@ - (void) applicationDidFinishLaunching:(NSNotification*)n { // make a plugin manager [_pluginManager = [PluginManager.alloc initWithPluginPath:DEFS.pluginsDirectory] setupAllPlugins]; - - // register custom url scheme handler - [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self - andSelector:@selector(handleGetURLEvent:withReplyEvent:) - forEventClass:kInternetEventClass - andEventID:kAEGetURL]; } - (void) receiveWakeNote: (NSNotification*) note