Changeset 44111 in webkit
- Timestamp:
- May 23, 2009 10:14:44 PM (15 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 7 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r44105 r44111 1 2009-05-23 Mark Rowe <mrowe@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Land the updated version of WebKitLauncher that the nightly builds have been using. 6 7 Changes include: 8 1) Support for self-updating via Sparkle. 9 2) Now respects the "Open using Rosetta" preference. 10 3) Passes environment variables through to the spawned Safari process. 11 4) Logs a list of extensions that are detected to the system console. 12 5) Disables extensions that are known to cause crashes too early in the 13 launch process to be detected by the extension-detection code. 14 15 * WebKitLauncher/Configurations/Base.xcconfig: Added. 16 * WebKitLauncher/Configurations/WebKitLauncher.xcconfig: Added. 17 * WebKitLauncher/Configurations/WebKitNightlyEnabler.xcconfig: Added. 18 * WebKitLauncher/Info.plist: 19 * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: 20 * WebKitLauncher/WebKitNightlyEnabler.h: Added. 21 * WebKitLauncher/WebKitNightlyEnabler.m: 22 (myBundleDidLoad): 23 (myApplicationWillFinishLaunching): 24 (poseAsWebKitApp): 25 (webKitLauncherBundle): 26 (enableWebKitNightlyBehaviour): 27 * WebKitLauncher/WebKitNightlyEnablerSparkle.h: Added. 28 * WebKitLauncher/WebKitNightlyEnablerSparkle.m: Added. 29 (initializeSparkle): 30 (updatePermissionPromptDescription): 31 (skipSignatureVerificationInDownloadDidFinish): 32 (updateAlertPanel): 33 (updateAlertInitForAlertPanel): 34 (-[NSAlert webKitHandleButtonPress:]): 35 (setMethodImplementation): 36 * WebKitLauncher/main.m: 37 (displayErrorAndQuit): 38 (getLastVersionShown): 39 (saveLastVersionShown): 40 (getPathForStartPage): 41 (getCurrentVersion): 42 (getShowStartPageVersion): 43 (startPageDisabled): 44 (addStartPageToArgumentsIfNeeded): 45 (preferredArchitecture): 46 (myExecve): 47 (locateSafariBundle): 48 (currentMacOSXVersion): 49 (checkFrameworkPath): 50 (main): 51 1 52 2009-05-23 Jan Michael Alonzo <jmalonzo@webkit.org> 2 53 -
trunk/WebKitTools/WebKitLauncher/Info.plist
r39892 r44111 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 3 <plist version="1.0"> 4 4 <dict> … … 425 425 <key>CFBundleShortVersionString</key> 426 426 <string>rVERSION</string> 427 <key>LSArchitecturePriority</key> 428 <array> 429 <string>x86_64</string> 430 <string>i386</string> 431 <string>ppc</string> 432 </array> 433 <key>LSMinimumSystemVersionByArchitecture</key> 434 <dict> 435 <key>x86_64</key> 436 <string>10.6</string> 437 </dict> 438 <key>SUFeedURL</key> 439 <string>http://nightly.webkit.org/builds/trunk/mac/rss</string> 440 <key>SUShowReleaseNotes</key> 441 <false/> 442 <key>SUAllowsAutomaticUpdates</key> 443 <false/> 427 444 <key>NSPrincipalClass</key> 428 445 <string>BrowserApplication</string> 429 430 446 <key>CFBundleHelpBookFolder</key> 431 447 <string>SafariHelp</string> … … 472 488 </dict> 473 489 </array> 474 475 490 </dict> 476 491 </plist> -
trunk/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj
r39109 r44111 4 4 classes = { 5 5 }; 6 objectVersion = 4 2;6 objectVersion = 45; 7 7 objects = { 8 9 /* Begin PBXAggregateTarget section */ 10 5DE79BC30F1C62450067BE08 /* Extract Sparkle */ = { 11 isa = PBXAggregateTarget; 12 buildConfigurationList = 5DE79BD80F1C629B0067BE08 /* Build configuration list for PBXAggregateTarget "Extract Sparkle" */; 13 buildPhases = ( 14 5DE79BC20F1C62450067BE08 /* ShellScript */, 15 ); 16 dependencies = ( 17 ); 18 name = "Extract Sparkle"; 19 productName = "Extract Sparkle"; 20 }; 21 /* End PBXAggregateTarget section */ 8 22 9 23 /* Begin PBXBuildFile section */ … … 13 27 5D650F3A09DB8B410075E9A8 /* WebKitNightlyEnabler.dylib in Resources */ = {isa = PBXBuildFile; fileRef = 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */; }; 14 28 5D877FCD0A5795F200D0C67B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 29 5DA88F6D0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA88F6B0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.h */; }; 30 5DA88F6E0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DA88F6C0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.m */; }; 31 5DA88F7A0FC813EB00AB2F62 /* WebKitNightlyEnabler.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA88F790FC813EB00AB2F62 /* WebKitNightlyEnabler.h */; }; 15 32 5DB70525097B94CD009875EC /* webkit.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5DB70524097B94CD009875EC /* webkit.icns */; }; 16 33 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; … … 26 43 remoteInfo = WebKitNightlyEnabler; 27 44 }; 45 5DE79BC90F1C62850067BE08 /* PBXContainerItemProxy */ = { 46 isa = PBXContainerItemProxy; 47 containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; 48 proxyType = 1; 49 remoteGlobalIDString = 5DE79BC30F1C62450067BE08; 50 remoteInfo = "Extract Sparkle"; 51 }; 52 5DE79BCB0F1C62890067BE08 /* PBXContainerItemProxy */ = { 53 isa = PBXContainerItemProxy; 54 containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; 55 proxyType = 1; 56 remoteGlobalIDString = 5DE79BC30F1C62450067BE08; 57 remoteInfo = "Extract Sparkle"; 58 }; 28 59 /* End PBXContainerItemProxy section */ 29 60 30 61 /* Begin PBXFileReference section */ 31 62 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; 32 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };33 63 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 34 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };35 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };36 64 5D41141B0A50A9DE00C84CF0 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; }; 37 65 5D4DF981097F89FB0083D5E5 /* start.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = start.html; sourceTree = "<group>"; }; 38 66 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = WebKitNightlyEnabler.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 39 5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebKitNightlyEnabler.m; sourceTree = "<group>"; }; 40 5D650F7509DB8CB40075E9A8 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; 67 5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebKitNightlyEnabler.m; sourceTree = "<group>"; }; 68 5DA88F6B0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNightlyEnablerSparkle.h; sourceTree = "<group>"; }; 69 5DA88F6C0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebKitNightlyEnablerSparkle.m; sourceTree = "<group>"; }; 70 5DA88F790FC813EB00AB2F62 /* WebKitNightlyEnabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNightlyEnabler.h; sourceTree = "<group>"; }; 71 5DA88F7E0FC8176100AB2F62 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; }; 72 5DA88F7F0FC8176100AB2F62 /* WebKitLauncher.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebKitLauncher.xcconfig; sourceTree = "<group>"; }; 73 5DA88F800FC8176100AB2F62 /* WebKitNightlyEnabler.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebKitNightlyEnabler.xcconfig; sourceTree = "<group>"; }; 41 74 5DB70524097B94CD009875EC /* webkit.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = webkit.icns; sourceTree = "<group>"; }; 75 5DE79BEB0F1C63CC0067BE08 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 76 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; 43 77 8D1107320486CEB800E47090 /* WebKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WebKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; … … 64 98 65 99 /* Begin PBXGroup section */ 66 080E96DDFE201D6D7F000001 /* Classes */ = {67 isa = PBXGroup;68 children = (69 );70 name = Classes;71 sourceTree = "<group>";72 };73 100 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { 74 101 isa = PBXGroup; … … 79 106 sourceTree = "<group>"; 80 107 }; 81 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {82 isa = PBXGroup;83 children = (84 29B97324FDCFA39411CA2CEA /* AppKit.framework */,85 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,86 5D650F7509DB8CB40075E9A8 /* CoreFoundation.framework */,87 29B97325FDCFA39411CA2CEA /* Foundation.framework */,88 );89 name = "Other Frameworks";90 sourceTree = "<group>";91 };92 108 19C28FACFE9D520D11CA2CBB /* Products */ = { 93 109 isa = PBXGroup; 94 110 children = ( 111 5DE79BEB0F1C63CC0067BE08 /* Sparkle.framework */, 95 112 8D1107320486CEB800E47090 /* WebKit.app */, 96 113 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */, … … 102 119 isa = PBXGroup; 103 120 children = ( 104 080E96DDFE201D6D7F000001 /* Classes*/,105 29B97315FDCFA39411CA2CEA /* Other Sources */,121 29B97315FDCFA39411CA2CEA /* Source */, 122 5DA88F7D0FC8174E00AB2F62 /* Configurations */, 106 123 29B97317FDCFA39411CA2CEA /* Resources */, 107 124 29B97323FDCFA39411CA2CEA /* Frameworks */, … … 111 128 sourceTree = "<group>"; 112 129 }; 113 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 114 isa = PBXGroup; 115 children = ( 130 29B97315FDCFA39411CA2CEA /* Source */ = { 131 isa = PBXGroup; 132 children = ( 133 5DA88F790FC813EB00AB2F62 /* WebKitNightlyEnabler.h */, 116 134 5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */, 135 5DA88F6B0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.h */, 136 5DA88F6C0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.m */, 117 137 29B97316FDCFA39411CA2CEA /* main.m */, 118 138 ); 119 name = "Other Sources";139 name = Source; 120 140 sourceTree = "<group>"; 121 141 }; … … 135 155 children = ( 136 156 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, 137 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,138 157 ); 139 158 name = Frameworks; 159 sourceTree = "<group>"; 160 }; 161 5DA88F7D0FC8174E00AB2F62 /* Configurations */ = { 162 isa = PBXGroup; 163 children = ( 164 5DA88F7E0FC8176100AB2F62 /* Base.xcconfig */, 165 5DA88F7F0FC8176100AB2F62 /* WebKitLauncher.xcconfig */, 166 5DA88F800FC8176100AB2F62 /* WebKitNightlyEnabler.xcconfig */, 167 ); 168 path = Configurations; 140 169 sourceTree = "<group>"; 141 170 }; … … 147 176 buildActionMask = 2147483647; 148 177 files = ( 178 5DA88F6D0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.h in Headers */, 179 5DA88F7A0FC813EB00AB2F62 /* WebKitNightlyEnabler.h in Headers */, 149 180 ); 150 181 runOnlyForDeploymentPostprocessing = 0; … … 164 195 ); 165 196 dependencies = ( 197 5DE79BCC0F1C62890067BE08 /* PBXTargetDependency */, 166 198 ); 167 199 name = WebKitNightlyEnabler; … … 177 209 8D11072C0486CEB800E47090 /* Sources */, 178 210 8D11072E0486CEB800E47090 /* Frameworks */, 211 5DA892AC0FC8E3A100AB2F62 /* Copy Sparkle in to Frameworks */, 179 212 ); 180 213 buildRules = ( … … 182 215 dependencies = ( 183 216 5D650F4509DB8B830075E9A8 /* PBXTargetDependency */, 217 5DE79BCA0F1C62850067BE08 /* PBXTargetDependency */, 184 218 ); 185 219 name = WebKit; … … 195 229 isa = PBXProject; 196 230 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WebKitLauncher" */; 197 compatibilityVersion = "Xcode 2.4";231 compatibilityVersion = "Xcode 3.1"; 198 232 hasScannedForEncodings = 1; 199 233 mainGroup = 29B97314FDCFA39411CA2CEA /* WebKit */; … … 203 237 8D1107260486CEB800E47090 /* WebKit */, 204 238 5D650F3309DB8B280075E9A8 /* WebKitNightlyEnabler */, 239 5DE79BC30F1C62450067BE08 /* Extract Sparkle */, 205 240 ); 206 241 }; … … 221 256 /* End PBXResourcesBuildPhase section */ 222 257 258 /* Begin PBXShellScriptBuildPhase section */ 259 5DA892AC0FC8E3A100AB2F62 /* Copy Sparkle in to Frameworks */ = { 260 isa = PBXShellScriptBuildPhase; 261 buildActionMask = 2147483647; 262 files = ( 263 ); 264 inputPaths = ( 265 ); 266 name = "Copy Sparkle in to Frameworks"; 267 outputPaths = ( 268 ); 269 runOnlyForDeploymentPostprocessing = 0; 270 shellPath = /bin/sh; 271 shellScript = "if [[ \"${ENABLE_SPARKLE}\" == \"1\" ]]\nthen\n ditto \"${CONFIGURATION_BUILD_DIR}/Sparkle.framework\" \"${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sparkle.framework\"\n cd \"${CONFIGURATION_BUILD_DIR}/Sparkle.framework/Resources\"\n find . -name '*lproj' -not -name 'en.lproj' -print0 | xargs -0 rm -rf\nelse\n rm -rf \"${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sparkle.framework\"\nfi\n"; 272 }; 273 5DE79BC20F1C62450067BE08 /* ShellScript */ = { 274 isa = PBXShellScriptBuildPhase; 275 buildActionMask = 2147483647; 276 files = ( 277 ); 278 inputPaths = ( 279 "$(SRCROOT)/Sparkle.framework.tar.gz", 280 ); 281 outputPaths = ( 282 "$(CONFIGURATION_BUILD_DIR)/Sparkle.framework", 283 ); 284 runOnlyForDeploymentPostprocessing = 0; 285 shellPath = /bin/sh; 286 shellScript = "if [[ \"${ENABLE_SPARKLE}\" == \"1\" ]]\nthen\n tar -C \"${CONFIGURATION_BUILD_DIR}\" -xvzf \"${SRCROOT}/Sparkle.framework.tar.gz\"\n cd \"${CONFIGURATION_BUILD_DIR}/Sparkle.framework/Resources\"\n find . -name '*lproj' -not -name 'en.lproj' -print0 | xargs -0 rm -rf\nelse\n rm -rf \"${CONFIGURATION_BUILD_DIR}/Sparkle.framework\"\nfi\n"; 287 }; 288 /* End PBXShellScriptBuildPhase section */ 289 223 290 /* Begin PBXSourcesBuildPhase section */ 224 291 5D650F3109DB8B280075E9A8 /* Sources */ = { … … 227 294 files = ( 228 295 5D650F3609DB8B370075E9A8 /* WebKitNightlyEnabler.m in Sources */, 296 5DA88F6E0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.m in Sources */, 229 297 ); 230 298 runOnlyForDeploymentPostprocessing = 0; … … 246 314 targetProxy = 5D650F4409DB8B830075E9A8 /* PBXContainerItemProxy */; 247 315 }; 316 5DE79BCA0F1C62850067BE08 /* PBXTargetDependency */ = { 317 isa = PBXTargetDependency; 318 target = 5DE79BC30F1C62450067BE08 /* Extract Sparkle */; 319 targetProxy = 5DE79BC90F1C62850067BE08 /* PBXContainerItemProxy */; 320 }; 321 5DE79BCC0F1C62890067BE08 /* PBXTargetDependency */ = { 322 isa = PBXTargetDependency; 323 target = 5DE79BC30F1C62450067BE08 /* Extract Sparkle */; 324 targetProxy = 5DE79BCB0F1C62890067BE08 /* PBXContainerItemProxy */; 325 }; 248 326 /* End PBXTargetDependency section */ 249 327 … … 251 329 5D650F3809DB8B370075E9A8 /* Debug */ = { 252 330 isa = XCBuildConfiguration; 253 buildSettings = { 254 MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; 255 PRODUCT_NAME = WebKitNightlyEnabler; 256 SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk; 331 baseConfigurationReference = 5DA88F800FC8176100AB2F62 /* WebKitNightlyEnabler.xcconfig */; 332 buildSettings = { 257 333 }; 258 334 name = Debug; … … 260 336 5D650F3909DB8B370075E9A8 /* Release */ = { 261 337 isa = XCBuildConfiguration; 262 buildSettings = { 263 MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; 264 PRODUCT_NAME = WebKitNightlyEnabler; 265 SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk; 338 baseConfigurationReference = 5DA88F800FC8176100AB2F62 /* WebKitNightlyEnabler.xcconfig */; 339 buildSettings = { 266 340 }; 267 341 name = Release; 268 342 }; 343 5DE79BC40F1C62450067BE08 /* Debug */ = { 344 isa = XCBuildConfiguration; 345 buildSettings = { 346 PRODUCT_NAME = "Extract Sparkle"; 347 }; 348 name = Debug; 349 }; 350 5DE79BC50F1C62450067BE08 /* Release */ = { 351 isa = XCBuildConfiguration; 352 buildSettings = { 353 PRODUCT_NAME = "Extract Sparkle"; 354 }; 355 name = Release; 356 }; 269 357 C01FCF4B08A954540054247B /* Debug */ = { 270 358 isa = XCBuildConfiguration; 271 buildSettings = { 272 COPY_PHASE_STRIP = NO; 273 GCC_DEBUGGING_SYMBOLS = full; 274 GCC_DYNAMIC_NO_PIC = NO; 275 GCC_ENABLE_FIX_AND_CONTINUE = YES; 276 GCC_MODEL_TUNING = G5; 359 baseConfigurationReference = 5DA88F7F0FC8176100AB2F62 /* WebKitLauncher.xcconfig */; 360 buildSettings = { 361 }; 362 name = Debug; 363 }; 364 C01FCF4C08A954540054247B /* Release */ = { 365 isa = XCBuildConfiguration; 366 baseConfigurationReference = 5DA88F7F0FC8176100AB2F62 /* WebKitLauncher.xcconfig */; 367 buildSettings = { 368 }; 369 name = Release; 370 }; 371 C01FCF4F08A954540054247B /* Debug */ = { 372 isa = XCBuildConfiguration; 373 baseConfigurationReference = 5DA88F7E0FC8176100AB2F62 /* Base.xcconfig */; 374 buildSettings = { 277 375 GCC_OPTIMIZATION_LEVEL = 0; 278 INFOPLIST_FILE = Info.plist; 279 INSTALL_PATH = "$(HOME)/Applications"; 280 PRODUCT_NAME = WebKit; 281 WRAPPER_EXTENSION = app; 376 ONLY_ACTIVE_ARCH = YES; 282 377 }; 283 378 name = Debug; 284 379 }; 285 C01FCF4C08A954540054247B /* Release */ = {286 isa = XCBuildConfiguration;287 buildSettings = {288 DEAD_CODE_STRIPPING = YES;289 DEPLOYMENT_POSTPROCESSING = YES;290 GCC_DEBUGGING_SYMBOLS = full;291 GCC_GENERATE_DEBUGGING_SYMBOLS = NO;292 INFOPLIST_FILE = Info.plist;293 PRODUCT_NAME = WebKit;294 WRAPPER_EXTENSION = app;295 };296 name = Release;297 };298 C01FCF4F08A954540054247B /* Debug */ = {299 isa = XCBuildConfiguration;300 buildSettings = {301 DEBUG_INFORMATION_FORMAT = dwarf;302 GCC_WARN_ABOUT_RETURN_TYPE = YES;303 GCC_WARN_UNUSED_VARIABLE = YES;304 MACOSX_DEPLOYMENT_TARGET = 10.2;305 MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;306 MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;307 PREBINDING = NO;308 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;309 };310 name = Debug;311 };312 380 C01FCF5008A954540054247B /* Release */ = { 313 381 isa = XCBuildConfiguration; 314 buildSettings = { 315 DEBUG_INFORMATION_FORMAT = dwarf; 316 GCC_WARN_ABOUT_RETURN_TYPE = YES; 317 GCC_WARN_UNUSED_VARIABLE = YES; 318 MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; 319 MACOSX_DEPLOYMENT_TARGET_ppc = 10.2; 320 PREBINDING = NO; 321 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; 382 baseConfigurationReference = 5DA88F7E0FC8176100AB2F62 /* Base.xcconfig */; 383 buildSettings = { 322 384 }; 323 385 name = Release; … … 335 397 defaultConfigurationName = Release; 336 398 }; 399 5DE79BD80F1C629B0067BE08 /* Build configuration list for PBXAggregateTarget "Extract Sparkle" */ = { 400 isa = XCConfigurationList; 401 buildConfigurations = ( 402 5DE79BC40F1C62450067BE08 /* Debug */, 403 5DE79BC50F1C62450067BE08 /* Release */, 404 ); 405 defaultConfigurationIsVisible = 0; 406 defaultConfigurationName = Release; 407 }; 337 408 C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WebKit" */ = { 338 409 isa = XCConfigurationList; -
trunk/WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m
r29663 r44111 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Graham Dennis. All rights reserved. 4 4 * … … 12 12 * notice, this list of conditions and the following disclaimer in the 13 13 * documentation and/or other materials provided with the distribution. 14 * 3. Neither the name of Apple Computer,Inc. ("Apple") nor the names of14 * 3. Neither the name of Apple Inc. ("Apple") nor the names of 15 15 * its contributors may be used to endorse or promote products derived 16 16 * from this software without specific prior written permission. … … 29 29 30 30 #import <Cocoa/Cocoa.h> 31 #import "WebKitNightlyEnablerSparkle.h" 31 32 32 33 static void enableWebKitNightlyBehaviour() __attribute__ ((constructor)); … … 41 42 } WKNERunStates; 42 43 44 static char *webKitAppPath; 43 45 static bool extensionBundlesWereLoaded = NO; 44 46 static NSSet *extensionPaths = nil; … … 46 48 static void myBundleDidLoad(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) 47 49 { 48 // Break out early if we have already detected an extension49 if (extensionBundlesWereLoaded)50 return;51 52 50 NSBundle *bundle = (NSBundle *)object; 53 51 NSString *bundlePath = [[bundle bundlePath] stringByAbbreviatingWithTildeInPath]; … … 63 61 NSEnumerator *e = [extensionPaths objectEnumerator]; 64 62 NSString *path = nil; 65 while ( path = [e nextObject]) {63 while ((path = [e nextObject])) { 66 64 if ([bundlePath length] < [path length]) 67 65 continue; 68 66 69 67 if ([[bundlePath substringToIndex:[path length]] isEqualToString:path]) { 68 NSLog(@"Extension detected: %@", bundlePath); 70 69 extensionBundlesWereLoaded = YES; 71 70 break; … … 89 88 @"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", 90 89 nil, nil); 90 91 initializeSparkle(); 91 92 } 92 93 … … 102 103 static void poseAsWebKitApp() 103 104 { 104 char *webKitAppPath = getenv("WebKitAppPath");105 webKitAppPath = strdup(getenv("WebKitAppPath")); 105 106 if (!webKitAppPath || !_CFGetProcessPath) 106 107 return; … … 120 121 } 121 122 123 NSBundle *webKitLauncherBundle() 124 { 125 NSString *executablePath = [NSString stringWithUTF8String:webKitAppPath]; 126 NSRange appLocation = [executablePath rangeOfString:@".app/" options:NSBackwardsSearch]; 127 NSString *appPath = [executablePath substringToIndex:appLocation.location + appLocation.length]; 128 return [NSBundle bundleWithPath:appPath]; 129 } 130 122 131 static void enableWebKitNightlyBehaviour() 123 132 { … … 125 134 poseAsWebKitApp(); 126 135 136 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 127 137 extensionPaths = [[NSSet alloc] initWithObjects:@"~/Library/InputManagers/", @"/Library/InputManagers/", 128 138 @"~/Library/Application Support/SIMBL/Plugins/", @"/Library/Application Support/SIMBL/Plugins/", … … 130 140 nil]; 131 141 132 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 142 // As of 2008-11 attempting to load Saft would cause a crash on launch, so prevent it from being loaded. 143 NSArray *disabledInputManagers = [NSArray arrayWithObjects:@"Saft", nil]; 144 133 145 NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; 134 146 NSDictionary *defaultPrefs = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:RunStateShutDown], WKNERunState, 135 [NSNumber numberWithBool:YES], WKNEShouldMonitorShutdowns, nil]; 147 [NSNumber numberWithBool:YES], WKNEShouldMonitorShutdowns, 148 disabledInputManagers, @"NSDisabledInputManagers", nil]; 136 149 [userDefaults registerDefaults:defaultPrefs]; 137 150 if ([userDefaults boolForKey:WKNEShouldMonitorShutdowns]) { … … 162 175 myApplicationWillTerminate, (CFStringRef) NSApplicationWillTerminateNotification, 163 176 NULL, CFNotificationSuspensionBehaviorDeliverImmediately); 177 178 NSLog(@"WebKit %@ initialized.", [webKitLauncherBundle() objectForInfoDictionaryKey:@"CFBundleShortVersionString"]); 179 164 180 [pool release]; 165 181 } -
trunk/WebKitTools/WebKitLauncher/main.m
r29663 r44111 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 11 11 * notice, this list of conditions and the following disclaimer in the 12 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of Apple Computer,Inc. ("Apple") nor the names of13 * 3. Neither the name of Apple Inc. ("Apple") nor the names of 14 14 * its contributors may be used to endorse or promote products derived 15 15 * from this software without specific prior written permission. … … 30 30 #import <CoreFoundation/CoreFoundation.h> 31 31 32 void displayErrorAndQuit(NSString *title, NSString *message) 32 // We need to weak-import posix_spawn and friends as they're not available on Tiger. 33 // The BSD-level system headers do not have availability macros, so we redeclare the 34 // functions ourselves with the "weak" attribute. 35 36 #define WEAK_IMPORT __attribute__((weak)) 37 38 #define POSIX_SPAWN_SETEXEC 0x0040 39 typedef void *posix_spawnattr_t; 40 typedef void *posix_spawn_file_actions_t; 41 int posix_spawnattr_init(posix_spawnattr_t *) WEAK_IMPORT; 42 int posix_spawn(pid_t * __restrict, const char * __restrict, const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict, char *const __argv[ __restrict], char *const __envp[ __restrict]) WEAK_IMPORT; 43 int posix_spawnattr_setbinpref_np(posix_spawnattr_t * __restrict, size_t, cpu_type_t *__restrict, size_t *__restrict) WEAK_IMPORT; 44 int posix_spawnattr_setflags(posix_spawnattr_t *, short) WEAK_IMPORT; 45 46 47 static void displayErrorAndQuit(NSString *title, NSString *message) 33 48 { 34 49 NSApplicationLoad(); … … 37 52 } 38 53 39 void checkMacOSXVersion() 40 { 41 long versionNumber = 0; 42 OSErr error = Gestalt(gestaltSystemVersion, &versionNumber); 43 if (error != noErr || versionNumber < 0x1040) 44 displayErrorAndQuit(@"Mac OS X 10.4 is Required", @"Nightly builds of WebKit require Mac OS X 10.4 or newer."); 45 } 46 47 int getLastVersionShown() 54 static int getLastVersionShown() 48 55 { 49 56 [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObject:@"-1" forKey:@"StartPageShownInVersion"]]; … … 51 58 } 52 59 53 void saveLastVersionShown(int lastVersion)60 static void saveLastVersionShown(int lastVersion) 54 61 { 55 62 [[NSUserDefaults standardUserDefaults] setInteger:lastVersion forKey:@"StartPageShownInVersion"]; … … 57 64 } 58 65 59 NSString *getPathForStartPage()66 static NSString *getPathForStartPage() 60 67 { 61 68 return [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"start.html"]; 62 69 } 63 70 64 int getShowStartPageVersion() 71 static int getCurrentVersion() 72 { 73 return [[[[NSBundle mainBundle] infoDictionary] valueForKey:(NSString *)kCFBundleVersionKey] intValue]; 74 } 75 76 static int getShowStartPageVersion() 65 77 { 66 78 return getCurrentVersion() + 1; 67 79 } 68 80 69 int getCurrentVersion() 70 { 71 return [[[[NSBundle mainBundle] infoDictionary] valueForKey:(NSString *)kCFBundleVersionKey] intValue]; 72 } 73 74 BOOL startPageDisabled() 81 static BOOL startPageDisabled() 75 82 { 76 83 return [[NSUserDefaults standardUserDefaults] boolForKey:@"StartPageDisabled"]; 77 84 } 78 85 79 void addStartPageToArgumentsIfNeeded(NSMutableArray *arguments)86 static void addStartPageToArgumentsIfNeeded(NSMutableArray *arguments) 80 87 { 81 88 if (startPageDisabled()) … … 90 97 } 91 98 99 static cpu_type_t preferredArchitecture() 100 { 101 #if defined(__ppc__) 102 return CPU_TYPE_POWERPC; 103 #elif defined(__LP64__) 104 return CPU_TYPE_X86_64; 105 #else 106 return CPU_TYPE_X86; 107 #endif 108 } 109 92 110 static void myExecve(NSString *executable, NSArray *args, NSDictionary *environment) 93 111 { 94 112 char **argv = (char **)calloc(sizeof(char *), [args count] + 1); 95 113 char **env = (char **)calloc(sizeof(char *), [environment count] + 1); 96 114 97 115 NSEnumerator *e = [args objectEnumerator]; 98 116 NSString *s; 99 117 int i = 0; 100 while ( s = [e nextObject])118 while ((s = [e nextObject])) 101 119 argv[i++] = (char *) [s UTF8String]; 102 120 103 121 e = [environment keyEnumerator]; 104 122 i = 0; 105 while ( s = [e nextObject])123 while ((s = [e nextObject])) 106 124 env[i++] = (char *) [[NSString stringWithFormat:@"%@=%@", s, [environment objectForKey:s]] UTF8String]; 107 108 execve([executable fileSystemRepresentation], argv, env); 109 } 110 111 NSBundle *locateSafariBundle() 125 126 if (posix_spawnattr_init && posix_spawn && posix_spawnattr_setbinpref_np && posix_spawnattr_setflags) { 127 posix_spawnattr_t attr; 128 posix_spawnattr_init(&attr); 129 cpu_type_t architecturePreference[] = { preferredArchitecture(), CPU_TYPE_X86 }; 130 posix_spawnattr_setbinpref_np(&attr, 2, architecturePreference, 0); 131 short flags = POSIX_SPAWN_SETEXEC; 132 posix_spawnattr_setflags(&attr, flags); 133 posix_spawn(NULL, [executable fileSystemRepresentation], NULL, &attr, argv, env); 134 } else 135 execve([executable fileSystemRepresentation], argv, env); 136 } 137 138 static NSBundle *locateSafariBundle() 112 139 { 113 140 NSArray *applicationDirectories = NSSearchPathForDirectoriesInDomains(NSApplicationDirectory, NSAllDomainsMask, YES); 114 141 NSEnumerator *e = [applicationDirectories objectEnumerator]; 115 142 NSString *applicationDirectory; 116 while ( applicationDirectory = [e nextObject]) {143 while ((applicationDirectory = [e nextObject])) { 117 144 NSString *possibleSafariPath = [applicationDirectory stringByAppendingPathComponent:@"Safari.app"]; 118 145 NSBundle *possibleSafariBundle = [NSBundle bundleWithPath:possibleSafariPath]; … … 131 158 } 132 159 160 static NSString *currentMacOSXVersion() 161 { 162 SInt32 version; 163 if (Gestalt(gestaltSystemVersion, &version) != noErr) 164 return @"10.4"; 165 166 return [NSString stringWithFormat:@"%x.%x", (version & 0xFF00) >> 8, (version & 0x00F0) >> 4]; 167 } 168 169 static BOOL checkFrameworkPath(NSString *frameworkPath) 170 { 171 BOOL isDirectory = NO; 172 return [[NSFileManager defaultManager] fileExistsAtPath:frameworkPath isDirectory:&isDirectory] && isDirectory; 173 } 174 133 175 int main(int argc, char *argv[]) 134 176 { 135 177 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 136 checkMacOSXVersion(); 137 178 179 NSString *systemVersion = currentMacOSXVersion(); 138 180 NSBundle *safariBundle = locateSafariBundle(); 139 181 NSString *executablePath = [safariBundle executablePath]; 140 NSString *frameworkPath = [[ NSBundle mainBundle] resourcePath];182 NSString *frameworkPath = [[[NSBundle mainBundle] privateFrameworksPath] stringByAppendingPathComponent:systemVersion]; 141 183 NSString *pathToEnablerLib = [[NSBundle mainBundle] pathForResource:@"WebKitNightlyEnabler" ofType:@"dylib"]; 184 185 if (!checkFrameworkPath(frameworkPath)) 186 displayErrorAndQuit([NSString stringWithFormat:@"Mac OS X %@ is Not Supported", systemVersion], 187 [NSString stringWithFormat:@"Nightly builds of WebKit are not supported on Mac OS X %@ at this time.", systemVersion]); 142 188 143 189 if ([frameworkPath rangeOfString:@":"].location != NSNotFound || … … 145 191 displayErrorAndQuit(@"Unable to launch Safari", 146 192 @"WebKit is located at a path containing an unsupported character. Please move WebKit to a different location and try again."); 147 148 NSMutableArray *arguments = [NSMutableArray arrayWithObjects:executablePath, @"-WebKitDeveloperExtras", @"YES", @"-WebKitScriptDebuggerEnabled", @"YES", nil]; 149 NSMutableDictionary *environment = [NSDictionary dictionaryWithObjectsAndKeys:frameworkPath, @"DYLD_FRAMEWORK_PATH", @"YES", @"WEBKIT_UNSET_DYLD_FRAMEWORK_PATH", 150 pathToEnablerLib, @"DYLD_INSERT_LIBRARIES", [[NSBundle mainBundle] executablePath], @"WebKitAppPath", nil]; 193 194 NSMutableArray *arguments = [NSMutableArray arrayWithObject:executablePath]; 195 NSMutableDictionary *environment = [[[NSDictionary dictionaryWithObjectsAndKeys:frameworkPath, @"DYLD_FRAMEWORK_PATH", @"YES", @"WEBKIT_UNSET_DYLD_FRAMEWORK_PATH", 196 pathToEnablerLib, @"DYLD_INSERT_LIBRARIES", [[NSBundle mainBundle] executablePath], @"WebKitAppPath", nil] mutableCopy] autorelease]; 197 [environment addEntriesFromDictionary:[[NSProcessInfo processInfo] environment]]; 151 198 addStartPageToArgumentsIfNeeded(arguments); 152 199
Note: See TracChangeset
for help on using the changeset viewer.