diff --git a/data/rus/settings/menu.dat b/data/rus/settings/menu.dat index 702f2c1423..60a3c4fc80 100644 --- a/data/rus/settings/menu.dat +++ b/data/rus/settings/menu.dat @@ -4,7 +4,6 @@ Графика > /@3 Звук и видео > /@4 Разработка > /@5 -Эмуляторы > /@6 Система > /@7 Офис > /@10 Сеть > /@11 @@ -48,6 +47,7 @@ FlatWave /sys/3d/flatwav Аудиоплеер AC97SND /sys/media/ac97snd Видеоплеер Fplay /kolibrios/media/fplay Midi-плеер /sys/media/midamp +Детское пианино /sys/media/piano #5 **** Разработка **** Упаковщик KPack /sys/kpack Flat Assembler /sys/develop/fasm @@ -67,7 +67,6 @@ PokeMini /kolibrios/emul/pokemini ScummVM /kolibrios/emul/scummvm ZSNES Super Nintendo /kolibrios/emul/zsnes #7 **** Система **** -Системная панель /sys/syspanel Файловые менеджеры > /@8 Спец. возможности > /@9 Календарь /sys/calendar @@ -75,6 +74,7 @@ ZSNES Super Nintendo /kolibrios/emul/zsnes Виртуальные диски /sys/tmpdisk Консоль SHELL /sys/shell Сохранение образа /sys/rdsave +Системная панель /sys/syspanel #8 **** Система -> Файловые менеджеры **** KFAR /sys/File Managers/kfar fNav /sys/File Managers/fNav/fNav @@ -109,6 +109,7 @@ VNC Интернет загрузчик /sys/network/downloader Текстовый браузер /sys/network/webview #14 **** Разное **** +Эмуляторы > /@6 Создание скриншотов /sys/scrshoot Аналоговые часы /sys/demos/aclock Таблица Менделеева /sys/period diff --git a/programs/cmm/lib/obj/libimg.h b/programs/cmm/lib/obj/libimg.h index b01b456e1a..c2113ab405 100644 --- a/programs/cmm/lib/obj/libimg.h +++ b/programs/cmm/lib/obj/libimg.h @@ -194,6 +194,11 @@ struct _Image } //NOTICE: DO NOT FORGET TO INIT libio AND libimg!!! +#ifdef LANG_RUS +#define TEXT_FILE_SAVED_AS "'File saved as " +#else +#define TEXT_FILE_SAVED_AS "'Файл сохранен как " +#endif :void save_image(dword _image_pointer, _w, _h, _path) { char save_success_message[4096+200]; @@ -219,7 +224,7 @@ struct _Image } else { if (CreateFile(encoded_size, encoded_data, _path) == 0) { - strcpy(#save_success_message, "'File saved as "); + strcpy(#save_success_message, TEXT_FILE_SAVED_AS); strcat(#save_success_message, _path); strcat(#save_success_message, "' -O"); notify(#save_success_message); diff --git a/programs/fs/unimg/fat12.c b/programs/fs/unimg/fat12.c index e311e623eb..232ddf9796 100644 --- a/programs/fs/unimg/fat12.c +++ b/programs/fs/unimg/fat12.c @@ -329,7 +329,7 @@ static int fat12__open(Fat12 *this, const char *img) { this->rootDirectory = this->firstFat + this->numberOfFats * this->sectorsPerFat * this->bytesPerSector; this->dataRegion = this->rootDirectory + this->maxRootEntries * 32; - con_printf("Bytes per sector: %d\n", this->bytesPerSector); + con_printf("\nBytes per sector: %d\n", this->bytesPerSector); con_printf("Sectors per claster: %d\n", this->sectorsPerClaster); con_printf("Reserver sector count: %d\n", this->reservedSectorCount); con_printf("Number of FATs: %d\n", this->numberOfFats); @@ -338,7 +338,7 @@ static int fat12__open(Fat12 *this, const char *img) { con_printf("Sectors per FAT: %d\n", this->sectorsPerFat); con_printf("First FAT: %d\n", this->firstFat); con_printf("Root directory: %d\n", this->rootDirectory); - con_printf("Data region: %d\n", this->dataRegion); + con_printf("Data region: %d\n\n", this->dataRegion); return 1; } @@ -373,7 +373,7 @@ static int callback(const char *name, size_t size, const uint8_t *data, void *pa *fileNameDelim = '/'; } } - con_printf("Extracting \"%s\"\n", outputPath->data); + con_printf("Extracting %s\n", outputPath->data); if (!(fp = fopen(outputPath->data, "wb"))) { perror(NULL); } fwrite(data, 1, size, fp); fclose(fp); @@ -383,31 +383,36 @@ static int callback(const char *name, size_t size, const uint8_t *data, void *pa - int main(int argc, char **argv) { Fat12 fat12 = { 0 }; char *imageFile = NULL; String outputFolder = { 0 }; int exit = 0; - if (con_init_console_dll()) return -1; - con_set_title("UnImg - kolibri.img file unpacker"); + char app_title[] = "UnImg - kolibri.img file unpacker"; + if (con_init_console_dll_param(-1, -1, -1, 350, app_title)) return -1; if (argc < 2) { - con_write_asciiz("Usage: unimg \"/path/to/kolibri.img\" \"/optional/extract/path\" [-e]"); - con_write_asciiz("-e\tExit on success"); + con_write_asciiz(" Usage:\n"); + con_write_asciiz(" unimg \"/path/to/kolibri.img\" \"/optional/extract/path\" [-e]\n"); + con_write_asciiz(" where optional key [-e] is exit on success"); con_exit(0); return -1; + } else { + imageFile = argv[1]; + con_printf("File: %s\n", imageFile); } - imageFile = argv[1]; outputFolder.capacity = 4096; outputFolder.data = malloc(outputFolder.capacity); //! ACHTUNG: possible buffer overflow, is 4096 enough in KolibriOS? if (argc >= 3 && argv[2][0] != '-') strcpy(outputFolder.data, argv[2]); - else strcpy(outputFolder.data, "/TMP0/1/KOLIBRI.IMG"); + else { + strcpy(outputFolder.data, "/tmp0/1"); + strcat(outputFolder.data, strrchr(imageFile, '/')); + } outputFolder.length = strlen(outputFolder.data); diff --git a/programs/fs/unimg/make.bat b/programs/fs/unimg/make.bat index d05ffa1101..c9befdb80b 100644 --- a/programs/fs/unimg/make.bat +++ b/programs/fs/unimg/make.bat @@ -1,2 +1,2 @@ -kos32-tcc fat12.c -lck -o unimg.kex +kos32-tcc fat12.c -lck -o unimg @pause \ No newline at end of file diff --git a/programs/fs/unimg/unimg b/programs/fs/unimg/unimg index 2380f4069d..9bda8f589b 100644 Binary files a/programs/fs/unimg/unimg and b/programs/fs/unimg/unimg differ diff --git a/programs/system/test/trunk/test.asm b/programs/system/test/trunk/test.asm index d3a96d2718..cfb22d0129 100644 --- a/programs/system/test/trunk/test.asm +++ b/programs/system/test/trunk/test.asm @@ -10,199 +10,195 @@ ; Translation into Russian. ;--------------------------------------------------------------------- use32 - org 0x0 + org 0x0 - db 'MENUET01' ; 8 byte id - dd 0x01 ; header version - dd START ; start of code - dd I_END ; size of image - dd IM_END ; memory for app - dd stack_top ; esp - dd 0x0 ; I_Param - dd 0x0 ; I_Icon + db 'MENUET01' ; 8 byte id + dd 0x01 ; header version + dd START ; start of code + dd I_END ; size of image + dd IM_END ; memory for app + dd stack_top ; esp + dd 0x0 ; I_Param + dd 0x0 ; I_Icon ;------------------------------------------------------------------------------- include '../../../macros.inc' include 'lang.inc' ;------------------------------------------------------------------------------- -START: ; start of execution -red: ; redraw - call draw_window ; at first, draw the window +START: ; start of execution +red: ; redraw + call draw_window ; at first, draw the window ;------------------------------------------------------------------------------- still: - mcall 10 ; wait here for event - cmp eax,1 ; redraw request ? - jz red + mcall 10 ; wait here for event + cmp eax,1 ; redraw request ? + jz red - cmp eax,3 ; button in buffer ? - jz button - - cmp eax,2 ; key in buffer ? - jnz still + cmp eax,3 ; button in buffer ? + jz button + + cmp eax,2 ; key in buffer ? + jnz still ;------------------------------------------------------------------------------- key: - mcall 2 ; just read it and ignore - jmp still + mcall 2 ; just read it and ignore + jmp still ;------------------------------------------------------------------------------- button: - mcall 17 - cmp ah,1 ; button id=1 ? - jnz noclose + mcall 17 + cmp ah,1 ; button id=1 ? + jnz noclose - mcall -1 ; close this program + mcall -1 ; close this program ;------------------------------------------------------------------------------- noclose: - cmp ah,2 - jnz notest2 - cli + cmp ah,2 + jnz notest2 + cli ;------------------------------------------------------------------------------- notest2: - cmp ah,3 - jnz notest3 - sti + cmp ah,3 + jnz notest3 + sti ;------------------------------------------------------------------------------- notest3: - cmp ah,4 - jnz notest4 - mov [0x10000],byte 1 -;------------------------------------------------------------------------------- + cmp ah,4 + jnz notest4 + mov [0x10000],byte 1 +;------------------------------------------------------------------------------- notest4: - cmp ah,5 - jnz notest5 - jmp dword 0x10000 + cmp ah,5 + jnz notest5 + jmp dword 0x10000 ;------------------------------------------------------------------------------- notest5: - cmp ah,6 - jnz notest6 - mov esp,0 - push eax + cmp ah,6 + jnz notest6 + mov esp,0 + push eax ;------------------------------------------------------------------------------- notest6: - cmp ah,7 - jnz notest7 - in al,0x60 + cmp ah,7 + jnz notest7 + in al,0x60 ;------------------------------------------------------------------------------- notest7: - cmp ah,8 - jnz still - out 0x60,al - jmp still + cmp ah,8 + jnz still + out 0x60,al + jmp still ;------------------------------------------------------------------------------- ; ********************************************* ; ******* WINDOW DEFINITIONS AND DRAW ******** ; ********************************************* ;------------------------------------------------------------------------------- draw_window: - ;mcall 48,3,sys_colors,40 - mcall 12,1 - mcall 0,<200,292>,<200,230>,0x14FFFFFF,,tlabel - mov eax,8 ; function 8 : define and draw button - mov ebx,32*65536+10 ; [x start] *65536 + [x size] - mov ecx,75*65536+10 ; [y start] *65536 + [y size] - mov edx,2 ; button id - mov esi,0x6888B8 ; button color RRGGBB + ;mcall 48,3,sys_colors,40 + mcall 12,1 + mcall 0,<200,370>,<200,295>,0x14FFFFFF,,tlabel + mcall 8, <36,15>, <88,15>, 2, 0x6888B8 .newb: - mcall - add ecx,20*65536 - inc edx - cmp edx,9 - jb .newb + mcall + add ecx,26*65536 + inc edx + cmp edx,9 + jb .newb - cld - mov ebx,26*65536+37 ; draw info text with function 4 - mov ecx,0x000000 - mov edx,text - mov esi,40 - - mov eax,4 + cld + mov ebx,26*65536+37 ; draw info text with function 4 + mov ecx,0x10000000 + mov edx,text + mov esi,40 + + mov eax,4 .newline: - mcall - add ebx,10 - add edx,40 - cmp [edx],byte 'x' - jnz .newline + mcall + add ebx,13 + add edx,40 + cmp [edx],byte 'x' + jnz .newline - mcall 12,2 ; function 12:tell os about windowdraw - ret + mcall 12,2 ; function 12:tell os about windowdraw + ret ;------------------------------------------------------------------------------- ; DATA AREA ;------------------------------------------------------------------------------- if lang eq it text: - db 'Il programma usa 0x1000 byte di memoria ' - db ' ' - db 'Open debug board for rezult information ' - db ' ' - db ' CLI ' - db ' ' - db ' STI ' - db ' ' - db ' MOV [0x10000],BYTE 1 ' - db ' ' - db ' JMP DWORD 0x10000 ' - db ' ' - db ' MOV ESP,0 & PUSH EAX ' - db ' ' - db ' IN Al,0x60 ' - db ' ' - db ' OUT 0x60,AL ' - db 'x' + db 'Il programma usa 0x1000 byte di memoria ' + db ' ' + db 'Open debug board for rezult information ' + db ' ' + db ' CLI ' + db ' ' + db ' STI ' + db ' ' + db ' MOV [0x10000],BYTE 1 ' + db ' ' + db ' JMP DWORD 0x10000 ' + db ' ' + db ' MOV ESP,0 & PUSH EAX ' + db ' ' + db ' IN Al,0x60 ' + db ' ' + db ' OUT 0x60,AL ' + db 'x' else if lang eq ru text: - db 'Приложение использует 0x1000 байт памяти' - db ' ' - db 'Открыть BOARD для просмотра результата ' - db ' ' - db ' CLI ' - db ' ' - db ' STI ' - db ' ' - db ' MOV [0x10000],BYTE 1 ' - db ' ' - db ' JMP DWORD 0x10000 ' - db ' ' - db ' MOV ESP,0 & PUSH EAX ' - db ' ' - db ' IN Al,0x60 ' - db ' ' - db ' OUT 0x60,AL ' - db 'x' + db 'Приложение использует 0x1000 байт памяти' + db ' ' + db 'Открыть BOARD для просмотра результата ' + db ' ' + db ' CLI ' + db ' ' + db ' STI ' + db ' ' + db ' MOV [0x10000],BYTE 1 ' + db ' ' + db ' JMP DWORD 0x10000 ' + db ' ' + db ' MOV ESP,0 & PUSH EAX ' + db ' ' + db ' IN Al,0x60 ' + db ' ' + db ' OUT 0x60,AL ' + db 'x' else text: - db 'Application uses 0x1000 bytes of memory ' - db ' ' - db 'Open debug board for result information ' - db ' ' - db ' CLI ' - db ' ' - db ' STI ' - db ' ' - db ' MOV [0x10000],BYTE 1 ' - db ' ' - db ' JMP DWORD 0x10000 ' - db ' ' - db ' MOV ESP,0 & PUSH EAX ' - db ' ' - db ' IN Al,0x60 ' - db ' ' - db ' OUT 0x60,AL ' - db 'x' + db 'Application uses 0x1000 bytes of memory ' + db ' ' + db 'Open debug board for result information ' + db ' ' + db ' CLI ' + db ' ' + db ' STI ' + db ' ' + db ' MOV [0x10000],BYTE 1 ' + db ' ' + db ' JMP DWORD 0x10000 ' + db ' ' + db ' MOV ESP,0 & PUSH EAX ' + db ' ' + db ' IN Al,0x60 ' + db ' ' + db ' OUT 0x60,AL ' + db 'x' end if ;------------------------------------------------------------------------------- if lang eq it tlabel: - db 'Kolibri prova di protezione',0 -else if lang eq ru + db 'Kolibri prova di protezione',0 +else if lang eq ru tlabel: - db 'Kolibri проверка защиты ядра',0 + db 'Kolibri проверка защиты ядра',0 else tlabel: - db 'Kolibri protection test',0 + db 'Kolibri protection test',0 end if ;------------------------------------------------------------------------------- I_END: ;------------------------------------------------------------------------------- align 4 - rb 256 + rb 256 stack_top: ;------------------------------------------------------------------------------- IM_END: