Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. @echo off
  2.  
  3. set MODE=%~1
  4. set TARGET=%~2
  5. set FLAGS=%~3
  6.  
  7. set NAME=%MODE%%TARGET%
  8.  
  9. call :setup
  10. call :build
  11. call :run
  12. echo.
  13. goto :eof
  14.  
  15. :build
  16. echo #define COMPILE_FLAGS "%FLAGS%" > compile_flags.txt
  17. pawno\pawncc.exe "gamemodes\%MODE%.pwn" -v0 -i"pawno\include" -;+ -(+ %FLAGS% _DEBUG=0 TEST_AUTO_EXIT=true -o"%NAME%\gamemodes\mode.amx" > nul
  18. goto :eof
  19.  
  20. :setup
  21. rem Remove old versions
  22. del logs\%NAME%.txt 2> nul
  23. rem Create subdirectories
  24. rmdir /S /Q %NAME% 2> nul
  25. mkdir %NAME%
  26. cd %NAME%
  27. mkdir gamemodes
  28. mklink samp-server.exe ..\samp-server.exe > nul
  29. mklink samp-npc.exe ..\samp-npc.exe > nul
  30. mklink /D plugins ..\plugins > nul
  31. mklink /D scriptfiles ..\scriptfiles > nul
  32. rem copy the important files
  33. rem Write the current test to the config file
  34. copy /A /Y ..\server_test.cfg server.cfg > nul
  35. cd ..
  36. goto :eof
  37.  
  38. :run
  39. rem Run the server with the custom server.cfg - it closes itself after
  40. cd %NAME%
  41. samp-server.exe > nul
  42. rem Copy server-log.txt somewhere
  43. if exist "server_log.txt" (
  44. move /Y server_log.txt ..\logs\%NAME%.txt > nul
  45. )
  46. cd ..
  47. rmdir /S /Q %NAME%
  48. goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement