Commit Graph
42 Commits
Author SHA1 Message Date
Alfred Wärnsäter 2ecea40fdc lots of Node fixes 2021-08-19 10:56:13 +02:00
Alfred Wärnsäter 472f859bd8 basic support for nib2cib 2021-08-03 13:39:54 +02:00
Alfred Wärnsäter 87a1c6621c ported nib2cib from narwhal to node, it now build using objj-jake 2021-07-29 13:20:30 +02:00
Daniel a005a468a7 Formatting: add semi-colons to nib2cib/Converter.j 2018-04-07 16:40:52 -07:00
Maik Opitz 08f74201b6 RegEx angepasst 2016-11-02 16:21:03 +00:00
Maik Opitz fb43f8bf1a Regex nochmals angepasst 2016-11-02 16:45:01 +01:00
Maik Opitz bf082600c3 fixed RegEx with newer gcc versions 2016-11-01 15:46:40 +01:00
Antoine Mercadal c603326e58 Use try/finally to ensure popen streams are always closed 2015-05-09 10:22:13 -07:00
Antoine Mercadal bcb1630f20 FIXED: Closes all streams after a OS.popen()
Previously, when popen was called, the 3 streams (stdin, stderr and stdourt) where never closed. This was the reason of the having an impossible number of open files.

This patch ensure all streams are closed after using them. This means that the ulimit trick is no more necessary
2015-04-23 16:46:01 -07:00
Aparajita Fishman c9dae8ced4 Revert "Fixed: nib2cib used a temp file for plutil output instead of using stdout."
This reverts commit 4e4fc389d2. It wasn't working reliably.
2013-08-15 10:35:25 -04:00
Aparajita Fishman 4e4fc389d2 Fixed: nib2cib used a temp file for plutil output instead of using stdout.
Previously, nib2cib sent the output of plutil to a temp file, then read that file. plutil supports writing to stdout, which avoids the temp file completely, so that is what we do now.
2013-08-15 10:21:45 -04:00
Aparajita Fishman 9cb2c758c7 New: --no-colors option for nib2cib.
Previously error messages would always be colorized, which doesn't work well if you are piping the output.

Passing --no-colors turns off all colors in the output.
2013-04-23 23:34:55 -04:00
Aparajita Fishman d9117bd9a0 Fixed: Converter was copying too much state from Nib2Cib, framework resources could not be referenced in Xcode.
* State *
Previously the Converter class needlessly copied a whole bunch of state from the Nib2Cib class, which was not only poor factoring, but made for easy omissions of state when instantiating a new Converter, such as was done in NSNib.j.

This commit pushes all state not specific to Converter up to Nib2Cib. This allowed removal of redundant code in NSNib -NS_initWithCoder.

* Resources *
Previously it was not possible to use custom images that were located in a framework, because only the app's Resources directory was searched.

This commit automatically searches all frameworks for Resources directories. When a custom image is specified in Xcode, first the app's Resources directory is searched, then all framework Resource directories. Alternately, the specific framework to use can be specified in Xcode by using the form framework@image.

At runtime, the framework is loaded by its identifier (as specified in Info.plist), and if there is no identifier, by searching next to the current AppKit framework.

All of this renders the nib2cib -R option completely obsolete, so it was removed from the NibApplication/Jakefile template.
2013-04-08 15:48:45 -04:00
Aparajita Fishman 2a580c675a Fixed: shared singleton Converter was being overwritten by incompletely constructed instance.
Previously, NSNib would create a Converter instance for converting table cell views. Unfortunately Converter did not expect to be instantiated more than once, and the singleton SharedConverter was unconditionally being set in the initializer. This might not have caused problems, except that NSNib did not copy all of the shared Converter's state to the copy, especially the resource path, which caused custom images in table cell views to fail.

This commit correctly ensures that the shared Converter instance is set only once, and also copies all of the shared Converter state to the instance that is used for converting the table cell view.
2013-03-25 16:07:58 -04:00
cacaodev 108042c190 Merge remote-tracking branch 'upstream/master' into CPTableViewLion
Conflicts:
	AppKit/CPTableView.j
	Tests/Manual/TableTest/TableCibTest/AppController.j
2013-02-13 19:27:53 +01:00
Aparajita Fishman af47857a47 Fixed missing/circular imports in nib2cib 2013-01-23 23:10:10 +08:00
Aparajita Fishman 866e1f00f7 Objj2 compiler fixes
- Each file compiles individually with no errors or warnings.
- Added missing imports.
- Fixed imports to remove circularity.
- Removed unnecessary imports.
- Added missing headers.
- Added missing action_button.png.
- Replace CPMakeRect with CGRectMake.
2013-01-23 15:48:56 +07:00
Antoine Mercadal 86e0282011 Fix nib2cib warnings 2013-01-18 14:29:25 -08:00
cacaodev 2cc3521989 Merge remote-tracking branch 'upstream/master' into CPTableViewLion
Conflicts:
	Tests/Manual/CPOutlineViewCibTest/Resources/MainMenu.cib
	Tests/Manual/TableTest/TableBindings/Resources/MainMenu.cib
