Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grockk

macrumors 6502
Original poster
Mar 16, 2006
365
5
Webkit on Leopard is old and not updated anymore. The Leopard Webkit project provides current builds of Webkit compatible with PPC Leopard and even started implementing some of the updated javascriptcore. To use this framework there is a droplet in the installer but doesn't work for some apps and doesn't work for Fluid apps specifically. I found a way to use the framework that has worked for every app I've tried.

In terminal to make any apps use Webkit Nightly (in this example I use a Fluid SSB app called Application.app)

Code:
$ cd Applications/Application.app/Contents/MacOS
where Application.app is the name of the app for which you want to use Webkit Nightly.
Code:
$ ls
This will list the Unix executable for the application
Code:
$ mv FluidInstance _FluidInstance
where FluidInstance is the executable you found with ls
Code:
$ vim FluidInstance
In vim Press s Type or paste in the following:
Code:
#!/bin/bash 
env DYLD_FRAMEWORK_PATH=/Applications/WebKit.app/Contents/Frameworks/10.5/ WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES /Applications/Application.app/Contents/MacOS/_FluidInstance
Where "FluidInstance" is the executable from the second step above

Press Escape, then :w, then :q
Code:
$ chmod a+x FluidInstance

Credit goes to http://brettterpstra.com/2011/03/28/make-cssedit-use-the-latest-webkit-nightly-every-time/ for the basic outline I adapted from how to do this for CSSEdit.
 
Last edited:
Very nice find indeed, though I doubt many people 'round here appreciate the awesomeness of vim, so you might want to replace vim with nano ;)
 
I'm not that great at the terminal. Just know a few walkthroughs and that's the program the guy i linked to used. I wouldn't even know where to start with nano.

also have another way to make programs use leopard webkit but it applies universally. The problem is some apps will crash but all you have to do is delete a single file instead of when you damage the system webkit by installing unstable leopard webkit using the install script like i've seen some people do on accident. Yikes.

anyway.

Instead of using the install shell script, I've found you can set the DYLD_FRAMEWORK_PATH envireonment variable to point to Webkit by using an environment.plist in ~\.MacOSX\ . You have to make the directory but putting the below in a plist in this directory will make it so all apps run using leopard Webkit unstable branch. Most apps are fine but I found some apps would crash and then choosing to restart the application it loads the built in frameworks and so is livable. anyways. Here is a copy of my environment.plist.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>DYLD_FRAMEWORK_PATH</key>
	<string>/Applications/WebKit.app/Contents/Frameworks/10.5/</string>
</dict>
</plist>

To reverse, just delete/rename the file and logout/reboot. This is nice as it affects everything, and is easy to reverse.

In both of my methods here, if an app crashes, the crash reporter will offer to restart it and it loads without the leopard webkit this second time. So, much nicer than the install script, for system stability at least.
 
Hi!
I tried the enviroment.plist method and it only crashes the fluid web app then making an icloud.app

Thread 10 Crashed:
0 libobjc.A.dylib 0xfffeff18 objc_msgSend_rtp + 24
1 ...uidapp.FluidInstance.iCloud 0x0001f8bc -[TODAppDelegate generateIcnsFile:] + 296
2 com.apple.Foundation 0x92c4bd84 __NSThread__main__ + 1004
3 libSystem.B.dylib 0x95436f70 _pthread_start + 316


it doesn't render anything, and crashes within 5 seconds or less

After the crash, it does seems to delete the framework used as it goes back to default, just like you said
 
Found a better way to do this.

First save the original executable like this (only type the $ lines)

Code:
$ cd Applications/Application.app/Contents/MacOS
$ ls
FluidInstance
$ mv FluidInstance FluidInstance.orig

Then create a shell script name FluidInstance in vim or whatever that looks like this.

Code:
#!/bin/sh

export DYLD_FRAMEWORK_PATH="/Applications/WebKit.app/Contents/Frameworks/10.5/"

exec "${0}.orig" "$@"

Then chmod a+x it.

The benefit is that it passes any arguments and loads plugins (like 1Password). It's also the same script for every app so you can literally copy and paste in Finder to do any app by doing the "Show Package Contents" and navigating to the above directory.

You can use it for dashboard by going to
Code:
/System/Library/CoreServices/Dock.app/Contents/Resources/DashboardClient.app/Contents/MacOS

Also seemed to fix all my issues with iCloud.com. Woohoo.

This was the clue that got me there.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.