Changeset 1169
- Timestamp:
- 02/24/2010 05:43:12 PM (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/PlayerFramework/SapphireFrappliance/FRAppliance/SapphireAppliance.m
r1164 r1169 30 30 #import <SapphireCompatClasses/BackRowUtils.h> 31 31 #ifdef DEBUG 32 #define FrameworkLoadDebug32 //#define FrameworkLoadDebug 33 33 #define FrameworkAlwaysCopy 34 34 #endif … … 66 66 @end 67 67 68 static NSString *initialError = nil; 68 69 69 70 @implementation SapphireAppliance 71 72 BOOL usingCategories = NO; 70 73 71 74 + (void) initialize … … 74 77 NSString *frameworkPath = [myBundlePath stringByAppendingPathComponent:@"Contents/Frameworks"]; 75 78 SapphireLoadFramework(frameworkPath); 76 loadCMPFramework(myBundlePath); 79 if(!loadCMPFramework(myBundlePath)) 80 initialError = BRLocalizedString(@"Error loading common player framework. Continuing is not recomended", @"Error string for loading common player framework"); 81 else if([CMPPlayerManager version] != CMPVersion) 82 initialError = BRLocalizedString(@"Common player framework is newer than expected. You may wish to check if a newer version of Sapphire is available. You may attempt to continue if you like.", @"Warning string for common player framework being newer than Sapphire"); 77 83 Class cls = NSClassFromString( @"BRFeatureManager" ); 78 84 if ( cls == Nil ) … … 162 168 - (id) applianceControllerWithScene: (id) scene 163 169 { 170 if(initialError && !usingCategories) 171 { 172 BRAlertController *controller = [SapphireFrontRowCompat alertOfType:0 titled:@"Error" primaryText:@"Framework Error" secondaryText:initialError withScene:nil]; 173 initialError = nil; 174 return controller; 175 } 164 176 // this function is called when your item is selected on the main menu 165 177 @try { … … 186 198 NSMutableArray *categories = [NSMutableArray array]; 187 199 200 usingCategories = YES; 188 201 if([SapphireApplianceController upgradeNeeded]) 189 202 { … … 235 248 -(id)controllerForIdentifier:(id)ident 236 249 { 250 if(initialError) 251 { 252 BRAlertController *controller = [SapphireFrontRowCompat alertOfType:0 titled:@"Error" primaryText:@"Framework Error" secondaryText:initialError withScene:nil]; 253 initialError = nil; 254 return controller; 255 } 237 256 NSString *identifier = (NSString *)ident; 238 257 if([identifier isEqualToString:UPGRADE_IDENTIFIER])
