@ECHO OFF

IF EXIST kvadro_sk.bin GOTO CHECK_EN
CALL make.cmd
@ECHO OFF
GOTO MAKE

:CHECK_EN
IF EXIST kvadro_en.bin GOTO MAKE
CALL make.cmd
@ECHO OFF
GOTO MAKE

:MAKE

COPY /Y /B intro\cpm\bootable.p32 /B release\kvadro.p32 >NUL
bin\p32mngr.exe release\kvadro.p32 /a intro\cpm\RUN.*

MD tmp >NUL
COPY /Y /B intro\kvadro_sk.* /B tmp\KVADRO.* >NUL
bin\p32mngr.exe release\kvadro.p32 /a tmp\*.*

DEL /F /Q tmp\*.*
COPY /Y /B kvadro_sk.bin /B tmp\KVADRO.BIN >NUL
bin\p32mngr.exe release\kvadro.p32 /a tmp\*.*

DEL /F /Q tmp\*.*
COPY /Y /B intro\kvadro_en.* /B tmp\KVADROEN.* >NUL
bin\p32mngr.exe release\kvadro.p32 /a tmp\*.*

DEL /F /Q tmp\*.*
COPY /Y /B kvadro_en.bin /B tmp\KVADROEN.BIN >NUL
bin\p32mngr.exe release\kvadro.p32 /a tmp\*.*

RD /S /Q tmp
ECHO ON
