[53735] branches/gsoc09-gui
juanger at macports.org
juanger at macports.org
Sun Jul 12 20:10:25 PDT 2009
Revision: 53735
http://trac.macports.org/changeset/53735
Author: juanger at macports.org
Date: 2009-07-12 20:10:25 -0700 (Sun, 12 Jul 2009)
Log Message:
-----------
Full integration of MPPortProcess
Modified Paths:
--------------
branches/gsoc09-gui/MPGUI/MPActionLauncher.m
branches/gsoc09-gui/MacPorts_Framework/MPInterpreter.m
branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.m
Modified: branches/gsoc09-gui/MPGUI/MPActionLauncher.m
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionLauncher.m 2009-07-13 02:53:14 UTC (rev 53734)
+++ branches/gsoc09-gui/MPGUI/MPActionLauncher.m 2009-07-13 03:10:25 UTC (rev 53735)
@@ -39,9 +39,9 @@
}
// This is the path to the MPActionTool
- NSString *toolPath = [bundlePath stringByAppendingPathComponent:@"Contents/MacOS/MPActionTool"];
+ // NSString *toolPath = [bundlePath stringByAppendingPathComponent:@"Contents/MacOS/MPActionTool"];
// Launch the MPActionTool
- actionTool = [NSTask launchedTaskWithLaunchPath:toolPath arguments:[NSArray arrayWithObject:@""]];
+ // actionTool = [NSTask launchedTaskWithLaunchPath:toolPath arguments:[NSArray arrayWithObject:@""]];
return sharedActionLauncher;
}
@@ -51,46 +51,29 @@
}
- (void)installPortInBackground:(MPPort *)port {
-// id theProxy;
-// theProxy = [NSConnection
-// rootProxyForConnectionWithRegisteredName:@"actionTool"
-// host:nil];
-// [theProxy installPort:port];
NSError * error;
NSArray *empty = [NSArray arrayWithObject: @""];
[port installWithOptions:empty variants:empty error:&error];
}
- (void)uninstallPortInBackground:(MPPort *)port {
- id theProxy;
- theProxy = [NSConnection
- rootProxyForConnectionWithRegisteredName:@"actionTool"
- host:nil];
- [theProxy uninstallPort:port];
+ NSError * error;
+ [port uninstallWithVersion:@"" error:&error];
}
- (void)upgradePortInBackground:(MPPort *)port {
- id theProxy;
- theProxy = [NSConnection
- rootProxyForConnectionWithRegisteredName:@"actionTool"
- host:nil];
- [theProxy upgradePort:port];
+ NSError * error;
+ [port upgradeWithError:&error];
}
- (void)syncInBackground {
- id theProxy;
- theProxy = [NSConnection
- rootProxyForConnectionWithRegisteredName:@"actionTool"
- host:nil];
- [theProxy sync];
+ NSError * error;
+ [[MPMacPorts sharedInstance] sync:&error];
}
- (void)selfupdateInBackground {
- id theProxy;
- theProxy = [NSConnection
- rootProxyForConnectionWithRegisteredName:@"actionTool"
- host:nil];
- [theProxy selfupdate];
+ NSError * error;
+ [[MPMacPorts sharedInstance] selfUpdate:&error];
}
#pragma mark Private Methods implementation
Modified: branches/gsoc09-gui/MacPorts_Framework/MPInterpreter.m
===================================================================
--- branches/gsoc09-gui/MacPorts_Framework/MPInterpreter.m 2009-07-13 02:53:14 UTC (rev 53734)
+++ branches/gsoc09-gui/MacPorts_Framework/MPInterpreter.m 2009-07-13 03:10:25 UTC (rev 53735)
@@ -675,11 +675,14 @@
[aTask setArguments:args];
[aTask launch];
-// NSLog(@"Going to sleep");
- [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:10]];
- id theProxy = [NSConnection
- rootProxyForConnectionWithRegisteredName:@"MPPortProcess"
- host:nil];
+ id theProxy;
+ do {
+ theProxy = [NSConnection
+ rootProxyForConnectionWithRegisteredName:@"MPPortProcess"
+ host:nil];
+ }
+ while (theProxy == nil);
+
[theProxy evaluateString:statement];
return nil;
}
Modified: branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.m
===================================================================
--- branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.m 2009-07-13 02:53:14 UTC (rev 53734)
+++ branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.m 2009-07-13 03:10:25 UTC (rev 53735)
@@ -26,6 +26,7 @@
- (oneway void)evaluateString:(bycopy id)statement {
// TODO Handle the posible errors and notifications
Tcl_Eval(interpreter, [statement UTF8String]);
+ exit(0);
}
#pragma mark Private Methods
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090712/3a6e4f60/attachment-0001.html>
More information about the macports-changes
mailing list