Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. color 0a
  3.  
  4. :: Check if we already have the tools in the environment
  5. if exist "%VCINSTALLDIR%" (
  6.     goto compile
  7. )
  8.  
  9.  
  10. :: Check for Visual Studio
  11. if exist "%VS100COMNTOOLS%" (
  12.     set VSPATH="%VS100COMNTOOLS%"
  13.     goto set_env
  14. )
  15. if exist "%VS90COMNTOOLS%" (
  16.     set VSPATH="%VS90COMNTOOLS%"
  17.     goto set_env
  18. )
  19. if exist "%VS80COMNTOOLS%" (
  20.     set VSPATH="%VS80COMNTOOLS%"
  21.     goto set_env
  22. )
  23.  
  24. echo You need Microsoft Visual Studio 8, 9 or 10 installed
  25. pause
  26. exit
  27.  
  28. :: Setup the environment
  29. :set_env
  30. call %VSPATH%vsvars32.bat
  31. ping -n 1 localhost >nul
  32.  
  33. ::Check for bam
  34. if exist "../bam-0.4.0/bam.exe" (
  35.     set BAM="../bam-0.4.0/bam.exe"
  36.     goto setbampar
  37. )
  38. if exist "../bam/bam.exe" (
  39.     set BAM="../bam/bam.exe"
  40.     goto compile
  41. )
  42. if exist "bam.exe" (
  43.     set BAM="bam.exe"
  44.     goto compile
  45. )
  46. if exist "../bam/src/bam.exe" (
  47.     set BAM="../bam/src/bam.exe"
  48.     goto compile
  49. )
  50. if exist "../bam-0.2.0/src/bam.exe" (
  51.     set BAM="../bam-0.2.0/src/bam.exe"
  52.     goto compile
  53. ) else goto nobam
  54. pause
  55.  
  56. :nobam
  57. cls
  58. echo.
  59. echo [ERROR]No bam found!
  60. echo.
  61. pause >nul
  62. exit
  63.  
  64. :: Compile
  65. :compile
  66. @echo === Building Teeworlds Server===
  67. ::@call %BAM% -c all
  68. @call %BAM% client_release
  69. @echo === Finished ===
  70. echo.
  71.  
  72. :: Ending/Or not
  73. echo Press any Key to Compile again...
  74. pause >nul
  75. color 0c
  76. echo === Again ===
  77. ping -n 2 localhost >nul
  78. color 0a
  79. cls
  80. goto compile
  81. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement