xcode.groups.tpl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. [* *]
  2. [* emit a PBXGroup for this folder *]
  3. [* *]
  4. [if is_array($dirWalk)]
  5. A[$groupHash] /* [$groupName] */ = {
  6. isa = PBXGroup;
  7. children = (
  8. [foreach from=$dirWalk item=child key=key]
  9. [if is_array($child)]
  10. [assign var='childpath' value=$groupPath|cat:"/"|cat:$key]
  11. [assign var=childhash value=$childpath|uid]
  12. A[$childhash] /* [$key] -- [$childpath] */,
  13. [else]
  14. F[$child->hash] /* [$child->name] */,
  15. [/if]
  16. [/foreach]
  17. );
  18. name = [$groupName];
  19. sourceTree = "<group>"; /* [$groupPath] */
  20. };
  21. [/if]
  22. [* *]
  23. [* now we emit a group for every child folder *]
  24. [* *]
  25. [foreach from=$dirWalk item=child key=key]
  26. [if is_array($child)]
  27. [assign var='childpath' value=$groupPath|cat:"/"|cat:$key]
  28. [assign var='childhash' value=$childpath|uid]
  29. [include file="xcode.groups.tpl" dirWalk=$child groupPath=$childpath groupName=$key groupHash=$childhash]
  30. [/if]
  31. [/foreach]
  32. [*----------------------------------------------------------------------------*]
  33. [* groupPath does not correctly correspond to the file system, and so it is *]
  34. [* only used for getting the groupHash. *]
  35. [*----------------------------------------------------------------------------*]