Reviewed by Darin, landed by Maciej.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Apr 2006 04:14:24 +0000 (04:14 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Apr 2006 04:14:24 +0000 (04:14 +0000)
        * BuildSlaveSupport/build-launcher-app: Added.  Builds WebKit.app from WebKitLauncher
          and bundles the WebKit frameworks inside it.
        * BuildSlaveSupport/build-launcher-dmg: Added.  Builds, and optionally uploads, a disk image
          containing WebKit.app.
        * BuildSlaveSupport/run-performance-tests:  Use currentSVNRevision.
        * Scripts/webkitdirs.pm:  Add currentSVNRevision to retrieve the revision
          number of the SVN working copy.
        * WebKitLauncher: Added.
        * WebKitLauncher/Info.plist: Added.
        * WebKitLauncher/WebKitLauncher.xcodeproj: Added.
        * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: Added.
        * WebKitLauncher/WebKitNightlyEnabler.m: Added.  This makes
          up the WebKitNightlyEnabler dylib which is loaded into Safari's address space
          to cause LaunchServices to treat Safari.app as WebKit.app when it is run from
          the nightly launcher.
        * WebKitLauncher/main.m: Added.  The WebKit.app launcher.
          It sets up the environment to have Safari use the bundled frameworks
          and load the WebKitNightlyEnabler dylib before exec'ing Safari
        * WebKitLauncher/start.html: Added.
        * WebKitLauncher/webkit.icns: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/BuildSlaveSupport/build-launcher-app [new file with mode: 0644]
WebKitTools/BuildSlaveSupport/build-launcher-dmg [new file with mode: 0644]
WebKitTools/BuildSlaveSupport/run-performance-tests
WebKitTools/ChangeLog
WebKitTools/Scripts/webkitdirs.pm
WebKitTools/WebKitLauncher/Info.plist [new file with mode: 0644]
WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj [new file with mode: 0644]
WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m [new file with mode: 0644]
WebKitTools/WebKitLauncher/main.m [new file with mode: 0644]
WebKitTools/WebKitLauncher/start.html [new file with mode: 0644]
WebKitTools/WebKitLauncher/webkit.icns [new file with mode: 0644]

diff --git a/WebKitTools/BuildSlaveSupport/build-launcher-app b/WebKitTools/BuildSlaveSupport/build-launcher-app
new file mode 100644 (file)
index 0000000..395b625
--- /dev/null
@@ -0,0 +1,80 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+# Copyright (C) 2006 Mark Rowe <opendarwin.org@bdash.net.nz>.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer. 
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution. 
+# 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+#     its contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission. 
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Creates the launcher WebKit.app with bundled frameworks.
+
+use strict;
+
+use FindBin;
+use lib "$FindBin::Bin/../Scripts";
+use webkitdirs;
+
+my @xcodeBuildArguments = XcodeOptions();
+my $nightlyLauncherTemplatePath = "$FindBin::Bin/../WebKitLauncher";
+my $nightlyLauncherStagingPath = productDir() . "/WebKit.app";
+
+sub buildNightlyLauncher
+{
+    chdir($nightlyLauncherTemplatePath);
+    system("xcodebuild", "clean", @xcodeBuildArguments) == 0 or die "Failed cleaning WebKitLauncher project";
+    system("xcodebuild", @xcodeBuildArguments) == 0 or die "Failed building WebKitLauncher project";
+    chdirWebKit();
+}
+
+sub copyNightlyLauncher
+{
+    my $revision = currentSVNRevision();
+    my $infoPlist = "$nightlyLauncherStagingPath/Contents/Info.plist";
+    my $data;
+    open(IN, $infoPlist) or die "Couldn't open Info.plist in built application for reading";
+    {
+        undef $/;
+        $data = <IN>;
+    }
+    close(IN);
+    open(OUT, ">$infoPlist") or die "Couldn't open Info.plist in built application for writing";
+    $data =~ s/VERSION/$revision/g;
+    print OUT $data;
+    close(OUT);
+    
+    my @frameworks = ("JavaScriptCore", "JavaScriptGlue", "WebCore", "WebKit");
+    for my $framework (@frameworks) {
+        system("ditto", productDir() . "/$framework.framework", "$nightlyLauncherStagingPath/Contents/Resources/$framework.framework") == 0 or die "Failed copying $framework.framework into $nightlyLauncherStagingPath";
+    }
+}
+
+chdirWebKit();
+buildNightlyLauncher();
+copyNightlyLauncher();
+
+Property changes on: WebKitTools/BuildSlaveSupport/build-launcher-app
+___________________________________________________________________
+Name: svn:executable
+   + *
+
diff --git a/WebKitTools/BuildSlaveSupport/build-launcher-dmg b/WebKitTools/BuildSlaveSupport/build-launcher-dmg
new file mode 100644 (file)
index 0000000..51eaec3
--- /dev/null
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+# Copyright (C) 2006 Mark Rowe <opendarwin.org@bdash.net.nz>.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer. 
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution. 
+# 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+#     its contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission. 
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script used by build slaves to create a disk-image containing WebKit.app.
+
+use strict;
+
+use File::Basename;
+use Getopt::Long;
+use FindBin;
+use lib "$FindBin::Bin/../Scripts";
+use webkitdirs;
+
+my $nightlyLauncherStagingPath = productDir() . "/WebKit.app";
+my $nightlyLauncherDiskImagePath;
+
+my $nightlyRemoteHost = 'webkit-nightlies@nightly.webkit.org';
+my $nightlyRemotePath = "/home/webkit-nightlies";
+my $nightlyRemoteLatestPath = "$nightlyRemotePath/update-latest.sh";
+
+sub buildDiskImage
+{
+    my $revision = currentSVNRevision();
+    my $productDir = productDir();
+    $nightlyLauncherDiskImagePath = productDir() . "/WebKit-SVN-r$revision.dmg";
+    
+    print "Creating disk image...\n";
+    my $output = `hdiutil create \"$nightlyLauncherDiskImagePath\" -ov -megabytes 50 -fs HFS+ -volname \"WebKit\"`;
+    die "Creating disk image failed" if $?;
+
+    $output = `hdiutil attach \"$nightlyLauncherDiskImagePath\"`;
+    die "Mounting disk image failed" if $?;
+    
+    my ($mountedDevice)  = ($output =~ /(\/dev\/.+?)\s*Apple_partition_scheme/im);
+    my ($mountedPath) = ($output =~ /Apple_HFS\s+(.+?)\s*$/im);
+    
+    print "Copying files to disk image...\n";    
+    system("ditto", $nightlyLauncherStagingPath, "$mountedPath/WebKit.app") == 0 or die "Failed copying $nightlyLauncherStagingPath to $mountedPath";
+    
+    system("hdiutil", "detach", "-quiet", $mountedDevice) == 0 or die "Unmounting disk image failed";
+    
+    print "Compressing disk image...\n";
+    system("mv", "-f", $nightlyLauncherDiskImagePath, "$nightlyLauncherDiskImagePath.uncompressed") == 0 or die "Renaming disk image failed";
+    system("hdiutil", "convert", "-quiet", "$nightlyLauncherDiskImagePath.uncompressed", "-format", "UDZO", "-imagekey", "zlib-level=9", "-o", "$nightlyLauncherDiskImagePath");
+    die "Compressing disk image failed" if $?;
+    
+    unlink "$nightlyLauncherDiskImagePath.uncompressed";
+}
+
+sub uploadNightlyDiskImage
+{
+    my $nightlyRemoteDiskImagePath = "$nightlyRemotePath/builds/" . basename($nightlyLauncherDiskImagePath);
+    system("rsync", "-vP", $nightlyLauncherDiskImagePath, "$nightlyRemoteHost:$nightlyRemoteDiskImagePath") == 0 or die "Failed uploading disk image";
+    system("ssh", $nightlyRemoteHost, $nightlyRemoteLatestPath, $nightlyRemoteDiskImagePath) == 0 or die "Failed linking disk image to latest";
+}
+
+sub uploadBuildSlaveDiskImage
+{
+    my $remoteDiskImagePath = shift(@_) . basename($nightlyLauncherDiskImagePath);
+    system("rsync", "-vP", $nightlyLauncherDiskImagePath, $remoteDiskImagePath) == 0 or die "Failed uploading disk image";
+}
+
+
+my $uploadTo;
+my $nightlyBuild = 0;
+GetOptions('upload-to-host=s' => \$uploadTo,
+           'upload-as-nightly!' => \$nightlyBuild);
+
+chdirWebKit();
+buildDiskImage();
+
+if ($nightlyBuild) {
+    uploadNightlyDiskImage();
+} elsif ($uploadTo) {
+    uploadBuildSlaveDiskImage($uploadTo);
+} else {
+    print "Disk image left at $nightlyLauncherDiskImagePath\n";
+}
+
+
+Property changes on: WebKitTools/BuildSlaveSupport/build-launcher-dmg
+___________________________________________________________________
+Name: svn:executable
+   + *
+
index 20a518d..5d6ea44 100755 (executable)
@@ -63,14 +63,8 @@ my $sock = new IO::Socket::INET(LocalHost => $perfMaster,
                                 Reuse => 1);
 die "Could not create socket for port $reportPort: $!\n" unless $sock;
 
-print "Determining source version...\n";
-chdirWebKit();
-my $svnInfo = `svn info .`;
-my ($revision) = ($svnInfo =~ m/Revision: (\d+)/g);
-die "Failed to determine svn revision!\n" unless (defined $revision);
-
 print "Starting performance tests on PLT slave...\n";
-die "Failed to start slave!\n" unless (system("ssh", $userAndHost, "autovicki", $slaveDirectory, "--safari", "$slaveDirectory/Safari.app", "--count", 5, "--clean-exit", "--webkit-revision", $revision, "--show-results", "send-completed-results.command") == 0);
+die "Failed to start slave!\n" unless (system("ssh", $userAndHost, "autovicki", $slaveDirectory, "--safari", "$slaveDirectory/Safari.app", "--count", 5, "--clean-exit", "--webkit-revision", currentSVNRevision(), "--show-results", "send-completed-results.command") == 0);
 
 print "Waiting for PLT slave to respond...\n";
 my $new_sock = $sock->accept();
index aaa5c32..1575ac8 100644 (file)
@@ -1,3 +1,28 @@
+2006-04-06  Mark Rowe  <opendarwin.org@bdash.net.nz>
+
+        Reviewed by Darin, landed by Maciej.
+
+        * BuildSlaveSupport/build-launcher-app: Added.  Builds WebKit.app from WebKitLauncher
+          and bundles the WebKit frameworks inside it.
+        * BuildSlaveSupport/build-launcher-dmg: Added.  Builds, and optionally uploads, a disk image
+          containing WebKit.app.
+        * BuildSlaveSupport/run-performance-tests:  Use currentSVNRevision.
+        * Scripts/webkitdirs.pm:  Add currentSVNRevision to retrieve the revision
+          number of the SVN working copy.
+        * WebKitLauncher: Added.
+        * WebKitLauncher/Info.plist: Added.
+        * WebKitLauncher/WebKitLauncher.xcodeproj: Added.
+        * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: Added.
+        * WebKitLauncher/WebKitNightlyEnabler.m: Added.  This makes
+          up the WebKitNightlyEnabler dylib which is loaded into Safari's address space
+          to cause LaunchServices to treat Safari.app as WebKit.app when it is run from
+          the nightly launcher.
+        * WebKitLauncher/main.m: Added.  The WebKit.app launcher.
+          It sets up the environment to have Safari use the bundled frameworks
+          and load the WebKitNightlyEnabler dylib before exec'ing Safari
+        * WebKitLauncher/start.html: Added.
+        * WebKitLauncher/webkit.icns: Added.
+
 2006-04-05  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.
index 409ddc3..a2191f4 100644 (file)
@@ -35,7 +35,7 @@ BEGIN {
    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
    $VERSION     = 1.00;
    @ISA         = qw(Exporter);
-   @EXPORT      = qw(&chdirWebKit &baseProductDir &productDir &XcodeOptions &XcodeOptionString &XcodeOptionStringNoConfig &passedConfiguration &setConfiguration &safariPath &checkFrameworks);
+   @EXPORT      = qw(&chdirWebKit &baseProductDir &productDir &XcodeOptions &XcodeOptionString &XcodeOptionStringNoConfig &passedConfiguration &setConfiguration &safariPath &checkFrameworks &currentSVNRevision);
    %EXPORT_TAGS = ( );
    @EXPORT_OK   = ();
 }
@@ -47,6 +47,8 @@ my @baseProductDirOption;
 my $configuration;
 my $configurationProductDir;
 my $sourceDir;
+my $currentSVNRevision;
+
 
 # Variables for Win32 support
 my $devenvPath;
@@ -133,6 +135,17 @@ sub determineConfigurationProductDir
     $configurationProductDir = "$baseProductDir/$configuration";
 }
 
+sub determineCurrentSVNRevision
+{
+    return if defined $currentSVNRevision;
+    determineSourceDir();
+    my $svnInfo = `svn info $sourceDir | grep Revision:`;
+    ($currentSVNRevision) = ($svnInfo =~ m/Revision: (\d+).*/g);
+    die "Unable to determine current SVN revision in $sourceDir" unless (defined $currentSVNRevision);
+    return $currentSVNRevision;
+}
+
+
 sub chdirWebKit
 {
     determineSourceDir();
@@ -157,6 +170,12 @@ sub configuration()
     return $configuration;
 }
 
+sub currentSVNRevision
+{
+    determineCurrentSVNRevision();
+    return $currentSVNRevision;
+}
+
 sub XcodeOptions
 {
     determineBaseProductDir();
diff --git a/WebKitTools/WebKitLauncher/Info.plist b/WebKitTools/WebKitLauncher/Info.plist
new file mode 100644 (file)
index 0000000..5ab5bd9
--- /dev/null
@@ -0,0 +1,482 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleDocumentTypes</key>
+       <array>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>css</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>text/css</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>CSS style sheet</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>pdf</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>application/pdf</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>PDF document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>webarchive</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>webarchive.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>application/x-webarchive</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Web archive</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>syndarticle</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>RSS article</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>webbookmark</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Safari bookmark</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>webloc</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Web internet location</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>ilht</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>download</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>download10.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Safari download</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>LSTypeIsPackage</key>
+                       <true/>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>gif</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>image/gif</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>GIF image</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>GIFf</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>html</string>
+                               <string>htm</string>
+                               <string>shtml</string>
+                               <string>jhtml</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>text/html</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>HTML document</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>HTML</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>js</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>application/x-javascript</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>JavaScript script</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>jpg</string>
+                               <string>jpeg</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>image/jpeg</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>JPEG image</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>JPEG</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>jp2</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>image/jp2</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>JPEG 2000 image</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>jp2 </string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>txt</string>
+                               <string>text</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>text/plain</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Plain text document</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>TEXT</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>png</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>image/png</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>PNG image</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>PNGf</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>rtf</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>application/rtf</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Rich Text Format (RTF) document</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>RTF </string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>tiff</string>
+                               <string>tif</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>image/tiff</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>TIFF image</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>TIFF</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>url</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Web site location</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>LINK</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>ico</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>image/x-icon</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Windows icon image</string>
+                       <key>CFBundleTypeOSTypes</key>
+                       <array>
+                               <string>ICO </string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>xhtml</string>
+                               <string>xhtm</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>application/xhtml+xml</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>XHTML document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>xml</string>
+                               <string>xbl</string>
+                               <string>xsl</string>
+                               <string>xslt</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeMIMETypes</key>
+                       <array>
+                               <string>application/xml</string>
+                               <string>text/xml</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>XML document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+                       <key>NSDocumentClass</key>
+                       <string>BrowserDocument</string>
+               </dict>
+       </array>
+       <key>CFBundleExecutable</key>
+       <string>${EXECUTABLE_NAME}</string>
+       <key>CFBundleIconFile</key>
+       <string>webkit.icns</string>
+       <key>CFBundleIdentifier</key>
+       <string>org.webkit.nightly.WebKit</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>${PRODUCT_NAME}</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleSignature</key>
+       <string>wbkt</string>
+       <key>CFBundleVersion</key>
+       <string>VERSION</string>
+       <key>NSPrincipalClass</key>
+       <string>BrowserApplication</string>
+       
+       <key>CFBundleHelpBookFolder</key>
+       <string>SafariHelp</string>
+       <key>CFBundleHelpBookName</key>
+       <string>Safari Help</string>
+       <key>CFBundleURLTypes</key>
+       <array>
+               <dict>
+                       <key>CFBundleURLName</key>
+                       <string>Web site URL</string>
+                       <key>CFBundleURLSchemes</key>
+                       <array>
+                               <string>http</string>
+                               <string>https</string>
+                       </array>
+               </dict>
+               <dict>
+                       <key>CFBundleURLName</key>
+                       <string>local file URL</string>
+                       <key>CFBundleURLSchemes</key>
+                       <array>
+                               <string>file</string>
+                       </array>
+               </dict>
+               <dict>
+                       <key>CFBundleURLName</key>
+                       <string>RSS URL</string>
+                       <key>CFBundleURLSchemes</key>
+                       <array>
+                               <string>feed</string>
+                               <string>feeds</string>
+                               <string>feedsearch</string>
+                       </array>
+               </dict>
+       </array>
+       <key>NSAppleScriptEnabled</key>
+       <string>Yes</string>
+       <key>UTExportedTypeDeclarations</key>
+       <array>
+               <dict>
+                       <key>UTTypeConformsTo</key>
+                       <string>public.data</string>
+                       <key>UTTypeDescription</key>
+                       <string>Safari bookmark</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>com.apple.safari.bookmark</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>webbookmark</string>
+                               </array>
+                       </dict>
+               </dict>
+       </array>
+
+</dict>
+</plist>
diff --git a/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj b/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..f8e7d53
--- /dev/null
@@ -0,0 +1,392 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 42;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               5D4DF982097F89FB0083D5E5 /* start.html in Resources */ = {isa = PBXBuildFile; fileRef = 5D4DF981097F89FB0083D5E5 /* start.html */; };
+               5D650F3609DB8B370075E9A8 /* WebKitNightlyEnabler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */; };
+               5D650F3A09DB8B410075E9A8 /* WebKitNightlyEnabler.dylib in Resources */ = {isa = PBXBuildFile; fileRef = 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */; };
+               5D650F7609DB8CB40075E9A8 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D650F7509DB8CB40075E9A8 /* CoreFoundation.framework */; };
+               5DB70525097B94CD009875EC /* webkit.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5DB70524097B94CD009875EC /* webkit.icns */; };
+               8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+               8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXBuildStyle section */
+               4A9504CCFFE6A4B311CA0CBA /* Debug */ = {
+                       isa = PBXBuildStyle;
+                       buildSettings = {
+                       };
+                       name = Debug;
+               };
+               4A9504CDFFE6A4B311CA0CBA /* Release */ = {
+                       isa = PBXBuildStyle;
+                       buildSettings = {
+                       };
+                       name = Release;
+               };
+/* End PBXBuildStyle section */
+
+/* Begin PBXContainerItemProxy section */
+               5D650F4409DB8B830075E9A8 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 5D650F3309DB8B280075E9A8;
+                       remoteInfo = WebKitNightlyEnabler;
+               };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+               13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+               29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+               29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+               29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+               5D4DF981097F89FB0083D5E5 /* start.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = start.html; sourceTree = "<group>"; };
+               5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = WebKitNightlyEnabler.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+               5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebKitNightlyEnabler.m; sourceTree = "<group>"; };
+               5D650F7509DB8CB40075E9A8 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
+               5DB70524097B94CD009875EC /* webkit.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = webkit.icns; sourceTree = "<group>"; };
+               8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+               8D1107320486CEB800E47090 /* WebKit.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = WebKit.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               5D650F3209DB8B280075E9A8 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               5D650F7609DB8CB40075E9A8 /* CoreFoundation.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               8D11072E0486CEB800E47090 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               080E96DDFE201D6D7F000001 /* Classes */ = {
+                       isa = PBXGroup;
+                       children = (
+                       );
+                       name = Classes;
+                       sourceTree = "<group>";
+               };
+               1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+                       );
+                       name = "Linked Frameworks";
+                       sourceTree = "<group>";
+               };
+               1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               5D650F7509DB8CB40075E9A8 /* CoreFoundation.framework */,
+                               29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+                               13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+                               29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+                       );
+                       name = "Other Frameworks";
+                       sourceTree = "<group>";
+               };
+               19C28FACFE9D520D11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               8D1107320486CEB800E47090 /* WebKit.app */,
+                               5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               29B97314FDCFA39411CA2CEA /* WebKit */ = {
+                       isa = PBXGroup;
+                       children = (
+                               080E96DDFE201D6D7F000001 /* Classes */,
+                               29B97315FDCFA39411CA2CEA /* Other Sources */,
+                               29B97317FDCFA39411CA2CEA /* Resources */,
+                               29B97323FDCFA39411CA2CEA /* Frameworks */,
+                               19C28FACFE9D520D11CA2CBB /* Products */,
+                       );
+                       name = WebKit;
+                       sourceTree = "<group>";
+               };
+               29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */,
+                               29B97316FDCFA39411CA2CEA /* main.m */,
+                       );
+                       name = "Other Sources";
+                       sourceTree = "<group>";
+               };
+               29B97317FDCFA39411CA2CEA /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               5D4DF981097F89FB0083D5E5 /* start.html */,
+                               5DB70524097B94CD009875EC /* webkit.icns */,
+                               8D1107310486CEB800E47090 /* Info.plist */,
+                       );
+                       name = Resources;
+                       sourceTree = "<group>";
+               };
+               29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+                               1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+                       );
+                       name = Frameworks;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+               5D650F3009DB8B280075E9A8 /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+               5D650F3309DB8B280075E9A8 /* WebKitNightlyEnabler */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 5D650F3709DB8B370075E9A8 /* Build configuration list for PBXNativeTarget "WebKitNightlyEnabler" */;
+                       buildPhases = (
+                               5D650F3009DB8B280075E9A8 /* Headers */,
+                               5D650F3109DB8B280075E9A8 /* Sources */,
+                               5D650F3209DB8B280075E9A8 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       buildSettings = {
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               INSTALL_PATH = /usr/local/lib;
+                               PREBINDING = NO;
+                               PRODUCT_NAME = WebKitNightlyEnabler;
+                               ZERO_LINK = YES;
+                       };
+                       dependencies = (
+                       );
+                       name = WebKitNightlyEnabler;
+                       productName = WebKitNightlyEnabler;
+                       productReference = 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */;
+                       productType = "com.apple.product-type.library.dynamic";
+               };
+               8D1107260486CEB800E47090 /* WebKit */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WebKit" */;
+                       buildPhases = (
+                               8D1107290486CEB800E47090 /* Resources */,
+                               8D11072C0486CEB800E47090 /* Sources */,
+                               8D11072E0486CEB800E47090 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       buildSettings = {
+                       };
+                       dependencies = (
+                               5D650F4509DB8B830075E9A8 /* PBXTargetDependency */,
+                       );
+                       name = WebKit;
+                       productInstallPath = "$(HOME)/Applications";
+                       productName = WebKit;
+                       productReference = 8D1107320486CEB800E47090 /* WebKit.app */;
+                       productType = "com.apple.product-type.application";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               29B97313FDCFA39411CA2CEA /* Project object */ = {
+                       isa = PBXProject;
+                       buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NightlyLauncher" */;
+                       buildSettings = {
+                       };
+                       buildStyles = (
+                               4A9504CCFFE6A4B311CA0CBA /* Debug */,
+                               4A9504CDFFE6A4B311CA0CBA /* Release */,
+                       );
+                       hasScannedForEncodings = 1;
+                       mainGroup = 29B97314FDCFA39411CA2CEA /* WebKit */;
+                       projectDirPath = "";
+                       targets = (
+                               8D1107260486CEB800E47090 /* WebKit */,
+                               5D650F3309DB8B280075E9A8 /* WebKitNightlyEnabler */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+               8D1107290486CEB800E47090 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               5D650F3A09DB8B410075E9A8 /* WebKitNightlyEnabler.dylib in Resources */,
+                               5DB70525097B94CD009875EC /* webkit.icns in Resources */,
+                               5D4DF982097F89FB0083D5E5 /* start.html in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               5D650F3109DB8B280075E9A8 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               5D650F3609DB8B370075E9A8 /* WebKitNightlyEnabler.m in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               8D11072C0486CEB800E47090 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072D0486CEB800E47090 /* main.m in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+               5D650F4509DB8B830075E9A8 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 5D650F3309DB8B280075E9A8 /* WebKitNightlyEnabler */;
+                       targetProxy = 5D650F4409DB8B830075E9A8 /* PBXContainerItemProxy */;
+               };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+               5D650F3809DB8B370075E9A8 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
+                               PRODUCT_NAME = WebKitNightlyEnabler;
+                               SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk;
+                       };
+                       name = Debug;
+               };
+               5D650F3909DB8B370075E9A8 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
+                               PRODUCT_NAME = WebKitNightlyEnabler;
+                               SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk;
+                       };
+                       name = Release;
+               };
+               C01FCF4B08A954540054247B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DEBUGGING_SYMBOLS = full;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               INFOPLIST_FILE = Info.plist;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               PRODUCT_NAME = WebKit;
+                               WRAPPER_EXTENSION = app;
+                       };
+                       name = Debug;
+               };
+               C01FCF4C08A954540054247B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               DEAD_CODE_STRIPPING = YES;
+                               DEPLOYMENT_POSTPROCESSING = YES;
+                               GCC_DEBUGGING_SYMBOLS = full;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+                               INFOPLIST_FILE = Info.plist;
+                               PRODUCT_NAME = WebKit;
+                               WRAPPER_EXTENSION = app;
+                       };
+                       name = Release;
+               };
+               C01FCF4F08A954540054247B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = (
+                                       ppc,
+                                       i386,
+                               );
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.2;
+                               MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+                               MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
+                               PREBINDING = NO;
+                               SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk;
+                               SDKROOT_ppc = /Developer/SDKs/MacOSX10.2.8.sdk;
+                       };
+                       name = Debug;
+               };
+               C01FCF5008A954540054247B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = (
+                                       i386,
+                                       ppc,
+                               );
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+                               MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
+                               PREBINDING = NO;
+                               SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk;
+                               SDKROOT_ppc = /Developer/SDKs/MacOSX10.2.8.sdk;
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               5D650F3709DB8B370075E9A8 /* Build configuration list for PBXNativeTarget "WebKitNightlyEnabler" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               5D650F3809DB8B370075E9A8 /* Debug */,
+                               5D650F3909DB8B370075E9A8 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WebKit" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4B08A954540054247B /* Debug */,
+                               C01FCF4C08A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NightlyLauncher" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4F08A954540054247B /* Debug */,
+                               C01FCF5008A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m b/WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m
new file mode 100644 (file)
index 0000000..5898267
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Graham Dennis.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#include <mach-o/dyld.h>
+#include <dlfcn.h>
+#include <mach-o/loader.h>
+#include <mach-o/nlist.h>
+#include <string.h>
+
+static void cleanUpAfterOurselves(void) __attribute__ ((constructor));
+
+void *symbol_lookup(char *symbol);
+
+void cleanUpAfterOurselves(void)
+{
+    char **args = *(char***)_NSGetArgv();
+    char **procPath = symbol_lookup("___CFProcessPath");
+    char *procPathBackup = *procPath;
+    *procPath = args[0];
+    CFBundleGetMainBundle();
+    *procPath = procPathBackup;
+    unsetenv("DYLD_INSERT_LIBRARIES");
+    unsetenv("CFProcessPath");
+}
+
+#if __LP64__
+#define LC_SEGMENT_COMMAND LC_SEGMENT_64
+#define macho_header mach_header_64
+#define macho_segment_command segment_command_64
+#define macho_section section_64
+#define getsectdatafromheader getsectdatafromheader_64
+#define macho_nlist nlist_64
+#else
+#define LC_SEGMENT_COMMAND LC_SEGMENT
+#define macho_header mach_header
+#define macho_segment_command segment_command
+#define macho_section section
+#define macho_nlist nlist
+#endif
+
+void *GDSymbolLookup(const struct macho_header *header, const char *symbol);
+
+void *symbol_lookup(char *symbol)
+{
+    int i;
+    for(i=0;i<_dyld_image_count();i++)
+    {    
+        void *symbolResult = GDSymbolLookup((const struct macho_header*)_dyld_get_image_header(i), symbol);
+        if (symbolResult)
+            return symbolResult;
+    }
+    return NULL;
+}
+
+void *GDSymbolLookup(const struct macho_header *header, const char *symbol)
+{
+    if (!header || !symbol)
+        return NULL;
+    if ((header->magic != MH_MAGIC) && (header->magic != MH_MAGIC_64))
+        return NULL;
+    
+    uint32_t currCommand;
+    const struct load_command *loadCommand = (const struct load_command *)( ((void *)header) + sizeof(struct macho_header));
+    const struct macho_segment_command *segCommand;
+    
+    const struct symtab_command *symtabCommand = NULL;
+    const struct dysymtab_command *dysymtabCommand = NULL;
+    const struct macho_segment_command *textSegment = NULL;
+    const struct macho_segment_command *linkEditSegment = NULL;
+    
+    for (currCommand = 0; currCommand < header->ncmds; currCommand++)
+    {
+        switch (loadCommand->cmd)
+        {
+            case LC_SEGMENT_COMMAND:
+                segCommand = (const struct macho_segment_command *)loadCommand;
+                if (strcmp(segCommand->segname, "__TEXT")==0)
+                    textSegment = segCommand;
+                else if (strcmp(segCommand->segname, "__LINKEDIT")==0)
+                    linkEditSegment = segCommand;
+                    break;
+                
+            case LC_SYMTAB:
+                symtabCommand = (const struct symtab_command *)loadCommand;
+                break;
+                
+            case LC_DYSYMTAB:
+                dysymtabCommand = (const struct dysymtab_command *)loadCommand;
+                break;
+        }
+        
+        loadCommand = (const struct load_command *)(((void*)loadCommand) + loadCommand->cmdsize);
+    }
+    if (textSegment==NULL || linkEditSegment==NULL || symtabCommand==NULL || dysymtabCommand==NULL) {
+        return NULL;
+    }
+    
+    typedef enum { Start = 0, LocalSymbols, ExternalSymbols, Done } SymbolSearchState;
+    uint32_t currentSymbolIndex;
+    uint32_t maximumSymbolIndex;
+    SymbolSearchState state;
+    
+    for (state = Start + 1; state < Done; state++)
+    {
+        switch(state) {
+            case LocalSymbols:
+                currentSymbolIndex = dysymtabCommand->ilocalsym;
+                maximumSymbolIndex = dysymtabCommand->ilocalsym + dysymtabCommand->nlocalsym;
+                break;
+                
+            case ExternalSymbols:
+                currentSymbolIndex = dysymtabCommand->iextdefsym;
+                maximumSymbolIndex = dysymtabCommand->nextdefsym;
+                break;
+                
+            default:
+                return NULL;
+        }
+        for (; currentSymbolIndex < maximumSymbolIndex; currentSymbolIndex++)
+        {
+            const struct macho_nlist *symbolTableEntry;
+            symbolTableEntry = (const struct macho_nlist *)(currentSymbolIndex*sizeof(struct macho_nlist)
+                                                            + (ptrdiff_t)header + symtabCommand->symoff
+                                                            + linkEditSegment->vmaddr - linkEditSegment->fileoff
+                                                            - textSegment->vmaddr);
+            int32_t stringTableIndex = symbolTableEntry->n_un.n_strx;
+            if (stringTableIndex<0)
+                continue;
+            const char *stringTableEntry = (const char*)(stringTableIndex + (ptrdiff_t)header + symtabCommand->stroff
+                                                         + linkEditSegment->vmaddr - linkEditSegment->fileoff
+                                                         - textSegment->vmaddr);
+            if (strcmp(symbol, stringTableEntry)==0) {
+                return ((void*)header) - textSegment->vmaddr + symbolTableEntry->n_value;
+            }
+        }
+        state++;
+    }
+    return NULL;
+}
+
+
diff --git a/WebKitTools/WebKitLauncher/main.m b/WebKitTools/WebKitLauncher/main.m
new file mode 100644 (file)
index 0000000..7167d32
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Mark Rowe.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <CoreFoundation/CoreFoundation.h>
+
+void displayErrorAndQuit(NSString *title, NSString *message)
+{
+    NSApplicationLoad();
+    NSRunCriticalAlertPanel(title, message, @"Quit", nil, nil);
+    exit(0);
+}
+
+void checkMacOSXVersion()
+{
+    long versionNumber = 0;
+    OSErr error = Gestalt(gestaltSystemVersion, &versionNumber);
+    if (error != noErr || versionNumber < 0x1040)
+        displayErrorAndQuit(@"Mac OS X 10.4 is Required", @"Nightly builds of WebKit require Mac OS X 10.4 or newer.");
+}
+
+int getLastVersionShown()
+{
+    [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObject:@"-1" forKey:@"StartPageShownInVersion"]];
+    return [[NSUserDefaults standardUserDefaults] integerForKey:@"StartPageShownInVersion"];
+}
+
+void saveLastVersionShown(int lastVersion)
+{
+    [[NSUserDefaults standardUserDefaults] setInteger:lastVersion forKey:@"StartPageShownInVersion"];
+    [[NSUserDefaults standardUserDefaults] synchronize];
+}
+
+NSString *getPathForStartPage()
+{
+    return [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"start.html"];
+}
+
+int getShowStartPageVersion()
+{
+    return getCurrentVersion() + 1;
+}
+
+int getCurrentVersion()
+{
+    return [[[[NSBundle mainBundle] infoDictionary] valueForKey:(NSString *)kCFBundleVersionKey] intValue];
+}
+
+BOOL startPageDisabled()
+{
+    return [[NSUserDefaults standardUserDefaults] boolForKey:@"StartPageDisabled"];
+}
+
+void addStartPageToArgumentsIfNeeded(NSMutableArray *arguments)
+{
+    if (startPageDisabled())
+        return;
+
+    if (getLastVersionShown() < getShowStartPageVersion()) {
+        saveLastVersionShown(getCurrentVersion());
+        NSString *startPagePath = getPathForStartPage();
+        if (startPagePath)
+            [arguments addObject:startPagePath];
+    }
+}
+
+static void myExecve(NSString *executable, NSArray *args, NSDictionary *environment)
+{
+    char **argv = (char **)calloc(sizeof(char *), [args count] + 1);
+    char **env = (char **)calloc(sizeof(char *), [environment count] + 1);
+    
+    NSEnumerator *e = [args objectEnumerator];
+    NSString *s;
+    int i = 0;
+    while (s = [e nextObject])
+        argv[i++] = (char *) [s UTF8String];
+    
+    e = [environment keyEnumerator];
+    i = 0;
+    while (s = [e nextObject])
+        env[i++] = (char *) [[NSString stringWithFormat:@"%@=%@", s, [environment objectForKey:s]] UTF8String];
+   
+    execve([executable fileSystemRepresentation], argv, env);
+}
+
+int main(int argc, char *argv[])
+{
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    checkMacOSXVersion();
+
+    CFURLRef safariURL = nil;
+    OSStatus err = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR("com.apple.Safari"), nil, nil, &safariURL);
+    if (err != noErr)
+        displayErrorAndQuit(@"Unable to locate Safari", @"Nightly builds of WebKit require Safari to run.  Please check that it is available and then try again.");
+
+    NSString *frameworkPath = [[NSBundle mainBundle] resourcePath];
+    NSString *executablePath = [[NSBundle bundleWithPath:[(NSURL *)safariURL path]] executablePath];
+    NSString *pathToEnablerLib = [[NSBundle mainBundle] pathForResource:@"WebKitNightlyEnabler" ofType:@"dylib"];
+    
+    NSMutableArray *arguments = [NSMutableArray arrayWithObjects:executablePath, @"-WebKitDeveloperExtras", @"YES", nil];
+    addStartPageToArgumentsIfNeeded(arguments);
+
+    while (*++argv)
+        [arguments addObject:[NSString stringWithUTF8String:*argv]];
+
+    myExecve(executablePath,
+             arguments,
+             [NSDictionary dictionaryWithObjectsAndKeys:frameworkPath, @"DYLD_FRAMEWORK_PATH", 
+             @"YES", @"WEBKIT_UNSET_DYLD_FRAMEWORK_PATH", 
+             pathToEnablerLib, @"DYLD_INSERT_LIBRARIES", 
+             [[NSBundle mainBundle] executablePath], @"CFProcessPath",
+              nil]);
+
+     char *error = strerror(errno);
+     NSString *errorMessage = [NSString stringWithFormat:@"Launching Safari at %@ failed with the error '%s' (%d)", [(NSURL *)safariURL  path], error, errno];
+     displayErrorAndQuit(@"Unable to launch Safari", errorMessage);
+
+    [pool release];
+    return 0;
+}
+\ No newline at end of file
diff --git a/WebKitTools/WebKitLauncher/start.html b/WebKitTools/WebKitLauncher/start.html
new file mode 100644 (file)
index 0000000..e987fea
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <meta http-equiv="refresh" content="1;URL=http://nightly.webkit.org/start/" />
+        <script type="text/javascript">
+            document.location = "http://nightly.webkit.org/start/";
+        </script>
+    </head>
+    <body>
+    </body>
+</html>
diff --git a/WebKitTools/WebKitLauncher/webkit.icns b/WebKitTools/WebKitLauncher/webkit.icns
new file mode 100644 (file)
index 0000000..bf629bf
Binary files /dev/null and b/WebKitTools/WebKitLauncher/webkit.icns differ