Changeset 53765 in webkit
- Timestamp:
- Jan 23, 2010 1:51:47 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r53763 r53765 1 2010-01-23 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Mark Rowe. 4 5 Added a user default for specifying a fallback frameworks path in case 6 the bundle does not contain frameworks for the current Mac OS X version. 7 8 * WebKitLauncher/main.m: 9 (fallbackMacOSXVersion): Added. Looks up the fallback version in a dictionary 10 keyed by the FallbackSystemVersions user default and returns it. 11 (main): If a frameworks directory for the current system version is not found, 12 try the fallback. 13 1 14 2010-01-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 15 -
trunk/WebKitTools/WebKitLauncher/main.m
r46505 r53765 167 167 } 168 168 169 static NSString *fallbackMacOSXVersion(NSString *systemVersion) 170 { 171 NSDictionary *fallbackVersionMap = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"FallbackSystemVersions"]; 172 if (!fallbackVersionMap) 173 return nil; 174 NSString *fallbackSystemVersion = [fallbackVersionMap objectForKey:systemVersion]; 175 if (!fallbackSystemVersion || ![fallbackSystemVersion isKindOfClass:[NSString class]]) 176 return nil; 177 return fallbackSystemVersion; 178 } 179 169 180 static BOOL checkFrameworkPath(NSString *frameworkPath) 170 181 { … … 187 198 NSString *systemVersion = currentMacOSXVersion(); 188 199 NSString *frameworkPath = [[[NSBundle mainBundle] privateFrameworksPath] stringByAppendingPathComponent:systemVersion]; 200 201 BOOL frameworkPathIsUsable = checkFrameworkPath(frameworkPath); 202 203 if (!frameworkPathIsUsable) { 204 NSString *fallbackSystemVersion = fallbackMacOSXVersion(systemVersion); 205 if (fallbackSystemVersion) { 206 frameworkPath = [[[NSBundle mainBundle] privateFrameworksPath] stringByAppendingPathComponent:fallbackSystemVersion]; 207 frameworkPathIsUsable = checkFrameworkPath(frameworkPath); 208 } 209 } 210 211 if (!frameworkPathIsUsable) 212 displayErrorAndQuit([NSString stringWithFormat:@"Mac OS X %@ is not supported", systemVersion], 213 [NSString stringWithFormat:@"Nightly builds of WebKit are not supported on Mac OS X %@ at this time.", systemVersion]); 214 189 215 NSString *pathToEnablerLib = [[NSBundle mainBundle] pathForResource:@"WebKitNightlyEnabler" ofType:@"dylib"]; 190 216 191 217 NSBundle *safariBundle = locateSafariBundle(); 192 218 NSString *executablePath = [safariBundle executablePath]; 193 194 if (!checkFrameworkPath(frameworkPath))195 displayErrorAndQuit([NSString stringWithFormat:@"Mac OS X %@ is not supported", systemVersion],196 [NSString stringWithFormat:@"Nightly builds of WebKit are not supported on Mac OS X %@ at this time.", systemVersion]);197 219 198 220 if (!checkSafariVersion(safariBundle)) {
Note: See TracChangeset
for help on using the changeset viewer.