wiki:UsingSafari2WithSafari3PublicBetaInstalled

Abstract

After installing the Safari 3 Public Beta, the original Safari 2 application and WebKit frameworks get archived. This page describes how to extract them in order to use Safari 2 for testing purposes.

Setup

  1. Open a Terminal window.
  2. Create a directory to save the Safari 2 application and WebKit frameworks.
    $ mkdir ~/Safari2
  3. Change directories to the directory created in Step 2.
    $ cd ~/Safari2
  4. Extract the Safari 2 archive.
    $ tar xzvf "/Library/Application Support/Apple/.SafariBetaArchive.tar.gz"
  5. Create a shell script (in ~/bin/Safari2) to launch Safari 2.
#!/bin/sh
export DYLD_FRAMEWORK_PATH=$HOME/Safari2/System/Library/Frameworks:$HOME/Safari2/System/Library/Frameworks/WebKit.framework/Frameworks
export WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES
exec $HOME/Safari2/Applications/Safari.app/Contents/MacOS/Safari

Running

To run Safari 2, simply run the shell script:

$ ~/bin/Safari2

Installing Safari 3 without affecting Safari 2

With some care, the Safari 3 beta can be installed without affecting the system-wide WebKit framework or replacing Safari 2. This is accomplished by bundling the Safari 3 libraries and application inside WebKitLauncher. Here's the quick HOWTO:

  1. Download the Safari 3 beta and mount the disk image.
  2. Download the prebuilt WebKitLauncher that I happen to have sitting around, and extract it to the Desktop.
  3. Paste the following voodoo into the Terminal, to merge in the Safari 3 bits:
    /bin/mkdir ~/Desktop/Safari3 && cd ~/Desktop/Safari3
    /bin/pax -rz -pp -f /Volumes/Safari\ 3\ Beta/Safari3Beta.pkg/Contents/Resources/Safari3Beta.pax.gz
    /bin/mv ./System/Library/Frameworks/WebKit.framework/Frameworks/* ../WebKit.app/Contents/Resources/
    /bin/mv ./System/Library/*Frameworks/* ../WebKit.app/Contents/Resources/
    /bin/mv ./Applications/* ../WebKit.app/Contents/Resources/
    cd .. && /bin/rm -r Safari3
    
  4. You now have a self-contained copy of Safari 3 called "WebKit.app" on your Desktop. Feel free to rename it or move it wherever you'd like, and you can also get rid of the Safari 3 disk image.

A few more details are available here.

Last modified 9 years ago Last modified on Dec 20, 2010 10:42:24 AM