Twitter Stream

Flickr Photos

GreaseKit in 64bit Safari

After I read about SIMBL gaining (beta) 10.6 support, my first reaction was hooray! But not so fast, just because SIMBL can now load bundles doesn’t quite mean your latest and greatest plugins will actually work. You’d still have to drop Safari down to 32bit only mode, which kind of defeats the purpose since SIMBL already continues to work for apps running in 32bit mode. But, a simple recompile was the proof I needed. With a bit of work, I got GreaseKit recompiled. First things first, you’ll need to go check out the source code somewhere onto your computer:

svn checkout http://greasekit.googlecode.com/svn/trunk/ greasekit


You might notice after trying to build an error like this:

There is no SDK with the name or path '/Developer/SDKs/MacOSX10.4u.sdk'

I don’t have the 10.4 SDK installed, maybe it was removed when I installed Snow Leopard, or maybe I just never installed it. You might have it installed, and get some other set of errors.

First thing you’ll want to do either way though is right click on the GreaseKit project file and choose Get Info:

GreaseKit Project Menu


Change the Base SDK for All Configurations to Mac OS X 10.6. Your build should succeed now, but we’re not quite done yet. It’s only building for 32bit still. Isn’t the whole point of this to get 64bit? By default GreaseKit only builds the native architecture you’re currently on for the Debug build configuration. This is fine, as it speeds up development and testing so we won’t change it. Switch to the Build tab so we can make it build a 64bit binary. Change the Configuration drop down from whatever it’s on (probably Debug) to Release. Aha, there’s the problem. It’s only building an i386 and ppc version. Since this is Snow Leopard, there’s no reason to be building ppc anymore. Switch this setting to Standard (32bit/64-bit Universal).

Before we go further make sure from now on you’re making a Release, and not Debug build. Otherwise, our changes are for naught. Unfortunately this varies a bit from setup to setup, but you’ve likely got a menu (or several menus) in the top/left of your Xcode window that says either Overview or Active Build Configuration. For either of these, click it and switch the build configuration to Release.

The GreaseKit project suffers from a common issue — some build settings are duplicated in both the Project and Target we’re trying to modify. Think of build settings as a cascading style sheet of settings, where the top level is the Project (able to dictate settings for all Targets in the project) and individual Targets inherit settings from the Project. Right click on the GreaseKit Target as pictured and click on Get Info:

GreaseKit Target Menu


Go again to this window’s Build tab and change the Configuration to Standard (32bit/64-bit Universal). After building again, a few errors are still popping up. In particular, this one:

Mac OS X version 10.5 or later is needed for zerocost-exceptions

This one’s a little harder to figure out, but once more we go back to the GreaseKit Project’s Get Info window and Build tab. The setting we’re looking for now is the Mac OS X Deployment Target which is currently set to Mac OS X 10.3. There’s your problem. Change that to 10.6, and it should succeed! Once you’ve put this compiled bundle in your ~/Library/Application Support/SIMBL/Plugins and installed the latest SIMBL beta you should be seeing GreaseKit show up in your Safari menus!



Update: Since some folks requested it, here’s a finished pre-built bundle of 64bit GreaseKit.



4 Responses to “GreaseKit in 64bit Safari”


  1. Gravatar · Links 9.7 Says:

    […] Tristan O’Tierney » Blog Archive » GreaseKit in 64bit Safari – GreaseKit ? Snow Leopard ?????????????? […]

  2. Gravatar Mya Says:

    Hi.

    I’d love to use Greasekit for the 64bit vers. of Safari.

    No clue though how to compile it. I have the developer tools installed.

    It would be cool if you’d write some kind of how to or just provide a download link for your version.

    Cheers :-) Mya

  3. Gravatar Glark Says:

    Thanks for having this available! Saved my power-Flickr-usin’ bacon.

  4. Gravatar Andrew Says:

    Could you please upload the compiled bundle somewhere. I can’t seem to compile it, all sorts of problems, missing files, and deprecated APIs.

Leave a Reply