Compare commits

..

1 Commits
main ... main

Author SHA1 Message Date
Sean Tang
2d22fca7b6 Added new build script 2024-06-21 02:14:06 -07:00
9 changed files with 33 additions and 27 deletions

View File

@ -31,11 +31,10 @@ A1. Fine. You will need a corresponding compiler, obviously.
If the compiler produces an error "file not found" regarding 'lang.inc', If the compiler produces an error "file not found" regarding 'lang.inc',
the program can be compiled using different languages of interface. the program can be compiled using different languages of interface.
Create a file 'lang.inc' in the same folder as <input.asm> like follows: Create a file 'lang.inc' in the same folder as <input.asm> like follows:
lang fix en_US lang fix en
Here the last word selects the language. Valid languages are Here the last word selects the language. Valid languages are
en_US, ru_RU, et_EE, it_IT, es_ES, ca_ES. Not all programs provide all en, ru, et, it, sp. Not all programs provide all translations,
translations, en_US should always be available, ru_RU is the most frequent en should always be available, ru is the most frequent after en.
after en_US.
* For a NASM program, get NASM at http://www.nasm.us/. * For a NASM program, get NASM at http://www.nasm.us/.
To compile, find the main .asm file of the program and run To compile, find the main .asm file of the program and run
@ -43,7 +42,7 @@ A1. Fine. You will need a corresponding compiler, obviously.
Multi-language is rarely supported in this category, but you could still Multi-language is rarely supported in this category, but you could still
see sometimes an error "file not found" regarding 'lang_nasm.inc'. If so, see sometimes an error "file not found" regarding 'lang_nasm.inc'. If so,
create a file 'lang_nasm.inc' in the same folder as <input.asm> like follows: create a file 'lang_nasm.inc' in the same folder as <input.asm> like follows:
%define lang 'en_US' %define lang 'en'
Read the entry about fasm for description of valid languages. Read the entry about fasm for description of valid languages.
* For a c-- program, try to avoid compiling it and instead rewrite the code * For a c-- program, try to avoid compiling it and instead rewrite the code

View File

