Ignore:
Timestamp:
Mar 26, 2010, 7:46:35 PM (14 years ago)
Author:
juanger@…
Message:

Merging with gsoc09-gui branch so that this is not outdated.

Location:
contrib/MacPorts_Framework
Files:
19 edited
6 copied

Legend:

Unmodified
Added
Removed
  • contrib/MacPorts_Framework

  • contrib/MacPorts_Framework/BetterAuthorizationSampleLib.c

    r39693 r65491  
    4848// "BetterAuthorizationSampleLib.h".
    4949
     50
    5051#define BAS_PRIVATE 1
    5152
     
    7879enum {
    7980    kIdleTimeoutInSeconds     = 120,        // if we get no requests in 2 minutes, we quit
    80     kWatchdogTimeoutInSeconds = 65          // any given request must be completely in 65 seconds
     81    kWatchdogTimeoutInSeconds = 500000      // any given request must be completed in ~5 days (is this ok?)
    8182};
    8283
     
    9495//    can be sent as an architecture-neutral uint32_t.
    9596
    96 #define kBASMaxNumberOfKBytes                   (1024 * 1024)
     97#define kBASMaxNumberOfKBytes           (1024 * 1024)
    9798
    9899// A hard-wired file system path for the UNIX domain socket; %s is the placeholder
    99100// for the bundle ID (in file system representation).
    100101
    101 #define kBASSocketPathFormat                    "/var/run/%s.socket"
     102#define kBASSocketPathFormat            "/var/run/%s.socket"
    102103
    103104// The key used to get our describe our socket in the launchd property list file.
     
    118119            break
    119120    switch (errNum) {
    120                 case noErr:
    121                         retval = 0;
    122                         break;
     121        case noErr:
     122            retval = 0;
     123            break;
    123124        case kENORSRCErr:
    124125            retval = ESRCH;                 // no ENORSRC on Mac OS X, so use ESRCH
     
    129130        CASE(EDEADLK);
    130131        CASE(EAGAIN);
    131                 case kEOPNOTSUPPErr:
    132                         retval = ENOTSUP;
    133                         break;
     132        case kEOPNOTSUPPErr:
     133            retval = ENOTSUP;
     134            break;
    134135        CASE(EPROTO);
    135136        CASE(ETIME);
     
    146147        default:
    147148            if ( (errNum <= kEPERMErr) && (errNum >= kENOMSGErr) ) {
    148                                 retval = (-3200 - errNum) + 1;                          // OT based error
     149                retval = (-3200 - errNum) + 1;              // OT based error
    149150            } else if ( (errNum >= errSecErrnoBase) && (errNum <= (errSecErrnoBase + ELAST)) ) {
    150                 retval = (int) errNum - errSecErrnoBase;        // POSIX based error
     151                retval = (int) errNum - errSecErrnoBase;    // POSIX based error
    151152            } else {
    152                                 retval = (int) errNum;                                          // just return the value unmodified
    153                         }
     153                retval = (int) errNum;                      // just return the value unmodified
     154            }
    154155    }
    155156    #undef CASE
     
    19211922    // We install the job disabled, then enable it as the last step.
    19221923
    1923     "   <key>Disabled</key>\n"
    1924     "   <true/>\n"
     1924    "   <key>Disabled</key>\n"
     1925    "   <true/>\n"
    19251926
    19261927    // Use the bundle identifier as the job label.
    19271928
    1928     "   <key>Label</key>\n"
    1929     "   <string>%s</string>\n"
     1929    "   <key>Label</key>\n"
     1930    "   <string>%s</string>\n"
    19301931
    19311932    // Use launch on demaind.
    19321933
    1933     "   <key>OnDemand</key>\n"
    1934     "   <true/>\n"
    1935 
    1936         // We don't want our helper tool to be respawned every 10 seconds
    1937         // after a faliure ... hopefully this won't ALSO prevent us from
    1938         // rerunning the helper tool without rebooting the machine
    1939 //      "       <key>LaunchOnlyOnce</key>\n"
    1940 //      "       <true/>\n"
    1941 
    1942     // There are no program arguments, other that the path to the helper tool itself.
     1934    "   <key>OnDemand</key>\n"
     1935    "   <true/>\n"
     1936
     1937    // We don't want our helper tool to be respawned every 10 seconds
     1938    // after a faliure ... hopefully this won't ALSO prevent us from
     1939    // rerunning the helper tool without rebooting the machine
     1940    "   <key>LaunchOnlyOnce</key>\n"
     1941    "   <true/>\n"
     1942
     1943    // There are no program arguments, other that the path to the helper tool itself
     1944    // but we must force it to run using the i386 binary if the Framework is
     1945    // being used as a i386 binary.
    19431946    //
    19441947    // IMPORTANT
    19451948    // kBASToolPathFormat embeds a %s
    19461949
    1947     "   <key>ProgramArguments</key>\n"
    1948     "   <array>\n"
    1949     "           <string>" kBASToolPathFormat "</string>\n"
    1950     "   </array>\n"
     1950    "   <key>ProgramArguments</key>\n"
     1951    "   <array>\n"
     1952#ifdef __i386__
     1953    "       <string>/usr/bin/arch</string>\n"
     1954    "       <string>-i386</string>\n"
     1955#endif
     1956    "       <string>" kBASToolPathFormat "</string>\n"
     1957    "   </array>\n"
    19511958
    19521959    // The tool is required to check in with launchd.
    19531960
    1954     "   <key>ServiceIPC</key>\n"
    1955     "   <true/>\n"
     1961    "   <key>ServiceIPC</key>\n"
     1962    "   <true/>\n"
    19561963
    19571964    // This specifies the UNIX domain socket used to launch the tool, including
     
    19611968    // kBASSocketPathFormat embeds a %s
    19621969
    1963     "   <key>Sockets</key>\n"
    1964     "   <dict>\n"
    1965     "           <key>" kLaunchDSocketDictKey "</key>\n"
    1966     "           <dict>\n"
    1967     "                   <key>SockFamily</key>\n"
    1968     "                   <string>Unix</string>\n"
    1969     "                   <key>SockPathMode</key>\n"
    1970     "                   <integer>438</integer>\n"
    1971     "                   <key>SockPathName</key>\n"
    1972     "                   <string>" kBASSocketPathFormat "</string>\n"
    1973     "                   <key>SockType</key>\n"
    1974     "                   <string>Stream</string>\n"
    1975     "           </dict>\n"
    1976     "   </dict>\n"
     1970    "   <key>Sockets</key>\n"
     1971    "   <dict>\n"
     1972    "       <key>" kLaunchDSocketDictKey "</key>\n"
     1973    "       <dict>\n"
     1974    "           <key>SockFamily</key>\n"
     1975    "           <string>Unix</string>\n"
     1976    "           <key>SockPathMode</key>\n"
     1977    "           <integer>438</integer>\n"
     1978    "           <key>SockPathName</key>\n"
     1979    "           <string>" kBASSocketPathFormat "</string>\n"
     1980    "           <key>SockType</key>\n"
     1981    "           <string>Stream</string>\n"
     1982    "       </dict>\n"
     1983    "   </dict>\n"
    19771984    "</dict>\n"
    19781985    "</plist>\n"
     
    24612468    return retval;
    24622469}
     2470
     2471extern void BASTerminateCommand (
     2472                           AuthorizationRef                     auth,
     2473                           const char *                         bundleID,
     2474                           const char *             installToolPath
     2475)
     2476// Terminate the HelperTool.
     2477{
     2478    // Pre-conditions
     2479   
     2480    assert(auth != NULL);
     2481    assert(bundleID != NULL);
     2482    assert(installToolPath != NULL);
     2483   
     2484    // Run the install tool as root using AuthorizationExecuteWithPrivileges.   
     2485    RunInstallToolAsRoot(auth, installToolPath, kBASInstallToolTerminateCommand, bundleID, NULL);
     2486   
     2487    return;
     2488}
     2489
  • contrib/MacPorts_Framework/BetterAuthorizationSampleLib.h

    r39766 r65491  
    739739);
    740740
     741extern void BASTerminateCommand(
     742    AuthorizationRef                    auth,
     743    const char *                                bundleID,
     744    const char *                installToolPath
     745);
     746
    741747/////////////////////////////////////////////////////////////////
    742748#pragma mark ***** Utility Routines
     
    764770    #define kBASInstallToolInstallCommand "install"
    765771    #define kBASInstallToolEnableCommand  "enable"
     772    #define kBASInstallToolTerminateCommand  "terminate"
    766773
    767774        // Magic values used to bracket the process ID returned by the install tool.
  • contrib/MacPorts_Framework/BetterAuthorizationSampleLibInstallTool.c

    r38876 r65491  
    396396}
    397397
     398static int TerminateCommand(
     399    const char                                  *bundleID
     400)
     401// Utility function to call through to RunLaunchCtl in order to terminate a job
     402// given by the path contructed from the (const char *) bundleID.
     403{
     404        int             err;
     405        char    plistPath[PATH_MAX];
     406       
     407        // Pre-condition.
     408        assert(bundleID != NULL);
     409       
     410        (void) snprintf(plistPath, sizeof(plistPath), kBASPlistPathFormat, bundleID);
     411        err = RunLaunchCtl(false, "unload", plistPath);
     412   
     413        return err;
     414}
     415
    398416int main(int argc, char **argv)
    399417{
     
    454472                                err = EINVAL;
    455473                        }
    456                 } else {
    457                         fprintf(stderr, "usage2\n");
    458                         err = EINVAL;
    459                 }
     474                } else if (strcmp(argv[1], kBASInstallToolTerminateCommand) == 0) {
     475            if (argc == 3) {
     476                                err = TerminateCommand(argv[2]);
     477                        } else {
     478                                fprintf(stderr, "usage4\n");
     479                                err = EINVAL;
     480                        }
     481        } else {
     482            fprintf(stderr, "usage2\n");
     483            err = EINVAL;
     484        }
    460485        }
    461486
  • contrib/MacPorts_Framework/Info.plist

    r39873 r65491  
    2020        <string>Randall Wood</string>
    2121        <key>CFBundleVersion</key>
    22         <string>1.0</string>
     22        <string>1.1</string>
    2323        <key>NSPrincipalClass</key>
    2424        <string></string>
     25        <key>LSMinimumSystemVersionByArchitecture</key>
     26        <dict>
     27                <key>i386</key>
     28                <string>10.4.0</string>
     29                <key>x86_64</key>
     30                <string>10.6.0</string>
     31        </dict>
    2532</dict>
    2633</plist>
  • contrib/MacPorts_Framework/MPHelperTool.m

    r39766 r65491  
    5454
    5555
    56 
    5756//According to the docs all I need is
    5857//the file descriptor that MPNotifications
     
    823822#pragma mark ***** Tool Infrastructure
    824823
    825 /*
    826  IMPORTANT
    827  ---------
    828  This array must be exactly parallel to the kMPHelperCommandSet array
    829  in "MPHelperCommon.c".
    830  */
    831824
    832825static OSStatus DoEvaluateTclString
     
    985978
    986979
     980/*
     981 IMPORTANT
     982 ---------
     983 This array must be exactly parallel to the kMPHelperCommandSet array
     984 in "MPHelperCommon.c".
     985 */
    987986static const BASCommandProc kMPHelperCommandProcs[] = {
    988987DoEvaluateTclString,   
  • contrib/MacPorts_Framework/MPInterpreter.h

    r40518 r65491  
    5353#define MPPackage                               @"macports"
    5454#define MPPackageVersion                @"1.0"
    55 #define MP_DEFAULT_PKG_PATH             @"/Library/Tcl"
    5655#define TCL_RETURN_CODE                 @"return code"
    5756#define TCL_RETURN_STRING               @"return string"
     
    8685
    8786
    88 
    89 
    90 
    9187/*!
    9288 @class MPInterpreter
     
    105101}
    106102
     103+(NSString*) PKGPath;
     104
     105+(void) setPKGPath:(NSString*)newPath;
     106
     107+(void) terminateMPHelperTool;
     108
     109+(NSTask*) task;
     110
    107111//Internal methods
    108112-(BOOL) setOptionsForNewTclPort:(NSArray *)options;
     113
     114-(BOOL) resetTclInterpreterWithPath:(NSString *)path;
    109115
    110116/*!
     
    199205- (BOOL)checkIfAuthorized;
    200206-(NSString *)evaluateStringWithMPHelperTool:(NSString *)statement error:(NSError **)mportError;
     207-(NSString *)evaluateStringWithMPPortProcess:(NSString *)statement error:(NSError **)mportError;
    201208
    202209@end
  • contrib/MacPorts_Framework/MPInterpreter.m

    r40518 r65491  
    3535
    3636#import "MPInterpreter.h"
     37#import "MPMacPorts.h"
    3738#include "BetterAuthorizationSampleLib.h"
    3839#include "MPHelperCommon.h"
    3940#include "MPHelperNotificationsProtocol.h"
    4041static AuthorizationRef internalMacPortsAuthRef;
    41 
    42 
     42static NSString* PKGPath = @"/Library/Tcl";
     43static NSTask* aTask;
    4344
    4445#pragma mark -
     
    4647@implementation MPInterpreter
    4748
    48 #pragma mark Notifications Code 
     49#pragma mark Notifications Code
    4950int Notifications_Send(int objc, Tcl_Obj *CONST objv[], int global, Tcl_Interp *interpreter) {
    5051        NSString *name;
     
    165166static NSString * tclInterpreterPkgPath = nil;
    166167
     168+(NSString*) PKGPath {
     169        return PKGPath;
     170}
     171
     172+(void) setPKGPath:(NSString*)newPath {
     173    if([PKGPath isNotEqualTo:newPath]) {
     174        [PKGPath release];
     175        PKGPath = [newPath copy];
     176        //I should check if interp is nil. *not needed now
     177        MPInterpreter *interp = (MPInterpreter*) [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"];
     178        [interp resetTclInterpreterWithPath:PKGPath];
     179    }
     180}
     181
    167182#pragma mark -
    168183#pragma mark Internal Methods
     
    185200       
    186201        if (path == nil)
    187                 path = MP_DEFAULT_PKG_PATH;
     202                path = PKGPath;
    188203       
    189204       
     
    248263       
    249264        if (tclInterpreterPkgPath == nil)
    250                 result = [self initTclInterpreter:&_interpreter withPath:MP_DEFAULT_PKG_PATH];
     265                result = [self initTclInterpreter:&_interpreter withPath:PKGPath];
    251266        else
    252267                result = [self initTclInterpreter:&_interpreter withPath:tclInterpreterPkgPath];
     
    260275}
    261276
     277-(BOOL) resetTclInterpreterWithPath:(NSString*) path {
     278    Tcl_DeleteInterp(_interpreter);
     279    return [self initTclInterpreter:&_interpreter withPath:PKGPath];
     280}
     281
    262282- (id) initWithPkgPath:(NSString *)path portOptions:(NSArray *)options {
    263283        if (self = [super init]) {
    264                
    265284                [self initTclInterpreter:&_interpreter withPath:path];
    266285               
     
    285304#pragma mark API methods
    286305- (id) init {
    287         return [self initWithPkgPath:MP_DEFAULT_PKG_PATH portOptions:nil];
     306        return [self initWithPkgPath:PKGPath portOptions:nil];
    288307}
    289308
    290309+ (MPInterpreter*)sharedInterpreterWithPkgPath:(NSString *)path {
    291         @synchronized(self) {
    292                 if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"] == nil) {
    293                         [[self alloc] initWithPkgPath:path portOptions:nil]; // assignment not done here
    294                 }
    295         }
    296         return [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"];
     310        return [self sharedInterpreterWithPkgPath:path portOptions:nil];
    297311}
    298312
    299313+ (MPInterpreter*)sharedInterpreter{
    300         return [self sharedInterpreterWithPkgPath:MP_DEFAULT_PKG_PATH];
    301 }
    302 
    303 
     314        return [self sharedInterpreterWithPkgPath:PKGPath];
     315}
    304316
    305317+ (MPInterpreter*)sharedInterpreterWithPkgPath:(NSString *)path portOptions:(NSArray *)options {
    306318        @synchronized(self) {
     319        if ([PKGPath isNotEqualTo:path]) {
     320            [self setPKGPath:path];
     321        }
     322       
    307323                if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"] == nil) {
    308324                        [[self alloc] initWithPkgPath:path portOptions:options]; // assignment not done here
     
    439455
    440456- (NSString *)evaluateStringWithPossiblePrivileges:(NSString *)statement error:(NSError **)mportError {
    441        
    442        
    443        
    444457        //N.B. I am going to insist that funciton users not pass in nil for the
    445458        //mportError parameter
    446         NSString * firstResult;
    447         NSString * secondResult;
    448        
    449         *mportError = nil;
    450         firstResult = [self evaluateStringAsString:statement error:mportError];
    451        
    452         //Because of string results of methods like mportsync (which returns the empty string)
    453         //the only way to truly check for an error is to check the mportError parameter.
    454         //If it is nil then there was no error, if not we re-evaluate with privileges using
    455         //the helper tool
    456        
    457         if ( *mportError != nil) {
    458                 *mportError = nil;
    459                 secondResult = [self evaluateStringWithMPHelperTool:statement error:mportError];
    460                
    461                 return secondResult;
    462         }
    463        
    464         return firstResult;
     459        NSString * result;
     460       
     461    [[MPNotifications sharedListener]
     462     sendIPCNotification:@"MPInfoNotification_&MP&_stdout_&MP&_None_&MP&_Starting up"];
     463   
     464    // Is this the best way to know if the running user can use macports without privileges?
     465    if ([[NSFileManager defaultManager] isWritableFileAtPath:PKGPath]) {
     466        result = [self evaluateStringWithMPPortProcess:statement error:mportError];
     467    } else {
     468        result = [self evaluateStringWithMPHelperTool:statement error:mportError];
     469    }
     470
     471    [[MPNotifications sharedListener]
     472     sendIPCNotification:@"MPInfoNotification_&MP&_stdout_&MP&_None_&MP&_Shutting down"];
     473   
     474        return result;
    465475}
    466476
     
    584594                //a noErr then response dictionary cannot be nil since everything went ok.
    585595                //Hence I'm only checking for errors WITHIN the following blocks ...
    586                 if (err == noErr) {
    587                         err = BASExecuteRequestInHelperTool(internalMacPortsAuthRef,
    588                                                                                                 kMPHelperCommandSet,
    589                                                                                                 (CFStringRef) bundleID,
    590                                                                                                 (CFDictionaryRef) request,
    591                                                                                                 &response);
    592                         if (err == noErr){// retrieve result here if available
    593                                 if( response != NULL)
    594                                         result = (NSString *) (CFStringRef) CFDictionaryGetValue(response, CFSTR(kTclStringEvaluationResult));
    595                         }
    596                         else { //If we executed unsuccessfully
    597                                 if (mportError != NULL) {
    598                                         NSError * undError = [[[NSError alloc] initWithDomain:NSOSStatusErrorDomain
    599                                                                                                                                          code:err
    600                                                                                                                                  userInfo:[NSDictionary dictionaryWithObjectsAndKeys:
    601                                                                                                                                                    NSLocalizedString(@"Check error code for OSStatus returned",@""),
    602                                                                                                                                                    NSLocalizedDescriptionKey,
    603                                                                                                                                                    nil]] autorelease];
    604                                        
    605                                         *mportError = [[[NSError alloc] initWithDomain:MPFrameworkErrorDomain
    606                                                                                                                           code:MPHELPINSTFAILED
    607                                                                                                                   userInfo:[NSDictionary dictionaryWithObjectsAndKeys:
    608                                                                                                                                         NSLocalizedString(@"Unable to execute MPHelperTool successfuly", @""),
    609                                                                                                                                         NSLocalizedDescriptionKey,
    610                                                                                                                                         undError, NSUnderlyingErrorKey,
    611                                                                                                                                         NSLocalizedString(@"BASExecuteRequestInHelperTool execution failed", @""),
    612                                                                                                                                         NSLocalizedFailureReasonErrorKey,
    613                                                                                                                                         nil]] autorelease];
    614                                 }
    615                         }
    616                 }
    617                 else {//This means FixFaliure failed ... Report that in returned error
     596        //
     597        // NOTE: We don't automatically retry as the user wants to have a consistent cancel
     598        //      action (i.e. terminate the process when he wants to)
     599                if (err != noErr) {//This means FixFaliure failed ... Report that in returned error
    618600                        if (mportError != NULL) {
    619601                                //I'm not sure of exactly how to report this error ...
     
    644626}
    645627
     628- (NSString *) evaluateStringWithMPPortProcess:(NSString *) statement error:(NSError **)mportError {
     629    aTask = [[NSTask alloc] init];
     630    NSMutableArray *args = [NSMutableArray array];
     631   
     632    /* set arguments */
     633    [args addObject:PKGPath];
     634    [aTask setCurrentDirectoryPath:[[NSBundle bundleForClass:[self class]] resourcePath]];
     635    [aTask setLaunchPath:[[NSBundle bundleForClass:[self class]] pathForResource:@"MPPortProcess" ofType:@""]];
     636    [aTask setArguments:args];
     637    [aTask launch];
     638   
     639    NSConnection *notificationsConnection = [NSConnection defaultConnection];
     640    // Vending MPNotifications sharedListener
     641    [notificationsConnection setRootObject:[MPNotifications sharedListener]];
     642   
     643    // Register the named connection
     644    if ( [notificationsConnection registerName:@"MPNotifications"] ) {
     645        NSLog( @"Successfully registered connection with port %@",
     646              [[notificationsConnection receivePort] description] );
     647    } else {
     648        NSLog( @"Name used by %@",
     649              [[[NSPortNameServer systemDefaultPortNameServer] portForName:@"MPNotifications"] description] );
     650    }
     651   
     652   
     653    id theProxy;
     654    do {
     655        theProxy = [NSConnection
     656                       rootProxyForConnectionWithRegisteredName:@"MPPortProcess"
     657                       host:nil];
     658    }
     659    while (theProxy == nil);
     660   
     661    [theProxy evaluateString:statement];
     662    [aTask waitUntilExit];
     663   
     664    int status = [aTask terminationStatus];
     665   
     666    if (status != TCL_OK) {
     667        NSLog(@"Task failed. Code: %i", status);
     668    }
     669    [[notificationsConnection receivePort] invalidate];
     670   
     671    return nil;
     672}
     673
     674+ (NSTask*) task {
     675    return aTask;
     676}
     677
     678+ (void) terminateMPHelperTool {
     679    NSString *      bundleID;
     680
     681    //In order to make the framework work normally by default ... we do a bare initialization
     682    //of internalMacPortsAuthRef if the delegate hasn't iniitialzed it already
     683    if (internalMacPortsAuthRef == NULL) {
     684        OSStatus res = AuthorizationCreate (NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &internalMacPortsAuthRef);
     685        assert(res == noErr);
     686    }
     687
     688    NSBundle * mpBundle = [NSBundle bundleForClass:[self class]];
     689    NSString * installToolPath = [mpBundle pathForResource:@"MPHelperInstallTool" ofType:nil];
     690    bundleID = [mpBundle bundleIdentifier];
     691
     692    BASSetDefaultRules(internalMacPortsAuthRef,
     693                        kMPHelperCommandSet,
     694                        (CFStringRef) bundleID,
     695                        NULL);
     696    BASTerminateCommand(internalMacPortsAuthRef,
     697                        [bundleID UTF8String],
     698                        [installToolPath UTF8String]);
     699    return;
     700}
    646701
    647702#pragma mark -
  • contrib/MacPorts_Framework/MPMacPorts.h

    r40518 r65491  
    7777}
    7878
     79+ (NSString*) PKGPath;
     80
     81+ (void) setPKGPath:(NSString*)newPath;
     82
    7983/*!
    8084 @brief Returns an MPMacPorts object that represents the MacPorts system on user's machine.
     
    8286+ (MPMacPorts *)sharedInstance;
    8387
    84 + (MPMacPorts *)sharedInstanceWithPortOptions:(NSArray *)options;
    85 
    86 //Names of messages below are subject to change
    87 + (MPMacPorts *)sharedInstanceWithPkgPath:(NSString *)path;
    8888+ (MPMacPorts *)sharedInstanceWithPkgPath:(NSString *)path portOptions:(NSArray *)options;
    8989- (id) initWithPkgPath:(NSString *)path portOptions:(NSArray *)options;
     
    222222-(BOOL) authorizationMode;
    223223
     224- (void) cancelCurrentCommand;
    224225
    225226//Notifications stuff for private use and testing purposes
  • contrib/MacPorts_Framework/MPMacPorts.m

    r40518 r65491  
    4040@implementation MPMacPorts
    4141
    42 
    4342- (id) init {
    44         return [self initWithPkgPath:MP_DEFAULT_PKG_PATH portOptions:nil];
    45 }
    46 
     43        return [self initWithPkgPath:[MPInterpreter PKGPath] portOptions:nil];
     44}
    4745
    4846- (id) initWithPkgPath:(NSString *)path portOptions:(NSArray *)options {
     
    5452}
    5553
     54+(NSString*) PKGPath {
     55        return [MPInterpreter PKGPath];
     56}
     57
     58+(void) setPKGPath:(NSString*)newPath {
     59    [MPInterpreter setPKGPath:newPath];
     60}
     61
     62- (void) cancelCurrentCommand {
     63    if ([[NSFileManager defaultManager] isWritableFileAtPath:[MPInterpreter PKGPath]]) {
     64        NSLog(@"Terminating MPPortProcess");
     65        NSTask *task = [MPInterpreter task];
     66        if(task != nil && [task isRunning]) {
     67            [task terminate];
     68        }
     69    } else {
     70        NSLog(@"Terminating MPHelperTool");
     71        [MPInterpreter terminateMPHelperTool];
     72    }
     73}
     74
    5675+ (MPMacPorts *)sharedInstance {
    57         return [self sharedInstanceWithPkgPath:MP_DEFAULT_PKG_PATH];
    58 }
    59 
    60 + (MPMacPorts *)sharedInstanceWithPortOptions:(NSArray *)options {
    61         return [self sharedInstanceWithPkgPath:MP_DEFAULT_PKG_PATH portOptions:options];
     76        return [self sharedInstanceWithPkgPath:[MPInterpreter PKGPath] portOptions:nil];
    6277}
    6378
    6479+ (MPMacPorts *)sharedInstanceWithPkgPath:(NSString *)path portOptions:(NSArray *)options {
    6580        @synchronized(self) {
     81                if ([path isEqual:nil]) {
     82                        path = [MPInterpreter PKGPath];
     83                }
     84                if ([[MPInterpreter PKGPath] isNotEqualTo:path]) {
     85            [self setPKGPath:path];
     86        }
     87               
    6688                if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPMacPorts"] == nil) {
    6789                        [[self alloc] initWithPkgPath:path portOptions:options ]; // assignment not done here
    68                 }
    69         }
    70         return [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPMacPorts"];
    71 }
    72 
    73 + (MPMacPorts *)sharedInstanceWithPkgPath:(NSString *)path {
    74         @synchronized(self) {
    75                 if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPMacPorts"] == nil) {
    76                         [[self alloc] initWithPkgPath:path portOptions:nil ]; // assignment not done here
    7790                }
    7891        }
  • contrib/MacPorts_Framework/MPMacPortsTest.m

    r39048 r65491  
    6666//Ask Randall about what exactly port tree path is
    6767-(void) testPathToPortIndex {
    68         NSURL *pindex = [testPort pathToPortIndex:@"file:///Users/Armahg/macportsbuild/build1/"];
     68        NSURL *pindex = [testPort pathToPortIndex:@"file:///Users/juanger/local/macportsbuild/branch-unprivileged/"];
    6969        STAssertNotNil(pindex, @"URL for port index should not be nil");
    7070}
     
    7575}
    7676
     77-(void) testPKGPathChange {
     78    NSString *newPkgPath = @"/Users/juanger/local/macportsbuild/branch-unprivileged/Library/Tcl";
    7779
     80    STAssertEqualObjects([MPInterpreter PKGPath], @"/Library/Tcl", @"Initialy, the PKGPath should be /Library/Tcl");
     81
     82    [MPMacPorts sharedInstanceWithPkgPath:newPkgPath portOptions:nil];
     83    STAssertEqualObjects([MPInterpreter PKGPath], newPkgPath, @"The global PKGPath should change as needed");
     84}
    7885/*-(void) testSync {
    7986        NSError * syncError = nil;
  • contrib/MacPorts_Framework/MPPort.h

    r39735 r65491  
    141141- (void)deactivateWithVersion:(NSString *)version error:(NSError**)mpError;
    142142
     143/*!
     144 @brief Upgrades an outdated MPPort.
     145 @discussion Only installed and active ports
     146 should be upgraded
     147 */
     148- (void)upgradeWithError:(NSError**)mpError;
     149
    143150
    144151/*!
     
    291298//Even more generic method to execute a Tcl command with any given number of args
    292299- (void)execPortProc:(NSString *)procedure withParams:(NSArray *)params error:(NSError **)execError;
     300
    293301@end
  • contrib/MacPorts_Framework/MPPort.m

    r40216 r65491  
    9999                [self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"categories"]] forKey:@"categories"];
    100100        }
     101        if ([self objectForKey:@"variants"] != nil) {
     102                [self setObject:[self objectForKey:@"variants"] forKey:@"variantsAsString"];
     103                [self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"variants"]] forKey:@"variants"];
     104        }
    101105        if ([self objectForKey:@"depends_build"] != nil) {
    102106                [self setObject:[self objectForKey:@"depends_build"] forKey:@"depends_buildAsString"];
     
    116120       
    117121        @try {
    118                 if ([[self valueForKey:@"long_description"] characterAtIndex:0] == '{') {
    119                         [self setValue:[self valueForKey:@"description"] forKey:@"long_description"];
     122                if ([[self valueForKey:@"description"] characterAtIndex:0] == '{') {
     123                        [self setValue:[self valueForKey:@"description"] forKey:@"description"];
    120124                }
    121125        }
     
    125129                                                                                                                  @"Localizable",
    126130                                                                                                                  [NSBundle mainBundle],
    127                                                                                                                   @"Port has an invalid desciption or long_description key.",
     131                                                                                                                  @"Port has an invalid desciption key.",
     132                                                                                                                  @"Error statement for exception raised when testing description.")]
     133                                forKey:@"description"];
     134        }
     135       
     136        @try {
     137                if ([[self valueForKey:@"long_description"] characterAtIndex:0] == '{') {
     138                        [self setValue:[self valueForKey:@"long_description"] forKey:@"long_description"];
     139                }
     140        }
     141        @catch (NSException *e) {
     142                [self setValue:[NSString stringWithFormat:
     143                                                NSLocalizedStringWithDefaultValue(@"setPortWithTclListAsStringDescreiptionError",
     144                                                                                                                  @"Localizable",
     145                                                                                                                  [NSBundle mainBundle],
     146                                                                                                                  @"Port has an invalid long_description key.",
    128147                                                                                                                  @"Error statement for exception raised when testing long_description.")]
    129148                                forKey:@"long_description"];
     
    212231                                                                                                        error:execError];               
    213232        }
    214        
     233    // I must get the new state of the port from the registry
     234        // instead of just [self setState:MPPortStateLearnState];
     235    //NSArray *receipts  = [[[MPRegistry sharedRegistry] installed:[self name]] objectForKey:[self name]];
     236    //[self setStateFromReceipts:receipts];
     237    [self removeObjectForKey:@"receipts"];
     238    [self setState:MPPortStateLearnState];
     239   
    215240        [[MPNotifications sharedListener] setPerformingTclCommand:@""];
    216241        [self sendGlobalExecNotification:procedure withStatus:@"Finished"];
     
    242267        [[MPNotifications sharedListener] setPerformingTclCommand:target];
    243268       
    244         if ([parentMacPortsInstance authorizationMode]) {
    245                 [interpreter evaluateStringWithMPHelperTool:
    246                  [NSString stringWithFormat:
    247                   @"set portHandle [mportopen  %@  %@  %@]; mportexec  $portHandle %@; mportclose $portHandle",
    248                   [self valueForKey:@"porturl"], opts, vrnts, target]
    249                                                                                                 error:execError];
    250         }
    251         else {
    252                 [interpreter evaluateStringWithPossiblePrivileges:
    253                  [NSString stringWithFormat:
    254                   @"set portHandle [mportopen  %@  %@  %@]; mportexec  $portHandle %@; mportclose $portHandle",
    255                   [self valueForKey:@"porturl"], opts, vrnts, target]
    256                                                                                                         error:execError];
    257         }
    258        
    259        
    260        
     269    [interpreter evaluateStringWithPossiblePrivileges:
     270        [NSString stringWithFormat:
     271            @"set portHandle [mportopen  %@  %@  %@]; mportexec  $portHandle %@; mportclose $portHandle",
     272            [self valueForKey:@"porturl"], opts, vrnts, target]
     273        error:execError];
     274       
     275       
     276        [self setState:MPPortStateLearnState];
    261277        [[MPNotifications sharedListener] setPerformingTclCommand:@""];
    262278        [self sendGlobalExecNotification:target withStatus:@"Finished"];
     
    332348}
    333349
     350- (void)upgradeWithError:(NSError **)mError {
     351        [self execPortProc:@"mportupgrade" withOptions:nil version:@"" error:mError];
     352}
     353
    334354-(void)configureWithOptions:(NSArray *)options variants:(NSArray *)variants error:(NSError **)mError {
    335355        [self exec:@"configure" withOptions:options variants:variants error:mError];
     
    384404}
    385405
     406
    386407# pragma mark -
    387408
     
    391412- (id)objectForKey:(id)aKey {
    392413        if ([aKey isEqualToString:@"receipts"] && ![super objectForKey:aKey]) {
    393                 [self setObject:[[[MPRegistry sharedRegistry] installed:[self objectForKey:@"name"]] objectForKey:[self objectForKey:@"name"]]forKey:aKey];
     414        NSArray *receipts = [[[MPRegistry sharedRegistry] installed:[self objectForKey:@"name"]] objectForKey:[self objectForKey:@"name"]];
     415        if (receipts == nil) {
     416            return nil;
     417        } else {
     418            [self setObject:receipts forKey:aKey];
     419        }
    394420        }
    395421        return [super objectForKey:aKey];
     
    437463
    438464- (void)setStateFromReceipts:(NSArray *)receipts {
    439         [self setObject:receipts forKey:@"receipts"];
     465    [self setObject:receipts forKey:@"receipts"];
    440466        [self setState:MPPortStateLearnState];
    441467}
  • contrib/MacPorts_Framework/MPPortManipulationTest.m

    r39374 r65491  
    1919        BOOL ret = NO;
    2020       
     21        MPMacPorts * port = [MPMacPorts sharedInstanceWithPkgPath:@"/Users/juanger/Projects/gsoc09-gui/MPGUI/build/Debug-InstallMacPorts/macports-1.8/Library/Tcl"
     22                                                portOptions:nil];
     23        NSLog(@"PkgPath1:  %@", [MPInterpreter PKGPath]);
    2124        MPRegistry * registry = [MPRegistry sharedRegistry];
    22         MPMacPorts * port = [MPMacPorts sharedInstance];
    23        
     25        NSLog(@"PkgPath2:  %@", [MPInterpreter PKGPath]);
    2426        // Check if portName is installed
    2527        unsigned int installed = [[registry installed:portName] count];
     
    4244                        return ret;
    4345                }
    44                
     46                NSLog(@"Uninstallation Successful.");
    4547                //Uninstallation was successful ... now check registry to make sure its gone
    4648                installed = [[registry installed:portName] count];
     
    6870                        return ret;
    6971                }
    70                
     72                NSLog(@"Installation successful");
    7173                //Installation was successful ... now check registry to make sure its gone
    7274                installed = [[registry installed:portName] count];
     75        NSLog(@"%@", [registry installed]);
     76       
    7377                if (installed == 0) { //Uh oh ... is this suppose to happen?
    7478                        NSLog(@"%@ is not installed after successful install operation ... double check this from commandline", portName);
     
    120124//             
    121125//             
    122 //      }
     126//      }       
    123127//     
    124128//      //Double check somehow
    125129//      MPRegistry * registry = [MPRegistry sharedRegistry];
    126130//      NSLog(@"\n\n Result from registry is %@ \n\n", [registry installed:[keyArray objectAtIndex:0]]);
    127        
     131
    128132        PortManipulator * pm = [[PortManipulator alloc] init];
    129133        STAssertTrue([pm installUninstallManipulation:@"pngcrush"] , @"This test should always return true on success");
    130134        [pm release];
     135   
    131136}
    132137
  • contrib/MacPorts_Framework/MPRegistry.h

    r38424 r65491  
    6161
    6262/*
    63  @brief Calls [self installed:name version:@""]
     63 @brief Calls [self installed:name withVersion:@""]
    6464 @param name Text to match the port name
    6565 */
  • contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj

    • Property svn:ignore
      •  

        old new  
        11*.mode1
         2*.mode1v3
        23*.pbxuser
  • contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj

    r40518 r65491  
    2222
    2323/* Begin PBXBuildFile section */
     24                2160109C1094C66300EE9CD0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED12AA60E3E7E900026773D /* Cocoa.framework */; };
     25                2160109F1094C6ED00EE9CD0 /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA0F56E0DFEB55E00C15082 /* Tcl.framework */; };
     26                216010A21094C6FD00EE9CD0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECD970D0E465C7800488335 /* Security.framework */; };
     27                216010A31094C6FD00EE9CD0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECD970D0E465C7800488335 /* Security.framework */; };
     28                216010C51094D34500EE9CD0 /* MPRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 48F811BE0CE4636A009630DE /* MPRegistry.h */; settings = {ATTRIBUTES = (Public, ); }; };
     29                216010C61094D34500EE9CD0 /* MPInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 48906AFB0C4230B700A3ED8A /* MPInterpreter.h */; settings = {ATTRIBUTES = (Public, ); }; };
     30                216010C71094D34500EE9CD0 /* MacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E9925B0C82C45800219DDF /* MacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
     31                216010C81094D34500EE9CD0 /* MPMacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E993920C82CAAE00219DDF /* MPMacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
     32                216010C91094D34500EE9CD0 /* MPIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 487679530C98C2EB00577C59 /* MPIndex.h */; settings = {ATTRIBUTES = (Public, ); }; };
     33                216010CA1094D34500EE9CD0 /* MPPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 487679670C98C55E00577C59 /* MPPort.h */; settings = {ATTRIBUTES = (Public, ); }; };
     34                216010CB1094D34500EE9CD0 /* MPReceipt.h in Headers */ = {isa = PBXBuildFile; fileRef = 48A866A80CD364F700B521BC /* MPReceipt.h */; settings = {ATTRIBUTES = (Public, ); }; };
     35                216010CC1094D34500EE9CD0 /* MPMutableDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 481D04A00CDAAAFC00D4A550 /* MPMutableDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
     36                216010CD1094D34500EE9CD0 /* MPNotifications.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E270D070E158CED00BAE687 /* MPNotifications.h */; settings = {ATTRIBUTES = (Public, ); }; };
     37                216010CE1094D34500EE9CD0 /* BetterAuthorizationSampleLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EC260710E426FC80013BC48 /* BetterAuthorizationSampleLib.h */; };
     38                216010CF1094D34500EE9CD0 /* MPHelperCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EC260950E4272D20013BC48 /* MPHelperCommon.h */; };
     39                216010D01094D34500EE9CD0 /* MPHelperNotificationsCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8563B60E5DDF7000C1D73C /* MPHelperNotificationsCommon.h */; };
     40                216010D11094D34500EE9CD0 /* MPHelperNotificationsProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8563B70E5DDF7000C1D73C /* MPHelperNotificationsProtocol.h */; };
     41                216010D21094D34500EE9CD0 /* MPNotifications+IPCAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE6DDCC0E6276AA00FB2115 /* MPNotifications+IPCAdditions.h */; };
     42                216010D41094D34500EE9CD0 /* MPHelperInstallTool in Resources */ = {isa = PBXBuildFile; fileRef = 6EC260870E426FF10013BC48 /* MPHelperInstallTool */; };
     43                216010D51094D34500EE9CD0 /* MPPortProcess in Resources */ = {isa = PBXBuildFile; fileRef = 21D9543E100940EE00DEF58A /* MPPortProcess */; };
     44                216010D61094D34500EE9CD0 /* MPHelperTool in Resources */ = {isa = PBXBuildFile; fileRef = 6ED12A4A0E3E552F0026773D /* MPHelperTool */; };
     45                216010D71094D34500EE9CD0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
     46                216010D81094D34500EE9CD0 /* init.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 48E9939E0C82CEB000219DDF /* init.tcl */; };
     47                216010D91094D34500EE9CD0 /* ToDo.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6E44A00C0E2DAD66007DE8EC /* ToDo.txt */; };
     48                216010DA1094D34500EE9CD0 /* interpInit.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 6EE93E660E493AC600AECE9E /* interpInit.tcl */; };
     49                216010DB1094D34500EE9CD0 /* portProcessInit.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 21D954711009475200DEF58A /* portProcessInit.tcl */; };
     50                216010DD1094D34500EE9CD0 /* MPInterpreter.m in Sources */ = {isa = PBXBuildFile; fileRef = 48906AFC0C4230B700A3ED8A /* MPInterpreter.m */; };
     51                216010DE1094D34500EE9CD0 /* MPMacPorts.m in Sources */ = {isa = PBXBuildFile; fileRef = 48E993930C82CAAE00219DDF /* MPMacPorts.m */; };
     52                216010DF1094D34500EE9CD0 /* MPIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = 487679540C98C2EB00577C59 /* MPIndex.m */; };
     53                216010E01094D34500EE9CD0 /* MPPort.m in Sources */ = {isa = PBXBuildFile; fileRef = 487679680C98C55E00577C59 /* MPPort.m */; };
     54                216010E11094D34500EE9CD0 /* MPReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 48A866A90CD364F700B521BC /* MPReceipt.m */; };
     55                216010E21094D34500EE9CD0 /* MPMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 481D04A10CDAAAFD00D4A550 /* MPMutableDictionary.m */; };
     56                216010E31094D34500EE9CD0 /* MPRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 48F811BF0CE4638C009630DE /* MPRegistry.m */; };
     57                216010E41094D34500EE9CD0 /* MPNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E270D080E158CED00BAE687 /* MPNotifications.m */; };
     58                216010E51094D34500EE9CD0 /* BetterAuthorizationSampleLib.c in Sources */ = {isa = PBXBuildFile; fileRef = 6EC260700E426FC80013BC48 /* BetterAuthorizationSampleLib.c */; };
     59                216010E61094D34500EE9CD0 /* MPHelperCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 6EC260960E4272D20013BC48 /* MPHelperCommon.c */; };
     60                216010E71094D34500EE9CD0 /* MPHelperNotificationsCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 6E8563B50E5DDF7000C1D73C /* MPHelperNotificationsCommon.c */; };
     61                216010E81094D34500EE9CD0 /* MPNotifications+IPCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE6DDCD0E6276AA00FB2115 /* MPNotifications+IPCAdditions.m */; };
     62                216010EA1094D34500EE9CD0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED12AA60E3E7E900026773D /* Cocoa.framework */; };
     63                216010EB1094D34500EE9CD0 /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA0F56E0DFEB55E00C15082 /* Tcl.framework */; };
     64                216010EC1094D34500EE9CD0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECD970D0E465C7800488335 /* Security.framework */; };
     65                218DEE2610162091003B5A3B /* SimpleLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 218DED83101612F1003B5A3B /* SimpleLog.m */; };
     66                21D95442100940FF00DEF58A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EB6FC900E45DEA80057962C /* Foundation.framework */; };
     67                21D954431009411400DEF58A /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA0F56E0DFEB55E00C15082 /* Tcl.framework */; };
     68                21D954471009412F00DEF58A /* MPPortProcess.m in Sources */ = {isa = PBXBuildFile; fileRef = 21D954461009412F00DEF58A /* MPPortProcess.m */; };
     69                21D954721009475200DEF58A /* portProcessInit.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 21D954711009475200DEF58A /* portProcessInit.tcl */; };
     70                21D9548C1009522100DEF58A /* MPPortProcess in Resources */ = {isa = PBXBuildFile; fileRef = 21D9543E100940EE00DEF58A /* MPPortProcess */; };
     71                21F6DD701017E38E00FC43DE /* SimpleLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 218DED82101612F1003B5A3B /* SimpleLog.h */; };
    2472                481D04A20CDAAAFD00D4A550 /* MPMutableDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 481D04A00CDAAAFC00D4A550 /* MPMutableDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
    2573                481D04A30CDAAAFD00D4A550 /* MPMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 481D04A10CDAAAFD00D4A550 /* MPMutableDictionary.m */; };
     
    3583                48A866AB0CD364F700B521BC /* MPReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 48A866A90CD364F700B521BC /* MPReceipt.m */; };
    3684                48E9925C0C82C45800219DDF /* MacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E9925B0C82C45800219DDF /* MacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
    37                 48E992980C82C98C00219DDF /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48E992970C82C98C00219DDF /* Tcl.framework */; };
    3885                48E993940C82CAAE00219DDF /* MPMacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E993920C82CAAE00219DDF /* MPMacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
    3986                48E993950C82CAAE00219DDF /* MPMacPorts.m in Sources */ = {isa = PBXBuildFile; fileRef = 48E993930C82CAAE00219DDF /* MPMacPorts.m */; };
     
    67114                6ECD98110E484E8400488335 /* MPHelperTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ECD98100E484E8400488335 /* MPHelperTool.m */; };
    68115                6ECD99C60E48B91B00488335 /* MPHelperToolTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ECD99C50E48B91B00488335 /* MPHelperToolTest.m */; };
    69                 6ED12A550E3E55DF0026773D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED12A540E3E55DF0026773D /* Security.framework */; };
    70                 6ED12A560E3E55DF0026773D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED12A540E3E55DF0026773D /* Security.framework */; };
    71116                6ED12AF10E3E9E210026773D /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA0F56E0DFEB55E00C15082 /* Tcl.framework */; };
    72117                6EE6DDA40E626D4A00FB2115 /* MacPorts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* MacPorts.framework */; };
     
    78123                6EE93FAB0E495C2200AECE9E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECD970D0E465C7800488335 /* Security.framework */; };
    79124                8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
    80                 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
    81125/* End PBXBuildFile section */
    82126
    83127/* Begin PBXContainerItemProxy section */
     128                216010BF1094D34500EE9CD0 /* PBXContainerItemProxy */ = {
     129                        isa = PBXContainerItemProxy;
     130                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     131                        proxyType = 1;
     132                        remoteGlobalIDString = 6ED12A490E3E552F0026773D;
     133                        remoteInfo = MPHelperTool;
     134                };
     135                216010C11094D34500EE9CD0 /* PBXContainerItemProxy */ = {
     136                        isa = PBXContainerItemProxy;
     137                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     138                        proxyType = 1;
     139                        remoteGlobalIDString = 6EC260860E426FF10013BC48;
     140                        remoteInfo = MPHelperInstallTool;
     141                };
     142                216010C31094D34500EE9CD0 /* PBXContainerItemProxy */ = {
     143                        isa = PBXContainerItemProxy;
     144                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     145                        proxyType = 1;
     146                        remoteGlobalIDString = 21D9543D100940EE00DEF58A;
     147                        remoteInfo = MPPortProcess;
     148                };
     149                21D9544B1009416100DEF58A /* PBXContainerItemProxy */ = {
     150                        isa = PBXContainerItemProxy;
     151                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     152                        proxyType = 1;
     153                        remoteGlobalIDString = 21D9543D100940EE00DEF58A;
     154                        remoteInfo = MPPortProcess;
     155                };
    84156                6E1AE8460E232D0700F6D7BC /* PBXContainerItemProxy */ = {
    85157                        isa = PBXContainerItemProxy;
     
    113185
    114186/* Begin PBXFileReference section */
    115                 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
    116187                089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
    117                 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
     188                21067BB50FE5B25800CAD732 /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
     189                216010F21094D34500EE9CD0 /* MacPorts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MacPorts.framework; sourceTree = BUILT_PRODUCTS_DIR; };
     190                218DED82101612F1003B5A3B /* SimpleLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLog.h; sourceTree = "<group>"; };
     191                218DED83101612F1003B5A3B /* SimpleLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleLog.m; sourceTree = "<group>"; };
     192                21D9543E100940EE00DEF58A /* MPPortProcess */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MPPortProcess; sourceTree = BUILT_PRODUCTS_DIR; };
     193                21D954461009412F00DEF58A /* MPPortProcess.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPortProcess.m; sourceTree = "<group>"; };
     194                21D954491009413800DEF58A /* MPPortProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPortProcess.h; sourceTree = "<group>"; };
     195                21D954711009475200DEF58A /* portProcessInit.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = portProcessInit.tcl; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; };
    118196                32DBCF5E0370ADEE00C91783 /* MacPorts.Framework_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacPorts.Framework_Prefix.pch; sourceTree = "<group>"; };
    119197                481D04A00CDAAAFC00D4A550 /* MPMutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MPMutableDictionary.h; sourceTree = "<group>"; };
     
    135213                48A866A90CD364F700B521BC /* MPReceipt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPReceipt.m; sourceTree = "<group>"; };
    136214                48E9925B0C82C45800219DDF /* MacPorts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacPorts.h; sourceTree = "<group>"; };
    137                 48E992970C82C98C00219DDF /* Tcl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tcl.framework; path = /System/Library/Frameworks/Tcl.framework; sourceTree = "<absolute>"; };
    138215                48E993920C82CAAE00219DDF /* MPMacPorts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMacPorts.h; sourceTree = "<group>"; };
    139216                48E993930C82CAAE00219DDF /* MPMacPorts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMacPorts.m; sourceTree = "<group>"; };
    140                 48E9939E0C82CEB000219DDF /* init.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = init.tcl; sourceTree = "<group>"; };
     217                48E9939E0C82CEB000219DDF /* init.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = init.tcl; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; };
    141218                48F811BE0CE4636A009630DE /* MPRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRegistry.h; sourceTree = "<group>"; };
    142219                48F811BF0CE4638C009630DE /* MPRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRegistry.m; sourceTree = "<group>"; };
     
    165242                6ECD99C50E48B91B00488335 /* MPHelperToolTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHelperToolTest.m; sourceTree = "<group>"; };
    166243                6ED12A4A0E3E552F0026773D /* MPHelperTool */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MPHelperTool; sourceTree = BUILT_PRODUCTS_DIR; };
    167                 6ED12A540E3E55DF0026773D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
    168244                6ED12AA60E3E7E900026773D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
    169245                6EE6DD9E0E626D2800FB2115 /* MPHelperToolIPCTester */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MPHelperToolIPCTester; sourceTree = BUILT_PRODUCTS_DIR; };
     
    171247                6EE6DDCC0E6276AA00FB2115 /* MPNotifications+IPCAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPNotifications+IPCAdditions.h"; sourceTree = "<group>"; };
    172248                6EE6DDCD0E6276AA00FB2115 /* MPNotifications+IPCAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPNotifications+IPCAdditions.m"; sourceTree = "<group>"; };
    173                 6EE93E660E493AC600AECE9E /* interpInit.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = interpInit.tcl; sourceTree = "<group>"; };
    174                 6EE93E780E495B3100AECE9E /* Tcl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tcl.framework; path = Library/Frameworks/Tcl.framework; sourceTree = SDKROOT; };
     249                6EE93E660E493AC600AECE9E /* interpInit.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = interpInit.tcl; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; };
    175250                8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
    176251                8DC2EF5B0486A6940098B216 /* MacPorts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MacPorts.framework; sourceTree = BUILT_PRODUCTS_DIR; };
     
    178253
    179254/* Begin PBXFrameworksBuildPhase section */
     255                216010E91094D34500EE9CD0 /* Frameworks */ = {
     256                        isa = PBXFrameworksBuildPhase;
     257                        buildActionMask = 2147483647;
     258                        files = (
     259                                216010EA1094D34500EE9CD0 /* Cocoa.framework in Frameworks */,
     260                                216010EB1094D34500EE9CD0 /* Tcl.framework in Frameworks */,
     261                                216010EC1094D34500EE9CD0 /* Security.framework in Frameworks */,
     262                        );
     263                        runOnlyForDeploymentPostprocessing = 0;
     264                };
     265                21D9543C100940EE00DEF58A /* Frameworks */ = {
     266                        isa = PBXFrameworksBuildPhase;
     267                        buildActionMask = 2147483647;
     268                        files = (
     269                                21D95442100940FF00DEF58A /* Foundation.framework in Frameworks */,
     270                                21D954431009411400DEF58A /* Tcl.framework in Frameworks */,
     271                        );
     272                        runOnlyForDeploymentPostprocessing = 0;
     273                };
    180274                489DD8F10C94365F00595506 /* Frameworks */ = {
    181275                        isa = PBXFrameworksBuildPhase;
     
    198292                        buildActionMask = 2147483647;
    199293                        files = (
    200                                 6ED12A550E3E55DF0026773D /* Security.framework in Frameworks */,
    201294                                6ED12AF10E3E9E210026773D /* Tcl.framework in Frameworks */,
    202295                                6EC2609E0E42950C0013BC48 /* CoreFoundation.framework in Frameworks */,
    203296                                6EB6FC910E45DEA80057962C /* Foundation.framework in Frameworks */,
     297                                216010A31094C6FD00EE9CD0 /* Security.framework in Frameworks */,
    204298                        );
    205299                        runOnlyForDeploymentPostprocessing = 0;
     
    218312                        buildActionMask = 2147483647;
    219313                        files = (
    220                                 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,
    221                                 48E992980C82C98C00219DDF /* Tcl.framework in Frameworks */,
    222                                 6ED12A560E3E55DF0026773D /* Security.framework in Frameworks */,
     314                                2160109C1094C66300EE9CD0 /* Cocoa.framework in Frameworks */,
     315                                2160109F1094C6ED00EE9CD0 /* Tcl.framework in Frameworks */,
     316                                216010A21094C6FD00EE9CD0 /* Security.framework in Frameworks */,
    223317                        );
    224318                        runOnlyForDeploymentPostprocessing = 0;
     
    235329                                6EC260870E426FF10013BC48 /* MPHelperInstallTool */,
    236330                                6EE6DD9E0E626D2800FB2115 /* MPHelperToolIPCTester */,
     331                                21D9543E100940EE00DEF58A /* MPPortProcess */,
     332                                216010F21094D34500EE9CD0 /* MacPorts.framework */,
    237333                        );
    238334                        name = Products;
     
    242338                        isa = PBXGroup;
    243339                        children = (
     340                                21D954381009409E00DEF58A /* MPPortProcess */,
    244341                                6EE6DDA80E626D8000FB2115 /* IPCTesting */,
    245342                                6ED12A460E3E54A80026773D /* MPHelperTools */,
     
    257354                                6EB6FC900E45DEA80057962C /* Foundation.framework */,
    258355                                6ECD970D0E465C7800488335 /* Security.framework */,
    259                                 6EE93E780E495B3100AECE9E /* Tcl.framework */,
     356                                21067BB50FE5B25800CAD732 /* Tests-Info.plist */,
    260357                        );
    261358                        name = "MacPorts Foundation";
     
    280377                                6E44A00C0E2DAD66007DE8EC /* ToDo.txt */,
    281378                                6EE93E660E493AC600AECE9E /* interpInit.tcl */,
     379                                21D954711009475200DEF58A /* portProcessInit.tcl */,
    282380                        );
    283381                        name = Resources;
     
    308406                        isa = PBXGroup;
    309407                        children = (
    310                                 6ED12A540E3E55DF0026773D /* Security.framework */,
    311                                 48E992970C82C98C00219DDF /* Tcl.framework */,
    312                                 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
    313408                        );
    314409                        name = "Linked Frameworks";
     
    318413                        isa = PBXGroup;
    319414                        children = (
    320                                 0867D69BFE84028FC02AAC07 /* Foundation.framework */,
    321415                        );
    322416                        name = "Other Frameworks";
     417                        sourceTree = "<group>";
     418                };
     419                21D954381009409E00DEF58A /* MPPortProcess */ = {
     420                        isa = PBXGroup;
     421                        children = (
     422                                21D954491009413800DEF58A /* MPPortProcess.h */,
     423                                21D954461009412F00DEF58A /* MPPortProcess.m */,
     424                                218DED82101612F1003B5A3B /* SimpleLog.h */,
     425                                218DED83101612F1003B5A3B /* SimpleLog.m */,
     426                        );
     427                        name = MPPortProcess;
    323428                        sourceTree = "<group>";
    324429                };
     
    395500
    396501/* Begin PBXHeadersBuildPhase section */
     502                216010C41094D34500EE9CD0 /* Headers */ = {
     503                        isa = PBXHeadersBuildPhase;
     504                        buildActionMask = 2147483647;
     505                        files = (
     506                                216010C51094D34500EE9CD0 /* MPRegistry.h in Headers */,
     507                                216010C61094D34500EE9CD0 /* MPInterpreter.h in Headers */,
     508                                216010C71094D34500EE9CD0 /* MacPorts.h in Headers */,
     509                                216010C81094D34500EE9CD0 /* MPMacPorts.h in Headers */,
     510                                216010C91094D34500EE9CD0 /* MPIndex.h in Headers */,
     511                                216010CA1094D34500EE9CD0 /* MPPort.h in Headers */,
     512                                216010CB1094D34500EE9CD0 /* MPReceipt.h in Headers */,
     513                                216010CC1094D34500EE9CD0 /* MPMutableDictionary.h in Headers */,
     514                                216010CD1094D34500EE9CD0 /* MPNotifications.h in Headers */,
     515                                216010CE1094D34500EE9CD0 /* BetterAuthorizationSampleLib.h in Headers */,
     516                                216010CF1094D34500EE9CD0 /* MPHelperCommon.h in Headers */,
     517                                216010D01094D34500EE9CD0 /* MPHelperNotificationsCommon.h in Headers */,
     518                                216010D11094D34500EE9CD0 /* MPHelperNotificationsProtocol.h in Headers */,
     519                                216010D21094D34500EE9CD0 /* MPNotifications+IPCAdditions.h in Headers */,
     520                        );
     521                        runOnlyForDeploymentPostprocessing = 0;
     522                };
     523                218DEE4010162175003B5A3B /* Headers */ = {
     524                        isa = PBXHeadersBuildPhase;
     525                        buildActionMask = 2147483647;
     526                        files = (
     527                                21F6DD701017E38E00FC43DE /* SimpleLog.h in Headers */,
     528                        );
     529                        runOnlyForDeploymentPostprocessing = 0;
     530                };
    397531                6ED12AD30E3E9AE10026773D /* Headers */ = {
    398532                        isa = PBXHeadersBuildPhase;
     
    430564
    431565/* Begin PBXNativeTarget section */
     566                216010BD1094D34500EE9CD0 /* MacPorts-embeddable */ = {
     567                        isa = PBXNativeTarget;
     568                        buildConfigurationList = 216010EE1094D34500EE9CD0 /* Build configuration list for PBXNativeTarget "MacPorts-embeddable" */;
     569                        buildPhases = (
     570                                216010C41094D34500EE9CD0 /* Headers */,
     571                                216010D31094D34500EE9CD0 /* Resources */,
     572                                216010DC1094D34500EE9CD0 /* Sources */,
     573                                216010E91094D34500EE9CD0 /* Frameworks */,
     574                                2136ECA01097A29500833416 /* Install */,
     575                        );
     576                        buildRules = (
     577                        );
     578                        dependencies = (
     579                                216010BE1094D34500EE9CD0 /* PBXTargetDependency */,
     580                                216010C01094D34500EE9CD0 /* PBXTargetDependency */,
     581                                216010C21094D34500EE9CD0 /* PBXTargetDependency */,
     582                        );
     583                        name = "MacPorts-embeddable";
     584                        productInstallPath = "$(HOME)/Library/Frameworks";
     585                        productName = "MacPorts Foundation";
     586                        productReference = 216010F21094D34500EE9CD0 /* MacPorts.framework */;
     587                        productType = "com.apple.product-type.framework";
     588                };
     589                21D9543D100940EE00DEF58A /* MPPortProcess */ = {
     590                        isa = PBXNativeTarget;
     591                        buildConfigurationList = 21D954481009413000DEF58A /* Build configuration list for PBXNativeTarget "MPPortProcess" */;
     592                        buildPhases = (
     593                                218DEE4010162175003B5A3B /* Headers */,
     594                                21D9543B100940EE00DEF58A /* Sources */,
     595                                21D9543C100940EE00DEF58A /* Frameworks */,
     596                        );
     597                        buildRules = (
     598                        );
     599                        dependencies = (
     600                        );
     601                        name = MPPortProcess;
     602                        productName = MPPortProcess;
     603                        productReference = 21D9543E100940EE00DEF58A /* MPPortProcess */;
     604                        productType = "com.apple.product-type.tool";
     605                };
    432606                489DD8F30C94365F00595506 /* Test */ = {
    433607                        isa = PBXNativeTarget;
     
    508682                                8DC2EF540486A6940098B216 /* Sources */,
    509683                                8DC2EF560486A6940098B216 /* Frameworks */,
    510                                 6E49F4F40E00DD520030C3AF /* ShellScript */,
    511684                        );
    512685                        buildRules = (
     
    515688                                6ED12A530E3E55A50026773D /* PBXTargetDependency */,
    516689                                6EC2608C0E4270110013BC48 /* PBXTargetDependency */,
     690                                21D9544C1009416100DEF58A /* PBXTargetDependency */,
    517691                        );
    518692                        name = MacPorts;
     
    541715                                6ED12A490E3E552F0026773D /* MPHelperTool */,
    542716                                8DC2EF4F0486A6940098B216 /* MacPorts */,
     717                                216010BD1094D34500EE9CD0 /* MacPorts-embeddable */,
    543718                                489DD8F30C94365F00595506 /* Test */,
    544719                                DFE353650CFB8F0C003BACFC /* Docs */,
    545720                                6EE6DD9D0E626D2800FB2115 /* MPHelperToolIPCTester */,
     721                                21D9543D100940EE00DEF58A /* MPPortProcess */,
    546722                        );
    547723                };
     
    549725
    550726/* Begin PBXResourcesBuildPhase section */
     727                216010D31094D34500EE9CD0 /* Resources */ = {
     728                        isa = PBXResourcesBuildPhase;
     729                        buildActionMask = 2147483647;
     730                        files = (
     731                                216010D41094D34500EE9CD0 /* MPHelperInstallTool in Resources */,
     732                                216010D51094D34500EE9CD0 /* MPPortProcess in Resources */,
     733                                216010D61094D34500EE9CD0 /* MPHelperTool in Resources */,
     734                                216010D71094D34500EE9CD0 /* InfoPlist.strings in Resources */,
     735                                216010D81094D34500EE9CD0 /* init.tcl in Resources */,
     736                                216010D91094D34500EE9CD0 /* ToDo.txt in Resources */,
     737                                216010DA1094D34500EE9CD0 /* interpInit.tcl in Resources */,
     738                                216010DB1094D34500EE9CD0 /* portProcessInit.tcl in Resources */,
     739                        );
     740                        runOnlyForDeploymentPostprocessing = 0;
     741                };
    551742                489DD8EF0C94365F00595506 /* Resources */ = {
    552743                        isa = PBXResourcesBuildPhase;
     
    568759                        files = (
    569760                                6EB6FA460E43ECD60057962C /* MPHelperInstallTool in Resources */,
     761                                21D9548C1009522100DEF58A /* MPPortProcess in Resources */,
    570762                                6EB6FA420E43ECCE0057962C /* MPHelperTool in Resources */,
    571763                                8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
     
    573765                                6E44A00D0E2DAD66007DE8EC /* ToDo.txt in Resources */,
    574766                                6EE93E670E493AC600AECE9E /* interpInit.tcl in Resources */,
     767                                21D954721009475200DEF58A /* portProcessInit.tcl in Resources */,
    575768                        );
    576769                        runOnlyForDeploymentPostprocessing = 0;
     
    579772
    580773/* Begin PBXShellScriptBuildPhase section */
     774                2136ECA01097A29500833416 /* Install */ = {
     775                        isa = PBXShellScriptBuildPhase;
     776                        buildActionMask = 2147483647;
     777                        files = (
     778                        );
     779                        inputPaths = (
     780                        );
     781                        name = Install;
     782                        outputPaths = (
     783                        );
     784                        runOnlyForDeploymentPostprocessing = 0;
     785                        shellPath = "/usr/bin/env ruby";
     786                        shellScript = "# This script just copies the framework to the build directory so that it can be found by Pallet\n# in any configuration.\nrequire 'fileutils'\n\nif File.directory? \"#{ENV['SRCROOT']}/../MacPorts_Framework/build/MacPorts.framework\"\n  FileUtils.rm_rf \"#{ENV['SRCROOT']}/../MacPorts_Framework/build/MacPorts.framework\"\nend\n\nFileUtils.cp_r \"#{ENV['SRCROOT']}/../MacPorts_Framework/build/#{ENV['CONFIGURATION']}/MacPorts.framework\", \"#{ENV['SRCROOT']}/../MacPorts_Framework/build\"\n";
     787                };
    581788                489DD8F20C94365F00595506 /* ShellScript */ = {
    582789                        isa = PBXShellScriptBuildPhase;
     
    592799                        shellPath = /bin/sh;
    593800                        shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n\n#rm -rf notifications.dylib\n\n\n";
    594                 };
    595                 6E49F4F40E00DD520030C3AF /* ShellScript */ = {
    596                         isa = PBXShellScriptBuildPhase;
    597                         buildActionMask = 2147483647;
    598                         files = (
    599                         );
    600                         inputPaths = (
    601                         );
    602                         outputPaths = (
    603                         );
    604                         runOnlyForDeploymentPostprocessing = 0;
    605                         shellPath = /bin/sh;
    606                         shellScript = "#This script is to copy the build product to a subfolder \"build\"\n#of the project directory so that whoever checks out this plugin will have\n#access to the built MacPorts.framework\n#Do I really need it since build products go to your default / project / target\n#specific Build Products path?\n\nditto $CONFIGURATION_BUILD_DIR/MacPorts.framework build/MacPorts.framework\n\n";
    607801                };
    608802                DFE353640CFB8F0C003BACFC /* ShellScript */ = {
     
    622816
    623817/* Begin PBXSourcesBuildPhase section */
     818                216010DC1094D34500EE9CD0 /* Sources */ = {
     819                        isa = PBXSourcesBuildPhase;
     820                        buildActionMask = 2147483647;
     821                        files = (
     822                                216010DD1094D34500EE9CD0 /* MPInterpreter.m in Sources */,
     823                                216010DE1094D34500EE9CD0 /* MPMacPorts.m in Sources */,
     824                                216010DF1094D34500EE9CD0 /* MPIndex.m in Sources */,
     825                                216010E01094D34500EE9CD0 /* MPPort.m in Sources */,
     826                                216010E11094D34500EE9CD0 /* MPReceipt.m in Sources */,
     827                                216010E21094D34500EE9CD0 /* MPMutableDictionary.m in Sources */,
     828                                216010E31094D34500EE9CD0 /* MPRegistry.m in Sources */,
     829                                216010E41094D34500EE9CD0 /* MPNotifications.m in Sources */,
     830                                216010E51094D34500EE9CD0 /* BetterAuthorizationSampleLib.c in Sources */,
     831                                216010E61094D34500EE9CD0 /* MPHelperCommon.c in Sources */,
     832                                216010E71094D34500EE9CD0 /* MPHelperNotificationsCommon.c in Sources */,
     833                                216010E81094D34500EE9CD0 /* MPNotifications+IPCAdditions.m in Sources */,
     834                        );
     835                        runOnlyForDeploymentPostprocessing = 0;
     836                };
     837                21D9543B100940EE00DEF58A /* Sources */ = {
     838                        isa = PBXSourcesBuildPhase;
     839                        buildActionMask = 2147483647;
     840                        files = (
     841                                21D954471009412F00DEF58A /* MPPortProcess.m in Sources */,
     842                                218DEE2610162091003B5A3B /* SimpleLog.m in Sources */,
     843                        );
     844                        runOnlyForDeploymentPostprocessing = 0;
     845                };
    624846                489DD8F00C94365F00595506 /* Sources */ = {
    625847                        isa = PBXSourcesBuildPhase;
     
    682904
    683905/* Begin PBXTargetDependency section */
     906                216010BE1094D34500EE9CD0 /* PBXTargetDependency */ = {
     907                        isa = PBXTargetDependency;
     908                        target = 6ED12A490E3E552F0026773D /* MPHelperTool */;
     909                        targetProxy = 216010BF1094D34500EE9CD0 /* PBXContainerItemProxy */;
     910                };
     911                216010C01094D34500EE9CD0 /* PBXTargetDependency */ = {
     912                        isa = PBXTargetDependency;
     913                        target = 6EC260860E426FF10013BC48 /* MPHelperInstallTool */;
     914                        targetProxy = 216010C11094D34500EE9CD0 /* PBXContainerItemProxy */;
     915                };
     916                216010C21094D34500EE9CD0 /* PBXTargetDependency */ = {
     917                        isa = PBXTargetDependency;
     918                        target = 21D9543D100940EE00DEF58A /* MPPortProcess */;
     919                        targetProxy = 216010C31094D34500EE9CD0 /* PBXContainerItemProxy */;
     920                };
     921                21D9544C1009416100DEF58A /* PBXTargetDependency */ = {
     922                        isa = PBXTargetDependency;
     923                        target = 21D9543D100940EE00DEF58A /* MPPortProcess */;
     924                        targetProxy = 21D9544B1009416100DEF58A /* PBXContainerItemProxy */;
     925                };
    684926                6E1AE8470E232D0700F6D7BC /* PBXTargetDependency */ = {
    685927                        isa = PBXTargetDependency;
     
    719961                        isa = XCBuildConfiguration;
    720962                        buildSettings = {
     963                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
     964                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
    721965                                COPY_PHASE_STRIP = NO;
    722966                                DYLIB_COMPATIBILITY_VERSION = 1;
     
    735979                                        "$(inherited)",
    736980                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
    737                                         "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
    738981                                );
    739982                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
     
    7621005                                        "$(inherited)",
    7631006                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
    764                                         "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
    7651007                                );
    7661008                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
     
    7751017                        isa = XCBuildConfiguration;
    7761018                        buildSettings = {
    777                                 ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
     1019                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
     1020                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
    7781021                                DEBUG_INFORMATION_FORMAT = stabs;
    7791022                                GCC_ENABLE_OBJC_GC = YES;
    7801023                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
    7811024                                GCC_WARN_UNUSED_VARIABLE = YES;
    782                                 ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)";
    783                                 PREBINDING = NO;
    784                                 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
     1025                                ONLY_ACTIVE_ARCH = NO;
     1026                                PREBINDING = NO;
     1027                                SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
    7851028                                ZERO_LINK = NO;
    7861029                        };
     
    7881031                };
    7891032                1DEB91B308733DA50010E9CD /* Release */ = {
     1033                        isa = XCBuildConfiguration;
     1034                        buildSettings = {
     1035                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
     1036                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
     1037                                GCC_ENABLE_OBJC_GC = YES;
     1038                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
     1039                                GCC_WARN_UNUSED_VARIABLE = YES;
     1040                                PREBINDING = NO;
     1041                                SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
     1042                                ZERO_LINK = NO;
     1043                        };
     1044                        name = Release;
     1045                };
     1046                216010B01094C7FC00EE9CD0 /* Release-Tiger */ = {
    7901047                        isa = XCBuildConfiguration;
    7911048                        buildSettings = {
     
    7931050                                ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
    7941051                                GCC_ENABLE_OBJC_GC = YES;
     1052                                GCC_VERSION = 4.0;
    7951053                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
    7961054                                GCC_WARN_UNUSED_VARIABLE = YES;
    7971055                                PREBINDING = NO;
    7981056                                SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
     1057                                ZERO_LINK = NO;
     1058                        };
     1059                        name = "Release-Tiger";
     1060                };
     1061                216010B11094C7FC00EE9CD0 /* Release-Tiger */ = {
     1062                        isa = XCBuildConfiguration;
     1063                        buildSettings = {
     1064                                ALWAYS_SEARCH_USER_PATHS = NO;
     1065                                COPY_PHASE_STRIP = YES;
     1066                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
     1067                                GCC_ENABLE_FIX_AND_CONTINUE = NO;
     1068                                GCC_MODEL_TUNING = G5;
     1069                                INSTALL_PATH = /usr/local/bin;
     1070                                PREBINDING = NO;
     1071                                PRODUCT_NAME = MPHelperInstallTool;
     1072                                ZERO_LINK = NO;
     1073                        };
     1074                        name = "Release-Tiger";
     1075                };
     1076                216010B21094C7FC00EE9CD0 /* Release-Tiger */ = {
     1077                        isa = XCBuildConfiguration;
     1078                        buildSettings = {
     1079                                ALWAYS_SEARCH_USER_PATHS = NO;
     1080                                COPY_PHASE_STRIP = YES;
     1081                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
     1082                                GCC_ENABLE_FIX_AND_CONTINUE = NO;
     1083                                GCC_MODEL_TUNING = G5;
     1084                                INSTALL_PATH = /usr/local/bin;
     1085                                PREBINDING = NO;
     1086                                PRODUCT_NAME = MPHelperTool;
     1087                                ZERO_LINK = NO;
     1088                        };
     1089                        name = "Release-Tiger";
     1090                };
     1091                216010B31094C7FC00EE9CD0 /* Release-Tiger */ = {
     1092                        isa = XCBuildConfiguration;
     1093                        buildSettings = {
     1094                                DYLIB_COMPATIBILITY_VERSION = 1;
     1095                                DYLIB_CURRENT_VERSION = 1;
     1096                                FRAMEWORK_VERSION = A;
     1097                                GCC_ENABLE_OBJC_EXCEPTIONS = YES;
     1098                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
     1099                                GCC_MODEL_TUNING = G5;
     1100                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1101                                GCC_PREFIX_HEADER = MacPorts.Framework_Prefix.pch;
     1102                                INFOPLIST_FILE = Info.plist;
     1103                                INSTALL_PATH = "";
     1104                                LIBRARY_SEARCH_PATHS = (
     1105                                        "$(inherited)",
     1106                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
     1107                                );
     1108                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
     1109                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
     1110                                PRODUCT_NAME = MacPorts;
     1111                                WRAPPER_EXTENSION = framework;
     1112                                ZERO_LINK = NO;
     1113                        };
     1114                        name = "Release-Tiger";
     1115                };
     1116                216010B41094C7FC00EE9CD0 /* Release-Tiger */ = {
     1117                        isa = XCBuildConfiguration;
     1118                        buildSettings = {
     1119                                ARCHS = "$(NATIVE_ARCH)";
     1120                                COPY_PHASE_STRIP = YES;
     1121                                FRAMEWORK_SEARCH_PATHS = (
     1122                                        "$(value)",
     1123                                        "$(DEVELOPER_FRAMEWORKS_DIR_QUOTED)",
     1124                                );
     1125                                GCC_ENABLE_FIX_AND_CONTINUE = NO;
     1126                                GCC_ENABLE_OBJC_EXCEPTIONS = YES;
     1127                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
     1128                                GCC_MODEL_TUNING = G5;
     1129                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1130                                GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
     1131                                INFOPLIST_FILE = "Test-Info.plist";
     1132                                INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
     1133                                OTHER_LDFLAGS = (
     1134                                        "-framework",
     1135                                        Cocoa,
     1136                                        "-framework",
     1137                                        SenTestingKit,
     1138                                );
     1139                                PREBINDING = NO;
     1140                                PRODUCT_NAME = Test;
     1141                                WRAPPER_EXTENSION = octest;
     1142                                ZERO_LINK = NO;
     1143                        };
     1144                        name = "Release-Tiger";
     1145                };
     1146                216010B51094C7FC00EE9CD0 /* Release-Tiger */ = {
     1147                        isa = XCBuildConfiguration;
     1148                        buildSettings = {
     1149                                COPY_PHASE_STRIP = YES;
     1150                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
     1151                                GCC_ENABLE_FIX_AND_CONTINUE = NO;
     1152                                PRODUCT_NAME = Docs;
     1153                                ZERO_LINK = NO;
     1154                        };
     1155                        name = "Release-Tiger";
     1156                };
     1157                216010B61094C7FC00EE9CD0 /* Release-Tiger */ = {
     1158                        isa = XCBuildConfiguration;
     1159                        buildSettings = {
     1160                                ALWAYS_SEARCH_USER_PATHS = NO;
     1161                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
     1162                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
     1163                                COPY_PHASE_STRIP = YES;
     1164                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
     1165                                GCC_ENABLE_FIX_AND_CONTINUE = NO;
     1166                                GCC_ENABLE_OBJC_GC = required;
     1167                                GCC_MODEL_TUNING = G5;
     1168                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1169                                GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
     1170                                INSTALL_PATH = /usr/local/bin;
     1171                                OTHER_LDFLAGS = (
     1172                                        "-framework",
     1173                                        Foundation,
     1174                                        "-framework",
     1175                                        AppKit,
     1176                                );
     1177                                PREBINDING = NO;
     1178                                PRODUCT_NAME = MPHelperToolIPCTester;
     1179                                SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
     1180                                ZERO_LINK = NO;
     1181                        };
     1182                        name = "Release-Tiger";
     1183                };
     1184                216010B71094C7FC00EE9CD0 /* Release-Tiger */ = {
     1185                        isa = XCBuildConfiguration;
     1186                        buildSettings = {
     1187                                ALWAYS_SEARCH_USER_PATHS = NO;
     1188                                COPY_PHASE_STRIP = YES;
     1189                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
     1190                                GCC_ENABLE_FIX_AND_CONTINUE = NO;
     1191                                GCC_MODEL_TUNING = G5;
     1192                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1193                                GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
     1194                                INSTALL_PATH = /usr/local/bin;
     1195                                OTHER_LDFLAGS = (
     1196                                        "-framework",
     1197                                        Foundation,
     1198                                        "-framework",
     1199                                        AppKit,
     1200                                );
     1201                                PREBINDING = NO;
     1202                                PRODUCT_NAME = MPPortProcess;
     1203                                ZERO_LINK = NO;
     1204                        };
     1205                        name = "Release-Tiger";
     1206                };
     1207                216010EF1094D34500EE9CD0 /* Debug */ = {
     1208                        isa = XCBuildConfiguration;
     1209                        buildSettings = {
     1210                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
     1211                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
     1212                                CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
     1213                                COPY_PHASE_STRIP = NO;
     1214                                DYLIB_COMPATIBILITY_VERSION = 1;
     1215                                DYLIB_CURRENT_VERSION = 1;
     1216                                FRAMEWORK_VERSION = A;
     1217                                GCC_DYNAMIC_NO_PIC = NO;
     1218                                GCC_ENABLE_FIX_AND_CONTINUE = YES;
     1219                                GCC_ENABLE_OBJC_EXCEPTIONS = YES;
     1220                                GCC_MODEL_TUNING = G5;
     1221                                GCC_OPTIMIZATION_LEVEL = 0;
     1222                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1223                                GCC_PREFIX_HEADER = MacPorts.Framework_Prefix.pch;
     1224                                INFOPLIST_FILE = Info.plist;
     1225                                INSTALL_PATH = "@executable_path/../Frameworks";
     1226                                LIBRARY_SEARCH_PATHS = (
     1227                                        "$(inherited)",
     1228                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
     1229                                );
     1230                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
     1231                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
     1232                                PRODUCT_NAME = MacPorts;
     1233                                SYMROOT = build;
     1234                                WRAPPER_EXTENSION = framework;
     1235                                ZERO_LINK = NO;
     1236                        };
     1237                        name = Debug;
     1238                };
     1239                216010F01094D34500EE9CD0 /* Release */ = {
     1240                        isa = XCBuildConfiguration;
     1241                        buildSettings = {
     1242                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
     1243                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
     1244                                CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
     1245                                DYLIB_COMPATIBILITY_VERSION = 1;
     1246                                DYLIB_CURRENT_VERSION = 1;
     1247                                FRAMEWORK_VERSION = A;
     1248                                GCC_ENABLE_OBJC_EXCEPTIONS = YES;
     1249                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
     1250                                GCC_MODEL_TUNING = G5;
     1251                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1252                                GCC_PREFIX_HEADER = MacPorts.Framework_Prefix.pch;
     1253                                INFOPLIST_FILE = Info.plist;
     1254                                INSTALL_PATH = "@executable_path/../Frameworks";
     1255                                LIBRARY_SEARCH_PATHS = (
     1256                                        "$(inherited)",
     1257                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
     1258                                );
     1259                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
     1260                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
     1261                                PRODUCT_NAME = MacPorts;
     1262                                WRAPPER_EXTENSION = framework;
     1263                                ZERO_LINK = NO;
     1264                        };
     1265                        name = Release;
     1266                };
     1267                216010F11094D34500EE9CD0 /* Release-Tiger */ = {
     1268                        isa = XCBuildConfiguration;
     1269                        buildSettings = {
     1270                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
     1271                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
     1272                                CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
     1273                                DYLIB_COMPATIBILITY_VERSION = 1;
     1274                                DYLIB_CURRENT_VERSION = 1;
     1275                                FRAMEWORK_VERSION = A;
     1276                                GCC_ENABLE_OBJC_EXCEPTIONS = YES;
     1277                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
     1278                                GCC_MODEL_TUNING = G5;
     1279                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1280                                GCC_PREFIX_HEADER = MacPorts.Framework_Prefix.pch;
     1281                                INFOPLIST_FILE = Info.plist;
     1282                                INSTALL_PATH = "@executable_path/../Frameworks";
     1283                                LIBRARY_SEARCH_PATHS = (
     1284                                        "$(inherited)",
     1285                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
     1286                                );
     1287                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
     1288                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
     1289                                PRODUCT_NAME = MacPorts;
     1290                                WRAPPER_EXTENSION = framework;
     1291                                ZERO_LINK = NO;
     1292                        };
     1293                        name = "Release-Tiger";
     1294                };
     1295                21D95440100940EF00DEF58A /* Debug */ = {
     1296                        isa = XCBuildConfiguration;
     1297                        buildSettings = {
     1298                                ALWAYS_SEARCH_USER_PATHS = NO;
     1299                                COPY_PHASE_STRIP = NO;
     1300                                GCC_DYNAMIC_NO_PIC = NO;
     1301                                GCC_ENABLE_FIX_AND_CONTINUE = YES;
     1302                                GCC_MODEL_TUNING = G5;
     1303                                GCC_OPTIMIZATION_LEVEL = 0;
     1304                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1305                                GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
     1306                                INSTALL_PATH = /usr/local/bin;
     1307                                OTHER_LDFLAGS = (
     1308                                        "-framework",
     1309                                        Foundation,
     1310                                        "-framework",
     1311                                        AppKit,
     1312                                );
     1313                                PREBINDING = NO;
     1314                                PRODUCT_NAME = MPPortProcess;
     1315                        };
     1316                        name = Debug;
     1317                };
     1318                21D95441100940EF00DEF58A /* Release */ = {
     1319                        isa = XCBuildConfiguration;
     1320                        buildSettings = {
     1321                                ALWAYS_SEARCH_USER_PATHS = NO;
     1322                                COPY_PHASE_STRIP = YES;
     1323                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
     1324                                GCC_ENABLE_FIX_AND_CONTINUE = NO;
     1325                                GCC_MODEL_TUNING = G5;
     1326                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     1327                                GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
     1328                                INSTALL_PATH = /usr/local/bin;
     1329                                OTHER_LDFLAGS = (
     1330                                        "-framework",
     1331                                        Foundation,
     1332                                        "-framework",
     1333                                        AppKit,
     1334                                );
     1335                                PREBINDING = NO;
     1336                                PRODUCT_NAME = MPPortProcess;
    7991337                                ZERO_LINK = NO;
    8001338                        };
     
    8201358                                INFOPLIST_FILE = "Test-Info.plist";
    8211359                                INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
     1360                                ONLY_ACTIVE_ARCH = YES;
    8221361                                OTHER_LDFLAGS = (
    8231362                                        "-framework",
     
    10061545                                1DEB91AE08733DA50010E9CD /* Debug */,
    10071546                                1DEB91AF08733DA50010E9CD /* Release */,
     1547                                216010B31094C7FC00EE9CD0 /* Release-Tiger */,
    10081548                        );
    10091549                        defaultConfigurationIsVisible = 0;
     
    10151555                                1DEB91B208733DA50010E9CD /* Debug */,
    10161556                                1DEB91B308733DA50010E9CD /* Release */,
     1557                                216010B01094C7FC00EE9CD0 /* Release-Tiger */,
     1558                        );
     1559                        defaultConfigurationIsVisible = 0;
     1560                        defaultConfigurationName = Release;
     1561                };
     1562                216010EE1094D34500EE9CD0 /* Build configuration list for PBXNativeTarget "MacPorts-embeddable" */ = {
     1563                        isa = XCConfigurationList;
     1564                        buildConfigurations = (
     1565                                216010EF1094D34500EE9CD0 /* Debug */,
     1566                                216010F01094D34500EE9CD0 /* Release */,
     1567                                216010F11094D34500EE9CD0 /* Release-Tiger */,
     1568                        );
     1569                        defaultConfigurationIsVisible = 0;
     1570                        defaultConfigurationName = Release;
     1571                };
     1572                21D954481009413000DEF58A /* Build configuration list for PBXNativeTarget "MPPortProcess" */ = {
     1573                        isa = XCConfigurationList;
     1574                        buildConfigurations = (
     1575                                21D95440100940EF00DEF58A /* Debug */,
     1576                                21D95441100940EF00DEF58A /* Release */,
     1577                                216010B71094C7FC00EE9CD0 /* Release-Tiger */,
    10171578                        );
    10181579                        defaultConfigurationIsVisible = 0;
     
    10241585                                489DD8F70C94366000595506 /* Debug */,
    10251586                                489DD8F80C94366000595506 /* Release */,
     1587                                216010B41094C7FC00EE9CD0 /* Release-Tiger */,
    10261588                        );
    10271589                        defaultConfigurationIsVisible = 0;
     
    10331595                                6EC260890E426FF30013BC48 /* Debug */,
    10341596                                6EC2608A0E426FF30013BC48 /* Release */,
     1597                                216010B11094C7FC00EE9CD0 /* Release-Tiger */,
    10351598                        );
    10361599                        defaultConfigurationIsVisible = 0;
     
    10421605                                6ED12A4C0E3E55300026773D /* Debug */,
    10431606                                6ED12A4D0E3E55300026773D /* Release */,
     1607                                216010B21094C7FC00EE9CD0 /* Release-Tiger */,
    10441608                        );
    10451609                        defaultConfigurationIsVisible = 0;
     
    10511615                                6EE6DDA00E626D2900FB2115 /* Debug */,
    10521616                                6EE6DDA10E626D2900FB2115 /* Release */,
     1617                                216010B61094C7FC00EE9CD0 /* Release-Tiger */,
    10531618                        );
    10541619                        defaultConfigurationIsVisible = 0;
     
    10601625                                DFE353660CFB8F0C003BACFC /* Debug */,
    10611626                                DFE353670CFB8F0C003BACFC /* Release */,
     1627                                216010B51094C7FC00EE9CD0 /* Release-Tiger */,
    10621628                        );
    10631629                        defaultConfigurationIsVisible = 0;
  • contrib/MacPorts_Framework/init.tcl

    r39471 r65491  
    55#Set ui_options to log all messages to stdout and notify system
    66#filtering is done on the Obj-C side of things
    7 set ui_options(ports_debug) "yes"
     7# set ui_options(ports_debug) "yes"
    88set ui_options(ports_verbose) "yes"
    99
     
    5252            } else {
    5353                return {}
    54                         }
    55                 }
     54            }
     55        }
    5656        msg {
    5757            if {[ui_isset ports_quiet]} {
    58                 return {}
    59                         } else {
    60                                 return {stdout}
    61                         }
    62                 }
     58              return {}
     59            } else {
     60              return {stdout}
     61            }
     62        }
    6363        error {
    6464                return {stderr}
     
    7777#This is currently under works ... a reasonable solution
    7878#should be coming up soon
    79 proc ui_init {priority prefix channels message} {
    80         switch $priority {
    81                 msg {
    82                         set nottype "MPMsgNotification"
    83                 }
    84                 debug {
    85                         set "MPDebugNotification"
    86                         puts "Recieved Debug"
    87                 }
    88                 warn {
    89                         set nottype "MPWarnNotification"
    90                 }
    91                 error {
    92                         set nottype "MPErrorNotification"
    93                         puts "Recieved Error"
    94                 }
    95                 info {
    96                         set nottype "MPInfoNotification"
    97                         puts "Recieved Info"
    98                 }
    99                 default {
    100                         set nottype "MPDefaultNotification"
    101                 }       
    102         }
    103        
     79proc macports::ui_init {priority args} {
     80    switch $priority {
     81                msg {
     82                        set nottype "MPMsgNotification"
     83                }
     84                debug {
     85                        set nottype "MPDebugNotification"
     86                        puts "Recieved Debug"
     87                }
     88                warn {
     89                        set nottype "MPWarnNotification"
     90                }
     91                error {
     92                        set nottype "MPErrorNotification"
     93                        puts "Recieved Error"
     94                }
     95                info {
     96                        set nottype "MPInfoNotification"
     97                        puts "Recieved Info"
     98                }
     99                default {
     100                        set nottype "MPDefaultNotification"
     101                }       
     102        }
     103 
    104104    # Get the list of channels.
    105     try {
     105    if {[llength [info commands ui_channels]] > 0} {
    106106        set channels [ui_channels $priority]
    107     } catch * {
     107    } else {
    108108        set channels [ui_channels_default $priority]
    109109    }
    110    
    111     #set channels [ui_channels $priority]
    112    
     110
    113111    # Simplify ui_$priority.
    114112    set nbchans [llength $channels]
    115113    if {$nbchans == 0} {
    116         proc ::ui_$priority {str} [subst {
    117                 notifications send $nottype "$chan $prefix" "\$str"
     114        proc ::ui_$priority {args} [subst {
     115          notifications send $nottype "$chan $prefix" "\$str"
    118116        }]
    119117    } else {
    120         try {
     118        if {[llength [info commands ui_prefix]] > 0} {
    121119            set prefix [ui_prefix $priority]
    122         } catch * {
     120        } else {
    123121            set prefix [ui_prefix_default $priority]
    124122        }
    125        
    126         #set prefix [ui_prefix $priority]
    127        
    128         if {$nbchans == 1} {
    129             set chan [lindex $channels 0]
    130            
    131             proc ::ui_$priority {str} [subst {
    132                 puts $chan "$prefix\$str"
    133                 notifications send $nottype "$chan $prefix" "\$str"
    134             }]
     123
     124        if {[llength [info commands ::ui_init]] > 0} {
     125            eval ::ui_init $priority $prefix $channels $args
    135126        } else {
    136                 proc ::ui_$priority {str} [subst {
    137                         foreach chan \$channels {
    138                                 puts $chan "$prefix\$str"
    139                                 notifications send $nottype "$chan $prefix" "\$str"
    140                         }
    141                 }]
    142         }
    143        
    144     # Call ui_$priority - Is this step necessary? Consult with Randall
    145     #::ui_$priority $message
     127            if {$nbchans == 1} {
     128                set chan [lindex $channels 0]
     129                proc ::ui_$priority {args} [subst {
     130                  if {\[lindex \$args 0\] == "-nonewline"} {
     131                    puts $chan "$prefix\[lindex \$args 1\]"
     132                    notifications send $nottype "$chan $prefix" "\[lindex \$args 1\]"
     133                  } else {
     134                    puts -nonewline $chan "$prefix\[lindex \$args 1\]"
     135                    notifications send $nottype "$chan $prefix" "\[lindex \$args 0\]"
     136                  }
     137                }]
     138            } else {
     139                proc ::ui_$priority {args} [subst {
     140                    foreach chan \$channels {
     141                      if {\[lindex \$args 0\] == "-nonewline"} {
     142                        puts $chan "$prefix\[lindex \$args 1\]"
     143                        notifications send $nottype "$chan $prefix" "\[lindex \$args 1\]"
     144                      } else {
     145                        puts -nonewline $chan "$prefix\[lindex \$args 1\]"
     146                        notifications send $nottype "$chan $prefix" "\[lindex \$args 0\]"
     147                      }
     148                    }
     149                }]
     150            }
     151        }
     152
     153        # Call ui_$priority
     154        eval ::ui_$priority $args
    146155    }
    147156}
     
    151160#and log error Information in a similar fashion to code
    152161#in macports.tcl.
    153 proc mportuninstall {portname {v ""} optionslist} {
     162proc mportuninstall {portname {v ""} {optionslist ""}} {
    154163        if {[catch {portuninstall::uninstall $portname $v $optionslist} result]} {
    155164               
     
    181190}
    182191
     192proc mportupgrade {portname} {
     193    array set depscache {}
     194        if {[catch {macports::upgrade $portname "port:$portname" [array get global_variations] [array get variations] [array get options] depscache} result]} {
     195                       
     196                        global errorInfo
     197                        ui_debug "$errorInfo"
     198                        ui_error "Upgrade $portname failed: $result"
     199                        return 1
     200        }
     201}
    183202
    184203
  • contrib/MacPorts_Framework/interpInit.tcl

    r39735 r65491  
    5353            } else {
    5454                return {}
    55                         }
    56                 }
     55            }
     56        }
    5757        msg {
    5858            if {[ui_isset ports_quiet]} {
    59                 return {}
    60                         } else {
    61                                 return {stdout}
    62                         }
    63                 }
     59              return {}
     60            } else {
     61              return {stdout}
     62            }
     63        }
    6464        error {
    6565                return {stderr}
     
    7777#This is currently under works ... a reasonable solution
    7878#should be coming up soon
    79 proc ui_init {priority prefix channels message} {
    80         #puts "INSIDE ui_init priority with prefix $prefix and message $message"
    81        
    82         switch $priority {
    83                 msg {
    84                         set nottype "MPMsgNotification"
    85                 }
    86                 debug {
    87                         set "MPDebugNotification"
    88                         puts "Recieved Debug"
    89                 }
    90                 warn {
    91                         set nottype "MPWarnNotification"
    92                 }
    93                 error {
    94                         set nottype "MPErrorNotification"
    95                         puts "Recieved Error"
    96                 }
    97                 info {
    98                         set nottype "MPInfoNotification"
    99                         puts "Recieved Info"
    100                 }
    101                 default {
    102                         set nottype "MPDefaultNotification"
    103                 }       
    104         }
    105        
     79proc macports::ui_init {priority args} {
     80    switch $priority {
     81      msg {
     82        set nottype "MPMsgNotification"
     83      }
     84      debug {
     85        set nottype "MPDebugNotification"
     86        puts "Recieved Debug"
     87      }
     88      warn {
     89        set nottype "MPWarnNotification"
     90      }
     91      error {
     92        set nottype "MPErrorNotification"
     93        puts "Recieved Error"
     94      }
     95      info {
     96        set nottype "MPInfoNotification"
     97        puts "Recieved Info"
     98      }
     99      default {
     100        set nottype "MPDefaultNotification"
     101      }
     102    }
     103
    106104    # Get the list of channels.
    107     try {
     105    if {[llength [info commands ui_channels]] > 0} {
    108106        set channels [ui_channels $priority]
    109     } catch * {
     107    } else {
    110108        set channels [ui_channels_default $priority]
    111109    }
     
    117115    if {$nbchans == 0} {
    118116        proc ::ui_$priority {str} [subst {
    119                 simplelog "$nottype $chan $prefix" "\$str"
     117          simplelog "$nottype $chan $prefix" "\$str"
    120118        }]
    121119    } else {
    122         try {
    123             set prefix [ui_prefix $priority]
    124         } catch * {
    125             set prefix [ui_prefix_default $priority]
    126         }
    127        
    128         #set prefix [ui_prefix $priority]
    129        
     120      if {[llength [info commands ui_prefix]] > 0} {
     121          set prefix [ui_prefix $priority]
     122      } else {
     123          set prefix [ui_prefix_default $priority]
     124      }
     125
     126      if {[llength [info commands ::ui_init]] > 0} {
     127          eval ::ui_init $priority $prefix $channels $args
     128      } else {
    130129        if {$nbchans == 1} {
    131             set chan [lindex $channels 0]
    132            
    133             proc ::ui_$priority {str} [subst {
    134                 puts $chan "$prefix\$str"
    135                 simplelog "$nottype $chan $prefix" "\$str"
    136             }]
     130          set chan [lindex $channels 0]
     131
     132          proc ::ui_$priority {args} [subst {
     133            if {\[lindex \$args 0\] == "-nonewline"} {
     134              puts $chan "$prefix\[lindex \$args 1\]"
     135              simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
     136            } else {
     137              puts -nonewline $chan "$prefix\[lindex \$args 1\]"
     138              simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
     139            }
     140          }]
    137141        } else {
    138                 proc ::ui_$priority {str} [subst {
    139                         foreach chan \$channels {
    140                                 puts $chan "$prefix\$str"
    141                                 simplelog "$nottype $chan $prefix" "\$str"
    142                         }
    143                 }]
    144         }
    145        
    146     # Call ui_$priority - Is this step necessary? Consult with Randall
    147     #::ui_$priority $message
     142          proc ::ui_$priority {args} [subst {
     143            foreach chan \$channels {
     144              if {\[lindex \$args 0\] == "-nonewline"} {
     145                puts $chan "$prefix\[lindex \$args 1\]"
     146                simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
     147              } else {
     148                puts -nonewline $chan "$prefix\[lindex \$args 1\]"
     149                simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
     150              }
     151            }
     152          }]
     153        }
     154      }
     155
     156      # Call ui_$priority
     157      eval ::ui_$priority $args
    148158    }
    149159}
     
    184194}
    185195
    186 
     196proc mportupgrade {portname} {
     197    array set depscache {}
     198        if {[catch {macports::upgrade $portname "port:$portname" [array get global_variations] [array get variations] [array get options] depscache} result]} {
     199                       
     200                        global errorInfo
     201                        ui_debug "$errorInfo"
     202                        ui_error "Upgrade $portname failed: $result"
     203                        return 1
     204        }
     205}
    187206
    188207# Initialize dport
Note: See TracChangeset for help on using the changeset viewer.