Changeset 53735


Ignore:
Timestamp:
Jul 13, 2009, 3:10:25 AM (10 years ago)
Author:
juanger@…
Message:

Full integration of MPPortProcess

Location:
branches/gsoc09-gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc09-gui/MPGUI/MPActionLauncher.m

    r53692 r53735  
    4040
    4141    // This is the path to the MPActionTool
    42     NSString *toolPath = [bundlePath stringByAppendingPathComponent:@"Contents/MacOS/MPActionTool"];
     42    // NSString *toolPath = [bundlePath stringByAppendingPathComponent:@"Contents/MacOS/MPActionTool"];
    4343    // Launch the MPActionTool
    44     actionTool = [NSTask launchedTaskWithLaunchPath:toolPath arguments:[NSArray arrayWithObject:@""]];
     44    // actionTool = [NSTask launchedTaskWithLaunchPath:toolPath arguments:[NSArray arrayWithObject:@""]];
    4545   
    4646    return sharedActionLauncher;
     
    5252
    5353- (void)installPortInBackground:(MPPort *)port {
    54 //    id theProxy;
    55 //    theProxy = [NSConnection
    56 //                    rootProxyForConnectionWithRegisteredName:@"actionTool"
    57 //                    host:nil];
    58 //    [theProxy installPort:port];
    5954    NSError * error;
    6055    NSArray *empty = [NSArray arrayWithObject: @""];
     
    6358
    6459- (void)uninstallPortInBackground:(MPPort *)port {
    65     id theProxy;
    66     theProxy = [NSConnection
    67                 rootProxyForConnectionWithRegisteredName:@"actionTool"
    68                 host:nil];
    69     [theProxy uninstallPort:port];
     60    NSError * error;
     61    [port uninstallWithVersion:@"" error:&error];
    7062}
    7163
    7264- (void)upgradePortInBackground:(MPPort *)port {
    73     id theProxy;
    74     theProxy = [NSConnection
    75                 rootProxyForConnectionWithRegisteredName:@"actionTool"
    76                 host:nil];
    77     [theProxy upgradePort:port];
     65    NSError * error;
     66    [port upgradeWithError:&error];
    7867}
    7968
    8069- (void)syncInBackground {
    81     id theProxy;
    82     theProxy = [NSConnection
    83                 rootProxyForConnectionWithRegisteredName:@"actionTool"
    84                 host:nil];
    85     [theProxy sync];
     70    NSError * error;
     71    [[MPMacPorts sharedInstance] sync:&error];
    8672}
    8773
    8874- (void)selfupdateInBackground {
    89     id theProxy;
    90     theProxy = [NSConnection
    91                 rootProxyForConnectionWithRegisteredName:@"actionTool"
    92                 host:nil];
    93     [theProxy selfupdate];
     75    NSError * error;
     76    [[MPMacPorts sharedInstance] selfUpdate:&error];
    9477}
    9578
  • branches/gsoc09-gui/MacPorts_Framework/MPInterpreter.m

    r53719 r53735  
    676676    [aTask launch];
    677677   
    678 //    NSLog(@"Going to sleep");
    679     [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:10]];
    680     id theProxy = [NSConnection
    681                 rootProxyForConnectionWithRegisteredName:@"MPPortProcess"
    682                 host:nil];
     678    id theProxy;
     679    do {
     680        theProxy = [NSConnection
     681                       rootProxyForConnectionWithRegisteredName:@"MPPortProcess"
     682                       host:nil];
     683    }
     684    while (theProxy == nil);
     685   
    683686    [theProxy evaluateString:statement];
    684687    return nil;
  • branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.m

    r53719 r53735  
    2727    // TODO Handle the posible errors and notifications
    2828    Tcl_Eval(interpreter, [statement UTF8String]);
     29    exit(0);
    2930}
    3031
Note: See TracChangeset for help on using the changeset viewer.