2006-12-10 17:34:19 +01:00
|
|
|
@echo off
|
|
|
|
|
2007-01-11 17:16:05 +01:00
|
|
|
set languages=en ru ge et
|
2006-12-10 17:34:19 +01:00
|
|
|
set drivers=unisound sis infinity ati2d
|
2006-12-11 02:22:38 +01:00
|
|
|
set targets=all kernel drivers skins clean
|
2006-12-10 17:34:19 +01:00
|
|
|
|
2006-12-11 02:22:38 +01:00
|
|
|
call :Check_Target %1
|
|
|
|
for %%a in (all kernel) do if %%a==%target% call :Check_Lang %2
|
|
|
|
call :Target_%target%
|
2006-12-10 17:34:19 +01:00
|
|
|
|
2006-12-11 02:22:38 +01:00
|
|
|
if ERRORLEVEL 0 goto Exit_OK
|
2006-12-10 17:34:19 +01:00
|
|
|
|
2006-12-11 02:22:38 +01:00
|
|
|
echo Probably at runing has been created error
|
|
|
|
echo For help send a report...
|
|
|
|
pause
|
|
|
|
goto :eof
|
2006-12-10 17:34:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-11 02:22:38 +01:00
|
|
|
: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 not founded
|
|
|
|
echo Enter valide languege
|
|
|
|
echo [%languages%]
|
|
|
|
|
|
|
|
set /P res=">
|
|
|
|
goto Check_Lang_loop
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:Check_Target
|
|
|
|
set res=%1
|
|
|
|
:Check_Target_loop
|
|
|
|
for %%a in (%targets%) do if %%a==%res% set target=%res%
|
|
|
|
if defined target goto :eof
|
|
|
|
|
|
|
|
echo Target "%res%" is not valide
|
|
|
|
echo Enter valide target
|
|
|
|
echo [%targets%]
|
|
|
|
|
|
|
|
set /P res=">
|
|
|
|
goto Check_Target_loop
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
|
|
|
|
:Target_kernel
|
|
|
|
echo building kernel with language %lang% ...
|
|
|
|
|
|
|
|
if not exist bin mkdir bin
|
|
|
|
echo lang fix %lang% > lang.inc
|
|
|
|
fasm kernel.asm bin\kernel.mnt
|
|
|
|
if not %errorlevel%==0 goto :Error_FasmFailed
|
|
|
|
erase lang.inc
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
|
|
|
|
:Target_all
|
|
|
|
echo building all ...
|
|
|
|
call :Target_kernel
|
|
|
|
call :Target_drivers
|
|
|
|
call :Target_skins
|
|
|
|
goto :eof
|
2006-12-10 17:34:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
:Target_drivers
|
2006-12-11 02:22:38 +01:00
|
|
|
echo building drivers ...
|
2006-12-10 17:34:19 +01:00
|
|
|
|
2006-12-11 02:22:38 +01:00
|
|
|
if not exist bin\drivers mkdir bin\drivers
|
|
|
|
cd drivers
|
|
|
|
for %%a in (%drivers%) do (
|
|
|
|
fasm %%a.asm ..\bin\drivers\%%a.obj
|
|
|
|
if not %errorlevel%==0 goto :Error_FasmFailed
|
|
|
|
)
|
|
|
|
cd ..
|
|
|
|
goto :eof
|
2006-12-10 17:34:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
:Target_skins
|
2006-12-11 02:22:38 +01:00
|
|
|
echo building skins ...
|
2006-12-10 17:34:19 +01:00
|
|
|
|
2006-12-11 02:22:38 +01:00
|
|
|
if not exist bin\skins mkdir bin\skins
|
|
|
|
cd skin
|
|
|
|
fasm default.asm ..\bin\skins\default.skn
|
|
|
|
if not %errorlevel%==0 goto :Error_FasmFailed
|
|
|
|
cd ..
|
|
|
|
goto :eof
|
2006-12-10 17:34:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
:Target_clean
|
2006-12-11 02:22:38 +01:00
|
|
|
echo cleaning ...
|
|
|
|
|
|
|
|
del /Q bin\drivers\*.*
|
|
|
|
del /Q bin\skins\*.*
|
|
|
|
del /Q bin\*.*
|
|
|
|
rmdir bin\drivers
|
|
|
|
rmdir bin\skins
|
|
|
|
rmdir bin
|
2006-12-10 17:34:19 +01:00
|
|
|
goto :Exit_OK
|
|
|
|
|
|
|
|
|
|
|
|
:Error_FasmFailed
|
|
|
|
echo error: fasm execution failed
|
|
|
|
erase lang.inc
|
2006-12-11 02:22:38 +01:00
|
|
|
pause
|
2006-12-10 17:34:19 +01:00
|
|
|
exit 1
|
|
|
|
|
|
|
|
:Exit_OK
|
2006-12-11 02:22:38 +01:00
|
|
|
echo all operations has been done
|
|
|
|
pause
|
|
|
|
exit 0
|