[53070] branches/gsoc09-gui/MPGUI

juanger at macports.org juanger at macports.org
Sun Jun 28 19:23:14 PDT 2009


Revision: 53070
          http://trac.macports.org/changeset/53070
Author:   juanger at macports.org
Date:     2009-06-28 19:23:13 -0700 (Sun, 28 Jun 2009)
Log Message:
-----------
Implementation of MPActionTool. This is a new executable to handle port commands on another process

Modified Paths:
--------------
    branches/gsoc09-gui/MPGUI/English.lproj/MainMenu.xib
    branches/gsoc09-gui/MPGUI/MPActionLauncher.h
    branches/gsoc09-gui/MPGUI/MPActionLauncher.m
    branches/gsoc09-gui/MPGUI/MPActionsController.m
    branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj
    branches/gsoc09-gui/MPGUI/PortsTableController.m

Added Paths:
-----------
    branches/gsoc09-gui/MPGUI/MPActionTool.h
    branches/gsoc09-gui/MPGUI/MPActionTool.m

Modified: branches/gsoc09-gui/MPGUI/English.lproj/MainMenu.xib
===================================================================
--- branches/gsoc09-gui/MPGUI/English.lproj/MainMenu.xib	2009-06-29 01:53:01 UTC (rev 53069)
+++ branches/gsoc09-gui/MPGUI/English.lproj/MainMenu.xib	2009-06-29 02:23:13 UTC (rev 53070)
@@ -2009,7 +2009,7 @@
 																				<reference ref="385089462"/>
 																			</object>
 																		</object>
-																		<object class="NSMutableDictionary" id="87328039">
+																		<object class="NSMutableDictionary" id="521510853">
 																			<bool key="EncodedWithXMLCoder">YES</bool>
 																			<object class="NSMutableArray" key="dict.sortedKeys">
 																				<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2135,7 +2135,7 @@
 																					<bool key="EncodedWithXMLCoder">YES</bool>
 																					<reference ref="833924481"/>
 																					<reference ref="328879136"/>
-																					<reference ref="87328039"/>
+																					<reference ref="521510853"/>
 																				</object>
 																				<object class="NSMutableArray">
 																					<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2592,6 +2592,7 @@
 									</object>
 									<string key="NSFrame">{{1, 1}, {246, 331}}</string>
 									<reference key="NSSuperview" ref="199390391"/>
+									<reference key="NSNextKeyView" ref="238622922"/>
 									<reference key="NSDocView" ref="238622922"/>
 									<reference key="NSBGColor" ref="800202432"/>
 									<int key="NScvFlags">4</int>
@@ -2618,6 +2619,7 @@
 							</object>
 							<string key="NSFrame">{{6, 26}, {263, 348}}</string>
 							<reference key="NSSuperview" ref="187671130"/>
+							<reference key="NSNextKeyView" ref="340647127"/>
 							<int key="NSsFlags">50</int>
 							<reference key="NSVScroller" ref="482661369"/>
 							<reference key="NSHScroller" ref="400167025"/>
@@ -2994,14 +2996,6 @@
 					<int key="connectionID">490</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">delegate</string>
-						<reference key="source" ref="1050"/>
-						<reference key="destination" ref="517167976"/>
-					</object>
-					<int key="connectionID">491</int>
-				</object>
-				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
 						<string key="label">value: arrangedObjects.description</string>
 						<reference key="source" ref="484726988"/>
@@ -3226,6 +3220,14 @@
 					</object>
 					<int key="connectionID">648</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="1050"/>
+						<reference key="destination" ref="800227439"/>
+					</object>
+					<int key="connectionID">650</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
@@ -4904,7 +4906,7 @@
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">648</int>
+			<int key="maxID">650</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">

Modified: branches/gsoc09-gui/MPGUI/MPActionLauncher.h
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionLauncher.h	2009-06-29 01:53:01 UTC (rev 53069)
+++ branches/gsoc09-gui/MPGUI/MPActionLauncher.h	2009-06-29 02:23:13 UTC (rev 53070)
@@ -15,6 +15,7 @@
 
 #import <Cocoa/Cocoa.h>
 #import <MacPorts/MacPorts.h>
+#import "MPActionTool.h"
 
 /*!
  @class MPActionLauncher
@@ -23,6 +24,8 @@
 */
 @interface MPActionLauncher : NSObject {
     NSMutableArray *ports;
+    NSTask *actionTool;
+    NSConnection *connectionToActionTool;
     BOOL isLoading, isBusy;
 }
 /*! 
@@ -31,6 +34,8 @@
 */
 @property (copy) NSMutableArray *ports;
 
+ at property NSTask *actionTool;
+
 /*! 
  @var isLoading
  @abstract Tells whether the instance is loading the ports array or not

Modified: branches/gsoc09-gui/MPGUI/MPActionLauncher.m
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionLauncher.m	2009-06-29 01:53:01 UTC (rev 53069)
+++ branches/gsoc09-gui/MPGUI/MPActionLauncher.m	2009-06-29 02:23:13 UTC (rev 53070)
@@ -14,18 +14,13 @@
 @interface MPActionLauncher (Private)
 
 - (void)loadPorts;
-- (void)installPort:(MPPort *)port;
-- (void)uninstallPort:(MPPort *)port;
-- (void)upgradePort:(MPPort *)port;
-- (void)sync;
-- (void)selfupdate;
 
 @end
 
 #pragma mark Implementation
 @implementation MPActionLauncher
 
- at synthesize ports, isLoading, isBusy;
+ at synthesize ports, isLoading, isBusy, actionTool;
 
 + (MPActionLauncher*) sharedInstance {
     
@@ -37,16 +32,31 @@
 }
 
 - (id)init {
-    // This is a temporary pkgPath for testing purposes
-    // PKGPath should be retrieved with User Defaults
+    NSString *bundlePath = [[NSBundle mainBundle] bundlePath];
     if (sharedActionLauncher == nil) {
-        NSString *bundlePath = [[NSBundle mainBundle] bundlePath];
-        NSString *pkgPath = [bundlePath stringByAppendingPathComponent:@"../macports-1.8/Library/Tcl"];
-        pkgPath = [pkgPath stringByStandardizingPath];
+        NSString *pkgPath;
+        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+        pkgPath = [defaults objectForKey:@"PKGPath"];
+        if (pkgPath == nil) {
+            // This pkgPath is just for testing purposes
+            // TODO: Open the preferences panel to setup the PKGPath
+            pkgPath = [bundlePath stringByAppendingPathComponent:@"../macports-1.8/Library/Tcl"];
+            pkgPath = [pkgPath stringByStandardizingPath];
+            [defaults setObject:pkgPath forKey:@"PKGPath"];
+        }
+                
         [MPMacPorts setPKGPath:pkgPath];
         ports = [NSMutableArray arrayWithCapacity:6000];
         sharedActionLauncher = self;
+        
+        // Runt he MPActionTool
     }
+
+    // This is the path to the MPActionTool
+    NSString *toolPath = [bundlePath stringByAppendingPathComponent:@"Contents/MacOS/MPActionTool"];
+    // Launch the MPActionTool
+    actionTool = [NSTask launchedTaskWithLaunchPath:toolPath arguments:[NSArray arrayWithObject:@""]];
+    
     return sharedActionLauncher;
 }
 
@@ -55,24 +65,43 @@
 }
 
 - (void)installPortInBackground:(MPPort *)port {
-    //[self performSelectorInBackground:@selector(installPort:) withObject:port];
-    [self installPort:port];
+    id theProxy;
+    theProxy = [NSConnection
+                    rootProxyForConnectionWithRegisteredName:@"actionTool"
+                    host:nil];
+    [theProxy installPort:port];
 }
 
 - (void)uninstallPortInBackground:(MPPort *)port {
-    [self performSelectorInBackground:@selector(uninstallPort:) withObject:port];
+    id theProxy;
+    theProxy = [NSConnection
+                rootProxyForConnectionWithRegisteredName:@"actionTool"
+                host:nil];
+    [theProxy uninstallPort:port];
 }
 
 - (void)upgradePortInBackground:(MPPort *)port {
-    [self performSelectorInBackground:@selector(upgradePort:) withObject:port];
+    id theProxy;
+    theProxy = [NSConnection
+                rootProxyForConnectionWithRegisteredName:@"actionTool"
+                host:nil];
+    [theProxy upgradePort:port];
 }
 
 - (void)syncInBackground {
-    [self performSelectorInBackground:@selector(sync) withObject:nil];
+    id theProxy;
+    theProxy = [NSConnection
+                rootProxyForConnectionWithRegisteredName:@"actionTool"
+                host:nil];
+    [theProxy sync];
 }
 
 - (void)selfupdateInBackground {
-    [self performSelectorInBackground:@selector(selfupdate) withObject:nil];
+    id theProxy;
+    theProxy = [NSConnection
+                rootProxyForConnectionWithRegisteredName:@"actionTool"
+                host:nil];
+    [theProxy selfupdate];
 }
 
 #pragma mark Private Methods implementation
@@ -96,44 +125,4 @@
     [self setIsLoading:NO];
 }
 
-- (void)installPort:(MPPort *)port {
-    NSError * error;
-    NSArray *empty = [NSArray arrayWithObject: @""];
-    [self setIsBusy:YES];
-    [port installWithOptions:empty variants:empty error:&error];
-    [port setState:MPPortStateLearnState];
-    [self setIsBusy:NO];
-}
-
-- (void)uninstallPort:(MPPort *)port {
-    NSError * error;
-    [self setIsBusy:YES];
-    [port uninstallWithVersion:nil error:&error];
-    [port setState:MPPortStateLearnState];
-    [self setIsBusy:NO];
-}
-
-- (void)upgradePort:(MPPort *)port {
-    NSError * error;
-    [self setIsBusy:YES];
-    [port upgradeWithError:&error];
-    [port setState:MPPortStateLearnState];
-    [self setIsBusy:NO];
-}
-
-- (void)sync {
-    NSError * error;
-    [self setIsBusy:YES];
-    [[MPMacPorts sharedInstance] sync:&error];
-    [self setIsBusy:NO];
-}
-
-- (void)selfupdate {
-    NSError * error;
-    [self setIsBusy:YES];
-    [[MPMacPorts sharedInstance] selfUpdate:&error];
-    [self setIsBusy:NO];
-}
-
-
 @end

Added: branches/gsoc09-gui/MPGUI/MPActionTool.h
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionTool.h	                        (rev 0)
+++ branches/gsoc09-gui/MPGUI/MPActionTool.h	2009-06-29 02:23:13 UTC (rev 53070)
@@ -0,0 +1,27 @@
+//
+//  MPActionTool.h
+//  MPGUI
+//
+//  Created by Juan Germán Castañeda Echevarría on 6/26/09.
+//  Copyright 2009 UNAM. All rights reserved.
+//
+#import <Cocoa/Cocoa.h>
+#import <MacPorts/MacPorts.h>
+
+
+ at interface MPActionTool : NSObject
+{
+    MPMacPorts *macports;
+}
+
+ at property MPMacPorts *macports;
+
+- (oneway void)installPort:(byref id)port;
+- (oneway void)uninstallPort:(byref id)port;
+- (oneway void)upgradePort:(byref id)port;
+- (oneway void)sync;
+- (oneway void)selfupdate;
+
+- (NSString*)PKGPathFromDefaults;
+
+ at end

Added: branches/gsoc09-gui/MPGUI/MPActionTool.m
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionTool.m	                        (rev 0)
+++ branches/gsoc09-gui/MPGUI/MPActionTool.m	2009-06-29 02:23:13 UTC (rev 53070)
@@ -0,0 +1,98 @@
+//
+//  MPActionTool.m
+//  MPGUI
+//
+//  Created by Juan Germán Castañeda Echevarría on 6/26/09.
+//  Copyright 2009 UNAM. All rights reserved.
+//
+
+#import "MPActionTool.h"
+
+ at implementation MPActionTool
+
+ at synthesize macports;
+
+- (id)init {
+    macports = [MPMacPorts sharedInstanceWithPkgPath:[self PKGPathFromDefaults] portOptions:nil];
+    return self;
+}
+
+- (oneway void)installPort:(byref id) port {
+    NSError * error;
+    NSArray *empty = [NSArray arrayWithObject: @""];
+    // for some reason the following line doesn't work
+    //[port installWithOptions:empty variants:empty error:&error];
+    // trying to get the MPPort again (if this is the only way to get it working,
+    // maybe it would be better to just pass the name of the port instead of the
+    // MPPort instance):
+    
+    NSDictionary * searchResult = [macports search:[port name]];
+	MPPort * foundPort = [searchResult objectForKey:[port name]];
+    
+    if (foundPort != nil) {
+        [foundPort installWithOptions:empty variants:empty error:&error];
+    }
+}
+
+- (oneway void)uninstallPort:(byref id) port {
+    NSError * error;
+    
+    NSDictionary * searchResult = [macports search:[port name]];
+	MPPort * foundPort = [searchResult objectForKey:[port name]];
+    
+    if (foundPort != nil) {
+        [foundPort uninstallWithVersion:@"" error:&error];
+    }
+}
+
+- (oneway void)upgradePort:(byref id) port {
+    NSError * error;
+    
+    NSDictionary * searchResult = [macports search:[port name]];
+	MPPort * foundPort = [searchResult objectForKey:[port name]];
+    
+    if (foundPort != nil) {
+        [foundPort upgradeWithError:&error];
+    }
+}
+
+- (oneway void)sync {
+    NSError * error;
+
+    [[MPMacPorts sharedInstance] sync:&error];
+}
+
+- (oneway void)selfupdate {
+    NSError * error;
+
+    [[MPMacPorts sharedInstance] selfUpdate:&error];
+}
+
+- (NSString*)PKGPathFromDefaults {
+    NSString *PKGPath = [[NSUserDefaults standardUserDefaults] objectForKey:@"PKGPath"];
+    return PKGPath;
+}
+
+ at end
+
+int main(int argc, char const * argv[]) {
+    NSConnection *serverConnection; 
+    serverConnection = [NSConnection defaultConnection];
+    MPActionTool *actionTool = [[MPActionTool alloc] init];
+    
+    // Vending actionTool
+    [serverConnection setRootObject:actionTool]; 
+    
+    // Register the named connection
+    if ( [serverConnection registerName:@"actionTool"] ) {
+        NSLog( @"Successfully registered connection with port %@", 
+              [[serverConnection receivePort] description] );
+    } else {
+        NSLog( @"Name used by %@", 
+              [[[NSPortNameServer systemDefaultPortNameServer] portForName:@"actionTool"] description] );
+    }
+    
+    // Wait for any message
+    NSLog(@"Action tool running");
+    [[NSRunLoop currentRunLoop] run];
+}
\ No newline at end of file

Modified: branches/gsoc09-gui/MPGUI/MPActionsController.m
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionsController.m	2009-06-29 01:53:01 UTC (rev 53069)
+++ branches/gsoc09-gui/MPGUI/MPActionsController.m	2009-06-29 02:23:13 UTC (rev 53070)
@@ -46,4 +46,18 @@
     return enable;
 }
 
+#pragma mark App Delegate
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+    [[MPActionLauncher sharedInstance] loadPortsInBackground];
+}
+
+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
+    return YES;
+}
+
+- (void)applicationWillTerminate:(NSNotification *)aNotification {
+    [[[MPActionLauncher sharedInstance] actionTool] terminate];
+}
+
 @end

Modified: branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj
===================================================================
--- branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj	2009-06-29 01:53:01 UTC (rev 53069)
+++ branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj	2009-06-29 02:23:13 UTC (rev 53070)
@@ -24,6 +24,10 @@
 		1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
 		21351FB30FEC67780074ACFE /* MPActionsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21351FB20FEC67780074ACFE /* MPActionsController.m */; };
 		214BAFE40FE7164200BD1B46 /* MPActionLauncher.m in Sources */ = {isa = PBXBuildFile; fileRef = 214BAFE30FE7164200BD1B46 /* MPActionLauncher.m */; };
