Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.5 KiB

  1. echo off
  2. if "%1" == "" goto usage
  3. @rem **********************************************************************
  4. @REM If the mapbuild directory ever moves out of src\devools,
  5. @REM update this relative path to the tree's "main" directory.
  6. @rem **********************************************************************
  7. set maindir=..\..\..
  8. if not exist %maindir%\game\%1 goto usage
  9. set vproject=%maindir%\game\%1
  10. @rem **********************************************************************
  11. @rem build options are -reslist, -nodegraph, -bsp, and -forcebuild.
  12. @rem The "-forcebuild" flag is used to build all changed maps, even if they
  13. @rem didn't use the 'autocompile' keyword. This is currently being used
  14. @rem to build only reslists and nodegraphs of changed maps each night.
  15. @rem **********************************************************************
  16. set defaultflags=%2
  17. set buildflags=%defaultflags%
  18. set TIME=
  19. for /F "tokens=1-4 delims=:., " %%a in ("%TIME%") do set TIME=%%a%%b%%c
  20. @rem if %TIME% GTR 030000 set buildflags="-forcebuild -reslist -nodegraph"
  21. @rem if %TIME% GTR 060000 set buildflags=%defaultflags%
  22. @rem **********************************************************************
  23. @rem Generate a list of changed vmf's without actually syncing them
  24. @rem **********************************************************************
  25. p4 sync -n %maindir%\content\%1\maps\*.vmf >> %1_buildlist.txt
  26. @rem **********************************************************************
  27. @rem Sync specified vmf's only. If "-forcebuild" flag is set,
  28. @rem all changed vmf's will be synced. Otherwise, only maps
  29. @rem that had the "autocompile" keyword in the checkin comments
  30. @rem will be synced.
  31. @rem **********************************************************************
  32. syncChangedMaps.pl %1 %buildflags%
  33. if errorlevel 1 goto end
  34. @rem **********************************************************************
  35. @rem Sync all other files
  36. @rem **********************************************************************
  37. p4 sync %maindir%\game\...
  38. p4 sync %maindir%\src\...
  39. @rem **********************************************************************
  40. @rem Build bsp's, cubemaps, and checkin
  41. @rem **********************************************************************
  42. echo compiling %1 maps >> log.txt
  43. time /t >> log.txt
  44. buildMaps.pl -mod %1 -maindir %maindir% %buildflags% %2
  45. echo Finished %1 >> log.txt
  46. time /t >> log.txt
  47. echo. >> log.txt
  48. echo. >> log.txt
  49. goto end
  50. :usage
  51. echo Usage: buildmod [modname]
  52. :end
  53. echo > %1_buildlist.txt