Growl latest (2.1.3) on OSX Mavericks

What’s that? You want to install Growl latest (2.1.3) without shelling out $4.99? I hear ya. Fortunately, Growl is open sourced under the bsd-license, which includes binary redistribution. I went ahead and put together Growl-2.1.3 and GrowlNotify-2.1.3 in a binary bundle below. I also document my patch process with compiling Growl-2.1.3 on unsupported XCode 5, complete with full bash install script.

First things first, I am not responsible for ANYTHING that happens to your computer. This is an experiment. I’m willing to run it on my computer and, it’s your decision if you are as well. Don’t trust me? Well, go ahead and compile yourself for all I care! I detail the instructions below with a full installation script!

Goodies

Now, For the kiddies and lazy people (that’s most of you, right?): Growl2.1.3-Mavericks Binary With GrowlNotify! Sounds too good to be true, well most people say that about me!

Manual Compile/Install

Software Prerequisites

I’m not sure. Because I run on a development system, I satisfy most dependencies out of the box. Things just worked for me, but I know you’ll need rake (Ruby Make) and XCode for starters. My rake is version 0.9.6, probs outdated.

You will likely need Auxiliary tools for Xcode. I tried only and was successfuly with the Late July 2012 version. The 2013 will not work, it does not have PackageMaker.app, which is what we need from it. Get Late July 2012  from https://developer.apple.com/downloads/index.action — you need an Apple ID for this or create one on the spot. After you open the DMG/download, move the PackageMaker.app into /Applications. If you neglect to install PackageMaker.app, you will get an error when you compile Growl like the following:

 xcrun: error: unable to find utility "packagemaker", not a developer tool or in PATH

Create Self Signed Certificate

Open the Keychain Access.app, go to Keychain Access menu then go to ‘Certificate Assistant’ and finally click on ‘Create a Certificate…’.

Keychain Access

Here are the details –
Name: 3rd Party Mac Developer Application: The Growl Project, LLC
Identity Type: Self Signed Root
Certificate Type: Code Signing

Above tips are from http://www.nyayapati.com/srao/2013/03/how-to-build-growl-2-0-1-from-source-on-mountain-lion-10-8-2/

growl_patch.sh

#!/bin/bash
# growl_patch.sh
# Authored by:
#  Bazz (www.bazz1.com)
#
# just run growl_patch.sh without any arguments to get usage info
PROJ_DIR="my_growl"

function prepend ()
{

        printf "$1" > /tmp/$$.bak;
        cat $2 >> /tmp/$$.bak;
        mv /tmp/$$.bak $2;
}

function substitute_replace()
{
  sed "$1" "$2" >> /tmp/$$.bak
  mv /tmp/$$.bak "$2"
}

function chdir()
{
  if [ "`basename $PWD`" != "$1" ]; then
    if ! cd $1; then
      echo "something is wrong!! \"$1\" directory not found"
      exit 1
    fi
  fi
}

