2010-06-25 20:47:51 +04:00
|
|
|
@echo off
|
|
|
|
|
2010-06-28 15:46:11 +04:00
|
|
|
set languages=en ru
|
|
|
|
|
|
|
|
call :Check_Lang en
|
|
|
|
call :Target_kernel
|
2010-06-25 20:47:51 +04:00
|
|
|
|
|
|
|
if ERRORLEVEL 0 goto Exit_OK
|
|
|
|
|
|
|
|
echo There was an error executing script.
|
|
|
|
echo For any help, please send a report.
|
|
|
|
pause
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:Check_Lang
|
|
|
|
set res=%1
|
|
|
|
:Check_Lang_loop
|
|
|
|
for %%a in (%languages%) do if %%a==%res% set lang=%res%
|
|
|
|
if defined lang goto :eof
|
|
|
|
|
|
|
|
echo Language '%res%' is incorrect
|
|
|
|
echo Enter valid language [ %languages% ]:
|
|
|
|
|
|
|
|
set /P res=">
|
|
|
|
goto Check_Lang_loop
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
|
|
|
|
:Target_kernel
|
|
|
|
echo *** building kernel with language '%lang%' ...
|
|
|
|
|
|
|
|
if not exist bin mkdir bin
|
|
|
|
echo lang fix %lang% > lang.inc
|
|
|
|
fasm -m 65536 kernel.asm bin\kernel.mnt
|
|
|
|
if not %errorlevel%==0 goto :Error_FasmFailed
|
|
|
|
erase lang.inc
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:Error_FasmFailed
|
|
|
|
echo error: fasm execution failed
|
2010-06-28 15:46:11 +04:00
|
|
|
erase lang.inc
|
2010-06-25 20:47:51 +04:00
|
|
|
pause
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
:Exit_OK
|
2010-06-28 15:46:11 +04:00
|
|
|
echo all operations has been done
|
2010-06-25 20:47:51 +04:00
|
|
|
pause
|
|
|
|
exit 0
|