Finished porting PBXFileReference
This commit is contained in:
parent
5b27a0a368
commit
7943baa46f
@ -134,11 +134,8 @@
|
||||
end
|
||||
|
||||
if node.kind == "product" then
|
||||
-- Strangely, targets are specified relative to the project.pbxproj file
|
||||
-- rather than the .xcodeproj directory like the rest of the files.
|
||||
local basepath = path.join(node.cfg.project.solution.location, "project.pbxproj")
|
||||
local targpath = path.getrelative(basepath, node.cfg.buildtarget.bundlepath)
|
||||
_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; includeInIndex = 0; name = %s; path = %s; sourceTree = BUILT_PRODUCTS_DIR; };',
|
||||
local targpath = path.getrelative(tr.project.location, node.cfg.buildtarget.bundlepath)
|
||||
_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; includeInIndex = 0; name = "%s"; path = "%s"; sourceTree = BUILT_PRODUCTS_DIR; };',
|
||||
node.id, node.name, xcode.gettargettype(node), node.name, targpath)
|
||||
else
|
||||
local pth, src
|
||||
@ -152,7 +149,7 @@
|
||||
src = "group"
|
||||
end
|
||||
|
||||
_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = %s; path = %s; sourceTree = "<%s>"; };',
|
||||
_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = "%s"; path = "%s"; sourceTree = "<%s>"; };',
|
||||
node.id, node.name, xcode.getfiletype(node), node.name, pth, src)
|
||||
end
|
||||
end
|
||||
|
@ -79,7 +79,7 @@
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[MyProject:product] /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = ../MyProject; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
[MyProject:product] /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = "MyProject"; path = "MyProject"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
]]
|
||||
end
|
||||
@ -91,7 +91,7 @@
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[MyProject.app:product] /* MyProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = MyProject.app; path = ../MyProject.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
[MyProject.app:product] /* MyProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = "MyProject.app"; path = "MyProject.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
]]
|
||||
end
|
||||
@ -103,7 +103,7 @@
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[libMyProject.a:product] /* libMyProject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libMyProject.a; path = ../libMyProject.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
[libMyProject.a:product] /* libMyProject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libMyProject.a"; path = "libMyProject.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
]]
|
||||
end
|
||||
@ -115,19 +115,7 @@
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[libMyProject.dylib:product] /* libMyProject.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; name = libMyProject.dylib; path = ../libMyProject.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
function suite.PBXFileReference_ConvertsProjectTargetsToSolutionRelative()
|
||||
targetdir "../bin"
|
||||
prepare()
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[MyProject:product] /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = ../../bin/MyProject; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
[libMyProject.dylib:product] /* libMyProject.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; name = "libMyProject.dylib"; path = "libMyProject.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
]]
|
||||
end
|
||||
@ -139,19 +127,18 @@
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[source.c] /* source.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = source.c; path = source.c; sourceTree = "<group>"; };
|
||||
[source.c] /* source.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "source.c"; path = "source.c"; sourceTree = "<group>"; };
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
function suite.PBXFileReference_ListsXibCorrectly()
|
||||
files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib" }
|
||||
prepare()
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[English] /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
[French] /* French */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = French; path = French.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
[English] /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "English"; path = "English.lproj/MainMenu.xib"; sourceTree = "<group>"; };
|
||||
[French] /* French */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "French"; path = "French.lproj/MainMenu.xib"; sourceTree = "<group>"; };
|
||||
]]
|
||||
end
|
||||
|
||||
@ -162,8 +149,8 @@
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[English] /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
[French] /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
[English] /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "English"; path = "English.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
[French] /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "French"; path = "French.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
]]
|
||||
end
|
||||
|
||||
@ -174,6 +161,6 @@
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[Cocoa.framework] /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
[Cocoa.framework] /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "Cocoa.framework"; path = "/System/Library/Frameworks/Cocoa.framework"; sourceTree = "<absolute>"; };
|
||||
]]
|
||||
end
|
||||
|
Reference in New Issue
Block a user