Changeset 53717


Ignore:
Timestamp:
Jul 12, 2009, 8:41:59 PM (10 years ago)
Author:
juanger@…
Message:

Integrating MPPortProcess to the framework

Location:
branches/gsoc09-gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj

    r53692 r53717  
    6666                        containerPortal = 21F165400FE2C04300542AEE /* MacPorts.Framework.xcodeproj */;
    6767                        proxyType = 2;
    68                         remoteGlobalIDString = 21D9543E100940EE00DEF58A /* MPPortProcess */;
     68                        remoteGlobalIDString = 21D9543E100940EE00DEF58A;
    6969                        remoteInfo = MPPortProcess;
    7070                };
  • branches/gsoc09-gui/MacPorts_Framework/MPInterpreter.m

    r53692 r53717  
    658658
    659659- (NSString *) evaluateStringWithMPPortProcess:(NSString *) statement error:(NSError **)mportError {
    660     NSLog(@"Path: %@", [[NSBundle bundleForClass:[self class]] resourcePath]);
     660/*    NSString *portProcessInitPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"portProcessInit" ofType:@"tcl"];
    661661    NSString *portProcessPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"MPPortProcess" ofType:@""];
    662     NSTask *portProcess = [NSTask launchedTaskWithLaunchPath:portProcessPath arguments:[NSArray arrayWithObject:PKGPath]];
     662    NSLog(portProcessInitPath);
     663   
     664    NSArray *args = [NSArray arrayWithObjects:PKGPath,portProcessInitPath];
     665   
     666    NSTask *portProcess = [NSTask launchedTaskWithLaunchPath:[portProcessPath retain] arguments:[args retain]];
     667 */
     668    NSTask *aTask = [[NSTask alloc] init];
     669    NSMutableArray *args = [NSMutableArray array];
     670   
     671    /* set arguments */
     672    [args addObject:PKGPath];
     673    [aTask setCurrentDirectoryPath:[[NSBundle bundleForClass:[self class]] resourcePath]];
     674    [aTask setLaunchPath:[[NSBundle bundleForClass:[self class]] pathForResource:@"MPPortProcess" ofType:@""]];
     675    [aTask setArguments:args];
     676    [aTask launch];
     677   
     678    NSLog(@"Going to sleep");
     679    [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:10000]];
    663680    id theProxy = [NSConnection
    664681                rootProxyForConnectionWithRegisteredName:@"MPPortProcess"
  • branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.h

    r53692 r53717  
    1212    Tcl_Interp *interpreter;
    1313    NSString *PKGPath;
     14    NSString *InitTclPath;
    1415}
    1516
  • branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.m

    r53692 r53717  
    1818@implementation MPPortProcess
    1919
    20 - (id)initWithPKGPath:(NSString*)path {
    21     PKGPath = path;
     20- (id)initWithPKGPath:(NSString*)pkgPath initTclPath:(NSString*)tclPath {
     21    PKGPath = pkgPath;
     22    InitTclPath = tclPath;
    2223    [self initializeInterpreter];
    2324    return self;
     
    6768    portProcessConnection = [NSConnection defaultConnection];
    6869    NSString *PKGPath = [[NSString alloc] initWithCString:argv[1] encoding:NSUTF8StringEncoding];
    69     MPPortProcess *portProcess = [[MPPortProcess alloc] initWithPKGPath:PKGPath];
     70    NSString *portProcessInitPath = [[NSString alloc] initWithCString:argv[2] encoding:NSUTF8StringEncoding];
     71   
     72    MPPortProcess *portProcess = [[MPPortProcess alloc] initWithPKGPath:PKGPath initTclPath:portProcessInitPath];
    7073   
    7174    // Vending portProcess
    72     [portProcessConnection setRootObject:portProcess]; 
     75    [portProcessConnection setRootObject:portProcess];
    7376   
    7477    // Register the named connection
  • branches/gsoc09-gui/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj

    r53692 r53717  
    9191                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
    9292                        proxyType = 1;
    93                         remoteGlobalIDString = 21D9543D100940EE00DEF58A /* MPPortProcess */;
     93                        remoteGlobalIDString = 21D9543D100940EE00DEF58A;
    9494                        remoteInfo = MPPortProcess;
    9595                };
Note: See TracChangeset for help on using the changeset viewer.