diff --git a/kernel/trunk/build.bat b/kernel/trunk/build.bat new file mode 100644 index 0000000000..37d22d8ff7 --- /dev/null +++ b/kernel/trunk/build.bat @@ -0,0 +1,87 @@ +@echo off + +set languages=en ru ge +set drivers=unisound sis infinity ati2d + +set opt_ok=0 +for %%a in (%languages%) do if %%a==%1 set opt_ok=1 +if %opt_ok%==0 goto :Check_Targets + +echo building kernel with language %1 ... + +if not exist bin mkdir bin +echo lang fix %1 > lang.inc +fasm kernel.asm bin\kernel.mnt +if not %errorlevel%==0 goto :Error_FasmFailed +erase lang.inc +goto :Exit_OK + +:Check_Targets + +for %%a in (all drivers skins clean) do if %%a==%1 set opt_ok=1 +if %opt_ok%==0 goto :Error_WrongOption +goto :Target_%1 + +:Target_all + +echo building all ... + +if not exist bin mkdir bin +for %%a in (%languages%) do ( + echo lang fix %%a > lang.inc + fasm kernel.asm bin\kernel_%%a.mnt + if not %errorlevel%==0 goto :Error_FasmFailed +) +erase lang.inc +call :Target_drivers +call :Target_skins +exit :Exit_OK + +:Target_drivers + +echo building drivers ... + +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 :Exit_OK + +:Target_skins + +echo building skins ... + +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 :Exit_OK + +:Target_clean + +echo cleaning ... + +del /Q bin\drivers\*.* +del /Q bin\skins\*.* +del /Q bin\*.* +rmdir bin\drivers +rmdir bin\skins +rmdir bin +goto :Exit_OK + +:Error_WrongOption + +echo error: specified option is incorrect - '%1' +exit 1 + +:Error_FasmFailed + +echo error: fasm execution failed +erase lang.inc +exit 1 + +:Exit_OK diff --git a/kernel/trunk/build_en.bat b/kernel/trunk/build_en.bat deleted file mode 100644 index ff112543e3..0000000000 --- a/kernel/trunk/build_en.bat +++ /dev/null @@ -1,5 +0,0 @@ -@erase lang.inc -@echo lang fix en >lang.inc -@fasm kernel.asm kernel.mnt -@erase lang.inc -@pause \ No newline at end of file diff --git a/kernel/trunk/build_ge.bat b/kernel/trunk/build_ge.bat deleted file mode 100644 index 1b9fcc3c23..0000000000 --- a/kernel/trunk/build_ge.bat +++ /dev/null @@ -1,5 +0,0 @@ -@erase lang.inc -@echo lang fix ge >lang.inc -@fasm kernel.asm kernel.mnt -@erase lang.inc -@pause \ No newline at end of file diff --git a/kernel/trunk/build_ru.bat b/kernel/trunk/build_ru.bat deleted file mode 100644 index a8cd530f0c..0000000000 --- a/kernel/trunk/build_ru.bat +++ /dev/null @@ -1,5 +0,0 @@ -@erase lang.inc -@echo lang fix ru >lang.inc -@fasm kernel.asm kernel.mnt -@erase lang.inc -@pause \ No newline at end of file diff --git a/kernel/trunk/drivers/build.bat b/kernel/trunk/drivers/build.bat deleted file mode 100644 index 9ee5512801..0000000000 --- a/kernel/trunk/drivers/build.bat +++ /dev/null @@ -1,4 +0,0 @@ -@fasm unisound.asm unisound.obj -@fasm sis.asm sis.obj -@fasm infinity.asm infinity.obj -@pause \ No newline at end of file diff --git a/kernel/trunk/skin/build.bat b/kernel/trunk/skin/build.bat deleted file mode 100644 index ac54f13566..0000000000 --- a/kernel/trunk/skin/build.bat +++ /dev/null @@ -1,2 +0,0 @@ -@fasm default.asm default.skn -@pause \ No newline at end of file