diff --git a/CHANGES.txt b/CHANGES.txt index 6fd86a40..78e3a58b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ * Bug 3135734: Remove WholeProgramOptimization setting in vs10 (doug) * Bug 3138377: Link dependencies ignored within "SharedLib" configuration * Bug 3163703: pdb file being set in the wrong section. (hodsondd) +* Bug 3157645: Full path for xcode frameworks ------- 4.3 diff --git a/src/actions/xcode/xcode_common.lua b/src/actions/xcode/xcode_common.lua index a569299c..f6fe03dd 100644 --- a/src/actions/xcode/xcode_common.lua +++ b/src/actions/xcode/xcode_common.lua @@ -313,8 +313,16 @@ else local pth, src if xcode.isframework(node.path) then - -- I need to figure out how to locate frameworks; this is just to get something working - pth = "/System/Library/Frameworks/" .. node.path + --respect user supplied paths + if string.find(node.path,'/') then + io.write(node.path .. '\n') + if string.find(node.path,'^%.')then + error('relative paths are not currently supported for frameworks') + end + pth = node.path + else + pth = "/System/Library/Frameworks/" .. node.path + end src = "absolute" else -- something else; probably a source code file diff --git a/tests/actions/xcode/test_xcode_project.lua b/tests/actions/xcode/test_xcode_project.lua index 03f53450..d667bd10 100644 --- a/tests/actions/xcode/test_xcode_project.lua +++ b/tests/actions/xcode/test_xcode_project.lua @@ -177,6 +177,32 @@ [Cocoa.framework] /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "Cocoa.framework"; path = "/System/Library/Frameworks/Cocoa.framework"; sourceTree = ""; }; ]] end + + + function suite.PBXFileReference_leavesFrameWorkLocationsAsIsWhenSupplied_pathIsSetToInput() + local inputFrameWork = 'somedir/Foo.framework' + links(inputFrameWork) + prepare() + + io.capture() + xcode.PBXFileReference(tr) + local buffer = io.endcapture() + + test.string_contains(buffer,'path = "'..inputFrameWork..'"') + end + + + function suite.PBXFileReference_relativeFrameworkPathSupplied_callsError() + local inputFrameWork = '../somedir/Foo.framework' + links(inputFrameWork) + prepare() + local error_called = false + local old_error = error + error = function( ... )error_called = true end + xcode.PBXFileReference(tr) + error = old_error + test.istrue(error_called) + end function suite.PBXFileReference_ListsIconFiles() files { "Icon.icns" }