Changeset 37865 for branches/gsoc08-framework
- Timestamp:
- Jun 26, 2008, 11:54:01 PM (16 years ago)
- Location:
- branches/gsoc08-framework/MacPorts.Framework
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.m
r37746 r37865 130 130 131 131 - (NSDictionary *)dictionaryFromTclListAsString:(NSString *)list { 132 return [NSDictionary dictionaryWithDictionary:[self :list]];132 return [NSDictionary dictionaryWithDictionary:[self mutableDictionaryFromTclListAsString:list]]; 133 133 } 134 134 -
branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.m
r37746 r37865 66 66 67 67 } 68 - (void)testEvaluateStringAsString ;{68 - (void)testEvaluateStringAsString { 69 69 70 70 } -
branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.h
r37746 r37865 34 34 */ 35 35 36 36 37 #import <Cocoa/Cocoa.h> 37 38 #import "MPInterpreter.h" 38 39 #import "MPPort.h" 39 40 41 40 42 #define MPPortsAll @".+" 43 41 44 42 45 /*! -
branches/gsoc08-framework/MacPorts.Framework/MPPort.h
r37746 r37865 34 34 */ 35 35 36 /*!37 @class MPPort38 @abstract A representation of a port.39 */40 36 41 37 #import <Cocoa/Cocoa.h> … … 44 40 #import "MPReceipt.h" 45 41 #import "MPRegistry.h" 42 43 44 46 45 47 46 #define MPPortStateUnknown 0 … … 55 54 #define MPPortWillExecuteTarget @"org.macports.framework.port.willExecuteTarget" 56 55 #define MPPortDidExecuteTarget @"org.macports.framework.port.didExecuteTarget" 57 56 /*! 57 @class MPPort 58 @abstract A representation of a port. 59 */ 58 60 @interface MPPort : MPMutableDictionary { 59 60 61 } 61 62 -
branches/gsoc08-framework/MacPorts.Framework/MacPorts.Framework.xcodeproj/project.pbxproj
r37746 r37865 39 39 48E993950C82CAAE00219DDF /* MPMacPorts.m in Sources */ = {isa = PBXBuildFile; fileRef = 48E993930C82CAAE00219DDF /* MPMacPorts.m */; }; 40 40 48E9939F0C82CEB000219DDF /* init.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 48E9939E0C82CEB000219DDF /* init.tcl */; }; 41 6E270BE10E1458DE00BAE687 /* init.tcl.original in Resources */ = {isa = PBXBuildFile; fileRef = 6E270BE00E1458DE00BAE687 /* init.tcl.original */; }; 41 42 6E49F37B0DFFAB0B0030C3AF /* MPInterpreterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 489DD92E0C94674B00595506 /* MPInterpreterTest.m */; }; 42 43 6E49F37F0DFFAFF80030C3AF /* MacPorts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* MacPorts.framework */; }; … … 86 87 48F811BE0CE4636A009630DE /* MPRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRegistry.h; sourceTree = "<group>"; }; 87 88 48F811BF0CE4638C009630DE /* MPRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRegistry.m; sourceTree = "<group>"; }; 89 6E270BE00E1458DE00BAE687 /* init.tcl.original */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = init.tcl.original; sourceTree = "<group>"; }; 88 90 6E88D1CA0DF4B90B00684E9F /* MPMacPortsTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMacPortsTest.h; sourceTree = "<group>"; }; 89 91 6E88D1CB0DF4B90B00684E9F /* MPMacPortsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMacPortsTest.m; sourceTree = "<group>"; }; … … 158 160 489DD8F50C94365F00595506 /* Test-Info.plist */, 159 161 6EAFD8B70DEC614E00E97270 /* dummycommit.test */, 162 6E270BE00E1458DE00BAE687 /* init.tcl.original */, 160 163 ); 161 164 name = Resources; … … 335 338 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */, 336 339 48E9939F0C82CEB000219DDF /* init.tcl in Resources */, 340 6E270BE10E1458DE00BAE687 /* init.tcl.original in Resources */, 337 341 ); 338 342 runOnlyForDeploymentPostprocessing = 0; … … 534 538 isa = XCBuildConfiguration; 535 539 buildSettings = { 536 ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; 537 ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; 540 ARCHS = "$(NATIVE_ARCH)"; 538 541 COPY_PHASE_STRIP = YES; 539 542 FRAMEWORK_SEARCH_PATHS = ( -
branches/gsoc08-framework/MacPorts.Framework/dummycommit.test
r37746 r37865 1 I have modified this file2 Now I should do another commit to make sure my3 modifications are ok.4 1 5 George.6 2 7 //NSString * initFile = [[NSBundle bundleWithIdentifier:@"org.macports.frameworks.macports"] 8 // pathForResource:@"init" 9 // ofType:@"tcl"]; 10 NSBundle * tbun = [NSBundle bundleWithIdentifier:@"org.macports.frameworks.macports"]; 11 if(tbun) { 12 NSLog(@"File found with path %@", [[NSBundle bundleForClass:[MPInterpreter class]] bundlePath]); 13 } 14 else{ 15 NSLog(@"File not found with path %@", [[NSBundle bundleForClass:[MPInterpreter class]] bundlePath]); 16 } 17 18 if( Tcl_EvalFile(_interpreter, [[tbun pathForResource:@"init" 19 ofType:@"tcl"] UTF8String]) != TCL_OK) { 20 NSLog(@"Error in Tcl_EvalFile: %s", Tcl_GetStringResult(_interpreter)); 21 Tcl_DeleteInterp(_interpreter); 22 } 23 3 -
branches/gsoc08-framework/MacPorts.Framework/init.tcl
r37395 r37865 1 #catch {source \ 2 # [file join "/Library/Tcl" macports1.0 macports_fastload.tcl]} 3 4 #Trying my own MacPorts build rather than default one on the system 1 5 catch {source \ 2 [file join "/Library/Tcl" macports1.0 macports_fastload.tcl]} 3 6 [file join "/Users/Armahg/macportsbuild/build1/Library/Tcl" macports1.0 macports_fastload.tcl]} 7 8 4 9 package require macports 10 package require notifications 5 11 6 12 # ui_options accessor … … 67 73 68 74 75 #Modifying UI initialization to enable notifications 76 proc ui_init {priority prefix channels message} { 77 # Get the list of channels. 78 try { 79 set channels [ui_channels $priority] 80 } catch * { 81 set channels [ui_channels_default $priority] 82 } 83 84 # Simplify ui_$priority. 85 set nbchans [llength $channels] 86 if {$nbchans == 0} { 87 proc ::ui_$priority {str} { 88 notifications send global testMacPortstNotification "$prefix\$str" 89 } 90 } else { 91 try { 92 set prefix [ui_prefix $priority] 93 } catch * { 94 set prefix [ui_prefix_default $priority] 95 } 96 97 if {$nbchans == 1} { 98 set chan [lindex $channels 0] 99 100 #Redefine ui_$priority here to also throw notifications of some sort 101 proc ::ui_$priority {str} { 102 #[subst { puts $chan "$prefix\$str" }] 103 subst { puts $chan "$prefix\$str" } 104 105 #Send notifications using NSDistributedNotificationCenter for now 106 #We need a way to name notifications based on given input, using 107 #testMacPortsNotification for now 108 notifications send global testMacPortstNotification "$prefix\$str" 109 } 110 111 112 } else { 113 114 115 proc ::ui_$priority {str} { 116 subst { 117 foreach chan \$channels { 118 puts $chan "$prefix\$str" 119 } 120 } 121 #Should we discriminate based on channel? 122 notifications send global testMacPortsNotification "$prefix\$str" 123 } 124 } 125 126 # Call ui_$priority 127 ::ui_$priority $message 128 } 129 } 130 131 132 69 133 # Initialize dport 70 134 # This must be done following parse of global options, as some options are … … 75 139 fatal "Failed to initialize ports system, $result" 76 140 } 77 78
Note: See TracChangeset
for help on using the changeset viewer.