From 09548370da172f683f7e6605a0a69972a81b1946 Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Tue, 8 Feb 2011 14:43:48 +0000 Subject: [PATCH] e80: multi-language build git-svn-id: svn://kolibrios.org@1854 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../e80/trunk/{compile.bat => compile_eng.bat} | 1 + programs/emulator/e80/trunk/compile_rus.bat | 12 ++++++++++++ programs/emulator/e80/trunk/e80.c | 5 +++++ programs/emulator/e80/trunk/system/msgbox.c | 8 ++------ 4 files changed, 20 insertions(+), 6 deletions(-) rename programs/emulator/e80/trunk/{compile.bat => compile_eng.bat} (84%) create mode 100644 programs/emulator/e80/trunk/compile_rus.bat diff --git a/programs/emulator/e80/trunk/compile.bat b/programs/emulator/e80/trunk/compile_eng.bat similarity index 84% rename from programs/emulator/e80/trunk/compile.bat rename to programs/emulator/e80/trunk/compile_eng.bat index ccca77aa6..972ffe19e 100644 --- a/programs/emulator/e80/trunk/compile.bat +++ b/programs/emulator/e80/trunk/compile_eng.bat @@ -1,5 +1,6 @@ del *.o fasm asm_code.asm start.o +echo #define LANG_ENG 1 > lang.h gcc -c z80/z80.c gcc -c system/kolibri.c gcc -c system/stdlib.c diff --git a/programs/emulator/e80/trunk/compile_rus.bat b/programs/emulator/e80/trunk/compile_rus.bat new file mode 100644 index 000000000..490364324 --- /dev/null +++ b/programs/emulator/e80/trunk/compile_rus.bat @@ -0,0 +1,12 @@ +del *.o +fasm asm_code.asm start.o +echo #define LANG_RUS 1 > lang.h +gcc -c z80/z80.c +gcc -c system/kolibri.c +gcc -c system/stdlib.c +gcc -c system/string.c +gcc -c e80.c +ld -nostdlib -T kolibri.ld -o e80.kex start.o kolibri.o stdlib.o string.o z80.o e80.o +objcopy e80.kex -O binary +kpack e80.kex +pause \ No newline at end of file diff --git a/programs/emulator/e80/trunk/e80.c b/programs/emulator/e80/trunk/e80.c index 0470e1bc1..1b68e8dc4 100644 --- a/programs/emulator/e80/trunk/e80.c +++ b/programs/emulator/e80/trunk/e80.c @@ -1,4 +1,9 @@ +#ifndef AUTOBUILD +// autobuild does not create lang.h, but defines LANG_{RUS,ENG} directly +#include "lang.h" +#endif + #include "system/kolibri.h" #include "system/stdlib.h" #include "system/string.h" diff --git a/programs/emulator/e80/trunk/system/msgbox.c b/programs/emulator/e80/trunk/system/msgbox.c index fda06dee3..b79850ea9 100644 --- a/programs/emulator/e80/trunk/system/msgbox.c +++ b/programs/emulator/e80/trunk/system/msgbox.c @@ -18,18 +18,14 @@ ///============================= -#define LANG_EN - -#ifdef LANG_RU +#if LANG_RUS char BTN_OK[]={"OK"}; char BTN_CANCEL[]={"Отмена"}; char BTN_ABORT[]={"Прекратить"}; char BTN_RETRY[]={"Повторить"}; char BTN_INGNORE[]={"Игнорировать"}; char BTN_NO[]={"Нет"}; -#endif - -#ifdef LANG_EN +#else char BTN_OK[]={"OK"}; char BTN_CANCEL[]={"Cancel"}; char BTN_ABORT[]={"Abort"};