Safari 2, Safari 3, Adium & forcing WebKit Frameworks

After installing Safari 3 you won’t be able to run Safari 2 to test websites or whatever anymore.

Here’s the trick to make it work

  1. Install Safari 3 Beta
    1. Yes, you have to reboot. Lame :(
    2. Rename /Applications/Safari.app to /Applications/Safari3.app
  2. Install WebKit Nightly as Safari2
    1. Rename /Applications/WebKit.app to /Applications/Safari2.app
  3. Unarchive the backed up Safari
    1. Open /Library/Application Support/Apple/.SafariBetaArchive.tar.gz
  4. Copy the old Safari from /Library/Application Support/Apple/.SafariBetaArchive/Applications/Safari.app to /Applications/Safari.app
  5. Copy all the frameworks into Safari2
    1. Copy /Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework

      /Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCore.framework

      /Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework

      /Library/Application Support/Apple/.SafariBetaArchive/System/Library/PrivateFrameworks/JavaScriptGlue.framework

      to /Applications/Safari2.app/Contents/Resources
  6. Open Safari2

Shell script

Alternatively, you can use this shell script to make it all work without having to do it all manually…

  1. Install Safari 3 Beta
  2. Install WebKit Nightly
  3. Unarchive the backed up Safari
    1. Run this from the terminal:
open "/Library/Application Support/Apple/.SafariBetaArchive.tar.gz"

4. Then run this script to do the rest…

mv /Applications/Safari.app /Applications/Safari3.app &&
mv /Applications/WebKit.app /Applications/Safari2.app &&
ditto "/Library/Application Support/Apple/.SafariBetaArchive/Applications/Safari.app" /Applications/Safari.app &&
rm -Rf \
  /Applications/Safari2.app/Contents/Resources/JavaScriptCore.framework/ \
  /Applications/Safari2.app/Contents/Resources/JavaScriptGlue.framework/ \
  /Applications/Safari2.app/Contents/Resources/WebCore.framework/ \
  /Applications/Safari2.app/Contents/Resources/WebKit.framework/ &&
cp -Rf \
  "/Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework" \
  "/Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCore.framework" \
  "/Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework" \
  "/Library/Application Support/Apple/.SafariBetaArchive/System/Library/PrivateFrameworks/JavaScriptGlue.framework" \
  /Applications/Safari2.app/Contents/Resources/

UPDATED Date: 2007-06-13 18:15:32



How to force another app to open with the old WebKit

You can force anything to run with the old WebKit if it’s having problems working with the new beta.

env DYLD_FRAMEWORK_PATH=“/Applications/Safari2.app/Contents/Resources” WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES “PATH_TO_THE_BIN_IN_YOUR_APP” &

Just replace PATH_TO_THE_BIN_IN_YOUR_APP with the path to the binary in the app you want to force to use the old WebKit frameworks.

How to make Adium work after installing Safari 3

For Adium you’d use:

env DYLD_FRAMEWORK_PATH=“/Applications/Safari2.app/Contents/Resources” WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES “/Applications/Adium.app/Contents/MacOS/Adium” &