1
1

MakeQSP.bat 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @ECHO off
  2. :: Set those lines to fit your setup.
  3. :: This is where glife.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. set QSPGUI=QSP\Player-video\qspgui.exe
  7. set QGEN=QSP\QGen5\QGen.exe
  8. :: The file that will be generated or open
  9. set QSPFILE=glife.qsp
  10. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  11. :menu
  12. cls
  13. echo.
  14. echo :: QSP Compiler and Launcher
  15. echo.
  16. if defined QGEN (
  17. if not exist "%QGEN%" (
  18. echo QGEN : [ERROR] - %QGEN% not found. Using DEFAULT application.
  19. set QGEN=
  20. ) else ( echo QGEN : [OK] - "%QGEN%")
  21. ) else echo QGEN : [NOT DEFINED] - Using DEFAULT application.
  22. if defined QSPGUI (
  23. if not exist "%QSPGUI%" (
  24. echo QSP EXEC : [ERROR] - %QSPGUI% not found.
  25. set QSPGUI=
  26. ) else ( echo QSP EXEC : [OK] - "%QSPGUI%")
  27. ) else ( echo QSP EXEC : [NOT DEFINED] - Using Windows DEFAULT.)
  28. if defined QSPFILE (
  29. if not exist "%QSPFILE%" (
  30. echo QSP FILE : [WARNING] - %QSPFILE% not found.
  31. ) else ( echo QSP FILE : [OK] - "%QSPFILE%")
  32. ) else ( echo QSP FILE : [NOT DEFINED] - ERROR: CAN'T CONTINUE.)
  33. if defined CP_TO (
  34. if not exist "%CP_TO%" (
  35. echo COPY : [ERROR] - Destination "%CP_TO%" not found. Copy DISABLED.
  36. set CP_TO=
  37. ) else ( echo COPY : [OK] - "%CP_TO%")
  38. ) else ( echo COPY : [DISABLED] )
  39. echo.
  40. if defined NOT_FOUND (
  41. echo ERROR: Option '%action%' wasn't recognized. Is it lowercase?
  42. set NOT_FOUND=
  43. )
  44. set action=f
  45. goto skip
  46. echo.
  47. echo ACTIONS: (B)uild (R)un (F)ull (Q)Gen (E)xit
  48. echo.
  49. set /p action=Choose an action:
  50. :skip
  51. if defined QSPFILE (
  52. if %action% == b goto build
  53. if %action% == r goto run
  54. if %action% == f goto build
  55. if %action% == q goto qgen
  56. )
  57. if %action% == e goto exit
  58. set NOT_FOUND=1
  59. goto menu
  60. :build
  61. echo.
  62. echo Building ...
  63. @ECHO ON
  64. python txtmerge.py locations glife.txt
  65. txt2gam.exe glife.txt %QSPFILE% > nul
  66. @ECHO OFF
  67. echo.
  68. if defined CP_TO ( echo Copying %QSPFILE% to "%CP_TO%" ... & copy %QSPFILE% %CP_TO% > nul )
  69. echo.
  70. echo Done.
  71. if %action% == f ( goto run ) else ( goto menu )
  72. :qgen
  73. echo.
  74. echo Running ...
  75. if defined CP_TO ( start %QGEN% %CP_TO%\%QSPFILE% ) else ( start %QGEN% %QSPFILE% )
  76. goto exit
  77. :run
  78. echo.
  79. echo Running ...
  80. if defined CP_TO ( start %QSPGUI% %CP_TO%\%QSPFILE% ) else ( start %QSPGUI% %QSPFILE% )
  81. :exit