Subversion Repositories nw_plus

Rev

Rev 1 | Rev 16 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. @echo off
  2.  
  3. set mapster32dir=%~dp0
  4. set nwdir=%~dp0
  5. set nwhrpdir=%~dp0
  6.  
  7. :recheck
  8. if not exist mapster32.exe goto mapster32check
  9. :mapster32check_done
  10. set mapster32dir=%cd%
  11. if "%debug%"=="1" echo DEBUG: Mapster32 Directory: "%mapster32dir%"
  12.  
  13. if exist nwinter_hrp set nwhrpdir=%cd%
  14. :nwdircheck
  15. cd nw_plus
  16. set nwdir=%cd%
  17. if exist nwinter_hrp set nwhrpdir=%cd%
  18. if exist nw_plus goto nwdircheck
  19. if "%debug%"=="1" echo DEBUG: NW+ Directory: "%nwdir%".
  20. if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%nwhrpdir%".
  21.  
  22. cd "%mapster32dir%"
  23.  
  24. if exist duke3d_hrp.zip set hrp=-gduke3d_hrp.zip
  25. if exist hrp_update.zip set hrpu=-ghrp_update.zip
  26.  
  27. set args=-j"%nwdir%" -j"%nwhrpdir%" -hnwinter.def -gnwinter.grp %hrp% %hrpu% %*
  28. set exe=mapster32
  29. if "%debug%"=="1" set exe=mapster32.debug
  30.  
  31. if exist %exe%.bat (
  32. call %exe%.bat %args%
  33. ) else (
  34. %exe%.exe %args%
  35. )
  36.  
  37. goto end
  38.  
  39. :mapster32check
  40. if exist mapster32.bat goto mapster32check_done
  41. if exist ..\mapster32.exe (
  42. cd ..
  43. goto recheck
  44. )
  45. if exist ..\..\mapster32.exe (
  46. cd ..\..
  47. goto recheck
  48. )
  49. if exist ..\..\..\mapster32.exe (
  50. cd ..\..\..
  51. goto recheck
  52. )
  53. if exist ..\mapster32.bat (
  54. cd ..
  55. goto mapster32check_done
  56. )
  57. if exist ..\..\mapster32.bat (
  58. cd ..\..
  59. goto mapster32check_done
  60. )
  61. if exist ..\..\..\mapster32.bat (
  62. cd ..\..\..
  63. goto mapster32check_done
  64. )
  65. echo Warning: You don't have Mapster32 in your directory.
  66. goto mapster32check_done
  67.  
  68. :end
  69.