Batch.bci 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. // Specification: Batch
  2. // Written by: Ryan Gregg
  3. // Version: N/A
  4. // Created: August 4, 2004
  5. // Last updated: October 17, 2004
  6. // Updated by: Ryan Gregg
  7. // Date: October 17, 2004
  8. // Added Batch Batch.
  9. // Updated by: Ryan Gregg
  10. // Date: September 5, 2004
  11. // Thanks to: Matt 'Bluefang' Turnbull
  12. // Added Delete .INC After Compile
  13. // Moved Delete .ERR After Compile
  14. // Fixed Delete .ENT.BAK After Compile
  15. // Updated by: Ryan Gregg
  16. // Date: August 9, 2004
  17. // Thanks to: Anders Jenbo
  18. // Added Delete .ENT.BAK After Compile
  19. Variable
  20. {
  21. Name "Output"
  22. Type "Folder"
  23. Optional "False"
  24. Hint "File output directory."
  25. }
  26. Batch
  27. {
  28. Name "Batch"
  29. Priority "1"
  30. Stages "Batch"
  31. Template "@echo off\n"_
  32. "${StageCmd=Batch}\n"
  33. }
  34. //
  35. // Batch
  36. //
  37. Stage
  38. {
  39. Name "Batch"
  40. Title "Batch Operations"
  41. Type "CommandList"
  42. //
  43. // Recommended File Deletions
  44. //
  45. LabelBox
  46. {
  47. Name "Recommended File Deletions:"
  48. Bold "True"
  49. }
  50. CheckBox
  51. {
  52. Name "Delete .WIC After Compile"
  53. Param "if not exist \"${FilePath}\\${FileName}.wic\" goto nodelwic\n"_
  54. "del \"${FilePath}\\${FileName}.wic\"\n"_
  55. "echo ${FilePath}\\${FileName}.wic deleted.\n"_
  56. ":nodelwic"
  57. }
  58. CheckBox
  59. {
  60. Name "Delete .LIN After Compile"
  61. Param "if not exist \"${FilePath}\\${FileName}.lin\" goto nodellin\n"_
  62. "del \"${FilePath}\\${FileName}.lin\"\n"_
  63. "echo ${FilePath}\\${FileName}.lin deleted.\n"_
  64. ":nodellin"
  65. }
  66. CheckBox
  67. {
  68. Name "Delete .P0 After Compile"
  69. Param "if not exist \"${FilePath}\\${FileName}.p0\" goto nodelp0\n"_
  70. "del \"${FilePath}\\${FileName}.p0\"\n"_
  71. "echo ${FilePath}\\${FileName}.p0 deleted.\n"_
  72. ":nodelp0"
  73. }
  74. CheckBox
  75. {
  76. Name "Delete .P1 After Compile"
  77. Param "if not exist \"${FilePath}\\${FileName}.p1\" goto nodelp1\n"_
  78. "del \"${FilePath}\\${FileName}.p1\"\n"_
  79. "echo ${FilePath}\\${FileName}.p1 deleted.\n"_
  80. ":nodelp1"
  81. }
  82. CheckBox
  83. {
  84. Name "Delete .P2 After Compile"
  85. Param "if not exist \"${FilePath}\\${FileName}.p2\" goto nodelp2\n"_
  86. "del \"${FilePath}\\${FileName}.p2\"\n"_
  87. "echo ${FilePath}\\${FileName}.p2 deleted.\n"_
  88. ":nodelp2"
  89. }
  90. CheckBox
  91. {
  92. Name "Delete .P3 After Compile"
  93. Param "if not exist \"${FilePath}\\${FileName}.p3\" goto nodelp3\n"_
  94. "del \"${FilePath}\\${FileName}.p3\"\n"_
  95. "echo ${FilePath}\\${FileName}.p3 deleted.\n"_
  96. ":nodelp3"
  97. }
  98. CheckBox
  99. {
  100. Name "Delete .PRT After Compile"
  101. Param "if not exist \"${FilePath}\\${FileName}.prt\" goto nodelprt\n"_
  102. "del \"${FilePath}\\${FileName}.prt\"\n"_
  103. "echo ${FilePath}\\${FileName}.prt deleted.\n"_
  104. ":nodelprt"
  105. }
  106. CheckBox
  107. {
  108. Name "Delete .ERR After Compile"
  109. Param "if not exist \"${FilePath}\\${FileName}.err\" goto nodelerr\n"_
  110. "del \"${FilePath}\\${FileName}.err\"\n"_
  111. "echo ${FilePath}\\${FileName}.err deleted.\n"_
  112. ":nodelerr"
  113. Hint "Note: If you delete this file you won't be able to view the compiler's error file."
  114. }
  115. CheckBox
  116. {
  117. Name "Delete .ENT.BAK After Compile"
  118. Param "if not exist \"${FilePath}\\${FileName}.ent.bak\" goto nodelentbac\n"_
  119. "del \"${FilePath}\\${FileName}.ent.bak\"\n"_
  120. "echo ${FilePath}\\${FileName}.ent.bak deleted.\n"_
  121. ":nodelentbac"
  122. }
  123. Space
  124. {
  125. Size "1"
  126. }
  127. //
  128. // Recommended File Functions
  129. //
  130. LabelBox
  131. {
  132. Name "Recommended File Functions:"
  133. Bold "True"
  134. }
  135. CheckBox
  136. {
  137. Name "Copy .BSP After Compile"
  138. Bold "True"
  139. Param "if not exist \"${FilePath}\\${FileName}.bsp\" goto nocopybsp\n"_
  140. "copy \"${FilePath}\\${FileName}.bsp\" \"${Output}\"\n"_
  141. "echo ${FileName}.bsp copied to ${Output}.\n"_
  142. ":nocopybsp"
  143. Hint "Copy your .BSP file to your map destination folder."
  144. }
  145. CheckBox
  146. {
  147. Name "Copy .RES After Compile"
  148. Bold "True"
  149. Param "if not exist \"${FilePath}\\${FileName}.res\" goto nocopyres\n"_
  150. "copy \"${FilePath}\\${FileName}.res\" \"${Output}\"\n"_
  151. "echo ${FileName}.res copied to ${Output}.\n"_
  152. ":nocopyres"
  153. Hint "Copy your .RES file to your map destination folder."
  154. }
  155. CheckBox
  156. {
  157. Name "Copy .PTS After Compile"
  158. Bold "True"
  159. Param "if not exist \"${FilePath}\\${FileName}.pts\" goto nocopypts\n"_
  160. "copy \"${FilePath}\\${FileName}.pts\" \"${Output}\"\n"_
  161. "echo ${FileName}.pts copied to ${Output}.\n"_
  162. ":nocopypts"
  163. Hint "Copy your .PTS file to your map destination folder."
  164. }
  165. Space
  166. {
  167. Size "7"
  168. }
  169. //
  170. // Unrecommended File Deletions
  171. //
  172. LabelBox
  173. {
  174. Name "Unrecommended File Deletions:"
  175. Bold "True"
  176. }
  177. CheckBox
  178. {
  179. Name "Delete .LOG After Compile"
  180. Param "if not exist \"${FilePath}\\${FileName}.log\" goto nodellog\n"_
  181. "del \"${FilePath}\\${FileName}.log\"\n"_
  182. "echo ${FilePath}\\${FileName}.log deleted.\n"_
  183. ":nodellog"
  184. Hint "Note: If you delete this file you won't be able to view the compiler's log file."
  185. }
  186. CheckBox
  187. {
  188. Name "Delete .PTS After Compile"
  189. Param "if not exist \"${FilePath}\\${FileName}.pts\" goto nodelpts\n"_
  190. "del \"${FilePath}\\${FileName}.pts\"\n"_
  191. "echo ${FilePath}\\${FileName}.pts deleted.\n"_
  192. ":nodelpts"
  193. Hint "Note: If you delete this file without copying it you won't be able to view the compiler's pts file."
  194. }
  195. CheckBox
  196. {
  197. Name "Delete .MAP After Compile"
  198. Param "if not exist \"${FilePath}\\${FileName}.map\" goto nodelmap\n"_
  199. "del \"${FilePath}\\${FileName}.map\"\n"_
  200. "echo ${FilePath}\\${FileName}.map deleted.\n"_
  201. ":nodelmap"
  202. }
  203. CheckBox
  204. {
  205. Name "Delete .MAX After Compile"
  206. Param "if not exist \"${FilePath}\\${FileName}.max\" goto nodelmax\n"_
  207. "del \"${FilePath}\\${FileName}.max\"\n"_
  208. "echo ${FilePath}\\${FileName}.max deleted.\n"_
  209. ":nodelmax"
  210. }
  211. CheckBox
  212. {
  213. Name "Delete .RMF After Compile"
  214. Param "if not exist \"${FilePath}\\${FileName}.rmf\" goto nodelrmf\n"_
  215. "del \"${FilePath}\\${FileName}.rmf\"\n"_
  216. "echo ${FilePath}\\${FileName}.rmf deleted.\n"_
  217. ":nodelrmf"
  218. }
  219. CheckBox
  220. {
  221. Name "Delete .RMX After Compile"
  222. Param "if not exist \"${FilePath}\\${FileName}.rmx\" goto nodelrmx\n"_
  223. "del \"${FilePath}\\${FileName}.rmx\"\n"_
  224. "echo ${FilePath}\\${FileName}.rmx deleted.\n"_
  225. ":nodelrmx"
  226. }
  227. CheckBox
  228. {
  229. Name "Delete .BSP After Compile"
  230. Param "if not exist \"${FilePath}\\${FileName}.bsp\" goto nodelbsp\n"_
  231. "del \"${FilePath}\\${FileName}.bsp\"\n"_
  232. "echo ${FilePath}\\${FileName}.bsp deleted.\n"_
  233. ":nodelbsp"
  234. Hint "Note: If you delete this file without copying it you won't be able to play your bsp file."
  235. }
  236. CheckBox
  237. {
  238. Name "Delete .RES After Compile"
  239. Param "if not exist \"${FilePath}\\${FileName}.res\" goto nodelres\n"_
  240. "del \"${FilePath}\\${FileName}.res\"\n"_
  241. "echo ${FilePath}\\${FileName}.res deleted.\n"_
  242. ":nodelres"
  243. }
  244. CheckBox
  245. {
  246. Name "Delete .ENT After Compile"
  247. Param "if not exist \"${FilePath}\\${FileName}.ent\" goto nodelent\n"_
  248. "del \"${FilePath}\\${FileName}.ent\"\n"_
  249. "echo ${FilePath}\\${FileName}.ent deleted.\n"_
  250. ":nodelent"
  251. }
  252. CheckBox
  253. {
  254. Name "Delete .INC After Compile"
  255. Param "if not exist \"${FilePath}\\${FileName}.inc\" goto nodelinc\n"_
  256. "del \"${FilePath}\\${FileName}.inc\"\n"_
  257. "echo ${FilePath}\\${FileName}.inc deleted.\n"_
  258. ":nodelinc"
  259. }
  260. }