[37746] branches/gsoc08-framework/MacPorts.Framework
armahg at macports.org
armahg at macports.org
Sat Jun 21 13:05:37 PDT 2008
Revision: 37746
http://trac.macosforge.org/projects/macports/changeset/37746
Author: armahg at macports.org
Date: 2008-06-21 13:05:37 -0700 (Sat, 21 Jun 2008)
Log Message:
-----------
Documented all Framework classes. Some of documentation needs review by mentor
Modified Paths:
--------------
branches/gsoc08-framework/MacPorts.Framework/MPIndex.h
branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.h
branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.m
branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.h
branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.m
branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.h
branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.m
branches/gsoc08-framework/MacPorts.Framework/MPMacPortsTest.h
branches/gsoc08-framework/MacPorts.Framework/MPMacPortsTest.m
branches/gsoc08-framework/MacPorts.Framework/MPPort.h
branches/gsoc08-framework/MacPorts.Framework/MPReceipt.h
branches/gsoc08-framework/MacPorts.Framework/MPRegistry.h
branches/gsoc08-framework/MacPorts.Framework/MacPorts.Framework.xcodeproj/project.pbxproj
branches/gsoc08-framework/MacPorts.Framework/dummycommit.test
branches/gsoc08-framework/MacPorts.Framework/headerDoc2HTML.config
Modified: branches/gsoc08-framework/MacPorts.Framework/MPIndex.h
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPIndex.h 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPIndex.h 2008-06-21 20:05:37 UTC (rev 37746)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -97,7 +97,7 @@
/*!
@brief Adds the port to the index
- @param port The port
+ at param port The port
@discussion The default state for the port is "not installed"
*/
- (void)setPort:(MPPort *)port;
Modified: branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.h
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.h 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.h 2008-06-21 20:05:37 UTC (rev 37746)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -33,24 +33,36 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/*!
+ @header
+ The MPInterpreter class allows access to a shared per-thread Tcl interpreter for
+ execution of MacPorts commands from upper levels in the API.
+ */
+
#import <Cocoa/Cocoa.h>
#include <tcl.h>
#define MPPackage @"macports"
#define MPPackageVersion @"1.0"
+/*
+ @class MPInterpreter
+ @abstract Tcl interpreter object
+ @discussion Contains a shared per-thread instance of a Tcl interpreter. The MPInterpreter class
+ is where the Objective-C API meets the Tcl command line. It is a per-thread interpreter to allow
+ for users of the API to multi-thread their programs without relative ease.
+ */
@interface MPInterpreter : NSObject {
Tcl_Interp* _interpreter;
}
+/*
+ @brief Return singleton shared MPInterpreter instance
+ */
+ (MPInterpreter *)sharedInterpreter;
-/*A version of sharedInterpreter that doesn't safeguard against
- *multi-threading. Use for Unit Testing Purposes only
- */
-+ (MPInterpreter *) ocSharedInterpreter;
#pragma Port Operations
@@ -58,14 +70,47 @@
#pragma Utilities
+/*
+ @brief Returns the NSstring result of evaluating a Tcl expression
+ @param statement An NSArray containing the Tcl expression
+ */
- (NSString *)evaluateArrayAsString:(NSArray *)statement;
+/*
+ @brief Returns the NSString result of evaluating a Tcl expression
+ @param statement An NSString containing the Tcl expression
+ */
- (NSString *)evaluateStringAsString:(NSString *)statement;
+
+/*
+ @brief Returns an NSArray whose elements are the the elements of a Tcl list in the form of an NSString
+ @param list A Tcl list in the form of an NSString
+ */
- (NSArray *)arrayFromTclListAsString:(NSString *)list;
+/*
+ @brief Returns an NSDictionary whose elements are the the elements of a Tcl list in the form of an NSString
+ @discussion The returned NSDictionary is of the form {k1, v1, k2, v2, ...} with ki being the keys and vi
+ the values in the dictionary. These keys and values are obtained from an NSString Tcl list of the
+ form {k1 v1 k2 v2 ...}
+ @param list A Tcl list in the form of an NSString
+ */
- (NSDictionary *)dictionaryFromTclListAsString:(NSString *)list;
+/*
+ @brief Same as dictionaryFromTclListAsString method. Returns an NSMutableDictionary
+ rather than NSDictionary.
+ */
- (NSMutableDictionary *)mutableDictionaryFromTclListAsString:(NSString *)list;
+
+/*
+ @brief Returns an NSArray whose elements are the contents of a Tcl variable
+ @param variable An NSString representation of a Tcl variable
+ */
- (NSArray *)getVariableAsArray:(NSString *)variable;
+/*
+ @brief Returns an NSString representation of a Tcl variable
+ @param variable An NSString representtion of a Tcl variable
+ */
- (NSString *)getVariableAsString:(NSString *)variable;
Modified: branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.m
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.m 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPInterpreter.m 2008-06-21 20:05:37 UTC (rev 37746)
@@ -47,19 +47,7 @@
NSLog(@"Error in Tcl Init: %s", Tcl_GetStringResult(_interpreter));
Tcl_DeleteInterp(_interpreter);
}
- //NSString * initFile = [[NSBundle bundleWithIdentifier:@"org.macports.frameworks.macports"]
- // pathForResource:@"init"
- // ofType:@"tcl"];
- NSBundle * tbun = [NSBundle bundleWithIdentifier:@"org.macports.frameworks.macports"];
- if(tbun) {
- NSLog(@"File found with path %@", [[NSBundle bundleForClass:[MPInterpreter class]] bundlePath]);
- }
- else{
- NSLog(@"File not found with path %@", [[NSBundle bundleForClass:[MPInterpreter class]] bundlePath]);
- }
-
- if( Tcl_EvalFile(_interpreter, [[tbun pathForResource:@"init"
- ofType:@"tcl"] UTF8String]) != TCL_OK) {
+ if( Tcl_EvalFile(_interpreter, [[[NSBundle bundleWithIdentifier:@"org.macports.frameworks.macports"] pathForResource:@"init" ofType:@"tcl"] UTF8String]) != TCL_OK) {
NSLog(@"Error in Tcl_EvalFile: %s", Tcl_GetStringResult(_interpreter));
Tcl_DeleteInterp(_interpreter);
}
@@ -76,17 +64,6 @@
return [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"];
}
-+ (MPInterpreter*)ocSharedInterpreter {
- if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"] == nil) {
- [[self alloc] init]; // assignment not done here
- }
- return [[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"];
-}
-
-
-
-
-
+ (id)allocWithZone:(NSZone*)zone {
@synchronized(self) {
if ([[[NSThread currentThread] threadDictionary] objectForKey:@"sharedMPInterpreter"] == nil) {
@@ -152,7 +129,7 @@
}
- (NSDictionary *)dictionaryFromTclListAsString:(NSString *)list {
- return [NSDictionary dictionaryWithDictionary:[self mutableDictionaryFromTclListAsString:list]];
+ return [NSDictionary dictionaryWithDictionary:[self :list]];
}
- (NSMutableDictionary *)mutableDictionaryFromTclListAsString:(NSString *)list {
Modified: branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.h
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.h 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.h 2008-06-21 20:05:37 UTC (rev 37746)
@@ -34,14 +34,17 @@
*/
#import <SenTestingKit/SenTestingKit.h>
+#import "MPInterpreter.h"
@interface MPInterpreterTest : SenTestCase {
-
+ MPInterpreter * interp;
}
-- (void)testOCsharedInterpreter;
-- (void)testGetVariableArray;
+- (void)testInitialization;
+- (void)testGetVariableAsArray;
+- (void)testMutableDictionaryFromTclListAsString;
+- (void)testEvaluateStringAsString;
@end
Modified: branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.m
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.m 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPInterpreterTest.m 2008-06-21 20:05:37 UTC (rev 37746)
@@ -34,28 +34,40 @@
*/
#import "MPInterpreterTest.h"
-#import "MPInterpreter.h"
+
@implementation MPInterpreterTest
+- (void)setUp {
+ interp = [MPInterpreter sharedInterpreter];
+}
-- (void)testOCsharedInterpreter {
- NSLog(@"class = %@", NSClassFromString(@"MPInterpreter"));
- MPInterpreter *interpreter = [MPInterpreter sharedInterpreter];
- STAssertNotNil(interpreter, @"Should not be nil");
-
+- (void)tearDown {
+ [interp release];
}
+- (void)testInitialization {
+ STAssertNotNil(interp, @"Should not be nil");
+}
-- (void)testGetVariableArray {
- MPInterpreter *interpreter = [MPInterpreter sharedInterpreter];
+
+- (void)testGetVariableAsArray {
//unsigned int aSize = [[interpreter getVariableAsArray:@"macports::sources"] count];
- //NSLog(@"Size is %d", aSize);
unsigned int aSize = 1;
- STAssertEquals([[interpreter getVariableAsArray:@"macports::sources"] count], aSize, @"Empty array returned when should have at least %d element.", aSize);
+ STAssertEquals([[interp getVariableAsArray:@"macports::sources"] count], aSize, @"Empty array returned when should have at least %d element.", aSize);
}
+/*
+ Having trouble coming up with test cases for the methods below. Speak to Randall
+ about that.
+ */
+- (void)testMutableDictionaryFromTclListAsString {
+
+}
+- (void)testEvaluateStringAsString; {
+
+}
@end
Modified: branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.h
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.h 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.h 2008-06-21 20:05:37 UTC (rev 37746)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -39,6 +39,13 @@
#define MPPortsAll @".+"
+/*!
+ @class MPMacPorts
+ @abstract Object representation of the MacPorts system
+ @discussion This class represents a single instance of the MacPorts installation system on a user's machine.
+ There is usually only one instance of this per machine, even though there might be more than one in some
+ cases.
+ */
@interface MPMacPorts : NSObject {
MPInterpreter *interpreter;
@@ -49,22 +56,100 @@
}
+/*!
+ @brief Returns an MPMacPorts object that represents the MacPorts system on user's machine.
+ */
+ (MPMacPorts *)sharedInstance;
+/*!
+ @brief Synchronizes the ports tree without checking for upgrades to the MacPorts base.
+ */
- (void)sync;
+
+
+/*!
+ @brief Returns an NSDictionary of ports
+ @param query An NSString containing name or partial name of port being searched.
+ @discussion The keys are NSString names of the ports whilst the values are the respective MPPort objects
+ (Double check this)
+ */
- (NSDictionary *)search:(NSString *)query;
+/*!
+ @brief Returns an NSDictionary of ports
+ @param query An NSString containing name (full or parital) of port being searched.
+ @param sensitivity A Boolean value indicating whether or not the search should be case sensitive
+ @discussion The keys are NSString names of the ports whilst the values are the respective MPPort objects
+ (Double check this)
+ */
- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity;
+/*!
+ @brief Returns an NSDictionary of ports
+ @param query An NSString containing name (full or parital) of port being searched.
+ @param sensitivity A Boolean value indicating whether or not the search should be case sensitive
+ @param style TALK TO RANDALL ABOUT WHAT THIS IS
+ @discussion The keys are NSString names of the ports whilst the values are the respective MPPort objects
+ (Double check this)
+ */
- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity matchStyle:(NSString *)style;
+/*!
+ @brief Returns an NSDictionary of ports
+ @param query An NSString containing name (full or parital) of port being searched.
+ @param sensitivity A Boolean value indicating whether or not the search should be case sensitive
+ @param style TALK TO RANDALL ABOUT WHAT THIS IS
+ @param fieldName TALK TO RANDALL ABOUT WHAT THIS IS
+ @discussion The keys are NSString names of the ports whilst the values are the respective MPPort objects
+ (Double check this)
+ */
- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity matchStyle:(NSString *)style field:(NSString *)fieldName;
+
+/*!
+ @brief Returns an NSArray of MPPorts that a port depends on
+ @param port The MPPort whose dependecies is being sought
+ */
- (NSArray *)depends:(MPPort *)port;
+
+/*!
+ @brief Executes specific target of given MPPort
+ @param port The MPPort whose target will be executed
+ @param target The NSString representing a given target
+ @Discussion The various options for target are: configure, build,
+ test, destroot, install, archive, dmg, mdmg, pkg, mpkg, rpm, dpkg, srpm.
+ (Should include more notes and what each of these do). Users of -exec
+ are responsible for ensuring that execution happens in an authorized environment for
+ various targets.
+ */
- (void)exec:(MPPort *)port withTarget:(NSString *)target;
-
+
+/*!
+ @brief Returns the NSString path to the directory where ports are installed.
+ */
- (NSString *)prefix;
+
+/*!
+ @brief Returns an NSArray of NSStrings for the paths to MacPorts sources or port trees
+ @param refresh A boolean indicating whether or not to refresh the NSArray of port trees
+ @Discussion A refresh value of YES will refresh the ports tree whilst a value of NO will not refresh
+ the tree.
+ */
- (NSArray *)sources:(BOOL)refresh;
+/*!
+ @brief Returns an NSArray of NSStrings of paths to various port trees enabled on User's system
+ @Discussion These file paths are listed in opt/local/etc/macports/sources.conf. Each port tree
+ contains the different files for each port.
+ */
- (NSArray *)sources;
+
+/*!
+ @brief Returns the NSURL of the portIndex file on this MacPorts system for a given ports tree
+ @param source An NSString containing the file path to the ports tree
+ @Discussion The PortIndex contains a list of descriptions ports and is where they are searched for
+ */
- (NSURL *)pathToPortIndex:(NSString *)source;
+
+/*!
+ @brief Returns an NSString indicating the version of the currently running MacPorts system
+ */
- (NSString *)version;
-
@end
Modified: branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.m
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.m 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPMacPorts.m 2008-06-21 20:05:37 UTC (rev 37746)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -97,8 +97,8 @@
return [self search:query caseSensitive:YES];
}
-- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity {
- return [self search:query caseSensitive:sensitivity matchStyle:@"regex"];
+- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)isCasesensitive {
+ return [self search:query caseSensitive:isCasesensitive matchStyle:@"regex"];
}
- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity matchStyle:(NSString *)style {
Modified: branches/gsoc08-framework/MacPorts.Framework/MPMacPortsTest.h
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPMacPortsTest.h 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPMacPortsTest.h 2008-06-21 20:05:37 UTC (rev 37746)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -40,9 +40,5 @@
MPMacPorts *testPort;
}
-/*
--(void)testPortCreation;
--(void) testPrefix;
-*/
@end
Modified: branches/gsoc08-framework/MacPorts.Framework/MPMacPortsTest.m
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPMacPortsTest.m 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPMacPortsTest.m 2008-06-21 20:05:37 UTC (rev 37746)
@@ -18,7 +18,7 @@
[testPort release];
}
-/*
+
- (void) testPortCreation {
STAssertNotNil(testPort, @"Should not be nil");
}
@@ -26,9 +26,9 @@
- (void) testPrefix {
NSString *prefix = [testPort prefix];
- STAssertNotNil(prefix, @" %@ should not be nil", prefix);
+ STAssertNil(prefix, @" %@ should not be nil", prefix);
[prefix release];
}
-*/
+
@end
Modified: branches/gsoc08-framework/MacPorts.Framework/MPPort.h
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPPort.h 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPPort.h 2008-06-21 20:05:37 UTC (rev 37746)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -35,7 +35,7 @@
/*!
@class MPPort
- @abstract A represtation of a port.
+ @abstract A representation of a port.
*/
#import <Cocoa/Cocoa.h>
@@ -59,20 +59,67 @@
}
+/*!
+ @brief Initializes this port with a MPPortStateUnkown state
+ @discussion Calls [self initWithCapacity:15]
+ */
- (id)init;
+/*!
+ @brief Initializes this port with a MPPortStateUnkown state
+ @param numItems The number of items to be stored with this port
+ */
- (id)initWithCapacity:(unsigned)numItems;
+/*!
+ @brief Initializes this port with an NSString derived from a Tcl list
+ @param string The NSString object used to initialize this MPPort object
+ @discussion The Tcl list is usually obtained from doing a search query for some
+ particular port.
+ IS THIS METHOD JUST FOR INTERNAL USE? IT LOOKS LIKE IT ... ASK RANDALL ABOUT THAT
+ */
- (id)initWithTclListAsString:(NSString *)string;
+/*!
+ @brief Returns the name of this port
+ */
- (NSString *)name;
+/*!
+ @brief Returns the version of this port
+ */
- (NSString *)version;
+
+/*!
+ @brief Returns an array of the dependencies of this port
+ @discussion This includes, libraries, build dependencies and run time dependencies
+ ASK RANDALL FOR MORE DETAILS
+ */
- (NSArray *)depends;
+/*!
+ @brief Executes the specified target for this MPPort
+ @param target NSString target to be executed for this MPPort
+ @discussion See *add link here to MPMacPorts documentation*
+ */
- (void)exec:(NSString *)target;
+/*!
+ @brief Sets the attributes of this MPPort using the given string
+ @param string An NSString object derived from a Tcl list containing this port's attributes
+ @discussion AGAIN I NEED TO EXPERIMENT WITH SOME MORE EXAMPLES
+ */
- (void) setPortWithTclListAsString:(NSString *)string;
+
+/*!
+ @brief ASK RANDALL ABOUT THIS METHOD
+ */
- (void) addDependencyAsPortName:(NSString *)dependency;
+
+/*!
+ @brief Sets the state of this MPPort object
+ @discussion Possible values are MPPortStateUnknown, MPPortStateLearnState, MPPortStateActive, MPPortStateInstalled,
+ MPPortStateOutdated, MPPortStateNotInstalled.
+*/
- (void)setState:(int)state;
+
- (void)setStateFromReceipts:(NSArray *)receipts;
-
- (void)setDictionary:(NSDictionary *)otherDictionary;
+ (Class)classForKeyedUnarchiver;
Modified: branches/gsoc08-framework/MacPorts.Framework/MPReceipt.h
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPReceipt.h 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPReceipt.h 2008-06-21 20:05:37 UTC (rev 37746)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -37,10 +37,26 @@
#import "MPInterpreter.h"
#import "MPRegistry.h"
+
+/*!
+ @class MPReceipt
+ @abstract Object representation of an port's receipt
+ @discussion A receipt consists mainly of the port's name, version, revision number, variants, whether or not
+ it is an active port, and some other information on the port. All receipts on the user's MacPorts system are
+ kept in the port registry located in ${prefix}/var/macports/receipts/.
+ */
@interface MPReceipt : MPMutableDictionary {
}
+
+/*!
+ @brief This method initializes the MPReceipt object with a name, version, revision, variants, active state and long description.
+ @param array An NSArray object containing the values for initializing this MPReceipt.
+ @discussion DOUBLE CHECK THIS WITH RANDALL
+ The MPReceipt object contains an internal dictionary whose keys are the following strings: name, version, revision, variants,
+ active, whatIsThis. The values for these keys are provided by the initializing array parameter.
+ */
- (id)initWithContentsOfArray:(NSArray *)array;
+ (Class)classForKeyedUnarchiver;
Modified: branches/gsoc08-framework/MacPorts.Framework/MPRegistry.h
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MPRegistry.h 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MPRegistry.h 2008-06-21 20:05:37 UTC (rev 37746)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -56,27 +56,31 @@
+ (MPRegistry *)sharedRegistry;
-/*
+/*!
@brief Calls [self installed:@""]
*/
- (NSDictionary *)installed;
+
/*
@brief Calls [self installed:name version:@""]
@param name Text to match the port name
*/
- (NSDictionary *)installed:(NSString *)name;
-/*!
+
+/*
@brief Returns an NSDictionary of MPReciepts keyed by port name
@param name Text to match the port name
@param version Text to match the port version
*/
- (NSDictionary *)installed:(NSString *)name withVersion:(NSString *)version;
+
/*!
@brief Returns an array of installed port names
@param name Text to match the port name
@param version Text to march the port version
*/
- (NSArray *)installedAsArray:(NSString *)name withVersion:(NSString *)version;
+
/*!
@brief Returns an array of the files in the (installed and active) port
*/
Modified: branches/gsoc08-framework/MacPorts.Framework/MacPorts.Framework.xcodeproj/project.pbxproj
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/MacPorts.Framework.xcodeproj/project.pbxproj 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/MacPorts.Framework.xcodeproj/project.pbxproj 2008-06-21 20:05:37 UTC (rev 37746)
@@ -41,6 +41,7 @@
6E49F37B0DFFAB0B0030C3AF /* MPInterpreterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 489DD92E0C94674B00595506 /* MPInterpreterTest.m */; };
6E49F37F0DFFAFF80030C3AF /* MacPorts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* MacPorts.framework */; };
6EA293580E05C8FC00902D12 /* notifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EA293570E05C8FC00902D12 /* notifications.m */; };
+ 6EA294590E080DEB00902D12 /* MPMacPortsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E88D1CB0DF4B90B00684E9F /* MPMacPortsTest.m */; };
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 */
@@ -385,6 +386,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 6EA294590E080DEB00902D12 /* MPMacPortsTest.m in Sources */,
6E49F37B0DFFAB0B0030C3AF /* MPInterpreterTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Modified: branches/gsoc08-framework/MacPorts.Framework/dummycommit.test
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/dummycommit.test 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/dummycommit.test 2008-06-21 20:05:37 UTC (rev 37746)
@@ -2,4 +2,22 @@
Now I should do another commit to make sure my
modifications are ok.
-George.
\ No newline at end of file
+George.
+
+//NSString * initFile = [[NSBundle bundleWithIdentifier:@"org.macports.frameworks.macports"]
+ // pathForResource:@"init"
+ // ofType:@"tcl"];
+ NSBundle * tbun = [NSBundle bundleWithIdentifier:@"org.macports.frameworks.macports"];
+ if(tbun) {
+ NSLog(@"File found with path %@", [[NSBundle bundleForClass:[MPInterpreter class]] bundlePath]);
+ }
+ else{
+ NSLog(@"File not found with path %@", [[NSBundle bundleForClass:[MPInterpreter class]] bundlePath]);
+ }
+
+ if( Tcl_EvalFile(_interpreter, [[tbun pathForResource:@"init"
+ ofType:@"tcl"] UTF8String]) != TCL_OK) {
+ NSLog(@"Error in Tcl_EvalFile: %s", Tcl_GetStringResult(_interpreter));
+ Tcl_DeleteInterp(_interpreter);
+ }
+
\ No newline at end of file
Modified: branches/gsoc08-framework/MacPorts.Framework/headerDoc2HTML.config
===================================================================
--- branches/gsoc08-framework/MacPorts.Framework/headerDoc2HTML.config 2008-06-21 19:45:51 UTC (rev 37745)
+++ branches/gsoc08-framework/MacPorts.Framework/headerDoc2HTML.config 2008-06-21 20:05:37 UTC (rev 37746)
@@ -57,7 +57,7 @@
typeStyle => background:#ffffff; color:#761550;
paramStyle => background:#ffffff; color:#000000;
varStyle => background:#ffffff; color:#000000;
-templateStyle => background:#ffffff; color:#761550;
+templateStyle => background:#fffff; color:#761550;
# These control the automatic generation of hierarchical jump links in large
# index pages. You can set these limits higher or lower as desired.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080621/bff8244c/attachment-0001.htm
More information about the macports-changes
mailing list