Source Batch.bci 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. // Specification: Source Batch
  2. // Written by: Ryan Gregg
  3. // Version: N/A
  4. // Created: November 5, 2004
  5. // Last updated: December 1, 2004
  6. // Updated by: Ryan Gregg
  7. // Date: December 1, 2004
  8. // Added Batch Batch.
  9. // Added Ouput variable.
  10. Variable
  11. {
  12. Name "Output"
  13. Type "Folder"
  14. Optional "False"
  15. Hint "File output directory."
  16. }
  17. Batch
  18. {
  19. Name "Batch"
  20. Priority "1"
  21. Stages "Batch"
  22. Template "@echo off\n"_
  23. "${StageCmd=Batch}\n"
  24. }
  25. //
  26. // Batch
  27. //
  28. Stage
  29. {
  30. Name "Batch"
  31. Title "Batch Operations"
  32. Type "CommandList"
  33. //
  34. // Recommended File Deletions
  35. //
  36. LabelBox
  37. {
  38. Name "Recommended File Deletions:"
  39. Bold "True"
  40. }
  41. CheckBox
  42. {
  43. Name "Delete .PRT After Compile"
  44. Param "if not exist \"${FilePath}\\${FileName}.prt\" goto nodelprt\n"_
  45. "del \"${FilePath}\\${FileName}.prt\"\n"_
  46. "echo ${FilePath}\\${FileName}.prt deleted.\n"_
  47. ":nodelprt"
  48. }
  49. Space
  50. {
  51. Size "9"
  52. }
  53. //
  54. // Recommended File Functions
  55. //
  56. LabelBox
  57. {
  58. Name "Recommended File Functions:"
  59. Bold "True"
  60. }
  61. CheckBox
  62. {
  63. Name "Copy .BSP After Compile"
  64. Bold "True"
  65. Param "if not exist \"${FilePath}\\${FileName}.bsp\" goto nocopybsp\n"_
  66. "copy \"${FilePath}\\${FileName}.bsp\" \"${Output}\"\n"_
  67. "echo ${FileName}.bsp copied to ${Output}.\n"_
  68. ":nocopybsp"
  69. Hint "\tCopy your .BSP file to your map destination folder."
  70. }
  71. CheckBox
  72. {
  73. Name "Copy .LIN After Compile"
  74. Param "if not exist \"${FilePath}\\${FileName}.lin\" goto nocopylin\n"_
  75. "copy \"${FilePath}\\${FileName}.lin\" \"${Output}\"\n"_
  76. "echo ${FileName}.lin copied to ${Output}.\n"_
  77. ":nocopylin"
  78. Hint "\tCopy your .LIN file to your map destination folder."
  79. }
  80. Space
  81. {
  82. Size "8"
  83. }
  84. //
  85. // Unrecommended File Deletions
  86. //
  87. LabelBox
  88. {
  89. Name "Unrecommended File Deletions:"
  90. Bold "True"
  91. }
  92. CheckBox
  93. {
  94. Name "Delete .BSP After Compile"
  95. Param "if not exist \"${FilePath}\\${FileName}.bsp\" goto nodelbsp\n"_
  96. "del \"${FilePath}\\${FileName}.bsp\"\n"_
  97. "echo ${FilePath}\\${FileName}.bsp deleted.\n"_
  98. ":nodelbsp"
  99. Hint "\tNote: If you delete this file without copying it you won't be able to play your bsp file."
  100. }
  101. CheckBox
  102. {
  103. Name "Delete .GL After Compile"
  104. Param "if not exist \"${FilePath}\\${FileName}.gl\" goto nodelgl\n"_
  105. "del \"${FilePath}\\${FileName}.gl\"\n"_
  106. "echo ${FilePath}\\${FileName}.gl deleted.\n"_
  107. ":nodelgl"
  108. }
  109. CheckBox
  110. {
  111. Name "Delete .LIN After Compile"
  112. Param "if not exist \"${FilePath}\\${FileName}.lin\" goto nodellin\n"_
  113. "del \"${FilePath}\\${FileName}.lin\"\n"_
  114. "echo ${FilePath}\\${FileName}.lin deleted.\n"_
  115. ":nodellin"
  116. Hint "\tNote: If you delete this file without copying it you won't be able to view the compiler's lin file."
  117. }
  118. CheckBox
  119. {
  120. Name "Delete .LOG After Compile"
  121. Param "if not exist \"${FilePath}\\${FileName}.log\" goto nodellog\n"_
  122. "del \"${FilePath}\\${FileName}.log\"\n"_
  123. "echo ${FilePath}\\${FileName}.log deleted.\n"_
  124. ":nodellog"
  125. Hint "\tNote: If you delete this file you won't be able to view the compiler's log file."
  126. }
  127. CheckBox
  128. {
  129. Name "Delete .VMF After Compile"
  130. Param "if not exist \"${FilePath}\\${FileName}.vmf\" goto nodelvmf\n"_
  131. "del \"${FilePath}\\${FileName}.vmf\"\n"_
  132. "echo ${FilePath}\\${FileName}.vmf deleted.\n"_
  133. ":nodelvmf"
  134. }
  135. }