From 9c85b5bc1aad5dd8cd517937657176cee28b1851 Mon Sep 17 00:00:00 2001 From: Cameron Hart Date: Sun, 25 Apr 2010 16:37:09 +1200 Subject: [PATCH 1/2] Add *.icns files to Xcode build category as a resource and file type as an image.icns. --- src/actions/xcode/xcode_common.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/actions/xcode/xcode_common.lua b/src/actions/xcode/xcode_common.lua index c430f674..6d005a00 100644 --- a/src/actions/xcode/xcode_common.lua +++ b/src/actions/xcode/xcode_common.lua @@ -31,6 +31,7 @@ [".strings"] = "Resources", [".nib"] = "Resources", [".xib"] = "Resources", + [".icns"] = "Resources", } return categories[path.getextension(node.name)] end @@ -83,6 +84,7 @@ [".plist"] = "text.plist.xml", [".strings"] = "text.plist.strings", [".xib"] = "file.xib", + [".icns"] = "image.icns", } return types[path.getextension(node.path)] or "text" end From e5d2b2f0ae8c8ba69f8c922b1c4fef393e87c51f Mon Sep 17 00:00:00 2001 From: Cameron Hart Date: Mon, 10 May 2010 15:53:45 +1200 Subject: [PATCH 2/2] Added test case for Xcode icon images --- tests/actions/xcode/test_xcode_project.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/actions/xcode/test_xcode_project.lua b/tests/actions/xcode/test_xcode_project.lua index ef2e27a2..a56ec3c1 100644 --- a/tests/actions/xcode/test_xcode_project.lua +++ b/tests/actions/xcode/test_xcode_project.lua @@ -178,6 +178,15 @@ ]] end + function suite.PBXFileReference_ListsIconFiles() + files { "Icon.icns" } + prepare() + xcode.PBXFileReference(tr) + test.capture [[ +/* Begin PBXFileReference section */ + [Icon.icns] /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = "Icon.icns"; path = "Icon.icns"; sourceTree = ""; }; + ]] + end function suite.PBXFileReference_IgnoresTargetDir() targetdir "bin"