+		21A588360FF5D683003CF725 /* MPActionTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 21A588350FF5D683003CF725 /* MPActionTool.m */; };
+		21A588370FF5D697003CF725 /* MacPorts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21F165510FE2C04300542AEE /* MacPorts.framework */; };
+		21A5884C0FF5D834003CF725 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
+		21A5895A0FF5E96E003CF725 /* MPActionTool in CopyFiles */ = {isa = PBXBuildFile; fileRef = 21A588140FF5D508003CF725 /* MPActionTool */; };
 		21B6A38E0FEDCBD5001DF976 /* TB_Install.icns in Resources */ = {isa = PBXBuildFile; fileRef = 21B6A38A0FEDCBD5001DF976 /* TB_Install.icns */; };
 		21B6A38F0FEDCBD5001DF976 /* TB_Sync.icns in Resources */ = {isa = PBXBuildFile; fileRef = 21B6A38B0FEDCBD5001DF976 /* TB_Sync.icns */; };
 		21B6A3910FEDCBD5001DF976 /* TB_Upgrade.icns in Resources */ = {isa = PBXBuildFile; fileRef = 21B6A38D0FEDCBD5001DF976 /* TB_Upgrade.icns */; };
@@ -41,6 +45,20 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
+		2106329F0FF7CC8100FF0217 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 21F165400FE2C04300542AEE /* MacPorts.Framework.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 8DC2EF4F0486A6940098B216 /* MacPorts */;
+			remoteInfo = MacPorts;
+		};
+		21A588E40FF5E09A003CF725 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 21A588130FF5D508003CF725;
+			remoteInfo = MPActionTool;
+		};
 		21F1654C0FE2C04300542AEE /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 21F165400FE2C04300542AEE /* MacPorts.Framework.xcodeproj */;
