From eb3e3934aeae07643fb1e4660877af4e3ea50cd2 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 18 Oct 2018 20:07:48 +0000 Subject: [PATCH] rforces: use newer version for autobuild git-svn-id: svn://kolibrios.org@7477 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/build.bat | 79 +++++++++++++++++++++++- programs/games/rforces/trunk/Tupfile.lua | 2 +- 2 files changed, 78 insertions(+), 3 deletions(-) diff --git a/kernel/trunk/build.bat b/kernel/trunk/build.bat index ed62da1786..1d3c1c6a69 100644 --- a/kernel/trunk/build.bat +++ b/kernel/trunk/build.bat @@ -1,2 +1,77 @@ - echo lang fix %lang% > lang.inc - fasm -m 65536 kernel.asm kernel.mnt +@echo off +cls +set languages=en ru ge et sp +set targets=kernel clean + +call :Check_Target %1 +for %%a in (kernel) do if %%a==%target% call :Check_Lang %2 +call :Target_%target% + +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 + +: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 incorrect + echo Enter valid target [ %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 -m 65536 bootbios.asm bootbios.bin + fasm -m 65536 kernel.asm bin\kernel.mnt + fasm -m 65536 kernel.asm bin\kernel.bin -dUEFI=1 + if not %errorlevel%==0 goto :Error_FasmFailed + erase lang.inc +goto :eof + + +:Target_clean + echo *** cleaning ... + rmdir /S /Q bin +goto :Exit_OK + + +:Error_FasmFailed +echo error: fasm execution failed +erase lang.inc >nul 2>&1 +echo. +pause +exit 1 + +:Exit_OK +echo. +echo all operations have been done +pause +exit 0 diff --git a/programs/games/rforces/trunk/Tupfile.lua b/programs/games/rforces/trunk/Tupfile.lua index 027eb878c8..d8bed8221d 100644 --- a/programs/games/rforces/trunk/Tupfile.lua +++ b/programs/games/rforces/trunk/Tupfile.lua @@ -1,5 +1,5 @@ if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("NO_MSVC") ~= "" then return end HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR") tup.include(HELPERDIR .. "/use_msvc.lua") -compile_msvc{"forces_1.1.cpp", "kosFile.cpp", "kosSyst.cpp", "mcsmemm.cpp"} +compile_msvc{"forces.cpp", "kosFile.cpp", "kosSyst.cpp", "mcsmemm.cpp"} link_msvc("rforces")