Monday, November 7, 2011

Building Growl 1.3.1

The new release of Growl is distributed in the App Store and is no longer free. The source code still is, and there are instructions on the Growl site to explain how to build it. Personally, I found the instructions a bit wordy. So, here the short version on how to download, compile, and install Growl from source:

1) If you don't have it, get and install Mercurial from this page:

2) Open a Terminal window and enter the following commands
cd /tmp
hg clone
cd growl
open Growl.xcodeproj

3) In the Xcode window that should have popped up disable code signing for the Growl project, as shown in this screenshot:

4) Back in the Terminal window enter these commands: (Don't enter the backslash, it's just there to indicate that the command continues on the next line.)
xcodebuild -project Growl.xcodeproj -target \
-configuration Release
open build/Release

5) The Finder window that should have opened contains, which you can copy to a folder of your choice and run.

Remember, due to the App Store Growl no longer checks for updates itself.


Fluffy Elmo said...

Thanks! This is just what I was looking for, if only to stop the upgrade notifications:)

One note, I also had to delete the line "CODE_SIGN_IDENTITY = 3rd Party Mac Developer Application: The Growl Project, LLC" from xcconfig/Release.xconfig in Xcode before it would build.

I may have caused this by building before all the code signing references were removed, or maybe it's been updated since this tutorial.

aisrael said...

I keep getting .../growl/Core/Source/GrowlApplicationController.m: error: Lexical or Preprocessor Issue: 'HgRevision.h' file not found

Whether I build using XCode or from the Terminal as per your instructions... The Growl page just says reboo^H^H^H^H^H try to build again and see if the problem goes away. It doesn't.

Mikhail said...

I'm created certificate named "3rd Party Mac Developer Application: The Growl Project, LLC" in Key Chanins. It takes about 5 seconds.

run Keychain -> Application's menu -> Certificate Assistant -> Create a certificate -> Paste certificate name and select type "code".

When xcodebuilder starts it asks for access, allow it always.

pr0ton said...

Latest source is only from 1.3, NOT 1.3.1..

Anonymous said...

I was finally able to get it built. It would not build through the xcode GUI I had to use the command line that was explained in this post. I did have to make that certificate for it to run correctly. I originally created a certificate that only had the first half of the name, not realized there was another part to it, and it wouldn't run. After deleting that one and creating a new one with the full correct name and building it through Terminal it all worked. Thanks for the info and help!

Anonymous said...

I have to apply this patch

skip said...
This comment has been removed by the author.
skip said...

I think the code *is* 1.3.1. The problem is that GrowlVersion.h has it as 1.3 To create a new GrowlVersion.h, delete or rename GrowlVersion.h, cd into Release, and type

CONFIGURATION=Release rake build:growl

To build everything, omit the build target:



togume said...

FYI - I was not able to pull down the latest version of the project. Looks like the OSS version is lagging from the current release. This is a shame, since the version available from the repo crashed when using growlnotify.

Prylux said...
This comment has been removed by the author.
Prylux said...

Created certificate named "3rd Party Mac Developer Application: The Growl Project, LLC"

Open Terminal:
cd ~/growl
sudo ./
xcodebuild -project Growl.xcodeproj -target -configuration Release

John said...

I keep getting this error from the command line xcodebuild:

The following build commands failed:
CompileC build/ Common/Source/GrowlVersionUtilities.m normal x86_64 objective-c
(1 failure)

Anonymous said...

Thanks for the great explanation!

Anonymous said...

Having the same compile issues as stated above.

Anonymous said...

Had to patch the following to get it to build properly.

diff -r 193986cc6493 Common/Source/GrowlVersionUtilities.m
--- a/Common/Source/GrowlVersionUtilities.m Mon Nov 07 10:48:13 2011 -0600
+++ b/Common/Source/GrowlVersionUtilities.m Tue Mar 13 03:13:44 2012 -0400
@@ -251,4 +251,5 @@

return compareVersions(v_a, v_b);
\ No newline at end of file
diff -r 193986cc6493 Common/Source/NSStringAdditions.m
--- a/Common/Source/NSStringAdditions.m Mon Nov 07 10:48:13 2011 -0600
+++ b/Common/Source/NSStringAdditions.m Tue Mar 13 03:13:44 2012 -0400
@@ -127,4 +127,5 @@
return [[[self mutableCopy] autorelease] escapeForHTML];

\ No newline at end of file
diff -r 193986cc6493 Core/Source/GroupController.m
--- a/Core/Source/GroupController.m Mon Nov 07 10:48:13 2011 -0600
+++ b/Core/Source/GroupController.m Tue Mar 13 03:13:44 2012 -0400
@@ -32,6 +32,7 @@
[groupID release];
[groupArray release];
+ [super dealloc];

