vc2k8_fileRecurse.tpl 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. {* *}
  2. {* Is this a dir or an item? *}
  3. {* *}
  4. {if is_array($dirWalk)}
  5. {if $depth > 2}
  6. {* *}
  7. {* Generate dir prefix *}
  8. {* *}
  9. {capture assign="dirPrefix"}
  10. <Filter
  11. Name="{$dirName}"
  12. Filter="">{/capture}
  13. {$dirPrefix|indent:$depth:"\t"}
  14. {/if}
  15. {* *}
  16. {* Iterate over children *}
  17. {* *}
  18. {foreach from=$dirWalk item=dir key=key}
  19. {include file="vc2k8_fileRecurse.tpl" dirWalk=$dir dirName=$key dirPath="$dirPath$dirName/" depth=$depth+1}
  20. {/foreach}
  21. {if $depth > 2}
  22. {* *}
  23. {* Generate dir suffix *}
  24. {* *}
  25. {capture assign="dirSuffix"}
  26. </Filter>{/capture}
  27. {$dirSuffix|indent:$depth:"\t"}
  28. {/if}
  29. {else}
  30. {* *}
  31. {* Output an item *}
  32. {* *}
  33. {capture assign="itemOut"}
  34. <File
  35. RelativePath="{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}">
  36. {* we don't compile some files. *}
  37. {if dontCompile($dirWalk->path, $projOutput)}
  38. <FileConfiguration
  39. Name="Debug|Win32"
  40. ExcludedFromBuild="true"
  41. >
  42. <Tool
  43. Name="VCCLCompilerTool"
  44. />
  45. </FileConfiguration>
  46. <FileConfiguration
  47. Name="Optimized Debug|Win32"
  48. ExcludedFromBuild="true"
  49. >
  50. <Tool
  51. Name="VCCLCompilerTool"
  52. />
  53. </FileConfiguration>
  54. <FileConfiguration
  55. Name="Release|Win32"
  56. ExcludedFromBuild="true"
  57. >
  58. <Tool
  59. Name="VCCLCompilerTool"
  60. />
  61. </FileConfiguration>
  62. {else}
  63. {if substr($dirWalk->path, -4, 4) == ".asm"}
  64. <FileConfiguration
  65. Name="Debug|Win32">
  66. <Tool
  67. Name="VCCustomBuildTool"
  68. CommandLine="&quot;{$binDir|replace:'//':'/'|replace:'/':'\\'}nasm\nasm.exe&quot; -f win32 &quot;$(InputPath)&quot; -o &quot;$(IntDir)/$(InputName).obj&quot;"
  69. Outputs="$(IntDir)/$(InputName).obj"/>
  70. </FileConfiguration>
  71. <FileConfiguration
  72. Name="Optimized Debug|Win32">
  73. <Tool
  74. Name="VCCustomBuildTool"
  75. CommandLine="&quot;{$binDir|replace:'//':'/'|replace:'/':'\\'}nasm\nasm.exe&quot; -f win32 &quot;$(InputPath)&quot; -o &quot;$(IntDir)/$(InputName).obj&quot;"
  76. Outputs="$(IntDir)/$(InputName).obj"/>
  77. </FileConfiguration>
  78. <FileConfiguration
  79. Name="Release|Win32">
  80. <Tool
  81. Name="VCCustomBuildTool"
  82. CommandLine="&quot;{$binDir|replace:'//':'/'|replace:'/':'\\'}nasm\nasm.exe&quot; -f win32 &quot;$(InputPath)&quot; -o &quot;$(IntDir)/$(InputName).obj&quot;"
  83. Outputs="$(IntDir)/$(InputName).obj"/>
  84. </FileConfiguration>
  85. {/if}{* if path == "*.asm" *}
  86. {/if}{* if dontCompile() *}
  87. </File>{/capture}
  88. {$itemOut|indent:$depth:"\t"}
  89. {/if}