[65491] contrib/MacPorts_Framework
juanger at macports.org
juanger at macports.org
Fri Mar 26 12:46:36 PDT 2010
Revision: 65491
http://trac.macports.org/changeset/65491
Author: juanger at macports.org
Date: 2010-03-26 12:46:35 -0700 (Fri, 26 Mar 2010)
Log Message:
-----------
Merging with gsoc09-gui branch so that this is not outdated.
Modified Paths:
--------------
contrib/MacPorts_Framework/BetterAuthorizationSampleLib.c
contrib/MacPorts_Framework/BetterAuthorizationSampleLib.h
contrib/MacPorts_Framework/BetterAuthorizationSampleLibInstallTool.c
contrib/MacPorts_Framework/Info.plist
contrib/MacPorts_Framework/MPHelperTool.m
contrib/MacPorts_Framework/MPInterpreter.h
contrib/MacPorts_Framework/MPInterpreter.m
contrib/MacPorts_Framework/MPMacPorts.h
contrib/MacPorts_Framework/MPMacPorts.m
contrib/MacPorts_Framework/MPMacPortsTest.m
contrib/MacPorts_Framework/MPPort.h
contrib/MacPorts_Framework/MPPort.m
contrib/MacPorts_Framework/MPPortManipulationTest.m
contrib/MacPorts_Framework/MPRegistry.h
contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj
contrib/MacPorts_Framework/init.tcl
contrib/MacPorts_Framework/interpInit.tcl
Added Paths:
-----------
contrib/MacPorts_Framework/MPPortProcess.h
contrib/MacPorts_Framework/MPPortProcess.m
contrib/MacPorts_Framework/SimpleLog.h
contrib/MacPorts_Framework/SimpleLog.m
contrib/MacPorts_Framework/Tests-Info.plist
contrib/MacPorts_Framework/portProcessInit.tcl
Property Changed:
----------------
contrib/MacPorts_Framework/
contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/
Property changes on: contrib/MacPorts_Framework
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/gsoc09-gui/MacPorts_Framework:50819-65490
Modified: contrib/MacPorts_Framework/BetterAuthorizationSampleLib.c
===================================================================
--- contrib/MacPorts_Framework/BetterAuthorizationSampleLib.c 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/BetterAuthorizationSampleLib.c 2010-03-26 19:46:35 UTC (rev 65491)
@@ -47,6 +47,7 @@
// Define BAS_PRIVATE so that we pick up our private definitions from
// "BetterAuthorizationSampleLib.h".
+
#define BAS_PRIVATE 1
#include "BetterAuthorizationSampleLib.h"
@@ -77,7 +78,7 @@
enum {
kIdleTimeoutInSeconds = 120, // if we get no requests in 2 minutes, we quit
- kWatchdogTimeoutInSeconds = 65 // any given request must be completely in 65 seconds
+ kWatchdogTimeoutInSeconds = 500000 // any given request must be completed in ~5 days (is this ok?)
};
// IMPORTANT:
@@ -93,12 +94,12 @@
// 2. Because it's less than 4 GB, this limit ensures that the dictionary size
// can be sent as an architecture-neutral uint32_t.
-#define kBASMaxNumberOfKBytes (1024 * 1024)
+#define kBASMaxNumberOfKBytes (1024 * 1024)
// A hard-wired file system path for the UNIX domain socket; %s is the placeholder
// for the bundle ID (in file system representation).
-#define kBASSocketPathFormat "/var/run/%s.socket"
+#define kBASSocketPathFormat "/var/run/%s.socket"
// The key used to get our describe our socket in the launchd property list file.
@@ -117,9 +118,9 @@
retval = ident; \
break
switch (errNum) {
- case noErr:
- retval = 0;
- break;
+ case noErr:
+ retval = 0;
+ break;
case kENORSRCErr:
retval = ESRCH; // no ENORSRC on Mac OS X, so use ESRCH
break;
@@ -128,9 +129,9 @@
break;
CASE(EDEADLK);
CASE(EAGAIN);
- case kEOPNOTSUPPErr:
- retval = ENOTSUP;
- break;
+ case kEOPNOTSUPPErr:
+ retval = ENOTSUP;
+ break;
CASE(EPROTO);
CASE(ETIME);
CASE(ENOSR);
@@ -145,12 +146,12 @@
CASE(ENOMSG);
default:
if ( (errNum <= kEPERMErr) && (errNum >= kENOMSGErr) ) {
- retval = (-3200 - errNum) + 1; // OT based error
+ retval = (-3200 - errNum) + 1; // OT based error
} else if ( (errNum >= errSecErrnoBase) && (errNum <= (errSecErrnoBase + ELAST)) ) {
- retval = (int) errNum - errSecErrnoBase; // POSIX based error
+ retval = (int) errNum - errSecErrnoBase; // POSIX based error
} else {
- retval = (int) errNum; // just return the value unmodified
- }
+ retval = (int) errNum; // just return the value unmodified
+ }
}
#undef CASE
return retval;
@@ -1920,39 +1921,45 @@
// We install the job disabled, then enable it as the last step.
- " <key>Disabled</key>\n"
- " <true/>\n"
+ " <key>Disabled</key>\n"
+ " <true/>\n"
// Use the bundle identifier as the job label.
- " <key>Label</key>\n"
- " <string>%s</string>\n"
+ " <key>Label</key>\n"
+ " <string>%s</string>\n"
// Use launch on demaind.
- " <key>OnDemand</key>\n"
- " <true/>\n"
+ " <key>OnDemand</key>\n"
+ " <true/>\n"
- // We don't want our helper tool to be respawned every 10 seconds
- // after a faliure ... hopefully this won't ALSO prevent us from
- // rerunning the helper tool without rebooting the machine
-// " <key>LaunchOnlyOnce</key>\n"
-// " <true/>\n"
+ // We don't want our helper tool to be respawned every 10 seconds
+ // after a faliure ... hopefully this won't ALSO prevent us from
+ // rerunning the helper tool without rebooting the machine
+ " <key>LaunchOnlyOnce</key>\n"
+ " <true/>\n"
- // There are no program arguments, other that the path to the helper tool itself.
+ // There are no program arguments, other that the path to the helper tool itself
+ // but we must force it to run using the i386 binary if the Framework is
+ // being used as a i386 binary.
//
// IMPORTANT
// kBASToolPathFormat embeds a %s
- " <key>ProgramArguments</key>\n"
- " <array>\n"
- " <string>" kBASToolPathFormat "</string>\n"
- " </array>\n"
+ " <key>ProgramArguments</key>\n"
+ " <array>\n"
+#ifdef __i386__
+ " <string>/usr/bin/arch</string>\n"
+ " <string>-i386</string>\n"
+#endif
+ " <string>" kBASToolPathFormat "</string>\n"
+ " </array>\n"
// The tool is required to check in with launchd.
- " <key>ServiceIPC</key>\n"
- " <true/>\n"
+ " <key>ServiceIPC</key>\n"
+ " <true/>\n"
// This specifies the UNIX domain socket used to launch the tool, including
// the permissions on the socket (438 is 0666).
@@ -1960,20 +1967,20 @@
// IMPORTANT
// kBASSocketPathFormat embeds a %s
- " <key>Sockets</key>\n"
- " <dict>\n"
- " <key>" kLaunchDSocketDictKey "</key>\n"
- " <dict>\n"
- " <key>SockFamily</key>\n"
- " <string>Unix</string>\n"
- " <key>SockPathMode</key>\n"
- " <integer>438</integer>\n"
- " <key>SockPathName</key>\n"
- " <string>" kBASSocketPathFormat "</string>\n"
- " <key>SockType</key>\n"
- " <string>Stream</string>\n"
- " </dict>\n"
- " </dict>\n"
+ " <key>Sockets</key>\n"
+ " <dict>\n"
+ " <key>" kLaunchDSocketDictKey "</key>\n"
+ " <dict>\n"
+ " <key>SockFamily</key>\n"
+ " <string>Unix</string>\n"
+ " <key>SockPathMode</key>\n"
+ " <integer>438</integer>\n"
+ " <key>SockPathName</key>\n"
+ " <string>" kBASSocketPathFormat "</string>\n"
+ " <key>SockType</key>\n"
+ " <string>Stream</string>\n"
+ " </dict>\n"
+ " </dict>\n"
"</dict>\n"
"</plist>\n"
;
@@ -2460,3 +2467,23 @@
return retval;
}
+
+extern void BASTerminateCommand (
+ AuthorizationRef auth,
+ const char * bundleID,
+ const char * installToolPath
+)
+// Terminate the HelperTool.
+{
+ // Pre-conditions
+
+ assert(auth != NULL);
+ assert(bundleID != NULL);
+ assert(installToolPath != NULL);
+
+ // Run the install tool as root using AuthorizationExecuteWithPrivileges.
+ RunInstallToolAsRoot(auth, installToolPath, kBASInstallToolTerminateCommand, bundleID, NULL);
+
+ return;
+}
+
Modified: contrib/MacPorts_Framework/BetterAuthorizationSampleLib.h
===================================================================
--- contrib/MacPorts_Framework/BetterAuthorizationSampleLib.h 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/BetterAuthorizationSampleLib.h 2010-03-26 19:46:35 UTC (rev 65491)
@@ -738,6 +738,12 @@
CFArrayRef descArray
);
+extern void BASTerminateCommand(
+ AuthorizationRef auth,
+ const char * bundleID,
+ const char * installToolPath
+);
+
/////////////////////////////////////////////////////////////////
#pragma mark ***** Utility Routines
@@ -763,6 +769,7 @@
#define kBASInstallToolInstallCommand "install"
#define kBASInstallToolEnableCommand "enable"
+ #define kBASInstallToolTerminateCommand "terminate"
// Magic values used to bracket the process ID returned by the install tool.
Modified: contrib/MacPorts_Framework/BetterAuthorizationSampleLibInstallTool.c
===================================================================
--- contrib/MacPorts_Framework/BetterAuthorizationSampleLibInstallTool.c 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/BetterAuthorizationSampleLibInstallTool.c 2010-03-26 19:46:35 UTC (rev 65491)
@@ -395,6 +395,24 @@
return err;
}
+static int TerminateCommand(
+ const char *bundleID
+)
+// Utility function to call through to RunLaunchCtl in order to terminate a job
+// given by the path contructed from the (const char *) bundleID.
+{
+ int err;
+ char plistPath[PATH_MAX];
+
+ // Pre-condition.
+ assert(bundleID != NULL);
+
+ (void) snprintf(plistPath, sizeof(plistPath), kBASPlistPathFormat, bundleID);
+ err = RunLaunchCtl(false, "unload", plistPath);
+
+ return err;
+}
+
int main(int argc, char **argv)
{
int err;
@@ -453,10 +471,17 @@
fprintf(stderr, "usage4\n");
err = EINVAL;
}
- } else {
- fprintf(stderr, "usage2\n");
- err = EINVAL;
- }
+ } else if (strcmp(argv[1], kBASInstallToolTerminateCommand) == 0) {
+ if (argc == 3) {
+ err = TerminateCommand(argv[2]);
+ } else {
+ fprintf(stderr, "usage4\n");
+ err = EINVAL;
+ }
+ } else {
+ fprintf(stderr, "usage2\n");
+ err = EINVAL;
+ }
}
// Write "oK" to stdout and quit. The presence of the "oK" on the last
Modified: contrib/MacPorts_Framework/Info.plist
===================================================================
--- contrib/MacPorts_Framework/Info.plist 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/Info.plist 2010-03-26 19:46:35 UTC (rev 65491)
@@ -19,8 +19,15 @@
<key>CFBundleSignature</key>
<string>Randall Wood</string>
<key>CFBundleVersion</key>
- <string>1.0</string>
+ <string>1.1</string>
<key>NSPrincipalClass</key>
<string></string>
+ <key>LSMinimumSystemVersionByArchitecture</key>
+ <dict>
+ <key>i386</key>
+ <string>10.4.0</string>
+ <key>x86_64</key>
+ <string>10.6.0</string>
+ </dict>
</dict>
</plist>
Modified: contrib/MacPorts_Framework/MPHelperTool.m
===================================================================
--- contrib/MacPorts_Framework/MPHelperTool.m 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPHelperTool.m 2010-03-26 19:46:35 UTC (rev 65491)
@@ -53,7 +53,6 @@
#include <signal.h>
-
//According to the docs all I need is
//the file descriptor that MPNotifications
//obtained when creating the server socket
@@ -822,12 +821,6 @@
/////////////////////////////////////////////////////////////////
#pragma mark ***** Tool Infrastructure
-/*
- IMPORTANT
- ---------
- This array must be exactly parallel to the kMPHelperCommandSet array
- in "MPHelperCommon.c".
- */
static OSStatus DoEvaluateTclString
(
@@ -984,6 +977,12 @@
}
+/*
+ IMPORTANT
+ ---------
+ This array must be exactly parallel to the kMPHelperCommandSet array
+ in "MPHelperCommon.c".
+ */
static const BASCommandProc kMPHelperCommandProcs[] = {
DoEvaluateTclString,
NULL
Modified: contrib/MacPorts_Framework/MPInterpreter.h
===================================================================
--- contrib/MacPorts_Framework/MPInterpreter.h 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPInterpreter.h 2010-03-26 19:46:35 UTC (rev 65491)
@@ -52,7 +52,6 @@
#define MPPackage @"macports"
#define MPPackageVersion @"1.0"
-#define MP_DEFAULT_PKG_PATH @"/Library/Tcl"
#define TCL_RETURN_CODE @"return code"
#define TCL_RETURN_STRING @"return string"
#define MPFrameworkErrorDomain @"MacPortsFrameworkErrorDomain"
@@ -85,9 +84,6 @@
#define MPTRACE @"ports_trace"
-
-
-
/*!
@class MPInterpreter
@abstract Tcl interpreter object
@@ -104,9 +100,19 @@
}
++(NSString*) PKGPath;
+
++(void) setPKGPath:(NSString*)newPath;
+
++(void) terminateMPHelperTool;
+
++(NSTask*) task;
+
//Internal methods
-(BOOL) setOptionsForNewTclPort:(NSArray *)options;
+-(BOOL) resetTclInterpreterWithPath:(NSString *)path;
+
/*!
@brief Return singleton shared MPInterpreter instance
*/
@@ -198,5 +204,6 @@
- (void)setAuthorizationRef:(AuthorizationRef)authRef;
- (BOOL)checkIfAuthorized;
-(NSString *)evaluateStringWithMPHelperTool:(NSString *)statement error:(NSError **)mportError;
+-(NSString *)evaluateStringWithMPPortProcess:(NSString *)statement error:(NSError **)mportError;
@end
Modified: contrib/MacPorts_Framework/MPInterpreter.m
===================================================================
--- contrib/MacPorts_Framework/MPInterpreter.m 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPInterpreter.m 2010-03-26 19:46:35 UTC (rev 65491)
@@ -34,18 +34,19 @@
*/
#import "MPInterpreter.h"
+#import "MPMacPorts.h"
#include "BetterAuthorizationSampleLib.h"
#include "MPHelperCommon.h"
#include "MPHelperNotificationsProtocol.h"
static AuthorizationRef internalMacPortsAuthRef;
+static NSString* PKGPath = @"/Library/Tcl";
+static NSTask* aTask;
-
-
#pragma mark -
@implementation MPInterpreter
-#pragma mark Notifications Code
+#pragma mark Notifications Code
int Notifications_Send(int objc, Tcl_Obj *CONST objv[], int global, Tcl_Interp *interpreter) {
NSString *name;
NSMutableString *msg;
@@ -164,6 +165,20 @@
//tool
static NSString * tclInterpreterPkgPath = nil;
++(NSString*) PKGPath {
+ return PKGPath;
+}
+
++(void) setPKGPath:(NSString*)newPath {
+ if([PKGPath isNotEqualTo:newPath]) {
+ [PKGPath release];
+ PKGPath = [newPath copy];
+ //I should check if interp is nil. *not needed now
+ MPInterpreter *interp = (MPInterpreter*) [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"];
+ [interp resetTclInterpreterWithPath:PKGPath];
+ }
+}
+
#pragma mark -
#pragma mark Internal Methods
//Internal method for initializing actual C Tcl interpreter
@@ -184,7 +199,7 @@
}
if (path == nil)
- path = MP_DEFAULT_PKG_PATH;
+ path = PKGPath;
NSString * mport_fastload = [[@"source [file join \"" stringByAppendingString:path]
@@ -247,7 +262,7 @@
Tcl_DeleteInterp(_interpreter);
if (tclInterpreterPkgPath == nil)
- result = [self initTclInterpreter:&_interpreter withPath:MP_DEFAULT_PKG_PATH];
+ result = [self initTclInterpreter:&_interpreter withPath:PKGPath];
else
result = [self initTclInterpreter:&_interpreter withPath:tclInterpreterPkgPath];
@@ -259,9 +274,13 @@
return (result && tempResult) ;
}
+-(BOOL) resetTclInterpreterWithPath:(NSString*) path {
+ Tcl_DeleteInterp(_interpreter);
+ return [self initTclInterpreter:&_interpreter withPath:PKGPath];
+}
+
- (id) initWithPkgPath:(NSString *)path portOptions:(NSArray *)options {
if (self = [super init]) {
-
[self initTclInterpreter:&_interpreter withPath:path];
//set port options maybe I should do this elsewhere?
@@ -284,26 +303,23 @@
#pragma mark API methods
- (id) init {
- return [self initWithPkgPath:MP_DEFAULT_PKG_PATH portOptions:nil];
+ return [self initWithPkgPath:PKGPath portOptions:nil];
}
+ (MPInterpreter*)sharedInterpreterWithPkgPath:(NSString *)path {
- @synchronized(self) {
- if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"] == nil) {
- [[self alloc] initWithPkgPath:path portOptions:nil]; // assignment not done here
- }
- }
- return [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"];
+ return [self sharedInterpreterWithPkgPath:path portOptions:nil];
}
+ (MPInterpreter*)sharedInterpreter{
- return [self sharedInterpreterWithPkgPath:MP_DEFAULT_PKG_PATH];
+ return [self sharedInterpreterWithPkgPath:PKGPath];
}
-
-
+ (MPInterpreter*)sharedInterpreterWithPkgPath:(NSString *)path portOptions:(NSArray *)options {
@synchronized(self) {
+ if ([PKGPath isNotEqualTo:path]) {
+ [self setPKGPath:path];
+ }
+
if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"] == nil) {
[[self alloc] initWithPkgPath:path portOptions:options]; // assignment not done here
}
@@ -438,30 +454,24 @@
}
- (NSString *)evaluateStringWithPossiblePrivileges:(NSString *)statement error:(NSError **)mportError {
-
-
-
//N.B. I am going to insist that funciton users not pass in nil for the
//mportError parameter
- NSString * firstResult;
- NSString * secondResult;
+ NSString * result;
- *mportError = nil;
- firstResult = [self evaluateStringAsString:statement error:mportError];
-
- //Because of string results of methods like mportsync (which returns the empty string)
- //the only way to truly check for an error is to check the mportError parameter.
- //If it is nil then there was no error, if not we re-evaluate with privileges using
- //the helper tool
-
- if ( *mportError != nil) {
- *mportError = nil;
- secondResult = [self evaluateStringWithMPHelperTool:statement error:mportError];
-
- return secondResult;
- }
-
- return firstResult;
+ [[MPNotifications sharedListener]
+ sendIPCNotification:@"MPInfoNotification_&MP&_stdout_&MP&_None_&MP&_Starting up"];
+
+ // Is this the best way to know if the running user can use macports without privileges?
+ if ([[NSFileManager defaultManager] isWritableFileAtPath:PKGPath]) {
+ result = [self evaluateStringWithMPPortProcess:statement error:mportError];
+ } else {
+ result = [self evaluateStringWithMPHelperTool:statement error:mportError];
+ }
+
+ [[MPNotifications sharedListener]
+ sendIPCNotification:@"MPInfoNotification_&MP&_stdout_&MP&_None_&MP&_Shutting down"];
+
+ return result;
}
//NOTE: We expect the Framework client to initialize the AuthorizationRef
@@ -583,38 +593,10 @@
//Making the following assumption in error handling. If we return
//a noErr then response dictionary cannot be nil since everything went ok.
//Hence I'm only checking for errors WITHIN the following blocks ...
- if (err == noErr) {
- err = BASExecuteRequestInHelperTool(internalMacPortsAuthRef,
- kMPHelperCommandSet,
- (CFStringRef) bundleID,
- (CFDictionaryRef) request,
- &response);
- if (err == noErr){// retrieve result here if available
- if( response != NULL)
- result = (NSString *) (CFStringRef) CFDictionaryGetValue(response, CFSTR(kTclStringEvaluationResult));
- }
- else { //If we executed unsuccessfully
- if (mportError != NULL) {
- NSError * undError = [[[NSError alloc] initWithDomain:NSOSStatusErrorDomain
- code:err
- userInfo:[NSDictionary dictionaryWithObjectsAndKeys:
- NSLocalizedString(@"Check error code for OSStatus returned",@""),
- NSLocalizedDescriptionKey,
- nil]] autorelease];
-
- *mportError = [[[NSError alloc] initWithDomain:MPFrameworkErrorDomain
- code:MPHELPINSTFAILED
- userInfo:[NSDictionary dictionaryWithObjectsAndKeys:
- NSLocalizedString(@"Unable to execute MPHelperTool successfuly", @""),
- NSLocalizedDescriptionKey,
- undError, NSUnderlyingErrorKey,
- NSLocalizedString(@"BASExecuteRequestInHelperTool execution failed", @""),
- NSLocalizedFailureReasonErrorKey,
- nil]] autorelease];
- }
- }
- }
- else {//This means FixFaliure failed ... Report that in returned error
+ //
+ // NOTE: We don't automatically retry as the user wants to have a consistent cancel
+ // action (i.e. terminate the process when he wants to)
+ if (err != noErr) {//This means FixFaliure failed ... Report that in returned error
if (mportError != NULL) {
//I'm not sure of exactly how to report this error ...
//Do we need some error codes for our domain? I'll define one
@@ -643,7 +625,80 @@
return result;
}
+- (NSString *) evaluateStringWithMPPortProcess:(NSString *) statement error:(NSError **)mportError {
+ aTask = [[NSTask alloc] init];
+ NSMutableArray *args = [NSMutableArray array];
+
+ /* set arguments */
+ [args addObject:PKGPath];
+ [aTask setCurrentDirectoryPath:[[NSBundle bundleForClass:[self class]] resourcePath]];
+ [aTask setLaunchPath:[[NSBundle bundleForClass:[self class]] pathForResource:@"MPPortProcess" ofType:@""]];
+ [aTask setArguments:args];
+ [aTask launch];
+
+ NSConnection *notificationsConnection = [NSConnection defaultConnection];
+ // Vending MPNotifications sharedListener
+ [notificationsConnection setRootObject:[MPNotifications sharedListener]];
+
+ // Register the named connection
+ if ( [notificationsConnection registerName:@"MPNotifications"] ) {
+ NSLog( @"Successfully registered connection with port %@",
+ [[notificationsConnection receivePort] description] );
+ } else {
+ NSLog( @"Name used by %@",
+ [[[NSPortNameServer systemDefaultPortNameServer] portForName:@"MPNotifications"] description] );
+ }
+
+
+ id theProxy;
+ do {
+ theProxy = [NSConnection
+ rootProxyForConnectionWithRegisteredName:@"MPPortProcess"
+ host:nil];
+ }
+ while (theProxy == nil);
+
+ [theProxy evaluateString:statement];
+ [aTask waitUntilExit];
+
+ int status = [aTask terminationStatus];
+
+ if (status != TCL_OK) {
+ NSLog(@"Task failed. Code: %i", status);
+ }
+ [[notificationsConnection receivePort] invalidate];
+
+ return nil;
+}
++ (NSTask*) task {
+ return aTask;
+}
+
++ (void) terminateMPHelperTool {
+ NSString * bundleID;
+
+ //In order to make the framework work normally by default ... we do a bare initialization
+ //of internalMacPortsAuthRef if the delegate hasn't iniitialzed it already
+ if (internalMacPortsAuthRef == NULL) {
+ OSStatus res = AuthorizationCreate (NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &internalMacPortsAuthRef);
+ assert(res == noErr);
+ }
+
+ NSBundle * mpBundle = [NSBundle bundleForClass:[self class]];
+ NSString * installToolPath = [mpBundle pathForResource:@"MPHelperInstallTool" ofType:nil];
+ bundleID = [mpBundle bundleIdentifier];
+
+ BASSetDefaultRules(internalMacPortsAuthRef,
+ kMPHelperCommandSet,
+ (CFStringRef) bundleID,
+ NULL);
+ BASTerminateCommand(internalMacPortsAuthRef,
+ [bundleID UTF8String],
+ [installToolPath UTF8String]);
+ return;
+}
+
#pragma mark -
#pragma mark Authorization Code
Modified: contrib/MacPorts_Framework/MPMacPorts.h
===================================================================
--- contrib/MacPorts_Framework/MPMacPorts.h 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPMacPorts.h 2010-03-26 19:46:35 UTC (rev 65491)
@@ -76,15 +76,15 @@
}
++ (NSString*) PKGPath;
+
++ (void) setPKGPath:(NSString*)newPath;
+
/*!
@brief Returns an MPMacPorts object that represents the MacPorts system on user's machine.
*/
+ (MPMacPorts *)sharedInstance;
-+ (MPMacPorts *)sharedInstanceWithPortOptions:(NSArray *)options;
-
-//Names of messages below are subject to change
-+ (MPMacPorts *)sharedInstanceWithPkgPath:(NSString *)path;
+ (MPMacPorts *)sharedInstanceWithPkgPath:(NSString *)path portOptions:(NSArray *)options;
- (id) initWithPkgPath:(NSString *)path portOptions:(NSArray *)options;
- (BOOL) setPortOptions:(NSArray *)options;
@@ -221,6 +221,7 @@
*/
-(BOOL) authorizationMode;
+- (void) cancelCurrentCommand;
//Notifications stuff for private use and testing purposes
-(void)registerForLocalNotifications;
Modified: contrib/MacPorts_Framework/MPMacPorts.m
===================================================================
--- contrib/MacPorts_Framework/MPMacPorts.m 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPMacPorts.m 2010-03-26 19:46:35 UTC (rev 65491)
@@ -39,12 +39,10 @@
@implementation MPMacPorts
-
- (id) init {
- return [self initWithPkgPath:MP_DEFAULT_PKG_PATH portOptions:nil];
+ return [self initWithPkgPath:[MPInterpreter PKGPath] portOptions:nil];
}
-
- (id) initWithPkgPath:(NSString *)path portOptions:(NSArray *)options {
if (self = [super init]) {
interpreter = [MPInterpreter sharedInterpreterWithPkgPath:path portOptions:nil];
@@ -53,16 +51,40 @@
return self;
}
-+ (MPMacPorts *)sharedInstance {
- return [self sharedInstanceWithPkgPath:MP_DEFAULT_PKG_PATH];
++(NSString*) PKGPath {
+ return [MPInterpreter PKGPath];
}
-+ (MPMacPorts *)sharedInstanceWithPortOptions:(NSArray *)options {
- return [self sharedInstanceWithPkgPath:MP_DEFAULT_PKG_PATH portOptions:options];
++(void) setPKGPath:(NSString*)newPath {
+ [MPInterpreter setPKGPath:newPath];
}
+- (void) cancelCurrentCommand {
+ if ([[NSFileManager defaultManager] isWritableFileAtPath:[MPInterpreter PKGPath]]) {
+ NSLog(@"Terminating MPPortProcess");
+ NSTask *task = [MPInterpreter task];
+ if(task != nil && [task isRunning]) {
+ [task terminate];
+ }
+ } else {
+ NSLog(@"Terminating MPHelperTool");
+ [MPInterpreter terminateMPHelperTool];
+ }
+}
+
++ (MPMacPorts *)sharedInstance {
+ return [self sharedInstanceWithPkgPath:[MPInterpreter PKGPath] portOptions:nil];
+}
+
+ (MPMacPorts *)sharedInstanceWithPkgPath:(NSString *)path portOptions:(NSArray *)options {
@synchronized(self) {
+ if ([path isEqual:nil]) {
+ path = [MPInterpreter PKGPath];
+ }
+ if ([[MPInterpreter PKGPath] isNotEqualTo:path]) {
+ [self setPKGPath:path];
+ }
+
if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPMacPorts"] == nil) {
[[self alloc] initWithPkgPath:path portOptions:options ]; // assignment not done here
}
@@ -70,15 +92,6 @@
return [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPMacPorts"];
}
-+ (MPMacPorts *)sharedInstanceWithPkgPath:(NSString *)path {
- @synchronized(self) {
- if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPMacPorts"] == nil) {
- [[self alloc] initWithPkgPath:path portOptions:nil ]; // assignment not done here
- }
- }
- return [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPMacPorts"];
-}
-
- (BOOL) setPortOptions:(NSArray *)options {
return [interpreter setOptionsForNewTclPort:options];
}
Modified: contrib/MacPorts_Framework/MPMacPortsTest.m
===================================================================
--- contrib/MacPorts_Framework/MPMacPortsTest.m 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPMacPortsTest.m 2010-03-26 19:46:35 UTC (rev 65491)
@@ -65,7 +65,7 @@
//Ask Randall about what exactly port tree path is
-(void) testPathToPortIndex {
- NSURL *pindex = [testPort pathToPortIndex:@"file:///Users/Armahg/macportsbuild/build1/"];
+ NSURL *pindex = [testPort pathToPortIndex:@"file:///Users/juanger/local/macportsbuild/branch-unprivileged/"];
STAssertNotNil(pindex, @"URL for port index should not be nil");
}
@@ -74,7 +74,14 @@
STAssertNotNil(searchResults, @"This dictionary should have at least %d key value pairs", [searchResults count]);
}
+-(void) testPKGPathChange {
+ NSString *newPkgPath = @"/Users/juanger/local/macportsbuild/branch-unprivileged/Library/Tcl";
+ STAssertEqualObjects([MPInterpreter PKGPath], @"/Library/Tcl", @"Initialy, the PKGPath should be /Library/Tcl");
+
+ [MPMacPorts sharedInstanceWithPkgPath:newPkgPath portOptions:nil];
+ STAssertEqualObjects([MPInterpreter PKGPath], newPkgPath, @"The global PKGPath should change as needed");
+}
/*-(void) testSync {
NSError * syncError = nil;
[testPort sync:&syncError];
Modified: contrib/MacPorts_Framework/MPPort.h
===================================================================
--- contrib/MacPorts_Framework/MPPort.h 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPPort.h 2010-03-26 19:46:35 UTC (rev 65491)
@@ -140,7 +140,14 @@
*/
- (void)deactivateWithVersion:(NSString *)version error:(NSError**)mpError;
+/*!
+ @brief Upgrades an outdated MPPort.
+ @discussion Only installed and active ports
+ should be upgraded
+ */
+- (void)upgradeWithError:(NSError**)mpError;
+
/*!
@brief Executes the specified target for this MPPort
@param target NSString target to be executed for this MPPort
@@ -290,4 +297,5 @@
- (void)execPortProc:(NSString *)procedure withOptions:(NSArray *)options version:(NSString *)version error:(NSError **)execError;
//Even more generic method to execute a Tcl command with any given number of args
- (void)execPortProc:(NSString *)procedure withParams:(NSArray *)params error:(NSError **)execError;
- at end
+
+ at end
\ No newline at end of file
Modified: contrib/MacPorts_Framework/MPPort.m
===================================================================
--- contrib/MacPorts_Framework/MPPort.m 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPPort.m 2010-03-26 19:46:35 UTC (rev 65491)
@@ -98,6 +98,10 @@
[self setObject:[self objectForKey:@"categories"] forKey:@"categoriesAsString"];
[self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"categories"]] forKey:@"categories"];
}
+ if ([self objectForKey:@"variants"] != nil) {
+ [self setObject:[self objectForKey:@"variants"] forKey:@"variantsAsString"];
+ [self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"variants"]] forKey:@"variants"];
+ }
if ([self objectForKey:@"depends_build"] != nil) {
[self setObject:[self objectForKey:@"depends_build"] forKey:@"depends_buildAsString"];
[self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"depends_build"]] forKey:@"depends_build"];
@@ -115,8 +119,23 @@
}
@try {
+ if ([[self valueForKey:@"description"] characterAtIndex:0] == '{') {
+ [self setValue:[self valueForKey:@"description"] forKey:@"description"];
+ }
+ }
+ @catch (NSException *e) {
+ [self setValue:[NSString stringWithFormat:
+ NSLocalizedStringWithDefaultValue(@"setPortWithTclListAsStringDescreiptionError",
+ @"Localizable",
+ [NSBundle mainBundle],
+ @"Port has an invalid desciption key.",
+ @"Error statement for exception raised when testing description.")]
+ forKey:@"description"];
+ }
+
+ @try {
if ([[self valueForKey:@"long_description"] characterAtIndex:0] == '{') {
- [self setValue:[self valueForKey:@"description"] forKey:@"long_description"];
+ [self setValue:[self valueForKey:@"long_description"] forKey:@"long_description"];
}
}
@catch (NSException *e) {
@@ -124,7 +143,7 @@
NSLocalizedStringWithDefaultValue(@"setPortWithTclListAsStringDescreiptionError",
@"Localizable",
[NSBundle mainBundle],
- @"Port has an invalid desciption or long_description key.",
+ @"Port has an invalid long_description key.",
@"Error statement for exception raised when testing long_description.")]
forKey:@"long_description"];
}
@@ -211,7 +230,13 @@
procedure, [self name], v, opts]
error:execError];
}
-
+ // I must get the new state of the port from the registry
+ // instead of just [self setState:MPPortStateLearnState];
+ //NSArray *receipts = [[[MPRegistry sharedRegistry] installed:[self name]] objectForKey:[self name]];
+ //[self setStateFromReceipts:receipts];
+ [self removeObjectForKey:@"receipts"];
+ [self setState:MPPortStateLearnState];
+
[[MPNotifications sharedListener] setPerformingTclCommand:@""];
[self sendGlobalExecNotification:procedure withStatus:@"Finished"];
}
@@ -241,23 +266,14 @@
//NSString * tclCmd = [@"YES_" stringByAppendingString:target];
[[MPNotifications sharedListener] setPerformingTclCommand:target];
- if ([parentMacPortsInstance authorizationMode]) {
- [interpreter evaluateStringWithMPHelperTool:
- [NSString stringWithFormat:
- @"set portHandle [mportopen %@ %@ %@]; mportexec $portHandle %@; mportclose $portHandle",
- [self valueForKey:@"porturl"], opts, vrnts, target]
- error:execError];
- }
- else {
- [interpreter evaluateStringWithPossiblePrivileges:
- [NSString stringWithFormat:
- @"set portHandle [mportopen %@ %@ %@]; mportexec $portHandle %@; mportclose $portHandle",
- [self valueForKey:@"porturl"], opts, vrnts, target]
- error:execError];
- }
+ [interpreter evaluateStringWithPossiblePrivileges:
+ [NSString stringWithFormat:
+ @"set portHandle [mportopen %@ %@ %@]; mportexec $portHandle %@; mportclose $portHandle",
+ [self valueForKey:@"porturl"], opts, vrnts, target]
+ error:execError];
-
+ [self setState:MPPortStateLearnState];
[[MPNotifications sharedListener] setPerformingTclCommand:@""];
[self sendGlobalExecNotification:target withStatus:@"Finished"];
@@ -331,6 +347,10 @@
}
}
+- (void)upgradeWithError:(NSError **)mError {
+ [self execPortProc:@"mportupgrade" withOptions:nil version:@"" error:mError];
+}
+
-(void)configureWithOptions:(NSArray *)options variants:(NSArray *)variants error:(NSError **)mError {
[self exec:@"configure" withOptions:options variants:variants error:mError];
}
@@ -383,6 +403,7 @@
[self exec:@"srpm" withOptions:options variants:variants error:mError];
}
+
# pragma mark -
@@ -390,7 +411,12 @@
- (id)objectForKey:(id)aKey {
if ([aKey isEqualToString:@"receipts"] && ![super objectForKey:aKey]) {
- [self setObject:[[[MPRegistry sharedRegistry] installed:[self objectForKey:@"name"]] objectForKey:[self objectForKey:@"name"]]forKey:aKey];
+ NSArray *receipts = [[[MPRegistry sharedRegistry] installed:[self objectForKey:@"name"]] objectForKey:[self objectForKey:@"name"]];
+ if (receipts == nil) {
+ return nil;
+ } else {
+ [self setObject:receipts forKey:aKey];
+ }
}
return [super objectForKey:aKey];
}
@@ -436,7 +462,7 @@
}
- (void)setStateFromReceipts:(NSArray *)receipts {
- [self setObject:receipts forKey:@"receipts"];
+ [self setObject:receipts forKey:@"receipts"];
[self setState:MPPortStateLearnState];
}
Modified: contrib/MacPorts_Framework/MPPortManipulationTest.m
===================================================================
--- contrib/MacPorts_Framework/MPPortManipulationTest.m 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPPortManipulationTest.m 2010-03-26 19:46:35 UTC (rev 65491)
@@ -18,9 +18,11 @@
-(BOOL) installUninstallManipulation:(NSString *)portName {
BOOL ret = NO;
+ MPMacPorts * port = [MPMacPorts sharedInstanceWithPkgPath:@"/Users/juanger/Projects/gsoc09-gui/MPGUI/build/Debug-InstallMacPorts/macports-1.8/Library/Tcl"
+ portOptions:nil];
+ NSLog(@"PkgPath1: %@", [MPInterpreter PKGPath]);
MPRegistry * registry = [MPRegistry sharedRegistry];
- MPMacPorts * port = [MPMacPorts sharedInstance];
-
+ NSLog(@"PkgPath2: %@", [MPInterpreter PKGPath]);
// Check if portName is installed
unsigned int installed = [[registry installed:portName] count];
@@ -41,7 +43,7 @@
//I guess we should just return here
return ret;
}
-
+ NSLog(@"Uninstallation Successful.");
//Uninstallation was successful ... now check registry to make sure its gone
installed = [[registry installed:portName] count];
if (installed > 0) { //Uh oh ... is this suppose to happen?
@@ -67,9 +69,11 @@
//I guess we should just return here
return ret;
}
-
+ NSLog(@"Installation successful");
//Installation was successful ... now check registry to make sure its gone
installed = [[registry installed:portName] count];
+ NSLog(@"%@", [registry installed]);
+
if (installed == 0) { //Uh oh ... is this suppose to happen?
NSLog(@"%@ is not installed after successful install operation ... double check this from commandline", portName);
//for now return
@@ -119,15 +123,16 @@
// NSLog(@"\n\n Installation successful \n\n");
//
//
-// }
+// }
//
// //Double check somehow
// MPRegistry * registry = [MPRegistry sharedRegistry];
// NSLog(@"\n\n Result from registry is %@ \n\n", [registry installed:[keyArray objectAtIndex:0]]);
-
+
PortManipulator * pm = [[PortManipulator alloc] init];
STAssertTrue([pm installUninstallManipulation:@"pngcrush"] , @"This test should always return true on success");
[pm release];
+
}
@end
Copied: contrib/MacPorts_Framework/MPPortProcess.h (from rev 65490, branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.h)
===================================================================
--- contrib/MacPorts_Framework/MPPortProcess.h (rev 0)
+++ contrib/MacPorts_Framework/MPPortProcess.h 2010-03-26 19:46:35 UTC (rev 65491)
@@ -0,0 +1,19 @@
+//
+// MPPortProcess.h
+// MacPorts.Framework
+//
+// Created by Juan Germán Castañeda Echevarría on 7/9/09.
+// Copyright 2009 UNAM. All rights reserved.
+//
+
+#include <tcl.h>
+
+ at interface MPPortProcess : NSObject {
+ Tcl_Interp *interpreter;
+ NSString *PKGPath;
+}
+
+
+- (oneway void)evaluateString:(bycopy id)statement;
+
+ at end
Copied: contrib/MacPorts_Framework/MPPortProcess.m (from rev 65490, branches/gsoc09-gui/MacPorts_Framework/MPPortProcess.m)
===================================================================
--- contrib/MacPorts_Framework/MPPortProcess.m (rev 0)
+++ contrib/MacPorts_Framework/MPPortProcess.m 2010-03-26 19:46:35 UTC (rev 65491)
@@ -0,0 +1,104 @@
+//
+// MPPortProcess.m
+// MacPorts.Framework
+//
+// Created by Juan Germán Castañeda Echevarría on 7/9/09.
+// Copyright 2009 UNAM. All rights reserved.
+//
+
+#import "MPPortProcess.h"
+#import "SimpleLog.h"
+
+ at interface MPPortProcess (PrivateMethods)
+
+- (void)initializeInterpreter;
+
+ at end
+
+ at implementation MPPortProcess
+
+- (id)initWithPKGPath:(NSString*)pkgPath {
+ PKGPath = pkgPath;
+ [self initializeInterpreter];
+ return self;
+}
+
+- (oneway void)evaluateString:(bycopy id)statement {
+ // TODO Handle the posible errors and notifications
+ int retCode = Tcl_Eval(interpreter, [statement UTF8String]);
+ if (retCode != TCL_OK) {
+ Tcl_Obj * interpObj = Tcl_GetObjResult(interpreter);
+ int length, errCode;
+ NSString * errString = [NSString stringWithUTF8String:Tcl_GetStringFromObj(interpObj, &length)];
+ errCode = Tcl_GetErrno();
+
+ NSLog(@"- %@ - %i", errString, errCode);
+ exit(errCode);
+ }
+
+ exit(retCode);
+}
+
+
+#pragma mark Private Methods
+
+- (void)initializeInterpreter {
+ // Create interpreter
+ interpreter = Tcl_CreateInterp();
+ if(interpreter == NULL) {
+ NSLog(@"Error in Tcl_CreateInterp, aborting.");
+ }
+ // Initialize interpreter
+ if(Tcl_Init(interpreter) == TCL_ERROR) {
+ NSLog(@"Error in Tcl_Init: %s", Tcl_GetStringResult(interpreter));
+ Tcl_DeleteInterp(interpreter);
+ }
+ // Load macports_fastload.tcl from PKGPath/macports1.0
+ NSString * mport_fastload = [[@"source [file join \"" stringByAppendingString:PKGPath]
+ stringByAppendingString:@"\" macports1.0 macports_fastload.tcl]"];
+ if(Tcl_Eval(interpreter, [mport_fastload UTF8String]) == TCL_ERROR) {
+ NSLog(@"Error in Tcl_EvalFile macports_fastload.tcl: %s", Tcl_GetStringResult(interpreter));
+ Tcl_DeleteInterp(interpreter);
+ }
+ // Load notifications methods
+ Tcl_CreateObjCommand(interpreter, "simplelog", SimpleLog_Command, NULL, NULL);
+ if (Tcl_PkgProvide(interpreter, "simplelog", "1.0") != TCL_OK) {
+ NSLog(@"Error in Tcl_PkgProvide: %s", Tcl_GetStringResult(interpreter));
+ }
+ // Load portProcessInit.tcl
+ NSString *portProcessInitPath = @"portProcessInit.tcl";
+ if( Tcl_EvalFile(interpreter, [portProcessInitPath UTF8String]) == TCL_ERROR) {
+ NSLog(@"Error in Tcl_EvalFile portProcessInit.tcl: %s", Tcl_GetStringResult(interpreter));
+ Tcl_DeleteInterp(interpreter);
+ }
+}
+
+ at end
+
+int main(int argc, char const * argv[]) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSConnection *portProcessConnection;
+ portProcessConnection = [NSConnection defaultConnection];
+ NSString *PKGPath = [[NSString alloc] initWithCString:argv[1] encoding:NSUTF8StringEncoding];
+// NSString *portProcessInitPath = [[NSString alloc] initWithCString:argv[2] encoding:NSUTF8StringEncoding];
+
+ MPPortProcess *portProcess = [[MPPortProcess alloc] initWithPKGPath:PKGPath];
+
+ // Vending portProcess
+ [portProcessConnection setRootObject:portProcess];
+
+ // Register the named connection
+ if ( [portProcessConnection registerName:@"MPPortProcess"] ) {
+ NSLog( @"Successfully registered connection with port %@",
+ [[portProcessConnection receivePort] description] );
+ } else {
+ NSLog( @"Name used by %@",
+ [[[NSPortNameServer systemDefaultPortNameServer] portForName:@"MPPortProcess"] description] );
+ }
+
+ // Wait for any message
+ [[NSRunLoop currentRunLoop] run];
+ [pool release];
+ return 0;
+}
\ No newline at end of file
Modified: contrib/MacPorts_Framework/MPRegistry.h
===================================================================
--- contrib/MacPorts_Framework/MPRegistry.h 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MPRegistry.h 2010-03-26 19:46:35 UTC (rev 65491)
@@ -60,7 +60,7 @@
- (NSDictionary *)installed;
/*
- @brief Calls [self installed:name version:@""]
+ @brief Calls [self installed:name withVersion:@""]
@param name Text to match the port name
*/
- (NSDictionary *)installed:(NSString *)name;
Property changes on: contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj
___________________________________________________________________
Modified: svn:ignore
- *.mode1
*.pbxuser
+ *.mode1
*.mode1v3
*.pbxuser
Modified: contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj
===================================================================
--- contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj 2010-03-26 19:46:35 UTC (rev 65491)
@@ -21,6 +21,54 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
+ 2160109C1094C66300EE9CD0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED12AA60E3E7E900026773D /* Cocoa.framework */; };
+ 2160109F1094C6ED00EE9CD0 /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA0F56E0DFEB55E00C15082 /* Tcl.framework */; };
+ 216010A21094C6FD00EE9CD0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECD970D0E465C7800488335 /* Security.framework */; };
+ 216010A31094C6FD00EE9CD0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECD970D0E465C7800488335 /* Security.framework */; };
+ 216010C51094D34500EE9CD0 /* MPRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 48F811BE0CE4636A009630DE /* MPRegistry.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010C61094D34500EE9CD0 /* MPInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 48906AFB0C4230B700A3ED8A /* MPInterpreter.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010C71094D34500EE9CD0 /* MacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E9925B0C82C45800219DDF /* MacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010C81094D34500EE9CD0 /* MPMacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E993920C82CAAE00219DDF /* MPMacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010C91094D34500EE9CD0 /* MPIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 487679530C98C2EB00577C59 /* MPIndex.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010CA1094D34500EE9CD0 /* MPPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 487679670C98C55E00577C59 /* MPPort.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010CB1094D34500EE9CD0 /* MPReceipt.h in Headers */ = {isa = PBXBuildFile; fileRef = 48A866A80CD364F700B521BC /* MPReceipt.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010CC1094D34500EE9CD0 /* MPMutableDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 481D04A00CDAAAFC00D4A550 /* MPMutableDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010CD1094D34500EE9CD0 /* MPNotifications.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E270D070E158CED00BAE687 /* MPNotifications.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 216010CE1094D34500EE9CD0 /* BetterAuthorizationSampleLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EC260710E426FC80013BC48 /* BetterAuthorizationSampleLib.h */; };
+ 216010CF1094D34500EE9CD0 /* MPHelperCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EC260950E4272D20013BC48 /* MPHelperCommon.h */; };
+ 216010D01094D34500EE9CD0 /* MPHelperNotificationsCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8563B60E5DDF7000C1D73C /* MPHelperNotificationsCommon.h */; };
+ 216010D11094D34500EE9CD0 /* MPHelperNotificationsProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8563B70E5DDF7000C1D73C /* MPHelperNotificationsProtocol.h */; };
+ 216010D21094D34500EE9CD0 /* MPNotifications+IPCAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE6DDCC0E6276AA00FB2115 /* MPNotifications+IPCAdditions.h */; };
+ 216010D41094D34500EE9CD0 /* MPHelperInstallTool in Resources */ = {isa = PBXBuildFile; fileRef = 6EC260870E426FF10013BC48 /* MPHelperInstallTool */; };
+ 216010D51094D34500EE9CD0 /* MPPortProcess in Resources */ = {isa = PBXBuildFile; fileRef = 21D9543E100940EE00DEF58A /* MPPortProcess */; };
+ 216010D61094D34500EE9CD0 /* MPHelperTool in Resources */ = {isa = PBXBuildFile; fileRef = 6ED12A4A0E3E552F0026773D /* MPHelperTool */; };
+ 216010D71094D34500EE9CD0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
+ 216010D81094D34500EE9CD0 /* init.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 48E9939E0C82CEB000219DDF /* init.tcl */; };
+ 216010D91094D34500EE9CD0 /* ToDo.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6E44A00C0E2DAD66007DE8EC /* ToDo.txt */; };
+ 216010DA1094D34500EE9CD0 /* interpInit.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 6EE93E660E493AC600AECE9E /* interpInit.tcl */; };
+ 216010DB1094D34500EE9CD0 /* portProcessInit.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 21D954711009475200DEF58A /* portProcessInit.tcl */; };
+ 216010DD1094D34500EE9CD0 /* MPInterpreter.m in Sources */ = {isa = PBXBuildFile; fileRef = 48906AFC0C4230B700A3ED8A /* MPInterpreter.m */; };
+ 216010DE1094D34500EE9CD0 /* MPMacPorts.m in Sources */ = {isa = PBXBuildFile; fileRef = 48E993930C82CAAE00219DDF /* MPMacPorts.m */; };
+ 216010DF1094D34500EE9CD0 /* MPIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = 487679540C98C2EB00577C59 /* MPIndex.m */; };
+ 216010E01094D34500EE9CD0 /* MPPort.m in Sources */ = {isa = PBXBuildFile; fileRef = 487679680C98C55E00577C59 /* MPPort.m */; };
+ 216010E11094D34500EE9CD0 /* MPReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 48A866A90CD364F700B521BC /* MPReceipt.m */; };
+ 216010E21094D34500EE9CD0 /* MPMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 481D04A10CDAAAFD00D4A550 /* MPMutableDictionary.m */; };
+ 216010E31094D34500EE9CD0 /* MPRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 48F811BF0CE4638C009630DE /* MPRegistry.m */; };
+ 216010E41094D34500EE9CD0 /* MPNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E270D080E158CED00BAE687 /* MPNotifications.m */; };
+ 216010E51094D34500EE9CD0 /* BetterAuthorizationSampleLib.c in Sources */ = {isa = PBXBuildFile; fileRef = 6EC260700E426FC80013BC48 /* BetterAuthorizationSampleLib.c */; };
+ 216010E61094D34500EE9CD0 /* MPHelperCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 6EC260960E4272D20013BC48 /* MPHelperCommon.c */; };
+ 216010E71094D34500EE9CD0 /* MPHelperNotificationsCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 6E8563B50E5DDF7000C1D73C /* MPHelperNotificationsCommon.c */; };
+ 216010E81094D34500EE9CD0 /* MPNotifications+IPCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE6DDCD0E6276AA00FB2115 /* MPNotifications+IPCAdditions.m */; };
+ 216010EA1094D34500EE9CD0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED12AA60E3E7E900026773D /* Cocoa.framework */; };
+ 216010EB1094D34500EE9CD0 /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA0F56E0DFEB55E00C15082 /* Tcl.framework */; };
+ 216010EC1094D34500EE9CD0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECD970D0E465C7800488335 /* Security.framework */; };
+ 218DEE2610162091003B5A3B /* SimpleLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 218DED83101612F1003B5A3B /* SimpleLog.m */; };
+ 21D95442100940FF00DEF58A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EB6FC900E45DEA80057962C /* Foundation.framework */; };
+ 21D954431009411400DEF58A /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA0F56E0DFEB55E00C15082 /* Tcl.framework */; };
+ 21D954471009412F00DEF58A /* MPPortProcess.m in Sources */ = {isa = PBXBuildFile; fileRef = 21D954461009412F00DEF58A /* MPPortProcess.m */; };
+ 21D954721009475200DEF58A /* portProcessInit.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 21D954711009475200DEF58A /* portProcessInit.tcl */; };
+ 21D9548C1009522100DEF58A /* MPPortProcess in Resources */ = {isa = PBXBuildFile; fileRef = 21D9543E100940EE00DEF58A /* MPPortProcess */; };
+ 21F6DD701017E38E00FC43DE /* SimpleLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 218DED82101612F1003B5A3B /* SimpleLog.h */; };
481D04A20CDAAAFD00D4A550 /* MPMutableDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 481D04A00CDAAAFC00D4A550 /* MPMutableDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
481D04A30CDAAAFD00D4A550 /* MPMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 481D04A10CDAAAFD00D4A550 /* MPMutableDictionary.m */; };
4825ECC30CE6145B006B0385 /* MPRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 48F811BE0CE4636A009630DE /* MPRegistry.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -34,7 +82,6 @@
48A866AA0CD364F700B521BC /* MPReceipt.h in Headers */ = {isa = PBXBuildFile; fileRef = 48A866A80CD364F700B521BC /* MPReceipt.h */; settings = {ATTRIBUTES = (Public, ); }; };
48A866AB0CD364F700B521BC /* MPReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 48A866A90CD364F700B521BC /* MPReceipt.m */; };
48E9925C0C82C45800219DDF /* MacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E9925B0C82C45800219DDF /* MacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 48E992980C82C98C00219DDF /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48E992970C82C98C00219DDF /* Tcl.framework */; };
48E993940C82CAAE00219DDF /* MPMacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E993920C82CAAE00219DDF /* MPMacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
48E993950C82CAAE00219DDF /* MPMacPorts.m in Sources */ = {isa = PBXBuildFile; fileRef = 48E993930C82CAAE00219DDF /* MPMacPorts.m */; };
48E9939F0C82CEB000219DDF /* init.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 48E9939E0C82CEB000219DDF /* init.tcl */; };
@@ -66,8 +113,6 @@
6EC2609E0E42950C0013BC48 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EC2609D0E42950C0013BC48 /* CoreFoundation.framework */; };
6ECD98110E484E8400488335 /* MPHelperTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ECD98100E484E8400488335 /* MPHelperTool.m */; };
6ECD99C60E48B91B00488335 /* MPHelperToolTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ECD99C50E48B91B00488335 /* MPHelperToolTest.m */; };
- 6ED12A550E3E55DF0026773D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED12A540E3E55DF0026773D /* Security.framework */; };
- 6ED12A560E3E55DF0026773D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED12A540E3E55DF0026773D /* Security.framework */; };
6ED12AF10E3E9E210026773D /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA0F56E0DFEB55E00C15082 /* Tcl.framework */; };
6EE6DDA40E626D4A00FB2115 /* MacPorts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* MacPorts.framework */; };
6EE6DDA70E626D5A00FB2115 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EB6FC900E45DEA80057962C /* Foundation.framework */; };
@@ -77,10 +122,37 @@
6EE93E670E493AC600AECE9E /* interpInit.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 6EE93E660E493AC600AECE9E /* interpInit.tcl */; };
6EE93FAB0E495C2200AECE9E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECD970D0E465C7800488335 /* Security.framework */; };
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
- 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
+ 216010BF1094D34500EE9CD0 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 6ED12A490E3E552F0026773D;
+ remoteInfo = MPHelperTool;
+ };
+ 216010C11094D34500EE9CD0 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 6EC260860E426FF10013BC48;
+ remoteInfo = MPHelperInstallTool;
+ };
+ 216010C31094D34500EE9CD0 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 21D9543D100940EE00DEF58A;
+ remoteInfo = MPPortProcess;
+ };
+ 21D9544B1009416100DEF58A /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 21D9543D100940EE00DEF58A;
+ remoteInfo = MPPortProcess;
+ };
6E1AE8460E232D0700F6D7BC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -112,9 +184,15 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
- 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 21067BB50FE5B25800CAD732 /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
+ 216010F21094D34500EE9CD0 /* MacPorts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MacPorts.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 218DED82101612F1003B5A3B /* SimpleLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLog.h; sourceTree = "<group>"; };
+ 218DED83101612F1003B5A3B /* SimpleLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleLog.m; sourceTree = "<group>"; };
+ 21D9543E100940EE00DEF58A /* MPPortProcess */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MPPortProcess; sourceTree = BUILT_PRODUCTS_DIR; };
+ 21D954461009412F00DEF58A /* MPPortProcess.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPortProcess.m; sourceTree = "<group>"; };
+ 21D954491009413800DEF58A /* MPPortProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPortProcess.h; sourceTree = "<group>"; };
+ 21D954711009475200DEF58A /* portProcessInit.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = portProcessInit.tcl; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; };
32DBCF5E0370ADEE00C91783 /* MacPorts.Framework_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacPorts.Framework_Prefix.pch; sourceTree = "<group>"; };
481D04A00CDAAAFC00D4A550 /* MPMutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MPMutableDictionary.h; sourceTree = "<group>"; };
481D04A10CDAAAFD00D4A550 /* MPMutableDictionary.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MPMutableDictionary.m; sourceTree = "<group>"; };
@@ -134,10 +212,9 @@
48A866A80CD364F700B521BC /* MPReceipt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPReceipt.h; sourceTree = "<group>"; };
48A866A90CD364F700B521BC /* MPReceipt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPReceipt.m; sourceTree = "<group>"; };
48E9925B0C82C45800219DDF /* MacPorts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacPorts.h; sourceTree = "<group>"; };
- 48E992970C82C98C00219DDF /* Tcl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tcl.framework; path = /System/Library/Frameworks/Tcl.framework; sourceTree = "<absolute>"; };
48E993920C82CAAE00219DDF /* MPMacPorts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMacPorts.h; sourceTree = "<group>"; };
48E993930C82CAAE00219DDF /* MPMacPorts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMacPorts.m; sourceTree = "<group>"; };
- 48E9939E0C82CEB000219DDF /* init.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = init.tcl; sourceTree = "<group>"; };
+ 48E9939E0C82CEB000219DDF /* init.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = init.tcl; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; };
48F811BE0CE4636A009630DE /* MPRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRegistry.h; sourceTree = "<group>"; };
48F811BF0CE4638C009630DE /* MPRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRegistry.m; sourceTree = "<group>"; };
6E270D070E158CED00BAE687 /* MPNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNotifications.h; sourceTree = "<group>"; };
@@ -164,19 +241,36 @@
6ECD99C40E48B91B00488335 /* MPHelperToolTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHelperToolTest.h; sourceTree = "<group>"; };
6ECD99C50E48B91B00488335 /* MPHelperToolTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHelperToolTest.m; sourceTree = "<group>"; };
6ED12A4A0E3E552F0026773D /* MPHelperTool */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MPHelperTool; sourceTree = BUILT_PRODUCTS_DIR; };
- 6ED12A540E3E55DF0026773D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
6ED12AA60E3E7E900026773D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
6EE6DD9E0E626D2800FB2115 /* MPHelperToolIPCTester */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MPHelperToolIPCTester; sourceTree = BUILT_PRODUCTS_DIR; };
6EE6DDAA0E626DC900FB2115 /* MPHelperToolIPCTester.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHelperToolIPCTester.m; sourceTree = "<group>"; };
6EE6DDCC0E6276AA00FB2115 /* MPNotifications+IPCAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPNotifications+IPCAdditions.h"; sourceTree = "<group>"; };
6EE6DDCD0E6276AA00FB2115 /* MPNotifications+IPCAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPNotifications+IPCAdditions.m"; sourceTree = "<group>"; };
- 6EE93E660E493AC600AECE9E /* interpInit.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = interpInit.tcl; sourceTree = "<group>"; };
- 6EE93E780E495B3100AECE9E /* Tcl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tcl.framework; path = Library/Frameworks/Tcl.framework; sourceTree = SDKROOT; };
+ 6EE93E660E493AC600AECE9E /* interpInit.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = interpInit.tcl; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; };
8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8DC2EF5B0486A6940098B216 /* MacPorts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MacPorts.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 216010E91094D34500EE9CD0 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 216010EA1094D34500EE9CD0 /* Cocoa.framework in Frameworks */,
+ 216010EB1094D34500EE9CD0 /* Tcl.framework in Frameworks */,
+ 216010EC1094D34500EE9CD0 /* Security.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 21D9543C100940EE00DEF58A /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 21D95442100940FF00DEF58A /* Foundation.framework in Frameworks */,
+ 21D954431009411400DEF58A /* Tcl.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
489DD8F10C94365F00595506 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -197,10 +291,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 6ED12A550E3E55DF0026773D /* Security.framework in Frameworks */,
6ED12AF10E3E9E210026773D /* Tcl.framework in Frameworks */,
6EC2609E0E42950C0013BC48 /* CoreFoundation.framework in Frameworks */,
6EB6FC910E45DEA80057962C /* Foundation.framework in Frameworks */,
+ 216010A31094C6FD00EE9CD0 /* Security.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -217,9 +311,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,
- 48E992980C82C98C00219DDF /* Tcl.framework in Frameworks */,
- 6ED12A560E3E55DF0026773D /* Security.framework in Frameworks */,
+ 2160109C1094C66300EE9CD0 /* Cocoa.framework in Frameworks */,
+ 2160109F1094C6ED00EE9CD0 /* Tcl.framework in Frameworks */,
+ 216010A21094C6FD00EE9CD0 /* Security.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -234,6 +328,8 @@
6ED12A4A0E3E552F0026773D /* MPHelperTool */,
6EC260870E426FF10013BC48 /* MPHelperInstallTool */,
6EE6DD9E0E626D2800FB2115 /* MPHelperToolIPCTester */,
+ 21D9543E100940EE00DEF58A /* MPPortProcess */,
+ 216010F21094D34500EE9CD0 /* MacPorts.framework */,
);
name = Products;
sourceTree = "<group>";
@@ -241,6 +337,7 @@
0867D691FE84028FC02AAC07 /* MacPorts Foundation */ = {
isa = PBXGroup;
children = (
+ 21D954381009409E00DEF58A /* MPPortProcess */,
6EE6DDA80E626D8000FB2115 /* IPCTesting */,
6ED12A460E3E54A80026773D /* MPHelperTools */,
6EA293540E05C8C600902D12 /* Tcl Notifications */,
@@ -256,7 +353,7 @@
6EC2609D0E42950C0013BC48 /* CoreFoundation.framework */,
6EB6FC900E45DEA80057962C /* Foundation.framework */,
6ECD970D0E465C7800488335 /* Security.framework */,
- 6EE93E780E495B3100AECE9E /* Tcl.framework */,
+ 21067BB50FE5B25800CAD732 /* Tests-Info.plist */,
);
name = "MacPorts Foundation";
sourceTree = "<group>";
@@ -279,6 +376,7 @@
489DD8F50C94365F00595506 /* Test-Info.plist */,
6E44A00C0E2DAD66007DE8EC /* ToDo.txt */,
6EE93E660E493AC600AECE9E /* interpInit.tcl */,
+ 21D954711009475200DEF58A /* portProcessInit.tcl */,
);
name = Resources;
sourceTree = "<group>";
@@ -307,9 +405,6 @@
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
- 6ED12A540E3E55DF0026773D /* Security.framework */,
- 48E992970C82C98C00219DDF /* Tcl.framework */,
- 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
@@ -317,11 +412,21 @@
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
- 0867D69BFE84028FC02AAC07 /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
+ 21D954381009409E00DEF58A /* MPPortProcess */ = {
+ isa = PBXGroup;
+ children = (
+ 21D954491009413800DEF58A /* MPPortProcess.h */,
+ 21D954461009412F00DEF58A /* MPPortProcess.m */,
+ 218DED82101612F1003B5A3B /* SimpleLog.h */,
+ 218DED83101612F1003B5A3B /* SimpleLog.m */,
+ );
+ name = MPPortProcess;
+ sourceTree = "<group>";
+ };
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
@@ -394,6 +499,35 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
+ 216010C41094D34500EE9CD0 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 216010C51094D34500EE9CD0 /* MPRegistry.h in Headers */,
+ 216010C61094D34500EE9CD0 /* MPInterpreter.h in Headers */,
+ 216010C71094D34500EE9CD0 /* MacPorts.h in Headers */,
+ 216010C81094D34500EE9CD0 /* MPMacPorts.h in Headers */,
+ 216010C91094D34500EE9CD0 /* MPIndex.h in Headers */,
+ 216010CA1094D34500EE9CD0 /* MPPort.h in Headers */,
+ 216010CB1094D34500EE9CD0 /* MPReceipt.h in Headers */,
+ 216010CC1094D34500EE9CD0 /* MPMutableDictionary.h in Headers */,
+ 216010CD1094D34500EE9CD0 /* MPNotifications.h in Headers */,
+ 216010CE1094D34500EE9CD0 /* BetterAuthorizationSampleLib.h in Headers */,
+ 216010CF1094D34500EE9CD0 /* MPHelperCommon.h in Headers */,
+ 216010D01094D34500EE9CD0 /* MPHelperNotificationsCommon.h in Headers */,
+ 216010D11094D34500EE9CD0 /* MPHelperNotificationsProtocol.h in Headers */,
+ 216010D21094D34500EE9CD0 /* MPNotifications+IPCAdditions.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 218DEE4010162175003B5A3B /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 21F6DD701017E38E00FC43DE /* SimpleLog.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
6ED12AD30E3E9AE10026773D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@@ -429,6 +563,46 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
+ 216010BD1094D34500EE9CD0 /* MacPorts-embeddable */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 216010EE1094D34500EE9CD0 /* Build configuration list for PBXNativeTarget "MacPorts-embeddable" */;
+ buildPhases = (
+ 216010C41094D34500EE9CD0 /* Headers */,
+ 216010D31094D34500EE9CD0 /* Resources */,
+ 216010DC1094D34500EE9CD0 /* Sources */,
+ 216010E91094D34500EE9CD0 /* Frameworks */,
+ 2136ECA01097A29500833416 /* Install */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 216010BE1094D34500EE9CD0 /* PBXTargetDependency */,
+ 216010C01094D34500EE9CD0 /* PBXTargetDependency */,
+ 216010C21094D34500EE9CD0 /* PBXTargetDependency */,
+ );
+ name = "MacPorts-embeddable";
+ productInstallPath = "$(HOME)/Library/Frameworks";
+ productName = "MacPorts Foundation";
+ productReference = 216010F21094D34500EE9CD0 /* MacPorts.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+ 21D9543D100940EE00DEF58A /* MPPortProcess */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 21D954481009413000DEF58A /* Build configuration list for PBXNativeTarget "MPPortProcess" */;
+ buildPhases = (
+ 218DEE4010162175003B5A3B /* Headers */,
+ 21D9543B100940EE00DEF58A /* Sources */,
+ 21D9543C100940EE00DEF58A /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = MPPortProcess;
+ productName = MPPortProcess;
+ productReference = 21D9543E100940EE00DEF58A /* MPPortProcess */;
+ productType = "com.apple.product-type.tool";
+ };
489DD8F30C94365F00595506 /* Test */ = {
isa = PBXNativeTarget;
buildConfigurationList = 489DD8F60C94366000595506 /* Build configuration list for PBXNativeTarget "Test" */;
@@ -507,13 +681,13 @@
8DC2EF520486A6940098B216 /* Resources */,
8DC2EF540486A6940098B216 /* Sources */,
8DC2EF560486A6940098B216 /* Frameworks */,
- 6E49F4F40E00DD520030C3AF /* ShellScript */,
);
buildRules = (
);
dependencies = (
6ED12A530E3E55A50026773D /* PBXTargetDependency */,
6EC2608C0E4270110013BC48 /* PBXTargetDependency */,
+ 21D9544C1009416100DEF58A /* PBXTargetDependency */,
);
name = MacPorts;
productInstallPath = "$(HOME)/Library/Frameworks";
@@ -540,14 +714,31 @@
6EC260860E426FF10013BC48 /* MPHelperInstallTool */,
6ED12A490E3E552F0026773D /* MPHelperTool */,
8DC2EF4F0486A6940098B216 /* MacPorts */,
+ 216010BD1094D34500EE9CD0 /* MacPorts-embeddable */,
489DD8F30C94365F00595506 /* Test */,
DFE353650CFB8F0C003BACFC /* Docs */,
6EE6DD9D0E626D2800FB2115 /* MPHelperToolIPCTester */,
+ 21D9543D100940EE00DEF58A /* MPPortProcess */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
+ 216010D31094D34500EE9CD0 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 216010D41094D34500EE9CD0 /* MPHelperInstallTool in Resources */,
+ 216010D51094D34500EE9CD0 /* MPPortProcess in Resources */,
+ 216010D61094D34500EE9CD0 /* MPHelperTool in Resources */,
+ 216010D71094D34500EE9CD0 /* InfoPlist.strings in Resources */,
+ 216010D81094D34500EE9CD0 /* init.tcl in Resources */,
+ 216010D91094D34500EE9CD0 /* ToDo.txt in Resources */,
+ 216010DA1094D34500EE9CD0 /* interpInit.tcl in Resources */,
+ 216010DB1094D34500EE9CD0 /* portProcessInit.tcl in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
489DD8EF0C94365F00595506 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -567,34 +758,37 @@
buildActionMask = 2147483647;
files = (
6EB6FA460E43ECD60057962C /* MPHelperInstallTool in Resources */,
+ 21D9548C1009522100DEF58A /* MPPortProcess in Resources */,
6EB6FA420E43ECCE0057962C /* MPHelperTool in Resources */,
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
48E9939F0C82CEB000219DDF /* init.tcl in Resources */,
6E44A00D0E2DAD66007DE8EC /* ToDo.txt in Resources */,
6EE93E670E493AC600AECE9E /* interpInit.tcl in Resources */,
+ 21D954721009475200DEF58A /* portProcessInit.tcl in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 489DD8F20C94365F00595506 /* ShellScript */ = {
+ 2136ECA01097A29500833416 /* Install */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
- comments = "cd ~\nif [ -f /Library/LaunchDaemons/org.macports.frameworks.macports.plist ]\nthen\n\techo removing BAStuff\n\tsh mptooluninstall.sh\n\techo done removing BAStuff\nelse\n\techo nothing to Remove\nfi";
files = (
);
inputPaths = (
);
+ name = Install;
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n\n#rm -rf notifications.dylib\n\n\n";
+ shellPath = "/usr/bin/env ruby";
+ 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";
};
- 6E49F4F40E00DD520030C3AF /* ShellScript */ = {
+ 489DD8F20C94365F00595506 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
+ comments = "cd ~\nif [ -f /Library/LaunchDaemons/org.macports.frameworks.macports.plist ]\nthen\n\techo removing BAStuff\n\tsh mptooluninstall.sh\n\techo done removing BAStuff\nelse\n\techo nothing to Remove\nfi";
files = (
);
inputPaths = (
@@ -603,7 +797,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- 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";
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n\n#rm -rf notifications.dylib\n\n\n";
};
DFE353640CFB8F0C003BACFC /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -621,6 +815,34 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 216010DC1094D34500EE9CD0 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 216010DD1094D34500EE9CD0 /* MPInterpreter.m in Sources */,
+ 216010DE1094D34500EE9CD0 /* MPMacPorts.m in Sources */,
+ 216010DF1094D34500EE9CD0 /* MPIndex.m in Sources */,
+ 216010E01094D34500EE9CD0 /* MPPort.m in Sources */,
+ 216010E11094D34500EE9CD0 /* MPReceipt.m in Sources */,
+ 216010E21094D34500EE9CD0 /* MPMutableDictionary.m in Sources */,
+ 216010E31094D34500EE9CD0 /* MPRegistry.m in Sources */,
+ 216010E41094D34500EE9CD0 /* MPNotifications.m in Sources */,
+ 216010E51094D34500EE9CD0 /* BetterAuthorizationSampleLib.c in Sources */,
+ 216010E61094D34500EE9CD0 /* MPHelperCommon.c in Sources */,
+ 216010E71094D34500EE9CD0 /* MPHelperNotificationsCommon.c in Sources */,
+ 216010E81094D34500EE9CD0 /* MPNotifications+IPCAdditions.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 21D9543B100940EE00DEF58A /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 21D954471009412F00DEF58A /* MPPortProcess.m in Sources */,
+ 218DEE2610162091003B5A3B /* SimpleLog.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
489DD8F00C94365F00595506 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -681,6 +903,26 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
+ 216010BE1094D34500EE9CD0 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 6ED12A490E3E552F0026773D /* MPHelperTool */;
+ targetProxy = 216010BF1094D34500EE9CD0 /* PBXContainerItemProxy */;
+ };
+ 216010C01094D34500EE9CD0 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 6EC260860E426FF10013BC48 /* MPHelperInstallTool */;
+ targetProxy = 216010C11094D34500EE9CD0 /* PBXContainerItemProxy */;
+ };
+ 216010C21094D34500EE9CD0 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 21D9543D100940EE00DEF58A /* MPPortProcess */;
+ targetProxy = 216010C31094D34500EE9CD0 /* PBXContainerItemProxy */;
+ };
+ 21D9544C1009416100DEF58A /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 21D9543D100940EE00DEF58A /* MPPortProcess */;
+ targetProxy = 21D9544B1009416100DEF58A /* PBXContainerItemProxy */;
+ };
6E1AE8470E232D0700F6D7BC /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8DC2EF4F0486A6940098B216 /* MacPorts */;
@@ -718,6 +960,8 @@
1DEB91AE08733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -734,7 +978,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
- "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
);
LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
@@ -761,7 +1004,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
- "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
);
LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
@@ -774,14 +1016,15 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
DEBUG_INFORMATION_FORMAT = stabs;
GCC_ENABLE_OBJC_GC = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)";
+ ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
ZERO_LINK = NO;
};
name = Debug;
@@ -789,17 +1032,312 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
+ GCC_ENABLE_OBJC_GC = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 216010B01094C7FC00EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
GCC_ENABLE_OBJC_GC = YES;
+ GCC_VERSION = 4.0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
ZERO_LINK = NO;
};
+ name = "Release-Tiger";
+ };
+ 216010B11094C7FC00EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/bin;
+ PREBINDING = NO;
+ PRODUCT_NAME = MPHelperInstallTool;
+ ZERO_LINK = NO;
+ };
+ name = "Release-Tiger";
+ };
+ 216010B21094C7FC00EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/bin;
+ PREBINDING = NO;
+ PRODUCT_NAME = MPHelperTool;
+ ZERO_LINK = NO;
+ };
+ name = "Release-Tiger";
+ };
+ 216010B31094C7FC00EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = MacPorts.Framework_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ );
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
+ PRODUCT_NAME = MacPorts;
+ WRAPPER_EXTENSION = framework;
+ ZERO_LINK = NO;
+ };
+ name = "Release-Tiger";
+ };
+ 216010B41094C7FC00EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(NATIVE_ARCH)";
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(value)",
+ "$(DEVELOPER_FRAMEWORKS_DIR_QUOTED)",
+ );
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
+ INFOPLIST_FILE = "Test-Info.plist";
+ INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Cocoa,
+ "-framework",
+ SenTestingKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = Test;
+ WRAPPER_EXTENSION = octest;
+ ZERO_LINK = NO;
+ };
+ name = "Release-Tiger";
+ };
+ 216010B51094C7FC00EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = Docs;
+ ZERO_LINK = NO;
+ };
+ name = "Release-Tiger";
+ };
+ 216010B61094C7FC00EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_ENABLE_OBJC_GC = required;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INSTALL_PATH = /usr/local/bin;
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ "-framework",
+ AppKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = MPHelperToolIPCTester;
+ SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+ ZERO_LINK = NO;
+ };
+ name = "Release-Tiger";
+ };
+ 216010B71094C7FC00EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INSTALL_PATH = /usr/local/bin;
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ "-framework",
+ AppKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = MPPortProcess;
+ ZERO_LINK = NO;
+ };
+ name = "Release-Tiger";
+ };
+ 216010EF1094D34500EE9CD0 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
+ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
+ COPY_PHASE_STRIP = NO;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = MacPorts.Framework_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ );
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
+ PRODUCT_NAME = MacPorts;
+ SYMROOT = build;
+ WRAPPER_EXTENSION = framework;
+ ZERO_LINK = NO;
+ };
+ name = Debug;
+ };
+ 216010F01094D34500EE9CD0 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
+ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = MacPorts.Framework_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ );
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
+ PRODUCT_NAME = MacPorts;
+ WRAPPER_EXTENSION = framework;
+ ZERO_LINK = NO;
+ };
name = Release;
};
+ 216010F11094D34500EE9CD0 /* Release-Tiger */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
+ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = MacPorts.Framework_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ );
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)\"";
+ PRODUCT_NAME = MacPorts;
+ WRAPPER_EXTENSION = framework;
+ ZERO_LINK = NO;
+ };
+ name = "Release-Tiger";
+ };
+ 21D95440100940EF00DEF58A /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INSTALL_PATH = /usr/local/bin;
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ "-framework",
+ AppKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = MPPortProcess;
+ };
+ name = Debug;
+ };
+ 21D95441100940EF00DEF58A /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INSTALL_PATH = /usr/local/bin;
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ "-framework",
+ AppKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = MPPortProcess;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
489DD8F70C94366000595506 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -819,6 +1357,7 @@
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
INFOPLIST_FILE = "Test-Info.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
+ ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"-framework",
Cocoa,
@@ -1005,6 +1544,7 @@
buildConfigurations = (
1DEB91AE08733DA50010E9CD /* Debug */,
1DEB91AF08733DA50010E9CD /* Release */,
+ 216010B31094C7FC00EE9CD0 /* Release-Tiger */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1014,15 +1554,37 @@
buildConfigurations = (
1DEB91B208733DA50010E9CD /* Debug */,
1DEB91B308733DA50010E9CD /* Release */,
+ 216010B01094C7FC00EE9CD0 /* Release-Tiger */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 216010EE1094D34500EE9CD0 /* Build configuration list for PBXNativeTarget "MacPorts-embeddable" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 216010EF1094D34500EE9CD0 /* Debug */,
+ 216010F01094D34500EE9CD0 /* Release */,
+ 216010F11094D34500EE9CD0 /* Release-Tiger */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 21D954481009413000DEF58A /* Build configuration list for PBXNativeTarget "MPPortProcess" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 21D95440100940EF00DEF58A /* Debug */,
+ 21D95441100940EF00DEF58A /* Release */,
+ 216010B71094C7FC00EE9CD0 /* Release-Tiger */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
489DD8F60C94366000595506 /* Build configuration list for PBXNativeTarget "Test" */ = {
isa = XCConfigurationList;
buildConfigurations = (
489DD8F70C94366000595506 /* Debug */,
489DD8F80C94366000595506 /* Release */,
+ 216010B41094C7FC00EE9CD0 /* Release-Tiger */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1032,6 +1594,7 @@
buildConfigurations = (
6EC260890E426FF30013BC48 /* Debug */,
6EC2608A0E426FF30013BC48 /* Release */,
+ 216010B11094C7FC00EE9CD0 /* Release-Tiger */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1041,6 +1604,7 @@
buildConfigurations = (
6ED12A4C0E3E55300026773D /* Debug */,
6ED12A4D0E3E55300026773D /* Release */,
+ 216010B21094C7FC00EE9CD0 /* Release-Tiger */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1050,6 +1614,7 @@
buildConfigurations = (
6EE6DDA00E626D2900FB2115 /* Debug */,
6EE6DDA10E626D2900FB2115 /* Release */,
+ 216010B61094C7FC00EE9CD0 /* Release-Tiger */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1059,6 +1624,7 @@
buildConfigurations = (
DFE353660CFB8F0C003BACFC /* Debug */,
DFE353670CFB8F0C003BACFC /* Release */,
+ 216010B51094C7FC00EE9CD0 /* Release-Tiger */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Copied: contrib/MacPorts_Framework/SimpleLog.h (from rev 65490, branches/gsoc09-gui/MacPorts_Framework/SimpleLog.h)
===================================================================
--- contrib/MacPorts_Framework/SimpleLog.h (rev 0)
+++ contrib/MacPorts_Framework/SimpleLog.h 2010-03-26 19:46:35 UTC (rev 65491)
@@ -0,0 +1,12 @@
+/*
+ * SimpleLog.h
+ * MacPorts.Framework
+ *
+ * Created by Juan Germán Castañeda Echevarría on 7/21/09.
+ * Copyright 2009 UNAM. All rights reserved.
+ *
+ */
+
+#include <tcl.h>
+
+int SimpleLog_Command(ClientData clientData, Tcl_Interp *interpreter, int objc, Tcl_Obj *CONST objv[]);
\ No newline at end of file
Copied: contrib/MacPorts_Framework/SimpleLog.m (from rev 65490, branches/gsoc09-gui/MacPorts_Framework/SimpleLog.m)
===================================================================
--- contrib/MacPorts_Framework/SimpleLog.m (rev 0)
+++ contrib/MacPorts_Framework/SimpleLog.m 2010-03-26 19:46:35 UTC (rev 65491)
@@ -0,0 +1,76 @@
+/*
+ * SimpleLog.m
+ * MacPorts.Framework
+ *
+ * Created by Juan Germán Castañeda Echevarría on 7/21/09.
+ * Copyright 2009 UNAM. All rights reserved.
+ *
+ */
+
+#include "SimpleLog.h"
+
+#define MPSEPARATOR @"_&MP&_"
+
+int SimpleLog_Command(ClientData clientData, Tcl_Interp *interpreter, int objc, Tcl_Obj *CONST objv[]) {
+ int tclResult = TCL_ERROR;
+ NSMutableString * data;
+
+ ++objv, --objc;
+
+ if (objc) {
+ int tclCount;
+ const char **tclElements;
+
+ tclResult = Tcl_SplitList(interpreter, Tcl_GetString(*objv), &tclCount, &tclElements);
+
+
+ if (tclResult == TCL_OK) {
+ if (tclCount > 0) {
+ NSLog([NSString stringWithUTF8String:tclElements[0]]);
+ data = [NSMutableString stringWithUTF8String:tclElements[0]];
+ [data appendString:MPSEPARATOR];
+
+ if(tclCount > 1 && tclElements[1]) {
+ NSLog([NSString stringWithUTF8String:tclElements[1]]);
+ [data appendString:[NSString stringWithUTF8String:tclElements[1]]];
+ [data appendString:MPSEPARATOR];
+ }
+ else {
+ [data appendString:@"None"];
+ [data appendString:MPSEPARATOR];
+ }
+
+ if(tclCount > 2 && tclElements[2]) {
+ NSLog([NSString stringWithUTF8String:tclElements[2]]);
+ [data appendString:[NSString stringWithUTF8String:tclElements[2]]];
+ [data appendString:MPSEPARATOR];
+ }
+ else {
+ [data appendString:@"None"];
+ [data appendString:MPSEPARATOR];
+ }
+ }
+ else {
+ data = [NSMutableString stringWithFormat:@"None%@None%@None%@", MPSEPARATOR, MPSEPARATOR, MPSEPARATOR ];
+ }
+ }
+ }
+
+ //Now get the actual message
+ ++objv; --objc;
+ if (objc) {
+ [data appendString:[NSString stringWithUTF8String:Tcl_GetString(*objv)]];
+ }
+ else {
+ [data appendString:@"None"];
+ }
+
+ id theProxy = [NSConnection
+ rootProxyForConnectionWithRegisteredName:@"MPNotifications"
+ host:nil];
+ [theProxy sendIPCNotification:data];
+
+ NSLog(@"-----%@", data);
+
+ return tclResult;
+}
\ No newline at end of file
Copied: contrib/MacPorts_Framework/Tests-Info.plist (from rev 65490, branches/gsoc09-gui/MacPorts_Framework/Tests-Info.plist)
===================================================================
--- contrib/MacPorts_Framework/Tests-Info.plist (rev 0)
+++ contrib/MacPorts_Framework/Tests-Info.plist 2010-03-26 19:46:35 UTC (rev 65491)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
Modified: contrib/MacPorts_Framework/init.tcl
===================================================================
--- contrib/MacPorts_Framework/init.tcl 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/init.tcl 2010-03-26 19:46:35 UTC (rev 65491)
@@ -4,7 +4,7 @@
#Set ui_options to log all messages to stdout and notify system
#filtering is done on the Obj-C side of things
-set ui_options(ports_debug) "yes"
+# set ui_options(ports_debug) "yes"
set ui_options(ports_verbose) "yes"
# ui_options accessor
@@ -51,15 +51,15 @@
return {stdout}
} else {
return {}
- }
- }
+ }
+ }
msg {
if {[ui_isset ports_quiet]} {
- return {}
- } else {
- return {stdout}
- }
- }
+ return {}
+ } else {
+ return {stdout}
+ }
+ }
error {
return {stderr}
}
@@ -76,73 +76,82 @@
#Redefine ui_$pritority to throw global notifications
#This is currently under works ... a reasonable solution
#should be coming up soon
-proc ui_init {priority prefix channels message} {
- switch $priority {
- msg {
- set nottype "MPMsgNotification"
- }
- debug {
- set "MPDebugNotification"
- puts "Recieved Debug"
- }
- warn {
- set nottype "MPWarnNotification"
- }
- error {
- set nottype "MPErrorNotification"
- puts "Recieved Error"
- }
- info {
- set nottype "MPInfoNotification"
- puts "Recieved Info"
- }
- default {
- set nottype "MPDefaultNotification"
- }
- }
-
+proc macports::ui_init {priority args} {
+ switch $priority {
+ msg {
+ set nottype "MPMsgNotification"
+ }
+ debug {
+ set nottype "MPDebugNotification"
+ puts "Recieved Debug"
+ }
+ warn {
+ set nottype "MPWarnNotification"
+ }
+ error {
+ set nottype "MPErrorNotification"
+ puts "Recieved Error"
+ }
+ info {
+ set nottype "MPInfoNotification"
+ puts "Recieved Info"
+ }
+ default {
+ set nottype "MPDefaultNotification"
+ }
+ }
+
# Get the list of channels.
- try {
+ if {[llength [info commands ui_channels]] > 0} {
set channels [ui_channels $priority]
- } catch * {
+ } else {
set channels [ui_channels_default $priority]
}
-
- #set channels [ui_channels $priority]
-
+
# Simplify ui_$priority.
set nbchans [llength $channels]
if {$nbchans == 0} {
- proc ::ui_$priority {str} [subst {
- notifications send $nottype "$chan $prefix" "\$str"
+ proc ::ui_$priority {args} [subst {
+ notifications send $nottype "$chan $prefix" "\$str"
}]
} else {
- try {
+ if {[llength [info commands ui_prefix]] > 0} {
set prefix [ui_prefix $priority]
- } catch * {
+ } else {
set prefix [ui_prefix_default $priority]
}
-
- #set prefix [ui_prefix $priority]
-
- if {$nbchans == 1} {
- set chan [lindex $channels 0]
-
- proc ::ui_$priority {str} [subst {
- puts $chan "$prefix\$str"
- notifications send $nottype "$chan $prefix" "\$str"
- }]
+
+ if {[llength [info commands ::ui_init]] > 0} {
+ eval ::ui_init $priority $prefix $channels $args
} else {
- proc ::ui_$priority {str} [subst {
- foreach chan \$channels {
- puts $chan "$prefix\$str"
- notifications send $nottype "$chan $prefix" "\$str"
- }
- }]
+ if {$nbchans == 1} {
+ set chan [lindex $channels 0]
+ proc ::ui_$priority {args} [subst {
+ if {\[lindex \$args 0\] == "-nonewline"} {
+ puts $chan "$prefix\[lindex \$args 1\]"
+ notifications send $nottype "$chan $prefix" "\[lindex \$args 1\]"
+ } else {
+ puts -nonewline $chan "$prefix\[lindex \$args 1\]"
+ notifications send $nottype "$chan $prefix" "\[lindex \$args 0\]"
+ }
+ }]
+ } else {
+ proc ::ui_$priority {args} [subst {
+ foreach chan \$channels {
+ if {\[lindex \$args 0\] == "-nonewline"} {
+ puts $chan "$prefix\[lindex \$args 1\]"
+ notifications send $nottype "$chan $prefix" "\[lindex \$args 1\]"
+ } else {
+ puts -nonewline $chan "$prefix\[lindex \$args 1\]"
+ notifications send $nottype "$chan $prefix" "\[lindex \$args 0\]"
+ }
+ }
+ }]
+ }
}
-
- # Call ui_$priority - Is this step necessary? Consult with Randall
- #::ui_$priority $message
+
+ # Call ui_$priority
+ eval ::ui_$priority $args
}
}
@@ -150,7 +159,7 @@
#Wrapping the following API routines to catch errors
#and log error Information in a similar fashion to code
#in macports.tcl.
-proc mportuninstall {portname {v ""} optionslist} {
+proc mportuninstall {portname {v ""} {optionslist ""}} {
if {[catch {portuninstall::uninstall $portname $v $optionslist} result]} {
global errorInfo
@@ -180,6 +189,16 @@
}
}
+proc mportupgrade {portname} {
+ array set depscache {}
+ if {[catch {macports::upgrade $portname "port:$portname" [array get global_variations] [array get variations] [array get options] depscache} result]} {
+
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error "Upgrade $portname failed: $result"
+ return 1
+ }
+}
# Initialize dport
@@ -189,4 +208,4 @@
global errorInfo
puts "$errorInfo"
fatal "Failed to initialize ports system, $result"
-}
\ No newline at end of file
+}
Modified: contrib/MacPorts_Framework/interpInit.tcl
===================================================================
--- contrib/MacPorts_Framework/interpInit.tcl 2010-03-26 19:42:13 UTC (rev 65490)
+++ contrib/MacPorts_Framework/interpInit.tcl 2010-03-26 19:46:35 UTC (rev 65491)
@@ -52,15 +52,15 @@
return {stdout}
} else {
return {}
- }
- }
+ }
+ }
msg {
if {[ui_isset ports_quiet]} {
- return {}
- } else {
- return {stdout}
- }
- }
+ return {}
+ } else {
+ return {stdout}
+ }
+ }
error {
return {stderr}
}
@@ -76,37 +76,35 @@
#Redefine ui_$pritority to throw global notifications
#This is currently under works ... a reasonable solution
#should be coming up soon
-proc ui_init {priority prefix channels message} {
- #puts "INSIDE ui_init priority with prefix $prefix and message $message"
-
- switch $priority {
- msg {
- set nottype "MPMsgNotification"
- }
- debug {
- set "MPDebugNotification"
- puts "Recieved Debug"
- }
- warn {
- set nottype "MPWarnNotification"
- }
- error {
- set nottype "MPErrorNotification"
- puts "Recieved Error"
- }
- info {
- set nottype "MPInfoNotification"
- puts "Recieved Info"
- }
- default {
- set nottype "MPDefaultNotification"
- }
- }
-
+proc macports::ui_init {priority args} {
+ switch $priority {
+ msg {
+ set nottype "MPMsgNotification"
+ }
+ debug {
+ set nottype "MPDebugNotification"
+ puts "Recieved Debug"
+ }
+ warn {
+ set nottype "MPWarnNotification"
+ }
+ error {
+ set nottype "MPErrorNotification"
+ puts "Recieved Error"
+ }
+ info {
+ set nottype "MPInfoNotification"
+ puts "Recieved Info"
+ }
+ default {
+ set nottype "MPDefaultNotification"
+ }
+ }
+
# Get the list of channels.
- try {
+ if {[llength [info commands ui_channels]] > 0} {
set channels [ui_channels $priority]
- } catch * {
+ } else {
set channels [ui_channels_default $priority]
}
@@ -116,35 +114,47 @@
set nbchans [llength $channels]
if {$nbchans == 0} {
proc ::ui_$priority {str} [subst {
- simplelog "$nottype $chan $prefix" "\$str"
+ simplelog "$nottype $chan $prefix" "\$str"
}]
} else {
- try {
- set prefix [ui_prefix $priority]
- } catch * {
- set prefix [ui_prefix_default $priority]
- }
-
- #set prefix [ui_prefix $priority]
-
+ if {[llength [info commands ui_prefix]] > 0} {
+ set prefix [ui_prefix $priority]
+ } else {
+ set prefix [ui_prefix_default $priority]
+ }
+
+ if {[llength [info commands ::ui_init]] > 0} {
+ eval ::ui_init $priority $prefix $channels $args
+ } else {
if {$nbchans == 1} {
- set chan [lindex $channels 0]
-
- proc ::ui_$priority {str} [subst {
- puts $chan "$prefix\$str"
- simplelog "$nottype $chan $prefix" "\$str"
- }]
+ set chan [lindex $channels 0]
+
+ proc ::ui_$priority {args} [subst {
+ if {\[lindex \$args 0\] == "-nonewline"} {
+ puts $chan "$prefix\[lindex \$args 1\]"
+ simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
+ } else {
+ puts -nonewline $chan "$prefix\[lindex \$args 1\]"
+ simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
+ }
+ }]
} else {
- proc ::ui_$priority {str} [subst {
- foreach chan \$channels {
- puts $chan "$prefix\$str"
- simplelog "$nottype $chan $prefix" "\$str"
- }
- }]
+ proc ::ui_$priority {args} [subst {
+ foreach chan \$channels {
+ if {\[lindex \$args 0\] == "-nonewline"} {
+ puts $chan "$prefix\[lindex \$args 1\]"
+ simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
+ } else {
+ puts -nonewline $chan "$prefix\[lindex \$args 1\]"
+ simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
+ }
+ }
+ }]
}
-
- # Call ui_$priority - Is this step necessary? Consult with Randall
- #::ui_$priority $message
+ }
+
+ # Call ui_$priority
+ eval ::ui_$priority $args
}
}
@@ -183,8 +193,17 @@
}
}
+proc mportupgrade {portname} {
+ array set depscache {}
+ if {[catch {macports::upgrade $portname "port:$portname" [array get global_variations] [array get variations] [array get options] depscache} result]} {
+
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error "Upgrade $portname failed: $result"
+ return 1
+ }
+}
-
# Initialize dport
# This must be done following parse of global options, as some options are
# evaluated by dportinit.
Copied: contrib/MacPorts_Framework/portProcessInit.tcl (from rev 65490, branches/gsoc09-gui/MacPorts_Framework/portProcessInit.tcl)
===================================================================
--- contrib/MacPorts_Framework/portProcessInit.tcl (rev 0)
+++ contrib/MacPorts_Framework/portProcessInit.tcl 2010-03-26 19:46:35 UTC (rev 65491)
@@ -0,0 +1,211 @@
+package require macports
+package require simplelog
+
+
+
+#Set ui_options to log all messages to stdout and notify system
+#filtering is done on the Obj-C side of things
+set ui_options(ports_debug) "yes"
+set ui_options(ports_verbose) "yes"
+
+# ui_options accessor
+proc ui_isset {val} {
+ global ui_options
+ if {[info exists ui_options($val)]} {
+ if {$ui_options($val) == "yes"} {
+ return 1
+ }
+ }
+ return 0
+}
+
+# UI Callback
+proc ui_prefix {priority} {
+ switch $priority {
+ debug {
+ return "DEBUG: "
+ }
+ error {
+ return "Error: "
+ }
+ warn {
+ return "Warning: "
+ }
+ default {
+ return ""
+ }
+ }
+}
+
+proc ui_channels {priority} {
+ global logfd
+ switch $priority {
+ debug {
+ if {[ui_isset ports_debug]} {
+ return {stderr}
+ } else {
+ return {}
+ }
+ }
+ info {
+ if {[ui_isset ports_verbose]} {
+ return {stdout}
+ } else {
+ return {}
+ }
+ }
+ msg {
+ if {[ui_isset ports_quiet]} {
+ return {}
+ } else {
+ return {stdout}
+ }
+ }
+ error {
+ return {stderr}
+ }
+ default {
+ return {stdout}
+ }
+ }
+}
+
+
+
+#Modifying UI initialization to enable notifications
+#Redefine ui_$pritority to throw global notifications
+#This is currently under works ... a reasonable solution
+#should be coming up soon
+proc macports::ui_init {priority args} {
+ switch $priority {
+ msg {
+ set nottype "MPMsgNotification"
+ }
+ debug {
+ set nottype "MPDebugNotification"
+ puts "Recieved Debug"
+ }
+ warn {
+ set nottype "MPWarnNotification"
+ }
+ error {
+ set nottype "MPErrorNotification"
+ puts "Recieved Error"
+ }
+ info {
+ set nottype "MPInfoNotification"
+ puts "Recieved Info"
+ }
+ default {
+ set nottype "MPDefaultNotification"
+ }
+ }
+
+ # Get the list of channels.
+ if {[llength [info commands ui_channels]] > 0} {
+ set channels [ui_channels $priority]
+ } else {
+ set channels [ui_channels_default $priority]
+ }
+
+ # Simplify ui_$priority.
+ set nbchans [llength $channels]
+ if {$nbchans == 0} {
+ proc ::ui_$priority {args} [subst {
+ simplelog "$nottype $chan $prefix" "\$str"
+ }]
+ } else {
+ if {[llength [info commands ui_prefix]] > 0} {
+ set prefix [ui_prefix $priority]
+ } else {
+ set prefix [ui_prefix_default $priority]
+ }
+
+ if {[llength [info commands ::ui_init]] > 0} {
+ eval ::ui_init $priority $prefix $channels $args
+ } else {
+ if {$nbchans == 1} {
+ set chan [lindex $channels 0]
+ proc ::ui_$priority {args} [subst {
+ if {\[lindex \$args 0\] == "-nonewline"} {
+ puts $chan "$prefix\[lindex \$args 1\]"
+ simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
+ } else {
+ puts -nonewline $chan "$prefix\[lindex \$args 1\]"
+ simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
+ }
+ }]
+ } else {
+ proc ::ui_$priority {args} [subst {
+ foreach chan \$channels {
+ if {\[lindex \$args 0\] == "-nonewline"} {
+ puts $chan "$prefix\[lindex \$args 1\]"
+ simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
+ } else {
+ puts -nonewline $chan "$prefix\[lindex \$args 1\]"
+ simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
+ }
+ }
+ }]
+ }
+ }
+
+ # Call ui_$priority
+ eval ::ui_$priority $args
+ }
+}
+
+
+#Wrapping the following API routines to catch errors
+#and log error Information in a similar fashion to code
+#in macports.tcl. Note optionslist is not being used for now
+set mp_empty_list [list]
+proc mportuninstall {portname {v ""} {optionslist ""} } {
+ if {[catch {portuninstall::uninstall $portname $v [array get options]} result]} {
+
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error "Uninstall $portname $v failed: $result"
+ return 1
+ }
+}
+
+proc mportactivate {portname {v ""} {optionslist ""}} {
+ if {[catch {portimage::activate $portname $v $optionslist} result]} {
+
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error "Activate $portname $v failed: $result"
+ return 1
+ }
+}
+
+proc mportdeactivate {portname {v ""} {optionslist ""} } {
+ if {[catch {portimage::deactivate $portname $v $optionslist} result]} {
+
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error "Deactivate $portname $v failed: $result"
+ return 1
+ }
+}
+
+proc mportupgrade {portname} {
+ array set depscache {}
+ if {[catch {macports::upgrade $portname "port:$portname" [array get global_variations] [array get variations] [array get options] depscache} result]} {
+
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error "Upgrade $portname failed: $result"
+ return 1
+ }
+}
+
+# Initialize dport
+# This must be done following parse of global options, as some options are
+# evaluated by dportinit.
+if {[catch {mportinit ui_options global_options global_variations} result]} {
+ global errorInfo
+ puts "$errorInfo"
+ fatal "Failed to initialize ports system, $result"
+}
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100326/c1d2e4ef/attachment-0001.html>
More information about the macports-changes
mailing list