diff -r 193986cc6493 Core/Source/GrowlMenu.h
--- a/Core/Source/GrowlMenu.h Mon Nov 07 10:48:13 2011 -0600
+++ b/Core/Source/GrowlMenu.h Tue Mar 13 03:13:44 2012 -0400
@@ -32,8 +32,8 @@
- (void)stopPulse;
- (void)pulseStatusItem;

-- (void) openGrowlPreferences:(id)sender;
-- (void) startStopGrowl:(id)sender;
+- (IBAction) openGrowlPreferences:(id)sender;
+- (IBAction) startStopGrowl:(id)sender;
- (NSMenu *) createMenu:(BOOL)forDock;
- (void) setImage:(NSNumber*)state;
- (BOOL) validateMenuItem:(NSMenuItem *)item;
diff -r 193986cc6493 Core/Source/GrowlNotificationRowView.h
--- a/Core/Source/GrowlNotificationRowView.h Mon Nov 07 10:48:13 2011 -0600
+++ b/Core/Source/GrowlNotificationRowView.h Tue Mar 13 03:13:44 2012 -0400
@@ -16,4 +16,5 @@


\ No newline at end of file
diff -r 193986cc6493 Growl.xcodeproj/project.pbxproj
--- a/Growl.xcodeproj/project.pbxproj Mon Nov 07 10:48:13 2011 -0600
+++ b/Growl.xcodeproj/project.pbxproj Tue Mar 13 03:13:44 2012 -0400
@@ -4008,9 +4008,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 315C88BB1068F9A200880530 /* Localization.xcconfig */;
buildSettings = {
- CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application";
name = Localization;
@@ -4896,9 +4895,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 93EA7FFD136908B100AB89AE /* Debug.xcconfig */;
buildSettings = {
- CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application";
name = Debug;
@@ -4906,9 +4904,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 93EA7FFE136908B100AB89AE /* Release.xcconfig */;
buildSettings = {
- CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application";
name = Release;

Anonymous said...

thanks, worked for me after creating a certificate, I posted snapshots here:

TC said...

Thanks for the nice introduction! As other people already stated, there are a few problems setting this up from scratch.
I wanted to build Growl 1.3 and HardwareGrowler.

Let's start with Growl.
There are generally the following problems to be prepared for:
1) Code signing: You can either remove the Code Sign Identity from the Release.xconfig, remove all code signing manually by clicking into all targets in XCode (not just the framework or the app) or create a self signed certificate with the right name as described by other people. The self signed certificate did not work for me, I just disabled the signing in XCode.
2) Growl 1.3 was originally compiled with an older version of XCode, compiler settings in 4.3 are a bit more strict. You will need to change the following files:
- Common/Source/GrowlVersionUtilities.m: add a newline to end of file
- Common/Source/NSStringAdditions.m: add a newline to end of file
- Core/Source/GroupController.m: add "[super dealloc];" to the end of the dealloc method
- Core/Source/GrowlMenu.h: change "(void) openGrowlPreferences:(id)sender;" and "(void) startStopGrowl:(id)sender;" to "(IBAction) openGrowlPreferences:(id)sender;" and "(IBAction) startStopGrowl:(id)sender;"
- Core/Source/GrowlNotificationRowView.h: add a newline to end of file
3) Continue with step 4 (xcodebuild -project Growl.xcodeproj -target -configuration Release)
open build/Release), there is a better chance of it working now.

Hardwaregrowler requires you to disable code signing again (only one target this time), it is contained in the Extras/HardwareGrowler folder with an equivalent XCode project. Dependencies to the main Growl project can get a bit messy, make sure you build the Growl Framework in the Growl project first and then close that XCode window. For me the dependencies were resolved automatically although "Growl.framework" as well as "com.growl.hardwaregrowler.GNTPClientService.xpc" were marked red. This worked only if built through XCode - simply add a new build scheme with target "Release" or you will get a debug build by default (which doesn't hurt). The app is built and by default saved in your Library/Developer/Xcode/DerivedData/HardwareGrowlersomething/Build/Products/[Release|Debug] - just copy it to your Applications folder.

Good luck! ;)

Jack said...

Thanks Erik & TC, it works!

Pat said...
This comment has been removed by the author.
Pat said...

Have yet to try it, but this might solve the certificate issue, and even allow it to be built without openning xcode (ie. all command line):

Anita Romanenko said...

You always can publish something absorbing that does not waste minutes of your life like what you see on countless other sites. This is very interesting and I will be back for more. Thanks for sharing

Karthika Shree said...

Excellent and very cool idea and the subject at the top of magnificence and I am happy to this post..Interesting post! Thanks for writing it.What's wrong with this kind of post exactly? It follows your previous guideline for post length as well as clarity.

IOS Training in Chennai

Freddie King said...

Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point. | |