@@ -3,7 +3,8 @@ var path = require('path'),
33 H_EXTENSION = / [ . ] h $ / , HEADER_FILE = 'sourcecode.c.h' ,
44 BUNDLE_EXTENSION = / [ . ] b u n d l e $ / , BUNDLE = '"wrapper.plug-in"' ,
55 XIB_EXTENSION = / [ . ] x i b $ / , XIB_FILE = 'file.xib' ,
6- FRAMEWORK_EXTENSION = / [ . ] d y l i b $ / , FRAMEWORK = '"compiled.mach-o.dylib"' ,
6+ DYLIB_EXTENSION = / [ . ] d y l i b $ / , DYLIB = '"compiled.mach-o.dylib"' ,
7+ FRAMEWORK_EXTENSION = / [ . ] f r a m e w o r k / , FRAMEWORK = 'wrapper.framework' ,
78 DEFAULT_SOURCE_TREE = '"<group>"' ,
89 DEFAULT_FILE_ENCODING = 4 ;
910
@@ -23,6 +24,9 @@ function detectLastType(path) {
2324 if ( FRAMEWORK_EXTENSION . test ( path ) )
2425 return FRAMEWORK ;
2526
27+ if ( DYLIB_EXTENSION . test ( path ) )
28+ return DYLIB ;
29+
2630 // dunno
2731 return 'unknown' ;
2832}
@@ -34,7 +38,7 @@ function fileEncoding(file) {
3438}
3539
3640function defaultSourceTree ( file ) {
37- if ( file . lastType == FRAMEWORK ) {
41+ if ( file . lastType == DYLIB || file . lastType == FRAMEWORK ) {
3842 return 'SDKROOT' ;
3943 } else {
4044 return DEFAULT_SOURCE_TREE ;
@@ -43,6 +47,8 @@ function defaultSourceTree(file) {
4347
4448function correctPath ( file , filepath ) {
4549 if ( file . lastType == FRAMEWORK ) {
50+ return 'System/Library/Frameworks/' + filepath ;
51+ } else if ( file . lastType == DYLIB ) {
4652 return 'usr/lib/' + filepath ;
4753 } else {
4854 return filepath ;
@@ -52,7 +58,7 @@ function correctPath(file, filepath) {
5258function correctGroup ( file ) {
5359 if ( file . lastType == SOURCE_FILE ) {
5460 return 'Sources' ;
55- } else if ( file . lastType == FRAMEWORK ) {
61+ } else if ( file . lastType == DYLIB ) {
5662 return 'Frameworks' ;
5763 } else {
5864 return 'Resources' ;
0 commit comments