}
// }}}
// $pathForFile$inBundle$() {{{
-static void $pathForFile$inBundle$(NSMutableArray *names, NSString *file, NSString *identifier, NSURL *url) {
+static void $pathForFile$inBundle$(NSMutableArray *names, NSString *file, NSString *identifier, NSString *folder) {
if (identifier != nil)
[names addObject:[NSString stringWithFormat:@"Bundles/%@/%@", identifier, file]];
- if (NSString *folder = [url lastPathComponent]) {
+ if (folder != nil) {
[names addObject:[NSString stringWithFormat:@"Folders/%@/%@", folder, file]];
NSString *base([folder stringByDeletingPathExtension]);
if ([base hasSuffix:@"~iphone"])
if (identifier == nil);
else if ([identifier isEqualToString:@"com.apple.uikit.Artwork"])
- $pathForFile$inBundle$(names, file, @"com.apple.UIKit", nil);
+ $pathForFile$inBundle$(names, file, @"com.apple.UIKit", @"UIKit.framework");
else if ([identifier isEqualToString:@"com.apple.uikit.LegacyArtwork"])
- $pathForFile$inBundle$(names, file, @"com.apple.UIKit", nil);
+ $pathForFile$inBundle$(names, file, @"com.apple.UIKit", @"UIKit.framework");
else if ([identifier isEqualToString:@"com.apple.UIKit"])
[names addObject:[NSString stringWithFormat:@"UIImages/%@", file]];
else if ([identifier isEqualToString:@"com.apple.chatkit"])
- $pathForFile$inBundle$(names, file, @"com.apple.MobileSMS", nil);
+ $pathForFile$inBundle$(names, file, @"com.apple.MobileSMS", @"MobileSMS.app");
else if ([identifier isEqualToString:@"com.apple.calculator"])
[names addObject:[NSString stringWithFormat:@"Files/Applications/Calculator.app/%@", file]];
else if ([identifier isEqualToString:@"com.apple.Maps"] && [file isEqualToString:@"Icon-57@2x.png"])
- [names addObject:[NSString stringWithFormat:@"Bundles/com.apple.Maps/icon.png"]];
+ $pathForFile$inBundle$(names, @"icon.png", identifier, folder);
else if (!summer);
remapResourceName(@"FSO_BG.png", @"StatusBar")
remapResourceName(Four_ ? @"SBDockBG-old.png" : @"SBDockBG.png", @"Dock")
static NSString *$pathForFile$inBundle$(NSString *file, NSString *identifier, NSURL *url, bool use) {
NSMutableArray *names = [NSMutableArray arrayWithCapacity:8];
- $pathForFile$inBundle$(names, file, identifier, url);
+ $pathForFile$inBundle$(names, file, identifier, [url lastPathComponent]);
[names addObject:[NSString stringWithFormat:@"Fallback/%@", file]];
if (NSString *path = $getTheme$($useScale$(names, use)))
return path;
NSString *path = [self path];
NSString *folder = [path lastPathComponent];
NSString *dname = [self displayName];
- NSString *didentifier = [self displayIdentifier];
+
+ NSString *didentifier;
+ if ([self respondsToSelector:@selector(displayIdentifier)])
+ didentifier = [self displayIdentifier];
+ else
+ didentifier = nil;
if (Debug_)
NSLog(@"WB:Debug: [SBApplication(%@:%@:%@:%@) pathForIcon]", identifier, folder, dname, didentifier);
if (NSString *name = Name) \
[names addObject:[NSString stringWithFormat:@"Icons%@/%@.png", suffix, name]];
- if (![didentifier isEqualToString:identifier])
+ if (didentifier != nil && ![didentifier isEqualToString:identifier])
testForIcon(didentifier);
testForIcon(identifier);
if (paper != nil)
paper = [paper stringByDeletingLastPathComponent];
- {
- size_t size;
- sysctlbyname("hw.machine", NULL, &size, NULL, 0);
- char *machine = new char[size];
-
- if (sysctlbyname("hw.machine", machine, &size, NULL, 0) == -1) {
- perror("sysctlbyname(\"hw.machine\", ?)");
- delete [] machine;
- machine = NULL;
- }
-
- IsWild_ = machine != NULL && strncmp(machine, "iPad", 4) == 0;
- }
-
if (Debug_)
NSLog(@"WB:Debug:Info = %@", [Info_ description]);
no = true;
if (strstr(path, "/icon") != NULL)
- MSHookProcess(-1, "");
+ *reinterpret_cast<void *volatile *>(NULL) = NULL;
if (fd == -1 && errno == EFAULT)
NSLog(@"open(%p, %#x, %#o) = %d\n", path, oflag, mode, fd);
dlset(_GSFontGetUseLegacyFontMetrics, "GSFontGetUseLegacyFontMetrics");
+ // Initialize IsWild_ {{{
+ size_t size;
+ sysctlbyname("hw.machine", NULL, &size, NULL, 0);
+ char *machine = new char[size];
+
+ if (sysctlbyname("hw.machine", machine, &size, NULL, 0) == -1) {
+ perror("sysctlbyname(\"hw.machine\", ?)");
+ delete [] machine;
+ machine = NULL;
+ }
+
+ IsWild_ = machine != NULL && strncmp(machine, "iPad", 4) == 0;
+ // }}}
// Load Settings.plist {{{
if (NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"/User/Library/Preferences/com.saurik.WinterBoard.plist"]]) {
- if (NSNumber *value = [settings objectForKey:@"SummerBoard"])
+ if (kCFCoreFoundationVersionNumber >= 1000)
+ SummerBoard_ = false;
+ else if (NSNumber *value = [settings objectForKey:@"SummerBoard"])
SummerBoard_ = [value boolValue];
else
SummerBoard_ = true;