function patch()
{
  if [ -e .patched ]; then
    printf 'you already patched once. Would you like to patch again? (y/n): '
    read -n1 key
    echo
    if [ "$key" = "n" ] || [ "$key" = "N" ]; then
      return;
    fi
    patched_once=""
    if grep --silent "//#err" GrowlToolchainSupport.h; then
      echo 'GrowlToolchainSupport.h already patched. not touching'
    else
      # depends on the #err being a one-liner
      substitute_replace 's!#err!//#err!' GrowlToolChainSupport.h
    fi
  else
    # depends on the #err being a one-liner
    substitute_replace 's!#err!//#err!' GrowlToolChainSupport.h
    substitute_replace 's#GCC_ENABLE_OBJC_GC = supported#GCC_ENABLE_OBJC_GC = unsupported#g' external_dependencies/shortcutrecorder/ShortcutRecorder.xcodeproj/project.pbxproj
    substitute_replace 's#GCC_ENABLE_OBJC_GC = supported#GCC_ENABLE_OBJC_GC = unsupported#g' Plugins/System/GrowlAction/xcconfig/Common.xcconfig
    substitute_replace 's#GCC_ENABLE_OBJC_GC = supported#GCC_ENABLE_OBJC_GC = unsupported#g' xcconfig/Common-Framework.xcconfig

    if [ "$1" != "wflags" ]; then
      substitute_replace 's!\(system "#{$xcodebuild} -project #{$src_root}/Growl.xcodeproj -target Growl.app -configuration #{$configuration} SYMROOT=#{$build_root}/growl\)\("\)!\1 GCC_TREAT_WARNINGS_AS_ERRORS=NO\2!' Release/rakefile
    else
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Core/Source/GrowlTicketDatabase.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Core/Source/GrowlDisplaysViewController.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Core/Source/GrowlApplicationController.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Core/Source/GrowlPreferencesController.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Plugins/Displays/WebKit/GrowlWebKitWindowController.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Plugins/Displays/WebKit/GrowlWebKitWindowView.m
      prepend '#pragma GCC diagnostic ignored "-Wunused-property-ivar"//' Plugins/Actions/MailMe/MailMe/GrowlMailMePreferencePane.m
      prepend '#pragma GCC diagnostic ignored "-Wunused-property-ivar"//\n' Plugins/Actions/SoundAction/SoundAction/GrowlSoundActionPreferencePane.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//\n' Plugins/Actions/SoundAction/SoundAction/GrowlSoundActionPreferencePane.m
      prepend '#pragma GCC diagnostic ignored "-Wunused-property-ivar"//' Plugins/Displays/MusicVideo/GrowlMusicVideoPrefs.m
      prepend '#pragma GCC diagnostic ignored "-Wunused-property-ivar"//' Plugins/Actions/Speech/GrowlSpeechPrefs.m
      prepend '#pragma GCC diagnostic ignored "-Wunused-property-ivar"//' Plugins/PluginFramework/GrowlIdleStatusObserver.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Plugins/PluginFramework/GrowlPluginPreferencePane.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Plugins/Displays/GrowlDisplayWindowController.m
      prepend '#pragma GCC diagnostic ignored "-Wundeclared-selector"//' Plugins/Displays/GrowlNotificationView.m
    fi

    touch .patched
  fi
}

function download()
{
  hg clone https://code.google.com/p/growl/ $PROJ_DIR
  chdir $PROJ_DIR
  hg update tip
}

function compile()
{
  export LC_ALL="en_US.UTF-8"
  pushd Release
    VERSION=2.1.3 rake setup
    VERSION=2.1.3 rake build:growl
  popd
}

function install ()
{
  chdir $PROJ_DIR
  sudo mv Release/distribution/build/growl/Release/Growl.app /Applications/Growl.app
}

if [ "$1" = "download" ]; then
  download
elif [ "$1" = "patch" ]; then
  chdir $PROJ_DIR
  patch $2
elif [ "$1" = "compile" ]; then
  chdir $PROJ_DIR
  compile
elif [ "$1" = "all" ]; then
  download
  chdir $PROJ_DIR
  patch $2
  compile
  install
elif [ "$1" = "install" ]; then
  install
else
  echo 'usage: growl_patch.sh [download|patch [wflags]|compile|all [wflags]]'
  printf "\tdownload: creates a \"$PROJ_DIR\" directory in your current working directory\n"
  printf "\tpatch: patches the source tree for XCode 5.\n"
  printf "\t\tDisable warnings as errors throughout entire project is default behavior\n"
  printf "\t\tspecify \"wflags\" to only disable warnings as errors in critical files.\n"
  printf "all: Downloads and install the patch. You may specify \"wflags\" argument if desired\n"
  printf "install: install Growl.app into /Applications"
fi

You can run the script without any arguments to get usage info, but I would just do:

chmod +x growl_patch.sh
./growl_patch.sh all

The build will appear to FAIL. But that’s alright, it’s only because of the Code-Signing that we don’t care about anyways:

Command /usr/bin/codesign failed with exit code 1

** BUILD FAILED **
The following build commands failed:
 CodeSign /private/tmp/growl_final_test/Release/distribution/build/growl/Release/Growl.app
(1 failure)

That’s OK, the app still compiled, it just isn’t signed, whatever. I think that’s only for submitting to App store anyways.. So we are good to go :)

Old “Update”

Below are notes from when I started this adventure.

Below I manually patched a lot of files with some Warning Flags. I thought “man, couldnt I just pass this stuff globally into the “make” process?

