diff options
Diffstat (limited to 'WebKitTools/WebKitLauncher')
-rw-r--r-- | WebKitTools/WebKitLauncher/Info.plist | 476 | ||||
-rw-r--r-- | WebKitTools/WebKitLauncher/VERSION | 1 | ||||
-rw-r--r-- | WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj | 358 | ||||
-rw-r--r-- | WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m | 165 | ||||
-rw-r--r-- | WebKitTools/WebKitLauncher/main.m | 164 | ||||
-rw-r--r-- | WebKitTools/WebKitLauncher/start.html | 33 | ||||
-rw-r--r-- | WebKitTools/WebKitLauncher/webkit.icns | bin | 0 -> 56937 bytes |
7 files changed, 1197 insertions, 0 deletions
diff --git a/WebKitTools/WebKitLauncher/Info.plist b/WebKitTools/WebKitLauncher/Info.plist new file mode 100644 index 0000000..9317bd4 --- /dev/null +++ b/WebKitTools/WebKitLauncher/Info.plist @@ -0,0 +1,476 @@ +<?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>CFBundleGetInfoString</key> + <string>rVERSION, Copyright 2005, 2006, 2007 Apple Inc.</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>CFBundleShortVersionString</key> + <string>rVERSION</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> + </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/VERSION b/WebKitTools/WebKitLauncher/VERSION new file mode 100644 index 0000000..fd85e30 --- /dev/null +++ b/WebKitTools/WebKitLauncher/VERSION @@ -0,0 +1 @@ +VERSION diff --git a/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj b/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj new file mode 100644 index 0000000..67250dd --- /dev/null +++ b/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj @@ -0,0 +1,358 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 5D41141C0A50A9DE00C84CF0 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 5D41141B0A50A9DE00C84CF0 /* VERSION */; }; + 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 */; }; + 5D877FCD0A5795F200D0C67B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.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 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>"; }; + 5D41141B0A50A9DE00C84CF0 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; }; + 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; explicitFileType = wrapper.application; includeInIndex = 0; path = WebKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5D650F3209DB8B280075E9A8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5D877FCD0A5795F200D0C67B /* Cocoa.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 */, + 5D41141B0A50A9DE00C84CF0 /* VERSION */, + ); + 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 = ( + ); + 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 = ( + ); + 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 "WebKitLauncher" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* WebKit */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* WebKit */, + 5D650F3309DB8B280075E9A8 /* WebKitNightlyEnabler */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5D41141C0A50A9DE00C84CF0 /* VERSION in Resources */, + 5D650F3A09DB8B410075E9A8 /* WebKitNightlyEnabler.dylib in Resources */, + 5D4DF982097F89FB0083D5E5 /* start.html in Resources */, + 5DB70525097B94CD009875EC /* webkit.icns 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 = { + DEBUG_INFORMATION_FORMAT = dwarf; + 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 = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEBUG_INFORMATION_FORMAT = dwarf; + 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 = /Developer/SDKs/MacOSX10.4u.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 "WebKitLauncher" */ = { + 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 index 0000000..8c6eb84 --- /dev/null +++ b/WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2006, 2007 Apple 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> + +static void enableWebKitNightlyBehaviour() __attribute__ ((constructor)); + +static NSString *WKNERunState = @"WKNERunState"; +static NSString *WKNEShouldMonitorShutdowns = @"WKNEShouldMonitorShutdowns"; + +typedef enum { + RunStateShutDown, + RunStateInitializing, + RunStateRunning +} WKNERunStates; + +static bool extensionBundlesWereLoaded = NO; +static NSSet *extensionPaths = nil; + +static void myBundleDidLoad(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) +{ + // Break out early if we have already detected an extension + if (extensionBundlesWereLoaded) + return; + + NSBundle *bundle = (NSBundle *)object; + NSString *bundlePath = [[bundle bundlePath] stringByAbbreviatingWithTildeInPath]; + NSString *bundleFileName = [bundlePath lastPathComponent]; + + // Explicitly ignore SIMBL.bundle, as its only purpose is to load extensions + // on a per-application basis. It's presence indicates a user has application + // extensions, but not that any will be loaded into Safari + if ([bundleFileName isEqualToString:@"SIMBL.bundle"]) + return; + + // If the bundle lives inside a known extension path, flag it as an extension + NSEnumerator *e = [extensionPaths objectEnumerator]; + NSString *path = nil; + while (path = [e nextObject]) { + if ([bundlePath length] < [path length]) + continue; + + if ([[bundlePath substringToIndex:[path length]] isEqualToString:path]) { + extensionBundlesWereLoaded = YES; + break; + } + } +} + +static void myApplicationWillFinishLaunching(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) +{ + CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), &myApplicationWillFinishLaunching, NULL, NULL); + CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), &myBundleDidLoad, NULL, NULL); + [extensionPaths release]; + extensionPaths = nil; + + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + [userDefaults setInteger:RunStateRunning forKey:WKNERunState]; + [userDefaults synchronize]; + + if (extensionBundlesWereLoaded) + NSRunInformationalAlertPanel(@"Safari extensions detected", + @"Safari extensions were detected on your system. Extensions are incompatible with nightly builds of WebKit, and may cause crashes or incorrect behavior. Please disable them if you experience such behavior.", @"Continue", + nil, nil); +} + +static void myApplicationWillTerminate(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) +{ + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + [userDefaults setInteger:RunStateShutDown forKey:WKNERunState]; + [userDefaults synchronize]; +} + +extern char **_CFGetProcessPath() __attribute__((weak)); + +static void poseAsWebKitApp() +{ + char *webKitAppPath = getenv("WebKitAppPath"); + if (!webKitAppPath || !_CFGetProcessPath) + return; + + // Set up the main bundle early so it points at Safari.app + CFBundleGetMainBundle(); + + // Fiddle with CoreFoundation to have it pick up the executable path as being within WebKit.app + char **processPath = _CFGetProcessPath(); + *processPath = NULL; + setenv("CFProcessPath", webKitAppPath, 1); + _CFGetProcessPath(); + + // Clean up + unsetenv("CFProcessPath"); + unsetenv("WebKitAppPath"); +} + +static void enableWebKitNightlyBehaviour() +{ + unsetenv("DYLD_INSERT_LIBRARIES"); + poseAsWebKitApp(); + + extensionPaths = [[NSSet alloc] initWithObjects:@"~/Library/InputManagers/", @"/Library/InputManagers/", + @"~/Library/Application Support/SIMBL/Plugins/", @"/Library/Application Support/SIMBL/Plugins/", + @"~/Library/Application Enhancers/", @"/Library/Application Enhancers/", + nil]; + + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + NSDictionary *defaultPrefs = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:RunStateShutDown], WKNERunState, + [NSNumber numberWithBool:YES], WKNEShouldMonitorShutdowns, nil]; + [userDefaults registerDefaults:defaultPrefs]; + if ([userDefaults boolForKey:WKNEShouldMonitorShutdowns]) { + WKNERunStates savedState = (WKNERunStates)[userDefaults integerForKey:WKNERunState]; + if (savedState == RunStateInitializing) { + // Use CoreFoundation here as AppKit hasn't been initialized at this stage of Safari's lifetime + CFOptionFlags responseFlags; + CFUserNotificationDisplayAlert(0, kCFUserNotificationCautionAlertLevel, + NULL, NULL, NULL, + CFSTR("WebKit failed to open correctly"), + CFSTR("WebKit failed to open correctly on your previous attempt. Please disable any Safari extensions that you may have installed. If the problem continues to occur, please file a bug report at http://webkit.org/quality/reporting.html"), + CFSTR("Continue"), NULL, NULL, &responseFlags); + } + else if (savedState == RunStateRunning) { + NSLog(@"WebKit failed to shut down cleanly. Checking for Safari extensions."); + CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), &myBundleDidLoad, + myBundleDidLoad, (CFStringRef) NSBundleDidLoadNotification, + NULL, CFNotificationSuspensionBehaviorDeliverImmediately); + } + } + [userDefaults setInteger:RunStateInitializing forKey:WKNERunState]; + [userDefaults synchronize]; + + CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), &myApplicationWillFinishLaunching, + myApplicationWillFinishLaunching, (CFStringRef) NSApplicationWillFinishLaunchingNotification, + NULL, CFNotificationSuspensionBehaviorDeliverImmediately); + CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), &myApplicationWillTerminate, + myApplicationWillTerminate, (CFStringRef) NSApplicationWillTerminateNotification, + NULL, CFNotificationSuspensionBehaviorDeliverImmediately); + [pool release]; +} diff --git a/WebKitTools/WebKitLauncher/main.m b/WebKitTools/WebKitLauncher/main.m new file mode 100644 index 0000000..7d13994 --- /dev/null +++ b/WebKitTools/WebKitLauncher/main.m @@ -0,0 +1,164 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. 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); +} + +NSBundle *locateSafariBundle() +{ + NSArray *applicationDirectories = NSSearchPathForDirectoriesInDomains(NSApplicationDirectory, NSAllDomainsMask, YES); + NSEnumerator *e = [applicationDirectories objectEnumerator]; + NSString *applicationDirectory; + while (applicationDirectory = [e nextObject]) { + NSString *possibleSafariPath = [applicationDirectory stringByAppendingPathComponent:@"Safari.app"]; + NSBundle *possibleSafariBundle = [NSBundle bundleWithPath:possibleSafariPath]; + if ([[possibleSafariBundle bundleIdentifier] isEqualToString:@"com.apple.Safari"]) + return possibleSafariBundle; + } + + 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."); + + NSBundle *safariBundle = [NSBundle bundleWithPath:[(NSURL *)safariURL path]]; + CFRelease(safariURL); + return safariBundle; +} + +int main(int argc, char *argv[]) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + checkMacOSXVersion(); + + NSBundle *safariBundle = locateSafariBundle(); + NSString *executablePath = [safariBundle executablePath]; + NSString *frameworkPath = [[NSBundle mainBundle] resourcePath]; + NSString *pathToEnablerLib = [[NSBundle mainBundle] pathForResource:@"WebKitNightlyEnabler" ofType:@"dylib"]; + + if ([frameworkPath rangeOfString:@":"].location != NSNotFound || + [pathToEnablerLib rangeOfString:@":"].location != NSNotFound) + displayErrorAndQuit(@"Unable to launch Safari", + @"WebKit is located at a path containing an unsupported character. Please move WebKit to a different location and try again."); + + NSMutableArray *arguments = [NSMutableArray arrayWithObjects:executablePath, @"-WebKitDeveloperExtras", @"YES", @"-WebKitScriptDebuggerEnabled", @"YES", nil]; + NSMutableDictionary *environment = [NSDictionary dictionaryWithObjectsAndKeys:frameworkPath, @"DYLD_FRAMEWORK_PATH", @"YES", @"WEBKIT_UNSET_DYLD_FRAMEWORK_PATH", + pathToEnablerLib, @"DYLD_INSERT_LIBRARIES", [[NSBundle mainBundle] executablePath], @"WebKitAppPath", nil]; + addStartPageToArgumentsIfNeeded(arguments); + + while (*++argv) + [arguments addObject:[NSString stringWithUTF8String:*argv]]; + + myExecve(executablePath, arguments, environment); + + char *error = strerror(errno); + NSString *errorMessage = [NSString stringWithFormat:@"Launching Safari at %@ failed with the error '%s' (%d)", [safariBundle bundlePath], error, errno]; + displayErrorAndQuit(@"Unable to launch Safari", errorMessage); + + [pool release]; + return 0; +} diff --git a/WebKitTools/WebKitLauncher/start.html b/WebKitTools/WebKitLauncher/start.html new file mode 100644 index 0000000..2c94e79 --- /dev/null +++ b/WebKitTools/WebKitLauncher/start.html @@ -0,0 +1,33 @@ +<html> + <head> + <title>Loading WebKit...</title> + <meta http-equiv="refresh" content="1;URL=http://nightly.webkit.org/start/" /> + <script type="text/javascript"> + function getWebKitRevision() + { + var request = new XMLHttpRequest(); + request.open("GET", "VERSION", false); + request.send(); + var revision = parseInt(request.responseText); + if (isNaN(revision)) + return ""; + + return revision; + } + + function getWebKitBranch() + { + var request = new XMLHttpRequest(); + request.open("GET", "BRANCH", false); + request.send(); + return (request.responseText || "trunk").replace(/\s/g, '') + } + + var revision = getWebKitRevision(); + var branch = getWebKitBranch(); + document.location = "http://nightly.webkit.org/start/" + branch + "/" + revision; + </script> + </head> + <body> + </body> +</html> diff --git a/WebKitTools/WebKitLauncher/webkit.icns b/WebKitTools/WebKitLauncher/webkit.icns Binary files differnew file mode 100644 index 0000000..bf629bf --- /dev/null +++ b/WebKitTools/WebKitLauncher/webkit.icns |