@ -1223,10 +1223,10 @@ KOSAPI void _ksys_debug_puts(const char* s)
KOSAPI void ksys_draw_bitmap_palette(void* bitmap, int x, int y, int w, int h, int bpp, void* palette, int offset) KOSAPI void ksys_draw_bitmap_palette(void* bitmap, int x, int y, int w, int h, int bpp, void* palette, int offset)
{ {
asm_inline( asm_inline(
"pushl %%ebp\n\t" // save EBP register "pushl %%ebp,\n\t" // save EBP register
"movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param "movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param
"int $0x40\n\t" "int $0x40\n\t"
"popl %%ebp" // restore EBP register "popl %%ebp" // restore EBP register
: :
: "a"(65), : "a"(65),
"b"(bitmap), "b"(bitmap),

View File

@ -1,6 +1,6 @@
FASM=fasm FASM=fasm
FLAGS=-m 65536 FLAGS=-m 65536
languages=en_US|ru_RU|de_DE|et_EE|es_ES languages=en|ru|ge|et|sp
.PHONY: all kernel bootloader clean .PHONY: all kernel bootloader clean

View File

@ -11,8 +11,8 @@ pause
goto :eof goto :eof
:Target_kernel :Target_kernel
rem valid languages: en_US ru_RU de_DE et_EE es_ES rem valid languages: en ru ge et sp
set lang=en_US set lang=en
echo *** building kernel with language '%lang%' ... echo *** building kernel with language '%lang%' ...

View File

@ -6,7 +6,7 @@ KERPACK=$HOME/kolibrios/programs/other/kpack/kerpack_linux/kerpack
KOLIBRI_IMG=$HOME/nightly/kolibri.img KOLIBRI_IMG=$HOME/nightly/kolibri.img
replace=0; # Replace kernel in the image file? replace=0; # Replace kernel in the image file?
echo 'lang fix en_US' > lang.inc echo 'lang fix en' > lang.inc
fasm -m 65536 bootbios.asm bootbios.bin fasm -m 65536 bootbios.asm bootbios.bin
fasm -m 65536 kernel.asm kernel.mnt fasm -m 65536 kernel.asm kernel.mnt
$KERPACK kernel.mnt kernel.mnt $KERPACK kernel.mnt kernel.mnt

View File

@ -1 +1,11 @@
../c--/c--.elf -D=LANG_ENG WebView.c ../c--/c--.elf -OC -D=LANG_ENG WebView.c
rm -rf INSTALL.TXT
rm -rf kolibri.img
cp ~/Downloads/latest-img.7z ./
p7zip -d latest-img.7z
sudo mount -o loop kolibri.img /media/floppy1/
sudo rm -rf /media/floppy1/GAMES
sudo rm -rf /media/floppy1/NETWORK/WEBVIEW
sudo cp ./WebView.com /media/floppy1/NETWORK/WEBVIEW
sudo umount /media/floppy1/
echo "finished copying file"

View File

@ -62,7 +62,6 @@ char *actions[] = {
#define T_FD "„¨áª¥â  " #define T_FD "„¨áª¥â  "
#define T_HD "†¥á⪨© ¤¨áª " #define T_HD "†¥á⪨© ¤¨áª "
#define T_SATA "SATA ¤¨áª " #define T_SATA "SATA ¤¨áª "
#define T_NVME "NVMe disk "
#define T_USB "USB ¤¨áª " #define T_USB "USB ¤¨áª "
#define T_RAM "RAM ¤¨áª " #define T_RAM "RAM ¤¨áª "
#define T_UNC "<22>¥¨§¢¥áâ­® " #define T_UNC "<22>¥¨§¢¥áâ­® "
@ -161,7 +160,6 @@ char *actions[] = {
#define T_FD "Floppy disk " #define T_FD "Floppy disk "
#define T_HD "Hard disk " #define T_HD "Hard disk "
#define T_SATA "SATA disk " #define T_SATA "SATA disk "
#define T_NVME "NVMe disk "
#define T_USB "USB disk " #define T_USB "USB disk "
#define T_RAM "RAM disk " #define T_RAM "RAM disk "
#define T_UNC "Unknown " #define T_UNC "Unknown "
@ -254,7 +252,6 @@ char *devinfo = {
"hd", 4, T_HD, "hd", 4, T_HD,
"bd", 4, T_HD, "bd", 4, T_HD,
"sd", 4, T_SATA, "sd", 4, T_SATA,
"nv", 4, T_NVME,
"tm", 5, T_RAM, "tm", 5, T_RAM,
"us", 6, T_USB, "us", 6, T_USB,
0 0

View File

@ -168,7 +168,7 @@ fail:
download_1: download_1:
DEBUGF 1, "Starting download\n" DEBUGF 1, "Starting download\n"
invoke HTTP_get, document_user, 0, params, 0 invoke HTTP_get, 0, 0, params, 0
test eax, eax test eax, eax
jz fail jz fail
mov [identifier], eax mov [identifier], eax

View File

@ -144,21 +144,21 @@ n_slot rd 1
ctx_menu_PID rd 1 ctx_menu_PID rd 1
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
lsz ctx_menu_text,\ lsz ctx_menu_text,\
ru_RU, <"X ‡ ªàëâì Alt + F4",0>,\ ru, <"X ‡ ªàëâì Alt + F4",0>,\
en_US, <"X Close Alt + F4",0>,\ en, <"X Close Alt + F4",0>,\
et_EE, <"X Sulge Alt + F4",0>,\ et, <"X Sulge Alt + F4",0>,\
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
lsz ctx_menu_text2,\ lsz ctx_menu_text2,\
ru_RU, <25," ‘¢¥à­ãâì ",0>,\ ru, <25," ‘¢¥à­ãâì ",0>,\
en_US, <25," Minimize ",0>,\ en, <25," Minimize ",0>,\
et_EE, <25," Minimeeri ",0>,\ et, <25," Minimeeri ",0>,\
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
lsz ctx_menu_text3,\ lsz ctx_menu_text3,\
ru_RU, <24," ‚®ááâ ­®¢¨âì ",0>,\ ru, <24," ‚®ááâ ­®¢¨âì ",0>,\
en_US, <24," Restore ",0>,\ en, <24," Restore ",0>,\
et_EE, <24," Taasta ",0> et, <24," Taasta ",0>
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
ctx_menu_title: ctx_menu_title:
db 'KolibriOS' db 'KolibriOS'
ctx_menu_title_end: ctx_menu_title_end:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------