Ported PBXResourcesBuildPhase
This commit is contained in:
parent
11a4804617
commit
bd65dcc2c9
@ -285,6 +285,29 @@
|
||||
end
|
||||
|
||||
|
||||
function xcode.PBXResourcesBuildPhase(tr)
|
||||
_p('/* Begin PBXResourcesBuildPhase section */')
|
||||
for _, target in ipairs(tr.products.children) do
|
||||
_p(2,'%s /* Resources */ = {', target.resstageid)
|
||||
_p(3,'isa = PBXResourcesBuildPhase;')
|
||||
_p(3,'buildActionMask = 2147483647;')
|
||||
_p(3,'files = (')
|
||||
tree.traverse(tr, {
|
||||
onnode = function(node)
|
||||
if xcode.getbuildcategory(node) == "Resources" then
|
||||
_p(4,'%s /* %s in Resources */,', node.buildid, node.name)
|
||||
end
|
||||
end
|
||||
})
|
||||
_p(3,');')
|
||||
_p(3,'runOnlyForDeploymentPostprocessing = 0;')
|
||||
_p(2,'};')
|
||||
end
|
||||
_p('/* End PBXResourcesBuildPhase section */')
|
||||
_p('')
|
||||
end
|
||||
|
||||
|
||||
function xcode.Footer()
|
||||
_p(1,'};')
|
||||
_p('\trootObject = 08FB7793FE84155DC02AAC07 /* Project object */;')
|
||||
|
@ -206,29 +206,6 @@
|
||||
|
||||
|
||||
|
||||
function xcode.PBXResourcesBuildPhase(tr)
|
||||
_p('/* Begin PBXResourcesBuildPhase section */')
|
||||
for _, target in ipairs(tr.products.children) do
|
||||
_p(2,'%s /* Resources */ = {', target.resstageid)
|
||||
_p(3,'isa = PBXResourcesBuildPhase;')
|
||||
_p(3,'buildActionMask = 2147483647;')
|
||||
_p(3,'files = (')
|
||||
tree.traverse(target.prjnode, {
|
||||
onnode = function(node)
|
||||
if xcode.getbuildcategory(node) == "Resources" then
|
||||
_p(4,'%s /* %s in Resources */,', node.buildid, node.name)
|
||||
end
|
||||
end
|
||||
})
|
||||
_p(3,');')
|
||||
_p(3,'runOnlyForDeploymentPostprocessing = 0;')
|
||||
_p(2,'};')
|
||||
end
|
||||
_p('/* End PBXResourcesBuildPhase section */')
|
||||
_p('')
|
||||
end
|
||||
|
||||
|
||||
function xcode.PBXSourcesBuildPhase(tr)
|
||||
_p('/* Begin PBXSourcesBuildPhase section */')
|
||||
for _, target in ipairs(tr.products.children) do
|
||||
@ -395,7 +372,7 @@
|
||||
xcode.PBXFrameworksBuildPhase(tr) -- done
|
||||
xcode.PBXGroup(tr) -- done
|
||||
xcode.PBXNativeTarget(tr) -- done
|
||||
xcode.PBXProject(tr)
|
||||
xcode.PBXProject(tr) -- done
|
||||
xcode.PBXResourcesBuildPhase(tr)
|
||||
xcode.PBXSourcesBuildPhase(tr)
|
||||
xcode.PBXVariantGroup(tr)
|
||||
|
@ -122,5 +122,6 @@
|
||||
xcode.PBXGroup(tr)
|
||||
xcode.PBXNativeTarget(tr)
|
||||
xcode.PBXProject(tr)
|
||||
xcode.PBXResourcesBuildPhase(tr)
|
||||
xcode.Footer(tr)
|
||||
end
|
||||
|
@ -27,46 +27,6 @@
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- PBXResourceBuildPhase tests
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
function T.xcode3.PBXResourcesBuildPhase_OnNoResources()
|
||||
prepare()
|
||||
xcode.PBXResourcesBuildPhase(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
[MyProject:rez] /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
function T.xcode3.PBXResourcesBuildPhase_OnResources()
|
||||
files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib", "Info.plist" }
|
||||
prepare()
|
||||
xcode.PBXResourcesBuildPhase(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
[MyProject:rez] /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
[MainMenu.xib:build] /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- PBXSourcesBuildPhase tests
|
||||
---------------------------------------------------------------------------
|
||||
|
@ -432,3 +432,45 @@
|
||||
/* End PBXProject section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- PBXResourceBuildPhase tests
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
function suite.PBXResourcesBuildPhase_OnNoResources()
|
||||
prepare()
|
||||
xcode.PBXResourcesBuildPhase(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
[MyProject:rez] /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
function suite.PBXResourcesBuildPhase_OnResources()
|
||||
files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib", "Info.plist" }
|
||||
prepare()
|
||||
xcode.PBXResourcesBuildPhase(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
[MyProject:rez] /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
[MainMenu.xib:build] /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user