diff --git a/AppKit/AppKit.steam b/AppKit/AppKit.steam
index 14e67d8d0..f07d2aaf3 100644
--- a/AppKit/AppKit.steam
+++ b/AppKit/AppKit.steam
@@ -7,7 +7,7 @@
Targets
- name
+ NameAppKitExcluded
@@ -15,12 +15,24 @@
CPTableColumn.jCPTableView.j
+ Flags
+ -DPLATFORM_DOM
+
+
+ Name
+ AppKit-Rhino
+ Excluded
+
+ CPOutlineView.j
+ CPTableColumn.j
+ CPTableView.j
+ Configurations
- name
+ NameDebugSettings
@@ -31,7 +43,7 @@
- name
+ NameReleaseSettings
diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j
index 67064bb9e..43421a846 100644
--- a/AppKit/CPTextField.j
+++ b/AppKit/CPTextField.j
@@ -210,6 +210,7 @@ var _CPTextFieldSquareBezelColor = nil;
[self setStringValue:@""];
+#if PLATFORM(DOM)
var element = [[self class] _inputElement];
element.value = string;
@@ -244,17 +245,20 @@ var _CPTextFieldSquareBezelColor = nil;
};
[[CPDOMWindowBridge sharedDOMWindowBridge] _propagateCurrentDOMEvent:YES];
-
+#endif
+
return YES;
}
- (BOOL)resignFirstResponder
{
+#if PLATFORM(DOM)
var element = [[self class] _inputElement];
_DOMElement.removeChild(element);
[self setStringValue:element.value];
-
+#endif
+
return YES;
}
@@ -272,7 +276,9 @@ var _CPTextFieldSquareBezelColor = nil;
{
[super setFrameSize:aSize];
+#if PLATFORM(DOM)
CPDOMDisplayServerSetStyleSize(_DOMTextElement, _frame.size.width - 2.0 * HORIZONTAL_PADDING, _frame.size.height - TOP_PADDING - BOTTOM_PADDING);
+#endif
}
- (BOOL)isSelectable
diff --git a/AppKit/Cib/CPCustomView.j b/AppKit/Cib/CPCustomView.j
index 035b97e20..24eea7386 100644
--- a/AppKit/Cib/CPCustomView.j
+++ b/AppKit/Cib/CPCustomView.j
@@ -22,6 +22,19 @@
import "CPView.j"
+
+var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
+ CPViewAutoresizesSubviewsKey = @"CPViewAutoresizesSubviews",
+ CPViewBackgroundColorKey = @"CPViewBackgroundColor",
+ CPViewBoundsKey = @"CPViewBoundsKey",
+ CPViewFrameKey = @"CPViewFrameKey",
+ CPViewHitTestsKey = @"CPViewHitTestsKey",
+ CPViewIsHiddenKey = @"CPViewIsHiddenKey",
+ CPViewOpacityKey = @"CPViewOpacityKey",
+ CPViewSubviewsKey = @"CPViewSubviewsKey",
+ CPViewSuperviewKey = @"CPViewSuperviewKey",
+ CPViewWindowKey = @"CPViewWindowKey";
+
@implementation CPCustomView : CPView
{
CPString _className;
@@ -43,41 +56,41 @@ var CPCustomViewClassNameKey = @"CPCustomViewClassNameKey";
// FIXME: Should we instead throw an exception?
if (!theClass)
theClass = [CPView class];
-
- // If this is just a "CPView", don't bother with any funny business, just go ahead and create it with initWithCoder:
- if (theClass == [CPView class])
- self = [[CPView alloc] initWithCoder:aCoder];
-
- return self;
- // If not, fall back to initWithFrame:
-/*
+
var frame = [aCoder decodeRectForKey:CPViewFrameKey];
- self = [[theClass alloc] initWithFrame:frame];
-
+ // If this is just a "CPView", don't bother with any funny business, just go ahead and create it with initWithCoder:
+ if (theClass == [CPView class])
+ self = [[CPView alloc] initWithFrame:frame];
+
if (self)
- {
- _bounds = [aCoder decodeRectForKey:CPViewBoundsKey];
-
- _window = [aCoder decodeObjectForKey:CPViewWindowKey];
- _subviews = [aCoder decodeObjectForKey:CPViewSubviewsKey];
- _superview = [aCoder decodeObjectForKey:CPViewSuperviewKey];
+ {
+ [self _setWindow:[aCoder decodeObjectForKey:CPViewWindowKey]];
+
+ // Since the object replacement logic hasn't had a chance to kick in yet, we need to do it manually:
+ var subviews = [aCoder decodeObjectForKey:CPViewSubviewsKey],
+ index = 0,
+ count = subviews.length;
+
+ for (; index < count; ++index)
+ {
+ // This is a bogus superview "CPCustomView".
+ subviews[index]._superview = nil;
+
+ [self addSubview:subviews[index]];
+ }
_autoresizingMask = [aCoder decodeIntForKey:CPViewAutoresizingMaskKey];
_autoresizesSubviews = [aCoder decodeBoolForKey:CPViewAutoresizesSubviewsKey];
-
- // FIXME: UGH!!!!
- _index = [aCoder decodeIntForKey:FIXME_indexKey];
-
+
_hitTests = [aCoder decodeObjectForKey:CPViewHitTestsKey];
_isHidden = [aCoder decodeObjectForKey:CPViewIsHiddenKey];
_opacity = [aCoder decodeIntForKey:CPViewOpacityKey];
[self setBackgroundColor:[aCoder decodeObjectForKey:CPViewBackgroundColorKey]];
-
}
- return self;*/
+ return self;
}
@end
diff --git a/AppKit/Platform/Platform.h b/AppKit/Platform/Platform.h
index 7e763be27..ef099399d 100644
--- a/AppKit/Platform/Platform.h
+++ b/AppKit/Platform/Platform.h
@@ -21,5 +21,3 @@
*/
#define PLATFORM(FEATURE) (defined( PLATFORM_##FEATURE ) && PLATFORM_##FEATURE)
-
-#define PLATFORM_DOM 1
diff --git a/AppKit/build.xml b/AppKit/build.xml
index 9802e7cf4..322f7f3b0 100644
--- a/AppKit/build.xml
+++ b/AppKit/build.xml
@@ -16,7 +16,13 @@
-
+
+
+
+
+
+
+
@@ -33,7 +39,7 @@
-
+
diff --git a/Foundation/Foundation.steam b/Foundation/Foundation.steam
index 05f157698..55f54d44a 100644
--- a/Foundation/Foundation.steam
+++ b/Foundation/Foundation.steam
@@ -2,19 +2,19 @@
- name
+ NameFoundationTargets
- name
+ NameFoundationConfigurations
- name
+ NameDebugSettings
@@ -25,7 +25,7 @@
- name
+ NameReleaseSettings
diff --git a/Tools/Install/install-tools b/Tools/Install/install-tools
index 16803d8f5..6173d3ef6 100755
--- a/Tools/Install/install-tools
+++ b/Tools/Install/install-tools
@@ -27,11 +27,13 @@ mkdir -p $INSTALL_DIR/share
cp -fR objj/ $INSTALL_DIR/share/objj
+ln -sf $INSTALL_DIR/share/objj/bin/nib2cib $INSTALL_DIR/bin/nib2cib
ln -sf $INSTALL_DIR/share/objj/bin/objj $INSTALL_DIR/bin/objj
ln -sf $INSTALL_DIR/share/objj/bin/objjc $INSTALL_DIR/bin/objjc
ln -sf $INSTALL_DIR/share/objj/bin/steam $INSTALL_DIR/bin/steam
ln -sf $INSTALL_DIR/share/objj/bin/bake $INSTALL_DIR/bin/bake
+chmod +x $INSTALL_DIR/bin/nib2cib
chmod +x $INSTALL_DIR/bin/objj
chmod +x $INSTALL_DIR/bin/objjc
chmod +x $INSTALL_DIR/bin/steam
diff --git a/Tools/NibApp/AppController.j b/Tools/NibApp/AppController.j
new file mode 100644
index 000000000..7dc51c4b8
--- /dev/null
+++ b/Tools/NibApp/AppController.j
@@ -0,0 +1,25 @@
+
+import
+import
+
+
+@implementation AppController : CPObject
+{
+}
+
+- (void)applicationDidFinishLaunching:(CPNotification)aNotification
+{
+ var cib = [[CPCib alloc] initWithContentsOfURL:@"MainMenu.cib"],
+ x = [cib instantiateCibWithExternalNameTable:nil];
+
+ [x setBackgroundColor:[CPColor blueColor]];
+
+ var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
+ contentView = [theWindow contentView];
+
+ [contentView addSubview:x];
+
+ [theWindow orderFront:self];
+}
+
+@end
\ No newline at end of file
diff --git a/Tools/NibApp/Frameworks b/Tools/NibApp/Frameworks
new file mode 120000
index 000000000..50d7dd1d2
--- /dev/null
+++ b/Tools/NibApp/Frameworks
@@ -0,0 +1 @@
+/Users/tolmasky/Development/Build/Release
\ No newline at end of file
diff --git a/Tools/nib2cib/HelloWorld.nib/classes.nib b/Tools/NibApp/HelloWorld.nib/classes.nib
similarity index 100%
rename from Tools/nib2cib/HelloWorld.nib/classes.nib
rename to Tools/NibApp/HelloWorld.nib/classes.nib
diff --git a/Tools/nib2cib/HelloWorld.nib/info.nib b/Tools/NibApp/HelloWorld.nib/info.nib
similarity index 100%
rename from Tools/nib2cib/HelloWorld.nib/info.nib
rename to Tools/NibApp/HelloWorld.nib/info.nib
diff --git a/Tools/nib2cib/HelloWorld.nib/keyedobjects.nib b/Tools/NibApp/HelloWorld.nib/keyedobjects.nib
similarity index 100%
rename from Tools/nib2cib/HelloWorld.nib/keyedobjects.nib
rename to Tools/NibApp/HelloWorld.nib/keyedobjects.nib
diff --git a/Tools/NibApp/HelloWorld.xib b/Tools/NibApp/HelloWorld.xib
new file mode 100644
index 000000000..18b318598
--- /dev/null
+++ b/Tools/NibApp/HelloWorld.xib
@@ -0,0 +1,279 @@
+
+
+
+ 1050
+ 9E17
+ 629
+ 949.33
+ 352.00
+
+
+
+
+
+ YES
+
+
+
+ YES
+
+ 0
+
+ YES
+
+
+
+
+
+ -2
+
+
+ RmlsZSdzIE93bmVyA
+
+
+ -1
+
+
+ First Responder
+
+
+ -3
+
+
+ Application
+
+
+ 1
+
+
+ YES
+
+
+
+
+
+
+ 8
+
+
+ YES
+
+
+
+
+
+ 9
+
+
+
+
+ 10
+
+
+ YES
+
+
+
+
+
+ 11
+
+
+
+
+
+
+ YES
+
+ YES
+ -1.IBPluginDependency
+ -2.IBPluginDependency
+ -3.IBPluginDependency
+ 1.IBPluginDependency
+ 1.WindowOrigin
+ 1.editorWindowContentRectSynchronizationRect
+ 10.IBPluginDependency
+ 11.IBPluginDependency
+ 8.IBPluginDependency
+ 9.IBPluginDependency
+
+
+ YES
+
+
+
+
+ {628, 654}
+ {{319, 416}, {480, 272}}
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+
+
+
+ YES
+
+ YES
+
+
+ YES
+
+
+
+
+ YES
+
+ YES
+
+
+ YES
+
+
+
+ 11
+
+
+
+ YES
+
+
+ 0
+
+ 3
+
+ YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQkdG9wWSRhcmNoaXZlclgkb2JqZWN0cxIA
+AYag0QAHAAhdSUIub2JqZWN0ZGF0YYABXxAPTlNLZXllZEFyY2hpdmVyrxA/AAsADAAxADUANgA7ADwA
+QABEAEcASwBUAGwAbQB1AHYAeQCJAIoAjgCYAAsAmQCfALMAtgC3AL8AwgDHAMgAywALAJ0AzADPANIA
+0wDV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ABnAGoAbYBwQHPAesB+QIMAh4COAJCAk8CUQJTAlUCVwJZAlsCXQJf
+AmECYwJlAmcCaQJrAm0CbwJxAnMCfAKIAooCjAKVAp4CpwKyArcCxgLZAuIC7QLvAvAC+QMAAw0DEwMc
+Ax4DHwMoAy8DPgNGA08DUQNeA2ADYgNkA2YDaANqA5sDpwO9A9ID4QPzA/4ECAQWBCgENQRDBEwETgRQ
+BFIEVARWBFgEWgRcBF8EZARtBIEEkgSZBKAEqQSrBLQEtgS4BMUEzgTTBNoE+wUNBRUFHAUlBS8FOAVE
+BUYFSAVKBUwFTwVQBVIFVAVVBV4FZwV0BYEFogWtBbkFuwW9Bb8FwQXDBcUFxwXhBeoF9QX+BggGDwYb
+BlQGXAZyBocGkgadBqgGtgbTBtwG3gbgBuIG5AbmBugG8Qb6BvsG/AcNBw8HEQcbBzwHPgdAB0IHRAdF
+B0cHSQdSB1sHaAdxB3MHeAd6B3wHlQeeB6kHsge9B8YHzwfcB+UH5wfpB/cIAAgFCA4IEAgdCB8IIQgj
+CCUIJwgpCDIINAhDCEUIRwhJCEsITQhPCFEIWghcCGsIbQhvCHEIcwh1CHcIeQiFCJIItAjcCOgI/AkI
+CREJEwkUCR0JHwkgCSkJKwk6CTwJPglACUIJRAlGCUgJUQlTCWIJZAlmCWgJaglsCW4JcAlyCXQJdgl4
+CXoJgwmMCY4JjwmYCZoJmwmkCaYJpwmwCbUAAAAAAAACAgAAAAAAAAElAAAAAAAAAAAAAAAAAAAJxA
+
+
+
diff --git a/Tools/NibApp/Info.plist b/Tools/NibApp/Info.plist
index ca4dfaaab..25070c607 100644
--- a/Tools/NibApp/Info.plist
+++ b/Tools/NibApp/Info.plist
@@ -2,23 +2,10 @@
- CPBundleDocumentTypes
-
-
- CFBundleTypeExtensions
-
- MyDocument
-
- CPBundleTypeName
- MyDocument
- CPBundleTypeRole
- Editor
- CPDocumentClass
- MyDocument
-
-
+ CPApplicationDelegateClass
+ AppControllerCPBundleName
- MyApplication
+ NibAppCPPrincipalClassCPApplication
diff --git a/Tools/NibApp/MainMenu.cib b/Tools/NibApp/MainMenu.cib
new file mode 100644
index 000000000..5c6a8f4c8
--- /dev/null
+++ b/Tools/NibApp/MainMenu.cib
@@ -0,0 +1 @@
+280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;1E;E;K;8;$objectsA;S;5;$nullD;K;6;$classD;K;6;CP$UIDd;1;2E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;3E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;29;_CPCibObjectDataRootObjectKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;17E;E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;E;E;S;16;IBCocoaFrameworkd;1;7D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;17E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;15E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;17E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;E;E;D;K;6;$classD;K;6;CP$UIDd;2;16E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;29E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;29E;K;15;CPViewWindowKeyD;K;6;CP$UIDd;1;0E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;30E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;1;0E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;31E;K;25;CPViewAutoresizesSubviewsD;K;6;CP$UIDd;2;32E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;1;0E;K;17;CPViewHitTestsKeyD;K;6;CP$UIDd;2;33E;K;17;CPViewIsHiddenKeyD;K;6;CP$UIDd;2;34E;K;16;CPViewOpacityKeyD;K;6;CP$UIDd;2;27E;K;24;CPCustomViewClassNameKeyD;K;6;CP$UIDd;2;35E;E;D;K;10;$classnameS;12;CPCustomViewK;8;$classesA;S;12;CPCustomViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;15E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;36E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;37E;K;15;CPViewWindowKeyD;K;6;CP$UIDd;1;0E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;38E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;15E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;31E;K;25;CPViewAutoresizesSubviewsD;K;6;CP$UIDd;2;32E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;1;0E;K;17;CPViewHitTestsKeyD;K;6;CP$UIDd;2;33E;K;17;CPViewIsHiddenKeyD;K;6;CP$UIDd;2;34E;K;16;CPViewOpacityKeyD;K;6;CP$UIDd;2;27E;K;21;CPControlIsEnabledKeyD;K;6;CP$UIDd;2;33E;K;21;CPControlAlignmentKeyD;K;6;CP$UIDd;1;0E;K;16;CPControlFontKeyD;K;6;CP$UIDd;2;39E;K;21;CPControlTextColorKeyD;K;6;CP$UIDd;1;0E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;1;0E;K;18;CPControlActionKeyD;K;6;CP$UIDd;1;0E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;41E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;1;0E;K;23;CPButtonImageScalingKeyD;K;6;CP$UIDd;2;28E;K;21;CPButtonIsBorderedKeyD;K;6;CP$UIDd;2;33E;K;21;CPButtonBezelStyleKeyD;K;6;CP$UIDd;2;31E;E;D;K;10;$classnameS;8;CPButtonK;8;$classesA;S;8;CPButtonS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;S;11;ApplicationS;12;File's OwnerS;25;Button Cell (Hello World)S;11;Custom ViewS;31;Round Rect Button (Hello World)d;2;-3d;1;4d;1;6d;1;1d;1;2S;20;{{0, 0}, {480, 272}}D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;17E;E;E;d;2;12d;3;256T;F;S;6;CPViewS;23;{{166, 129}, {154, 19}}S;19;{{0, 0}, {154, 19}}D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;2;40E;K;13;CPFontNameKeyD;K;6;CP$UIDd;2;42E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;2;43E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;34E;E;D;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;S;11;Hello WorldS;5;Ariald;2;11E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E;
\ No newline at end of file
diff --git a/Tools/NibApp/MyDocument.j b/Tools/NibApp/MyDocument.j
deleted file mode 100644
index 964c9ca48..000000000
--- a/Tools/NibApp/MyDocument.j
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// Document.j
-// Editor
-//
-// Created by Francisco Tolmasky on May 21, 2008.
-// Copyright 2005 - 2008, 280 North, Inc. All rights reserved.
-//
-
-import
-import
-
-
-@implementation MyDocument : CPDocument
-{
- CPTextField _textField;
-}
-
-- (void)windowControllerDidLoadNib:(CPWindowController)aWindowController
-{
- [super windowControllerDidLoadNib:aWindowController];
-
- var nib = [[CPNib alloc] initWithContentsOfURL:@"MainMenu.cib"];
-
- var x = [nib instantiateNibWithExternalNameTable:nil];
-
- [x setBackgroundColor:[CPColor blueColor]];
-
- //alert([[x subviews] count]);
-
- [[[aWindowController window] contentView] addSubview:x];
-}
-
-@end
diff --git a/Tools/NibApp/index.html b/Tools/NibApp/index.html
index 774cb7e91..e3132e64c 100644
--- a/Tools/NibApp/index.html
+++ b/Tools/NibApp/index.html
@@ -14,13 +14,12 @@
-->
- Loading...
+ Nib App
diff --git a/Tools/NibApp/main.j b/Tools/NibApp/main.j
index d92a85b6f..4bbfb1618 100755
--- a/Tools/NibApp/main.j
+++ b/Tools/NibApp/main.j
@@ -9,12 +9,10 @@
import
import
-import "MyDocument.j"
+import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
-}
-
-window.setTimeout(main, 0);
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/Tools/build.xml b/Tools/build.xml
index 8e667e380..48d689c92 100644
--- a/Tools/build.xml
+++ b/Tools/build.xml
@@ -5,6 +5,7 @@
+
diff --git a/Tools/nib2cib/NSAppKit.j b/Tools/nib2cib/NSAppKit.j
index 47def697d..f11e4b92d 100644
--- a/Tools/nib2cib/NSAppKit.j
+++ b/Tools/nib2cib/NSAppKit.j
@@ -1,3 +1,24 @@
+/*
+ * NSAppKit.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import "NSButton.j"
import "NSCell.j"
diff --git a/Tools/nib2cib/NSArray.j b/Tools/nib2cib/NSArray.j
index 702e15d96..7bd5b312c 100644
--- a/Tools/nib2cib/NSArray.j
+++ b/Tools/nib2cib/NSArray.j
@@ -1,4 +1,25 @@
-
+/*
+ * NSArray.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
import
diff --git a/Tools/nib2cib/NSButton.j b/Tools/nib2cib/NSButton.j
index 1a888e512..9b0b40d1d 100644
--- a/Tools/nib2cib/NSButton.j
+++ b/Tools/nib2cib/NSButton.j
@@ -1,3 +1,27 @@
+/*
+ * NSButton.j
+ * nib2cib
+ *
+ * Portions based on NSButtonCell.m (09/09/2008) in Cocotron (http://www.cocotron.org/)
+ * Copyright (c) 2006-2007 Christopher J. W. Lloyd
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
@@ -13,12 +37,14 @@ import "NSControl.j"
if (self)
{
+ _controlSize = CPRegularControlSize;
+
var cell = [aCoder decodeObjectForKey:@"NSCell"];
- [self setBordered:[cell isBordered]];
- [self setBezelStyle:[cell bezelStyle]];
-
[self setTitle:[cell title]];
+
+ [self setBezelStyle:[cell bezelStyle]];
+ [self setBordered:[cell isBordered]];
}
return self;
@@ -62,7 +88,6 @@ import "NSControl.j"
_isBordered = (buttonFlags & 0x00800000) ? YES : NO;
_bezelStyle = (buttonFlags2 & 0x7) | ((buttonFlags2 & 0x20) >> 2);
-
// NSContents for NSButton is actually the title
_title = [aCoder decodeObjectForKey:@"NSContents"];
}
diff --git a/Tools/nib2cib/NSCell.j b/Tools/nib2cib/NSCell.j
index 4ac39357b..36eea53c4 100644
--- a/Tools/nib2cib/NSCell.j
+++ b/Tools/nib2cib/NSCell.j
@@ -1,3 +1,27 @@
+/*
+ * NSCell.j
+ * nib2cib
+ *
+ * Portions based on NSCell.m (09/09/2008) in Cocotron (http://www.cocotron.org/)
+ * Copyright (c) 2006-2007 Christopher J. W. Lloyd
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
diff --git a/Tools/nib2cib/NSControl.j b/Tools/nib2cib/NSControl.j
index d5f8ccd79..6714b5fd3 100644
--- a/Tools/nib2cib/NSControl.j
+++ b/Tools/nib2cib/NSControl.j
@@ -1,3 +1,24 @@
+/*
+ * NSControl.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
diff --git a/Tools/nib2cib/NSCustomView.j b/Tools/nib2cib/NSCustomView.j
index 4ed40b1fd..9b114bf53 100644
--- a/Tools/nib2cib/NSCustomView.j
+++ b/Tools/nib2cib/NSCustomView.j
@@ -1,3 +1,24 @@
+/*
+ * NSCustomView.j
+ * AppKit
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
diff --git a/Tools/nib2cib/NSFont.j b/Tools/nib2cib/NSFont.j
index 46ec5199f..d5aebd34c 100644
--- a/Tools/nib2cib/NSFont.j
+++ b/Tools/nib2cib/NSFont.j
@@ -1,3 +1,24 @@
+/*
+ * NSFont.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
diff --git a/Tools/nib2cib/NSFoundation.j b/Tools/nib2cib/NSFoundation.j
index 944c5cfc5..4c8e7af2c 100644
--- a/Tools/nib2cib/NSFoundation.j
+++ b/Tools/nib2cib/NSFoundation.j
@@ -1,2 +1,23 @@
+/*
+ * NSFoundation.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import "NSArray.j"
diff --git a/Tools/nib2cib/NSIBObjectData.j b/Tools/nib2cib/NSIBObjectData.j
index 9953f38cd..fa7cd2576 100644
--- a/Tools/nib2cib/NSIBObjectData.j
+++ b/Tools/nib2cib/NSIBObjectData.j
@@ -1,3 +1,24 @@
+/*
+ * NSIBObjectData.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
/*#import "NSIBObjectData.h"
#import
@@ -59,7 +80,6 @@ import
_connections = [aCoder decodeObjectForKey:@"NSConnections"];
//_fontManager = [aCoder decodeObjectForKey:@"NSFontManager"] retain];
-
_framework = [aCoder decodeObjectForKey:@"NSFramework"];
_nextOid = [aCoder decodeIntForKey:@"NSNextOid"];
diff --git a/Tools/nib2cib/NSResponder.j b/Tools/nib2cib/NSResponder.j
index b3640eec9..a9667feaf 100644
--- a/Tools/nib2cib/NSResponder.j
+++ b/Tools/nib2cib/NSResponder.j
@@ -1,3 +1,24 @@
+/*
+ * NSResponder.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
@@ -30,4 +51,4 @@ import
return [CPResponder class];
}
-@end
\ No newline at end of file
+@end
diff --git a/Tools/nib2cib/NSSlider.j b/Tools/nib2cib/NSSlider.j
index 09ced75ac..c9b6511cb 100644
--- a/Tools/nib2cib/NSSlider.j
+++ b/Tools/nib2cib/NSSlider.j
@@ -1,3 +1,24 @@
+/*
+ * NSSlider.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
@@ -14,10 +35,8 @@ import "NSSlider.j"
{
_minValue = [aCoder decodeDoubleForKey:@"NSMinValue"];
_maxValue = [aCoder decodeDoubleForKey:@"NSMaxValue"];
-/* _knobThickness=8.0;
- _numberOfTickMarks=[keyed decodeIntForKey:@"NSNumberOfTickMarks"];
- _tickMarkPosition=[keyed decodeIntForKey:@"NSTickMarkPosition"];
- _allowsTickMarkValuesOnly=[keyed decodeBoolForKey:@"NSAllowsTickMarkValuesOnly"];*/
+
+ //_value = [aCoder decodeDoubleForKey:@"NSValue"];
}
return self;
diff --git a/Tools/nib2cib/NSView.j b/Tools/nib2cib/NSView.j
index d6d2508f6..4d92d3010 100644
--- a/Tools/nib2cib/NSView.j
+++ b/Tools/nib2cib/NSView.j
@@ -1,30 +1,31 @@
+/*
+ * NSView.j
+ * nib2cib
+ *
+ * Portions based on NSView.m (09/09/2008) in Cocotron (http://www.cocotron.org/)
+ * Copyright (c) 2006-2007 Christopher J. W. Lloyd
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
-//unsigned int rotatedFromBase:1;
-//unsigned int rotatedOrScaledFromBase:1;
-//unsigned int autosizing:6;
-//unsigned int autoresizeSubviews:1;
-//unsigned int wantsGState:1;
-//unsigned int needsDisplay:1;
-//unsigned int validGState:1;
-//unsigned int newGState:1;
-//unsigned int noVerticalAutosizing:1;
-//unsigned int frameChangeNotesSuspended:1;
-//unsigned int needsFrameChangeNote:1;
-//unsigned int focusChangeNotesSuspended:1;
-//unsigned int boundsChangeNotesSuspended:1;
-//unsigned int needsBoundsChangeNote:1;
-//unsigned int removingWithoutInvalidation:1;
-//unsigned int interfaceStyle0:1;
-//unsigned int needsDisplayForBounds:1;
-//unsigned int specialArchiving:1;
-//unsigned int interfaceStyle1:1;
-//unsigned int retainCount:6;
-//unsigned int retainCountOverMax:1;
-//unsigned int aboutToResize:1;
-
@implementation CPView (NSCoding)
- (id)NS_initWithCoder:(CPCoder)aCoder
diff --git a/Tools/nib2cib/build.xml b/Tools/nib2cib/build.xml
new file mode 100644
index 000000000..6436588a4
--- /dev/null
+++ b/Tools/nib2cib/build.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tools/nib2cib/nib2cib.j b/Tools/nib2cib/main.j
similarity index 74%
rename from Tools/nib2cib/nib2cib.j
rename to Tools/nib2cib/main.j
index 65c03f233..8a822799d 100644
--- a/Tools/nib2cib/nib2cib.j
+++ b/Tools/nib2cib/main.j
@@ -1,3 +1,24 @@
+/*
+ * main.j
+ * nib2cib
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
import
@@ -62,7 +83,6 @@ var data = [CPURLConnection sendSynchronousRequest:[CPURLRequest requestWithURL:
// Minor NSKeyedArchive to CPKeyedArchive conversion.
[data setString:[data string].replace(/\\s*CF\$UID\s*\<\/key\>/g, "CP$UID")];
-
// Unarchive the NS data
var unarchiver = [[CPKeyedUnarchiver alloc] initForReadingWithData:data],
objectData = [unarchiver decodeObjectForKey:@"IB.objectdata"],
diff --git a/Tools/nib2cib/nib2cib b/Tools/nib2cib/nib2cib
index 194aecc18..338a66249 100755
--- a/Tools/nib2cib/nib2cib
+++ b/Tools/nib2cib/nib2cib
@@ -1,6 +1,58 @@
#!/bin/sh
-SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
-SELF_DIR=`dirname $SELF_PATH`
+#
+# nib2cib
+# nib2cib
+#
+# Created by Francisco Tolmasky.
+# Copyright 2008, 280 North, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
-$SELF_DIR/objj $SELF_DIR/../nib2cib/nib2cib.j $@
+# if OBJJ_HOME isn't set, try to determine it
+if [ -z $OBJJ_HOME ]; then
+ # get path of the executable
+ SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
+
+ # resolve symlinks
+ if [ -h $SELF_PATH ]; then
+ SELF_PATH=`readlink $SELF_PATH`
+ fi
+
+ # get second ancestor directory
+ SELF_DIR=`dirname $SELF_PATH`
+ export OBJJ_HOME=`dirname $SELF_DIR`
+
+ # check to ensure it exists, print message
+ if [ -d $OBJJ_HOME ]; then
+ echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2
+ else
+ echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2
+ exit 2
+ fi
+fi
+
+OBJJ_LIB="$OBJJ_HOME/lib"
+
+NIB2CIB="$OBJJ_LIB/nib2cib/main.j"
+
+# convert paths for Cygwin
+if [[ `uname` == CYGWIN* ]]; then
+ OBJJ_HOME=`cygpath -w "$OBJJ_HOME"`
+ BAKE=`cygpath -w "$NIB2CIB"`
+fi
+
+objj $NIB2CIB $@
diff --git a/Tools/nib2cib/nib2cib.steam b/Tools/nib2cib/nib2cib.steam
new file mode 100644
index 000000000..06ed7627c
--- /dev/null
+++ b/Tools/nib2cib/nib2cib.steam
@@ -0,0 +1,40 @@
+
+
+
+
+ Name
+ nib2cib
+ Targets
+
+
+ Name
+ nib2cib
+
+
+ Configurations
+
+
+ Name
+ Debug
+ Settings
+
+ PREPROCESS
+
+ FLAGS
+ -DDEBUG
+
+
+
+ Name
+ Release
+ Settings
+
+ PREPROCESS
+
+ PREINTERPRET
+
+
+
+
+
+
diff --git a/Tools/nib2cib/project.properties b/Tools/nib2cib/project.properties
deleted file mode 100644
index b0555d24f..000000000
--- a/Tools/nib2cib/project.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-
-CPBundleExecutable=nibtocib
-CPBundleIdentifier=com.280North.nibtocib
-CPBundleName=nibtocib
-CPBundlePackageType=280N
diff --git a/Tools/objj/build.xml b/Tools/objj/build.xml
index f6894ba9c..df51f4d28 100644
--- a/Tools/objj/build.xml
+++ b/Tools/objj/build.xml
@@ -36,8 +36,6 @@
-
-
@@ -50,8 +48,6 @@
-
-
diff --git a/Tools/objj/objj b/Tools/objj/objj
index 51225ca77..e0205f667 100644
--- a/Tools/objj/objj
+++ b/Tools/objj/objj
@@ -28,7 +28,6 @@ CLASSPATH="$OBJJ_LIB:$OBJJ_LIB/js.jar"
OBJJ="$OBJJ_LIB/objj.js"
RLWRAP=`which rlwrap`
-FRAMEWORKS="$STEAM_BUILD"
# if there's a "lib" directory, add all the jars from it
if [ -d "lib" ]; then
@@ -41,13 +40,11 @@ if [[ `uname` == CYGWIN* ]]; then
OBJJ_HOME=`cygpath -wp "$OBJJ_HOME"`
OBJJ_LIB=`cygpath -wp "$OBJJ_LIB"`
OBJJ=`cygpath -wp "$OBJJ"`
- FRAMEWORKS=`cygpath -w "$FRAMEWORKS"`
- STEAM_BUILD=`cygpath -w "$STEAM_BUILD"`
CLASSPATH=`cygpath -wp "$CLASSPATH"`
fi
#if [ -e $STEAM_BUILD/Objective-J.build/Release/Rhino ]; then
- $RLWRAP java -classpath $CLASSPATH objj $OBJJ_LIB $STEAM_BUILD $@
+ $RLWRAP java -classpath $CLASSPATH objj $OBJJ_LIB $@
#$RLWRAP java -classpath $CLASSPATH org.mozilla.javascript.tools.shell.Main $OBJJ $OBJJ_LIB $STEAM_BUILD $@
#else
# echo "Missing frameworks at $STEAM_BUILD/Objective-J.build/Release/Rhino" 1>&2
diff --git a/Tools/objj/objj.js b/Tools/objj/objj.js
index 8896654c3..b2cc0214e 100644
--- a/Tools/objj/objj.js
+++ b/Tools/objj/objj.js
@@ -2,8 +2,8 @@ debug = false;
args = arguments;
var OBJJ_LIB = arguments[0];
-var STEAM_BUILD = arguments[1];
-arguments.splice(0, 2);
+
+arguments.splice(0, 1);
if (typeof window == "undefined")
{
@@ -23,12 +23,12 @@ if (arguments.length > 0)
{
var main_file = arguments[0];
arguments.splice(0, 1);
-
+
if (debug)
print("Loading: " + main_file);
objj_import(main_file, NO);
-
+
serviceTimeouts();
if (debug)
diff --git a/Tools/steam/steam.js b/Tools/steam/steam.js
index 588611afa..92492b3b0 100644
--- a/Tools/steam/steam.js
+++ b/Tools/steam/steam.js
@@ -12,7 +12,11 @@ importClass(java.io.SequenceInputStream);
function Target(dictionary)
{
- this._name = dictionary_getValue(dictionary, "name");
+ this._name = dictionary_getValue(dictionary, "Name");
+
+ var flagsString = dictionary_getValue(dictionary, "Flags");
+
+ this._flags = flagsString ? flagsString.split(/\s+/) : [];
this._exclusions = [];
@@ -52,9 +56,18 @@ Target.prototype.exclusions = function()
return this._exclusions;
}
+Target.prototype.flags = function()
+{
+ return this._flags;
+}
+
function Configuration(dictionary)
{
- this._name = dictionary_getValue(dictionary, "name");
+ this._name = dictionary_getValue(dictionary, "Name");
+
+ var flagsString = dictionary_getValue(dictionary, "Flags");
+
+ this._flags = flagsString ? flagsString.split(/\s+/) : [];
return this;
}
@@ -64,6 +77,11 @@ Configuration.prototype.name = function()
return this._name;
}
+Configuration.prototype.flags = function()
+{
+ return this._flags;
+}
+
function Project(/*String*/ aFilePath, /*String*/ aBuildPath)
{
this._file = new File(aFilePath).getCanonicalFile();
@@ -151,6 +169,11 @@ Project.prototype.setActiveTarget = function(/*Target*/ aTarget)
this._buildObjects = null;
}
+Project.prototype.activeTarget = function()
+{
+ return this._activeTarget;
+}
+
Project.prototype.setActiveConfiguration = function(/*Configuration*/ aConfiguration)
{
this._activeConfiguration = aConfiguration;
@@ -160,6 +183,11 @@ Project.prototype.setActiveConfiguration = function(/*Configuration*/ aConfigura
this._buildObjects = null;
}
+Project.prototype.activeConfiguration = function()
+{
+ return this._activeConfiguration;
+}
+
Project.prototype.buildProducts = function()
{
if (!this._buildProducts)
@@ -193,6 +221,11 @@ Project.prototype.buildObjects = function()
return this._buildObjects;
}
+Project.prototype.activeFlags = function()
+{
+ return this.activeTarget().flags().concat(this.activeConfiguration().flags());
+}
+
Project.prototype.build = function()
{
var jFiles = getFiles(this._root, "j", this._activeTarget.exclusions()),
@@ -201,6 +234,8 @@ Project.prototype.build = function()
shouldObjjPreprocess = true,
objjcComponents = ["bash", OBJJ_HOME + "/bin/objjc"];
+ objjcComponents = objjcComponents.concat(this.activeFlags());
+
if (!shouldObjjPreprocess)
objjcComponents.push("-E");