Index: trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h =================================================================== --- trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h (revision 64) +++ trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h (revision 65) @@ -38,9 +38,6 @@ { } -// from the id to desc map in BootProp::instance(), load all default values for dict -+ (void) loadAllValues: (NSMutableDictionary*) dict; - // Register the Group panel for further automatic iteration matters + (void) registerPreferencesGroup:(id) myGroup; @@ -56,6 +53,10 @@ // Method for loading all registred options components in the interface + (void) loadOptionFromBootFile:(id) optionID; +// Get the resource in the pref pane, needed because the bundle get resource api wont work +// as it would return the SystemPreferences application resource +- (id) getResourcePath: (NSString *) str ofType: (NSString*) sType; + - (void) loadPreferences; - (bool) savePreferences; Index: trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm (revision 64) +++ trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm (revision 65) @@ -37,36 +37,17 @@ return self; } - //-------------------------------------------------------------------------- -// from the id to desc map in BootProp()., set all default values for dict -+ (void) loadAllValues: (NSMutableDictionary*) dict +- (id) getResourcePath: (NSString *) str ofType: (NSString*) sType { - [self doForEachGroup:LoadPreferencesOptions withOption: dict]; - for(const BootOptionDesc* bod = BootProp::instance().firstOption();bod; bod=BootProp::instance().nextOption()) - { - switch (bod->Type) - { - case OptionYesNo: - [(NSButton*)bod->ID setIntValue: (toupper(bod->Default[0])=='Y' ? 1 : 0) ]; - break; - case OptionKernel: - case OptionString: - [(NSButton*)bod->ID setIntValue: 0 ]; - case OptionKernel1: - [(NSTextField*)bod->contentID setStringValue: - [[NSString alloc] initWithUTF8String: bod->Default] ]; - break; - case OptionUnix: - [(NSButton*)bod->ID setIntValue: 0 ]; - break; - - default: - break; - } - } + NSImage * img=nil; + if(!str) return nil; + NSBundle * b = [NSBundle bundleForClass:[self class]]; + id sRes = [b pathForResource: str ofType:sType ]; + return sRes; } + //-------------------------------------------------------------------------- // get authorisation from main panel lock - (AuthorizationRef) getAuthorization Index: trunk/ChameleonPrefPane/Info.plist =================================================================== --- trunk/ChameleonPrefPane/Info.plist (revision 64) +++ trunk/ChameleonPrefPane/Info.plist (revision 65) @@ -17,7 +17,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.0 b7 + 2.0 b8 CFBundleSignature ???? CFBundleVersion Index: trunk/ChameleonPrefPane/EfiInjectController.h =================================================================== --- trunk/ChameleonPrefPane/EfiInjectController.h (revision 64) +++ trunk/ChameleonPrefPane/EfiInjectController.h (revision 65) @@ -16,6 +16,7 @@ { IBOutlet NSButton* mEfiInject; IBOutlet NSTextField* mEfiInjectText; + IBOutlet NSButton* mCurrentGfxInjection; } - (IBAction) onCheckButtonChange: (NSButton*) sender; Index: trunk/ChameleonPrefPane/CREDITS =================================================================== --- trunk/ChameleonPrefPane/CREDITS (revision 64) +++ trunk/ChameleonPrefPane/CREDITS (revision 65) @@ -15,4 +15,9 @@ MasterChief digital_dreamer smith@@ - scrax \ No newline at end of file + scrax + +Chameleon also reuses existing scripts and gfxutil tool from ronan (Lizard OSX app) available at: + http://code.google.com/p/lizard-app/ +See also: + http://darwinx86.org/software/darwinx86_software.html Index: trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj =================================================================== --- trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj (revision 64) +++ trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj (revision 65) @@ -10,6 +10,9 @@ 01001003110EBB2A00221234 /* CustomTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 01001001110EBB2A00221234 /* CustomTableView.h */; }; 01001004110EBB2A00221234 /* CustomTableView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 01001002110EBB2A00221234 /* CustomTableView.mm */; }; 010CC625110927A2006EFFE9 /* QuestionMark.png in Resources */ = {isa = PBXBuildFile; fileRef = 010CC624110927A2006EFFE9 /* QuestionMark.png */; }; + 013F671F110F7A7D0095EC8F /* cdBootCreator.sh in Resources */ = {isa = PBXBuildFile; fileRef = 013F671C110F7A7D0095EC8F /* cdBootCreator.sh */; }; + 013F6720110F7A7D0095EC8F /* getDevProp.sh in Resources */ = {isa = PBXBuildFile; fileRef = 013F671D110F7A7D0095EC8F /* getDevProp.sh */; }; + 013F6721110F7A7D0095EC8F /* gfxutil in Resources */ = {isa = PBXBuildFile; fileRef = 013F671E110F7A7D0095EC8F /* gfxutil */; }; 01466A931104062500088464 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01466A921104062500088464 /* Security.framework */; }; 01466C2A110408CC00088464 /* SecurityInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01466C29110408CC00088464 /* SecurityInterface.framework */; }; 01466C381104091400088464 /* SecurityFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01466C371104091400088464 /* SecurityFoundation.framework */; }; @@ -61,6 +64,9 @@ 01001001110EBB2A00221234 /* CustomTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomTableView.h; path = ../../../../../../devl/OSX/voodoo/chameleonApplications/trunk/ChameleonPrefPane/Sources/CustomTableView.h; sourceTree = SOURCE_ROOT; }; 01001002110EBB2A00221234 /* CustomTableView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CustomTableView.mm; path = ../../../../../../devl/OSX/voodoo/chameleonApplications/trunk/ChameleonPrefPane/Sources/CustomTableView.mm; sourceTree = SOURCE_ROOT; }; 010CC624110927A2006EFFE9 /* QuestionMark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = QuestionMark.png; path = Resources/QuestionMark.png; sourceTree = SOURCE_ROOT; }; + 013F671C110F7A7D0095EC8F /* cdBootCreator.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = cdBootCreator.sh; path = ../../../../../../devl/OSX/voodoo/chameleonApplications/trunk/ChameleonPrefPane/Resources/cdBootCreator.sh; sourceTree = SOURCE_ROOT; }; + 013F671D110F7A7D0095EC8F /* getDevProp.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = getDevProp.sh; path = ../../../../../../devl/OSX/voodoo/chameleonApplications/trunk/ChameleonPrefPane/Resources/getDevProp.sh; sourceTree = SOURCE_ROOT; }; + 013F671E110F7A7D0095EC8F /* gfxutil */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = gfxutil; path = ../../../../../../devl/OSX/voodoo/chameleonApplications/trunk/ChameleonPrefPane/Resources/gfxutil; sourceTree = SOURCE_ROOT; }; 01466A921104062500088464 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 01466C29110408CC00088464 /* SecurityInterface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityInterface.framework; path = System/Library/Frameworks/SecurityInterface.framework; sourceTree = SDKROOT; }; 01466C371104091400088464 /* SecurityFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityFoundation.framework; path = System/Library/Frameworks/SecurityFoundation.framework; sourceTree = SDKROOT; }; @@ -152,6 +158,9 @@ 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( + 013F671C110F7A7D0095EC8F /* cdBootCreator.sh */, + 013F671D110F7A7D0095EC8F /* getDevProp.sh */, + 013F671E110F7A7D0095EC8F /* gfxutil */, 010CC624110927A2006EFFE9 /* QuestionMark.png */, 01B0E81A1108B87A00ACF21B /* CDROM.png */, 01B0E81B1108B87A00ACF21B /* Chameleon.icns */, @@ -329,6 +338,9 @@ 01B0E8291108B89D00ACF21B /* version in Resources */, 01E0E9511108F9ED004EF6E8 /* TODO in Resources */, 010CC625110927A2006EFFE9 /* QuestionMark.png in Resources */, + 013F671F110F7A7D0095EC8F /* cdBootCreator.sh in Resources */, + 013F6720110F7A7D0095EC8F /* getDevProp.sh in Resources */, + 013F6721110F7A7D0095EC8F /* gfxutil in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; Index: trunk/ChameleonPrefPane/EfiInjectController.mm =================================================================== --- trunk/ChameleonPrefPane/EfiInjectController.mm (revision 64) +++ trunk/ChameleonPrefPane/EfiInjectController.mm (revision 65) @@ -44,7 +44,29 @@ //-------------------------------------------------------------------------- -(IBAction) onCheckButtonChange: (NSButton*) sender { - [self handleSender: sender]; + if(sender == mCurrentGfxInjection) + { + NSTask *gfxutil = [[NSTask alloc] init]; + NSString * pathTask = [self getResourcePath:@"getDevProp" ofType:@"sh"]; + [gfxutil setLaunchPath:pathTask]; + [gfxutil launch]; + + //[progressIndicator startAnimation: self]; //lancement de l'anim + [gfxutil waitUntilExit]; //surveille le script et bloque le bouton + int status = [gfxutil terminationStatus]; + + if (status == 0) { //script terminé avec succès + //[progressIndicator stopAnimation: self]; + NSLog(@"dev-props checked."); + } + else { + //[progressIndicator stopAnimation: self]; //problème avec le script + NSLog(@"no dev-props."); + } + + } + else + [self handleSender: sender]; } //-------------------------------------------------------------------------- Index: trunk/ChameleonPrefPane/English.lproj/Chameleon.xib =================================================================== --- trunk/ChameleonPrefPane/English.lproj/Chameleon.xib (revision 64) +++ trunk/ChameleonPrefPane/English.lproj/Chameleon.xib (revision 65) @@ -12,7 +12,8 @@ YES - + + YES @@ -72,7 +73,7 @@ 1 - + 292 YES @@ -732,7 +733,6 @@ {{10, 33}, {640, 267}} - Boot From ... @@ -2600,7 +2600,7 @@ Item 5 - + 256 YES @@ -2614,27 +2614,10 @@ 256 YES - - - 268 - {{18, 14}, {536, 145}} - - YES - - -1805517311 - 272629760 - - - - YES - - - - 268 - {{16, 170}, {132, 18}} + {{16, 215}, {132, 18}} YES @@ -2653,12 +2636,96 @@ 25 + + + 268 + {{414, 210}, {141, 27}} + + YES + + -2080244224 + 134217728 + Current Gfx Injection + + + -2033434369 + 162 + + + 400 + 75 + + + + + 268 + + YES + + + 2304 + + YES + + + 268 + {536, 506} + + YES + + -1805517311 + 272629760 + + + + YES + + + + + + {{1, 1}, {536, 173}} + + + + + 4 + + + + 256 + {{537, 1}, {15, 173}} + + YES + + _doScroller: + 0.34189723320158105 + + + + -2147483392 + {{-100, -100}, {536, 15}} + + 1 + + _doScroller: + 0.50602412223815918 + + + {{10, 22}, {553, 175}} + + + 82 + + + + - {{1, 1}, {572, 196}} + {{1, 1}, {572, 246}} - {{34, 45}, {574, 212}} + {{34, 5}, {574, 262}} {0, 0} @@ -2680,20 +2747,21 @@ {{10, 33}, {640, 267}} + EFI Inject - + 0 YES YES YES - + @@ -2742,7 +2810,7 @@ {1.79769e+308, 1.79769e+308} - + 256 YES @@ -2784,7 +2852,7 @@ 268 - {{46, 49}, {373, 154}} + {{46, 20}, {373, 183}} YES @@ -2792,7 +2860,8 @@ 272629760 ICBJbml0aWFsIENvbmNlcHRpb24gJiBEZXNpZ246ICAKCVJla3Vyc29yCiAgCiAgQ3JldyBNZW1iZXJz OiAgCglSZWt1cnNvciwgICBEaWVCdWNoZQogIAogIENvbnRyaWJ1dG9ycyAmIFRlc3RlcnM6ICAKCUJs -YWNrT1NYLCAgTWFzdGVyQ2hpZWYsICBkaWdpdGFsX2RyZWFtZXIsICBzbWl0aEBAA +YWNrT1NYLCAgTWFzdGVyQ2hpZWYsICBkaWdpdGFsX2RyZWFtZXIsICBzbWl0aEBALCBzb25vdG9uZSAo +Zm9yIExpemFyZCBzY3JpcHRzIGFuZCBnZnggdG9vbCB1c2UpA @@ -2804,6 +2873,7 @@ {464, 255} + {{0, 0}, {1920, 1058}} {1.79769e+308, 1.79769e+308} @@ -4039,28 +4109,44 @@ 789 + + onCheckButtonChange: + + + + 792 + + - mEfiInjectText + mCurrentGfxInjection - + - 790 + 796 - onTextFiedChange: + onCheckButtonChange: - + - 791 + 797 + + mEfiInjectText + + + + 824 + + - onCheckButtonChange: + onTextFiedChange: - + - 792 + 825 @@ -5258,9 +5344,9 @@ YES - + @@ -5620,39 +5706,75 @@ YES - + + - 784 - + 786 + YES - + - 785 - - + 787 + + - 786 - + 794 + YES - + - 787 - - + 795 + + + + 820 + + + YES + + + + + + + + 821 + + + + + 822 + + + + + 818 + + + YES + + + + + + 819 + + + @@ -5931,12 +6053,16 @@ 776.IBAttributePlaceholdersKey 776.IBPluginDependency 777.IBPluginDependency - 784.IBPluginDependency - 785.IBPluginDependency + 780.IBPluginDependency + 781.IBPluginDependency 786.IBAttributePlaceholdersKey 786.IBPluginDependency 787.IBPluginDependency - 788.IBPluginDependency + 793.IBPluginDependency + 794.IBPluginDependency + 795.IBPluginDependency + 818.IBPluginDependency + 819.IBPluginDependency 99.IBAttributePlaceholdersKey 99.IBPluginDependency @@ -5962,9 +6088,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{197, 183}, {668, 368}} + {{65, 274}, {668, 368}} com.apple.InterfaceBuilder.CocoaPlugin - {{197, 183}, {668, 368}} + {{65, 274}, {668, 368}} {224.664, 10} @@ -6716,6 +6842,10 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -6743,7 +6873,7 @@ - 793 + 825 @@ -7028,12 +7158,14 @@ YES YES + mCurrentGfxInjection mEfiInject mEfiInjectText YES NSButton + NSButton NSTextField