2013-01-18 16:57:46 +01:00
Martin Carlberg 897adf27f0 Fixed import statements in nib2cib, bug in load system and some more fixes to test cases 2012-12-17 14:57:18 +01:00
cacaodev 2bd5696d99 Add info message when converting NSTableCellView nib to plist 2012-07-15 22:33:46 +02:00
cacaodev dfb2340e83 Merge remote-tracking branch 'upstream/master' into CPTableViewLion 2012-05-16 21:02:03 +02:00
Alexander Ljungberg 3525bd0183 Code formatting. 2012-05-13 14:26:19 +01:00
cacaodev 392702cc18 nib2cib Converter.j : Add a flag to disable ibtool step in case the input is already compiled. Set SharedConverter class var in init (not a singleton, represents the current Converter). 2012-04-13 09:18:54 +02:00
Aparajita Fishman 502edbd152 nib2cib enhancements
- Added support for User Defined Runtime Attributes in IB.
- Added support for userland NS classes in IB.
- Added support for file-based nib2cib configuration.
- Converted nib2cib to Objective-J from straight Javascript.
- Updated man page for new features.
- Test app.
2012-04-12 12:09:24 -04:00
Aparajita Fishman af6d38fd16 Fixes and enhancements
- When a xib/nib is deleted, the corresponding cib is deleted.
- Fixed the calculation of the output path when given a relative path.
- Works with .nib files now.
- Works with -R option now. NSCustomResource was assuming an image path would always be relative to cwd().
- The Resources directory is always inferred from the input path, so the -R option is usually unnecessary.
- Added --default-theme option.
- Multiple extra themes can be specified with the --theme option.
- Verbose mode displays the inferred application and resources paths, and the source theme used when doing font substitutions.
- Added a man page.
- Themes are read using StaticResource instead of parsing the file myself.
- Error message tweaks.
2011-04-05 16:57:16 -04:00
Aparajita Fishman 16bacae7e3 More cool stuff...
- The holy grail! I took Klaas' great autonib2cib and rolled it into nib2cib.
- Removed check for stream in CPLogColorize, it isn't necessary and reduces its general-purpose usage.
2011-03-29 16:06:19 -04:00
Aparajita Fishman 42c71172f2 Better path checking and error messages, fixed issue #1154 2011-03-13 10:08:17 -04:00
Aparajita Fishman 11f92353c8 Removed layoutMode references 2011-03-11 08:37:23 -05:00
Aparajita Fishman d303e6e96c Initial commit before testing. 2011-03-08 17:40:41 -05:00
Francisco Ryan Tolmasky I ff60125183 Some capp_linting.
Reviewed by me.
2010-12-01 11:04:17 -08:00
Ross Boucher 421ae6b316 Make CPButton archive its key equivalents, and make nib2cib support the feature. 2010-06-10 10:41:15 -07:00
Tom Robinson 22cdd6e04d Cleanup nib2cib logging. 2010-03-06 21:21:08 -08:00
Tom Robinson a453412d5b Strip invalid characters from plist before attempting to parse (so far just ESC) 2010-03-06 21:21:08 -08:00
Tom Robinson ce749302a5 Fix nib2cib .nib support. Also use array form of OS.popen to avoid path escaping issues. 2010-03-06 19:34:56 -08:00
Francisco Ryan Tolmasky I 272f938f2e Fix for CPData naming issues, added test cases, and fixed isEqual: for CPDictionary.
Reviewed by me.
2010-02-21 23:29:41 -08:00
Ross Boucher 27e99344bd Make nib2cib quieter by default. Prints only fatal error messages.
Pass the -v flag to print warnings, and -vv or --verbose to print all messages.

Closes #475.
2010-02-16 16:59:44 -08:00
Francisco Ryan Tolmasky I 59660032e1 nib2cib fixes.
Reviewed by me.
2010-01-29 13:22:44 -08:00
Francisco Ryan Tolmasky I 794d8a754c Make blendtask work with new system.
Reviewed by me.
2010-01-28 16:24:18 -08:00
Francisco Ryan Tolmasky I 16deb3700d Fixed incompatibilities in nib2cib with CommonJS and JavaScriptCore.
Reviewed by me.
2009-10-15 19:03:59 -07:00
Francisco Ryan Tolmasky I a607d79c7d Further spriting work.
Reviewed by me.
2009-10-13 10:19:50 -07:00
Francisco Ryan Tolmasky I afba1909bb Improved TableView nib support as well as including several nib2cib improvements.
Reviewed by me.
2009-07-11 18:12:20 -07:00