At first, I saw this great post for adding flags to an xcodebuild command, including preserving the previous contents of the flag. Great, but it wasn’t working :(. I tried everything from OTHER_CFLAGS to OTHER_MFLAGS, WARNING_FLAGS, and I tried CXX_FLAGS and the OBJC variant (not the CXX one tho). ie WARNING_CFLAGS=’-Wunused-property-ivar -Wundeclared-selector ${inherited}’. Funny enough, the warning flags were showing up on the compiler execution but it wasn’t actually stopping the errors from halting the build. So, after that crap, I got fed up, and found my secret sauce:

GCC_TREAT_WARNINGS_AS_ERRORS=NO

BINGO. Then, no file patching for warnings is necessary, save for the Garbage Collection patches and the toolchain version mismatch patch.

  • Compiled Growl 2.1.3 for my Mavericks.
    • hg clone https://code.google.com/p/growl/
    • hg update tip
    • VERSION=2.1.3 rake setup
    • VERSION=2.1.3 rake build:growl
    • many files had to be patched with either of the following at the top (.m files)
      • Core/Source/GrowlTicketDatabase.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Core/Source/GrowlDisplaysViewController.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Core/Source/GrowlApplicationController.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Core/Source/GrowlPreferencesController.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Plugins/Displays/WebKit/GrowlWebKitWindowController.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Plugins/Displays/WebKit/GrowlWebKitWindowView.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Plugins/Actions/MailMe/MailMe/GrowlMailMePreferencePane.m
        • #pragma GCC diagnostic ignored “-Wunused-property-ivar”
      • Plugins/Actions/SoundAction/SoundAction/GrowlSoundActionPreferencePane.h
        • #pragma GCC diagnostic ignored “-Wunused-property-ivar”
          #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Plugins/Actions/SoundAction/SoundAction/GrowlSoundActionPreferencePane.h
        • #pragma GCC diagnostic ignored “-Wunused-property-ivar”
          #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Plugins/Displays/MusicVideo/GrowlMusicVideoPrefs.m
        • #pragma GCC diagnostic ignored “-Wunused-property-ivar”
      • Plugins/Actions/Speech/GrowlSpeechPrefs.m
        • #pragma GCC diagnostic ignored “-Wunused-property-ivar”
      • Plugins/PluginFramework/GrowlIdleStatusObserver.m
        • #pragma GCC diagnostic ignored “-Wunused-property-ivar”
      • Plugins/PluginFramework/GrowlPluginPreferencePane.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Plugins/Displays/GrowlDisplayWindowController.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
      • Plugins/Displays/GrowlNotificationView.m
        • #pragma GCC diagnostic ignored “-Wundeclared-selector”
    • Comment out #error in GrowlToolChainSupport.h
    • Disable Garbage Collecting — grep -r “GCC_ENABLE_OBJC_GC”
      • remove or change ‘supported’ to ‘unsupported’
    • Release/distribution/build/growl/Release/Growl.app

3 Comments on “Growl latest (2.1.3) on OSX Mavericks

  1. Considering Growl is nigh-abandonware, this is awesome. I use Growl for networked notifications around the office, but being a personal side-project, did not feel like paying for a copy for all 10 of my coworkers who’ve upgraded past Snow Leopard (I’ve paid/donated for Growl 3 times for personal use already), just to be able to use the command line growlnotify again.

  2. Hi there!

    Thanks a lot. I’m used to takte Growl many years but patching High Sierra to Mojave “destroyed” my habit.
    Looking worldwide for the latest version (I had 1.2…. on SIERRA) at least an hour or so, i was always re-routed to the appstore, which detected me as a german….no chance to download anywhere. Now I’m in Houston (thanks to VPN!!) and succeeded. Thank you! Best regards from Bavaria!

  3. 2024-01-14 Growl2.1.3-Mavericks-21oz704.zip
    md5: 93663854fed459c9f1c253f7998bde41
    sha256: 48f269d278c0837c9355e50a85c78af56ab2657dcba8d0edeb746bec0eb873d5
    sha384: f34a293688ca62c97fde904413bb6658d1a3e0c88de93a80809b4e385557fd40c6f3c6cd1289f79e0dfa784523b533bc
    sha512: b4ea250f3a88a81e2062dfd95bdd150d32300f82100ca030d6bd34cafb7ce909dcee567bc75e8a948ad241c60eb7d2a79907ad04bb1b857770b674b3bf395690

Leave a Reply

Your email address will not be published. Required fields are marked *

*