From 4c9dd0828e7df6c48cfbbfb4488c893579579bcd Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 28 Apr 2020 18:03:20 +0000 Subject: [PATCH] add '-ker' key to kpack to pack kernel remove kerpack from IMG git-svn-id: svn://kolibrios.org@7834 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 1 - programs/other/kpack/trunk/const_var.inc | 4 +++- programs/other/kpack/trunk/kpack.asm | 27 ++++++++++++++++++++---- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/data/Tupfile.lua b/data/Tupfile.lua index b665babb95..c9c6ed759d 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -364,7 +364,6 @@ tup.append_table(img_files, { {"HDD_INFO", PROGS .. "/system/hdd_info/trunk/hdd_info"}, {"KBD", PROGS .. "/system/kbd/trunk/kbd"}, {"KPACK", PROGS .. "/other/kpack/trunk/kpack"}, - {"KERPACK", PROGS .. "/other/outdated/kerpack/trunk/kerpack"}, {"LAUNCHER", PROGS .. "/system/launcher/trunk/launcher"}, {"LOADDRV", PROGS .. "/system/loaddrv/loaddrv"}, {"MAGNIFY", PROGS .. "/demos/magnify/trunk/magnify"}, diff --git a/programs/other/kpack/trunk/const_var.inc b/programs/other/kpack/trunk/const_var.inc index a7212f30a8..41042c8f41 100644 --- a/programs/other/kpack/trunk/const_var.inc +++ b/programs/other/kpack/trunk/const_var.inc @@ -8,9 +8,10 @@ aCompress db ' Compress',0 aDecompress db 'Decompress',0 definoutname db 0 defpath db '/rd/1',0 +kernel_name db 'kernel.mnt',0 ;curedit dd 0 -info_str db 'KPack - Kolibri Packer, version 0.21',10 +info_str db 'KPack - Kolibri Packer, version 0.22',10 db 'Uses LZMA v4.32 compression library',10,10 info_len = $ - info_str usage_str db 'Written by diamond in 2006-2009 specially for KolibriOS',10 @@ -20,6 +21,7 @@ usage_str db 'Written by diamond in 2006-2009 specially for KolibriOS',10 db 10 db 'Command-line usage:',10 db ' path_to_infile with zero',10 + db ' use <-ker> key to pack kernel',10 db 10 db 'Window usage:',10 db ' Select file with PATH-button or set all data in the',10 diff --git a/programs/other/kpack/trunk/kpack.asm b/programs/other/kpack/trunk/kpack.asm index b414dcf8b0..f53afe101c 100644 --- a/programs/other/kpack/trunk/kpack.asm +++ b/programs/other/kpack/trunk/kpack.asm @@ -33,15 +33,33 @@ START: mcall 68,11 mcall 40,0x80000027 -load_libraries l_libs_start,load_lib_end + load_libraries l_libs_start,load_lib_end cmp eax,-1 je exit init_checkboxes2 check1,check1_end - ;push check1 - ;call [init_checkbox] - call clear_messages + +; pack kernel ? + cmp [params], dword '-ker' + jne @f + + mov esi,kernel_name + mov edi,inname + call copy_1 + + mov esi,kernel_name + mov edi,outname + call copy_1 + + mov esi,defpath + mov edi,path + call copy_1 + + call pack + jmp exit + +@@: ; set default path = /RD/1/ mov esi,defpath mov edi,path @@ -73,6 +91,7 @@ load_libraries l_libs_start,load_lib_end pop esi mov edi,outname call copy_1 +end_param: ;--------------------------------------------------------------------- call set_editbox_position_all ;---------------------------------------------------------------------