0
0

MakeQSP.bat 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. @ECHO off
  2. :: Set batch file path
  3. set BATDir=%~dp0
  4. :: Set those lines to fit your setup.
  5. :: This is where glife.qsp will be copied. If you don't want to move it just comment (::) the line below.
  6. :: set CP_TO=..\GL_ECV
  7. :: This is the program used to open the QSPFILE. If you comment this line windows will launch the default app for the ".qsp" extension.
  8. set QSPGUI=tools\Player-video\qspgui.exe
  9. set QGEN=tools\QGen5\QGen.exe
  10. :: The file that will be generated or open
  11. set QSPFILE=glife.qsp
  12. :: Chimrod validation tool
  13. set QSPParser=tools\Parser\qsp_parser.exe
  14. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  15. :menu
  16. cls
  17. echo.
  18. echo :: Girl Life - QSP Compiler and Launcher ::
  19. echo.
  20. if defined QGEN (
  21. if not exist "%BATDir%%QGEN%" (
  22. echo QGEN : [ERROR] - "%BATDir%%QGEN%" not found. Using DEFAULT application.
  23. set QGEN=
  24. ) else (
  25. echo QGEN : [OK] - "%BATDir%%QGEN%")
  26. ) else echo QGEN : [NOT DEFINED] - Using DEFAULT application.
  27. if defined QSPGUI (
  28. if not exist "%BATDir%%QSPGUI%" (
  29. echo QSP EXEC : [ERROR] -"%BATDir%%QSPGUI%" not found.
  30. set QSPGUI=
  31. ) else ( echo QSP EXEC : [OK] - "%BATDir%%QSPGUI%")
  32. ) else ( echo QSP EXEC : [NOT DEFINED] - Using Windows DEFAULT.)
  33. if defined QSPFILE (
  34. if not exist "%BATDir%%QSPFILE%" (
  35. echo QSP FILE : [WARNING] - "%BATDir%%QSPFILE%" not found.
  36. ) else ( echo QSP FILE : [OK] - "%BATDir%%QSPFILE%")
  37. ) else ( echo QSP FILE : [NOT DEFINED] - ERROR: CAN'T CONTINUE.)
  38. if defined CP_TO (
  39. if not exist "%CP_TO%" (
  40. echo COPY : [ERROR] - Destination "%CP_TO%" not found. Copy DISABLED.
  41. set CP_TO=
  42. ) else ( echo COPY : [OK] - "%CP_TO%")
  43. ) else ( echo COPY : [DISABLED] )
  44. if defined QSPParser (
  45. if not exist "%BATDir%%QSPParser%" (
  46. echo QSP Parser : [WARNING] - "%BATDir%%QSPParser%" not found.
  47. echo Please visit the Girl Life Discord to download the latest version.
  48. ) else ( echo QSP Parser : [OK] - "%BATDir%%QSPParser%")
  49. ) else ( echo QSP Parser : [NOT FOUND - DISABLED ] )
  50. echo.
  51. if defined NOT_FOUND (
  52. echo ERROR: Option '%action%' wasn't recognized. Is it lowercase?
  53. set NOT_FOUND=
  54. )
  55. echo.
  56. echo ACTIONS: (B)uild (D)ebug (R)un (F)ull (Q)Gen (V)alidate (E)xit
  57. echo.
  58. set /p action=Choose an action:
  59. if defined QSPFILE (
  60. if %action% == b goto build
  61. if %action% == d goto build_debug
  62. if %action% == r goto run
  63. if %action% == f goto build
  64. if %action% == v goto parser
  65. if %action% == q goto qgen
  66. if %action% == B goto build
  67. if %action% == D goto build_debug
  68. if %action% == R goto run
  69. if %action% == F goto build
  70. if %action% == V goto parser
  71. if %action% == Q goto qgen
  72. )
  73. if %action% == e goto exit
  74. if %action% == E goto exit
  75. set NOT_FOUND=1
  76. goto menu
  77. :build
  78. echo.
  79. echo Building ...
  80. @ECHO ON
  81. python tools\txtmerge.py locations glife.txt
  82. tools\txt2gam.exe glife.txt %QSPFILE% > nul
  83. @ECHO OFF
  84. echo.
  85. if defined CP_TO ( echo Copying %QSPFILE% to "%CP_TO%" ... & copy %QSPFILE% %CP_TO% > nul )
  86. echo.
  87. echo Done.
  88. pause
  89. if %action% == f ( goto run ) else ( goto menu )
  90. :build_debug
  91. echo.
  92. echo Building DEBUG ...
  93. @ECHO ON
  94. python tools\build_debug.py locations glife.txt
  95. tools\txt2gam.exe glife.txt %QSPFILE% > nul
  96. @ECHO OFF
  97. echo.
  98. if defined CP_TO ( echo Copying %QSPFILE% to "%CP_TO%" ... & copy %QSPFILE% %CP_TO% > nul )
  99. echo.
  100. echo Done.
  101. pause
  102. goto menu
  103. :qgen
  104. echo.
  105. echo Running ...
  106. if defined CP_TO ( start %QGEN% %CP_TO%\%QSPFILE% ) else ( start %QGEN% %QSPFILE% )
  107. goto exit
  108. :parser
  109. echo.
  110. echo validating...
  111. @ECHO ON
  112. "%BATDir%%QSPParser%" --level warn "%BATDir%glife.txt" > "%BATDir%validation.log"
  113. @ECHO off
  114. echo Done - Exiting.
  115. pause
  116. goto exit
  117. :run
  118. echo.
  119. echo Running ...
  120. if defined CP_TO ( start "%BATDir%%QSPGUI%" %CP_TO%\%QSPFILE% ) else ( start "%BATDir%%QSPGUI%" %QSPFILE% )
  121. :exit