diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..65e3ba2 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +test/ diff --git a/lib/pbxFile.js b/lib/pbxFile.js index 9e04504..3235d1b 100644 --- a/lib/pbxFile.js +++ b/lib/pbxFile.js @@ -54,8 +54,6 @@ function correctPath(file, filepath) { return 'System/Library/Frameworks/' + filepath; } else if (file.lastType == DYLIB) { return 'usr/lib/' + filepath; - } else if (file.customFramework == true) { - return file.basename; } else { return filepath; } diff --git a/lib/pbxProject.js b/lib/pbxProject.js index 71b89ce..608c0fa 100644 --- a/lib/pbxProject.js +++ b/lib/pbxProject.js @@ -718,7 +718,7 @@ function correctForFrameworksPath(file, project) { } function searchPathForFile(file, proj) { - var plugins = proj.pbxGroupByName('Plugins') + var plugins = proj.pbxGroupByName('Plugins'), pluginsPath = plugins ? plugins.path : null, fileDir = path.dirname(file.path); @@ -731,7 +731,7 @@ function searchPathForFile(file, proj) { if (file.plugin && pluginsPath) { return '"\\"$(SRCROOT)/' + unquote(pluginsPath) + '\\""'; } else if (file.customFramework && file.dirname) { - return '"' + file.dirname + '"' + return '"\\"' + file.dirname + '\\""'; } else { return '"\\"$(SRCROOT)/' + proj.productName + fileDir + '\\""'; } diff --git a/package.json b/package.json index 2b7ff0b..b09cc91 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Andrew Lunny ", "name": "xcode", "description": "parser for xcodeproj/project.pbxproj files", - "version": "0.6.3", + "version": "0.6.6", "main":"index.js", "repository": { "url": "https://github.com/alunny/node-xcode.git" diff --git a/test/addFramework.js b/test/addFramework.js index 2bfb6f2..d4a4bf4 100644 --- a/test/addFramework.js +++ b/test/addFramework.js @@ -182,13 +182,13 @@ exports.addFramework = { test.equal(newFile.basename, 'Custom.framework'); test.equal(newFile.dirname, '/path/to'); // XXX framework has to be copied over to PROJECT root. That is what XCode does when you drag&drop - test.equal(newFile.path, 'Custom.framework'); + test.equal(newFile.path, '/path/to/Custom.framework'); // should add path to framework search path var frameworkPaths = frameworkSearchPaths(proj); - expectedPath = '"/path/to"'; - + expectedPath = '"\\"/path/to\\""'; + for (i = 0; i < frameworkPaths.length; i++) { var current = frameworkPaths[i]; test.ok(current.indexOf('"$(inherited)"') >= 0);