Make_isample_mod.bat 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @ECHO off
  2. :: Set those lines to fit your setup.
  3. :: This is where isample.qsp will be copied. If you don't want to move it just comment (::) the line below.
  4. :: set CP_TO=..\GL_ECV
  5. :: This is the program used to open the QSPFILE. If you comment this line windows will launch the default app for the ".qsp" extension.
  6. :: The file that will be generated or open
  7. set QSPFILE=isample.qsp
  8. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  9. :menu
  10. cls
  11. echo.
  12. echo :: QSP Compiler and Launcher
  13. echo.
  14. if defined QSPFILE (
  15. if not exist "%QSPFILE%" (
  16. echo QSP FILE : [WARNING] - %QSPFILE% not found.
  17. ) else ( echo QSP FILE : [OK] - "%QSPFILE%")
  18. ) else ( echo QSP FILE : [NOT DEFINED] - ERROR: CAN'T CONTINUE.)
  19. if defined CP_TO (
  20. if not exist "%CP_TO%" (
  21. echo COPY : [ERROR] - Destination "%CP_TO%" not found. Copy DISABLED.
  22. set CP_TO=
  23. ) else ( echo COPY : [OK] - "%CP_TO%")
  24. ) else ( echo COPY : [DISABLED] )
  25. echo.
  26. if defined NOT_FOUND (
  27. echo ERROR: Option '%action%' wasn't recognized. Is it lowercase?
  28. set NOT_FOUND=
  29. )
  30. echo.
  31. echo ACTIONS: (B)uild (E)xit
  32. echo.
  33. set /p action=Choose an action:
  34. if defined QSPFILE (
  35. if %action% == b goto build
  36. )
  37. if %action% == e goto exit
  38. set NOT_FOUND=1
  39. goto menu
  40. :build
  41. echo.
  42. echo Building ...
  43. @ECHO ON
  44. python tools\txtmerge.py isample.qproj locations isample.txt
  45. tools\txt2gam.exe isample.txt %QSPFILE% > nul
  46. @ECHO OFF
  47. echo.
  48. if defined CP_TO ( echo Copying %QSPFILE% to "%CP_TO%" ... & copy %QSPFILE% %CP_TO% > nul )
  49. echo.
  50. echo Done.
  51. pause
  52. if %action% == f ( goto run ) else ( goto menu )
  53. :exit