@@ -86,6 +104,16 @@
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXCopyFilesBuildPhase section */
+		21A5894C0FF5E8C6003CF725 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 6;
+			files = (
+				21A5895A0FF5E96E003CF725 /* MPActionTool in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		21F165890FE2C22D00542AEE /* CopyFiles */ = {
 			isa = PBXCopyFilesBuildPhase;
 			buildActionMask = 2147483647;
@@ -107,6 +135,9 @@
 		21351FB20FEC67780074ACFE /* MPActionsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPActionsController.m; sourceTree = "<group>"; };
 		214BAFE20FE7164200BD1B46 /* MPActionLauncher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPActionLauncher.h; sourceTree = "<group>"; };
 		214BAFE30FE7164200BD1B46 /* MPActionLauncher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPActionLauncher.m; sourceTree = "<group>"; wrapsLines = 0; };
+		21A588140FF5D508003CF725 /* MPActionTool */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MPActionTool; sourceTree = BUILT_PRODUCTS_DIR; };
+		21A588340FF5D683003CF725 /* MPActionTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPActionTool.h; sourceTree = "<group>"; };
+		21A588350FF5D683003CF725 /* MPActionTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPActionTool.m; sourceTree = "<group>"; };
 		21B6A38A0FEDCBD5001DF976 /* TB_Install.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = TB_Install.icns; sourceTree = "<group>"; };
 		21B6A38B0FEDCBD5001DF976 /* TB_Sync.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = TB_Sync.icns; sourceTree = "<group>"; };
 		21B6A38D0FEDCBD5001DF976 /* TB_Upgrade.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = TB_Upgrade.icns; sourceTree = "<group>"; };
@@ -129,6 +160,15 @@
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
+		21A588120FF5D508003CF725 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				21A588370FF5D697003CF725 /* MacPorts.framework in Frameworks */,
+				21A5884C0FF5D834003CF725 /* Foundation.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		8D11072E0486CEB800E47090 /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
@@ -163,10 +203,20 @@
 			isa = PBXGroup;
 			children = (
 				8D1107320486CEB800E47090 /* MPGUI.app */,
+				21A588140FF5D508003CF725 /* MPActionTool */,
 			);
 			name = Products;
 			sourceTree = "<group>";
 		};
+		21A588200FF5D5B3003CF725 /* ActionTool */ = {
+			isa = PBXGroup;
+			children = (
+				21A588340FF5D683003CF725 /* MPActionTool.h */,
+				21A588350FF5D683003CF725 /* MPActionTool.m */,
+			);
+			name = ActionTool;
+			sourceTree = "<group>";
+		};
 		21F165410FE2C04300542AEE /* Products */ = {
 			isa = PBXGroup;
 			children = (
@@ -214,6 +264,7 @@
 			isa = PBXGroup;
 			children = (
 				21F165400FE2C04300542AEE /* MacPorts.Framework.xcodeproj */,
+				21A588200FF5D5B3003CF725 /* ActionTool */,
 				21F166FC0FE32DF000542AEE /* Models */,
 				21F167570FE3343600542AEE /* Controllers */,
 				21FC22620FE888F200B1E835 /* Helpers */,
@@ -262,12 +313,30 @@
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
+		21A588130FF5D508003CF725 /* MPActionTool */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 21A588190FF5D527003CF725 /* Build configuration list for PBXNativeTarget "MPActionTool" */;
+			buildPhases = (
+				21A588110FF5D508003CF725 /* Sources */,
+				21A588120FF5D508003CF725 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				210632A00FF7CC8100FF0217 /* PBXTargetDependency */,
+			);
+			name = MPActionTool;
+			productName = MPActionTool;
+			productReference = 21A588140FF5D508003CF725 /* MPActionTool */;
+			productType = "com.apple.product-type.tool";
+		};
 		8D1107260486CEB800E47090 /* MPGUI */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MPGUI" */;
 			buildPhases = (
 				8D1107290486CEB800E47090 /* Resources */,
 				21F165890FE2C22D00542AEE /* CopyFiles */,
+				21A5894C0FF5E8C6003CF725 /* CopyFiles */,
 				8D11072C0486CEB800E47090 /* Sources */,
 				8D11072E0486CEB800E47090 /* Frameworks */,
 				21FC212A0FE8546700B1E835 /* ShellScript */,
@@ -275,6 +344,7 @@
 			buildRules = (
 			);
 			dependencies = (
+				21A588E50FF5E09A003CF725 /* PBXTargetDependency */,
 				21F165820FE2C17C00542AEE /* PBXTargetDependency */,
 			);
 			name = MPGUI;
@@ -303,6 +373,7 @@
 			targets = (
 				8D1107260486CEB800E47090 /* MPGUI */,
 				21351F530FEC59520074ACFE /* Docs */,
+				21A588130FF5D508003CF725 /* MPActionTool */,
 			);
 		};
 /* End PBXProject section */
@@ -395,6 +466,14 @@
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
+		21A588110FF5D508003CF725 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				21A588360FF5D683003CF725 /* MPActionTool.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		8D11072C0486CEB800E47090 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -411,6 +490,16 @@
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
+		210632A00FF7CC8100FF0217 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = MacPorts;
+			targetProxy = 2106329F0FF7CC8100FF0217 /* PBXContainerItemProxy */;
+		};
+		21A588E50FF5E09A003CF725 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 21A588130FF5D508003CF725 /* MPActionTool */;
+			targetProxy = 21A588E40FF5E09A003CF725 /* PBXContainerItemProxy */;
+		};
 		21F165820FE2C17C00542AEE /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			name = MacPorts;
@@ -466,6 +555,72 @@
 			};
 			name = Release;
 		};
+		21A588160FF5D509003CF725 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+				INSTALL_PATH = /usr/local/bin;
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = MPActionTool;
+			};
+			name = Debug;
+		};
+		21A588170FF5D509003CF725 /* Debug-InstallMacPorts */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+				INSTALL_PATH = /usr/local/bin;
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = MPActionTool;
+			};
+			name = "Debug-InstallMacPorts";
+		};
+		21A588180FF5D509003CF725 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+				INSTALL_PATH = /usr/local/bin;
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = MPActionTool;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
 		21FC211D0FE84F7F00B1E835 /* Debug-InstallMacPorts */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -581,6 +736,16 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		21A588190FF5D527003CF725 /* Build configuration list for PBXNativeTarget "MPActionTool" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				21A588160FF5D509003CF725 /* Debug */,
+				21A588170FF5D509003CF725 /* Debug-InstallMacPorts */,
+				21A588180FF5D509003CF725 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MPGUI" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (

Modified: branches/gsoc09-gui/MPGUI/PortsTableController.m
===================================================================
--- branches/gsoc09-gui/MPGUI/PortsTableController.m	2009-06-29 01:53:01 UTC (rev 53069)
+++ branches/gsoc09-gui/MPGUI/PortsTableController.m	2009-06-29 02:23:13 UTC (rev 53070)
@@ -26,15 +26,6 @@
     return self;
 }
 
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
-    [[MPActionLauncher sharedInstance] loadPortsInBackground];
-    [self changePredicateEditorSize:0];
-}
-
-- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
-    return YES;
-}
-
 #pragma mark PredicateEditor delegate
 
 - (void)ruleEditorRowsDidChange:(NSNotification *)notification {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090628/b64def99/attachment-0001.html>


More information about the macports-changes mailing list