From 7ff31d47244db796249cfe1dac31a869823268ec Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 14 Apr 2020 16:03:24 +0000 Subject: [PATCH] View3DS: support kpacked files WebView: DOCX support git-svn-id: svn://kolibrios.org@7788 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/File Managers/icons.ini | 7 +- data/common/File Managers/kfar.ini | 7 +- data/common/File Managers/kfm.ini | 5 +- data/common/settings/assoc.ini | 5 ++ data/common/wallpapers/Cool Blue.png | Bin 7493 -> 0 bytes programs/cmm/browser/WebView.c | 10 ++- programs/cmm/browser/texts.h | 2 +- .../cmm/lib/patterns/simple_open_dialog.h | 2 +- programs/demos/3DS/DATA.INC | 2 +- programs/demos/3DS/VIEW3DS.ASM | 69 ++++++++++++------ 10 files changed, 73 insertions(+), 36 deletions(-) delete mode 100644 data/common/wallpapers/Cool Blue.png diff --git a/data/common/File Managers/icons.ini b/data/common/File Managers/icons.ini index 69a542f44c..e1e7107e32 100644 --- a/data/common/File Managers/icons.ini +++ b/data/common/File Managers/icons.ini @@ -8,6 +8,7 @@ rtf=3 log=3 dic=3 doc=3 +docx=3 exc=3 wtx=3 inf=3 @@ -225,8 +226,8 @@ obj=92 dll=92 skn=80 kex=88 -rft=85 -rft=85 kf=118 mgb=121 -txt=122 \ No newline at end of file +txt=122 +rtf=122 +docx=122 diff --git a/data/common/File Managers/kfar.ini b/data/common/File Managers/kfar.ini index ea5b77f1b4..2c010abb4f 100644 --- a/data/common/File Managers/kfar.ini +++ b/data/common/File Managers/kfar.ini @@ -27,16 +27,17 @@ skn=/sys/skincfg lap=/sys/media/listplay asf=/sys/media/listplay m3u=/sys/media/AC97SND -wav=/sys/media/AC97SND +wav=/sys/media/pixie mp3=/sys/media/pixie -xm=/sys/media/AC97SND +xm=/sys/media/pixie mid=/sys/media/MIDAMP cvs=/sys/graph obj=/sys/develop/cObj htm=/sys/network/WebView html=/sys/network/WebView -fb2=/sys/fb2read mht=/sys/network/WebView +docx=/sys/network/WebView +fb2=/sys/fb2read kla=/sys/games/klavisha pdf=/kolibrios/media/updf avi=/kolibrios/media/fplay_run diff --git a/data/common/File Managers/kfm.ini b/data/common/File Managers/kfm.ini index 9b4d0fa49b..553b9d641c 100644 --- a/data/common/File Managers/kfm.ini +++ b/data/common/File Managers/kfm.ini @@ -172,9 +172,9 @@ tif /sys/media/kiv tiff /sys/media/kiv wbmp /sys/media/kiv m3u /sys/media/ac97snd -wav /sys/media/ac97snd +wav /sys/media/pixie mp3 /sys/media/pixie -xm /sys/media/ac97snd +xm /sys/media/pixie mid /sys/media/midamp rtf /sys/rtfread 3ds /sys/3d/view3ds @@ -211,6 +211,7 @@ obj /sys/develop/cObj htm /sys/network/WebView html /sys/network/WebView mht /sys/network/WebView +docx /sys/network/WebView fb2 /sys/fb2read kla /sys/games/klavisha bin /sys/develop/heed diff --git a/data/common/settings/assoc.ini b/data/common/settings/assoc.ini index d7f7e4937f..c4e1cc9fae 100644 --- a/data/common/settings/assoc.ini +++ b/data/common/settings/assoc.ini @@ -13,6 +13,10 @@ exec=/sys/txtread icon=85 next=$HexEditor +[Run] +exec=/sys/run +icon=55 + [FB2Read] exec=/sys/fb2read icon=44 @@ -92,6 +96,7 @@ fb2=$FB2Read htm=$WebView html=$WebView mht=$WebView +docx=$WebView avi=$FPlay mkv=$FPlay diff --git a/data/common/wallpapers/Cool Blue.png b/data/common/wallpapers/Cool Blue.png deleted file mode 100644 index dbc1e2520af3662120b91acf4eccd435bb3019c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7493 zcmWNW`6JVh1IFLR&_+3Cq-*9L%Pp#pW|JQYzd;v5)BJ9Y0co()uC% z;~R}(ifNw}dTV}qZ(wg>kJ_1GYWltF;9MBWRT;q9xaBQ8ADCNzy|54!`IA4pF*hEy z>+yZ*OlM&9+S=#9(``=%uCIx0*X8BTfN~r)gag%n83sN&c6)DW``VsB@F03|`^4<5 zsm@`Sz<+eSQDgAQ)m5|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Xd7={HnFE zV|3>6_<_JSzF@mx(=_mU)QOP!;w}x*F+d#T>*EHUFlJcJW)6JH@s=rEsTtWls&Meg z;C-j78#m3uwG`6^NxV-Y|(e+8E;O0!`}mB=}C zSc3mEt#jM_+)%Oxr^Rk2bG#t>(@qh8>s*x1!0WDqmZHcCZ1XdcMhrLx3*}BVfKTfW z<-9x|@%ml2Oxh7E1?XMsc5t-Ey5jT76qi=Ws(`{QYH;F}QhLH@&m zaBq`oJ=y-5{p$5&*_U#SrN-Pv9FjO31_T52J1@u EKmK+V=l}o! diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index bfc39099c5..ee650ea3c0 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -89,7 +89,7 @@ enum { #include "tabs.h" char default_dir[] = "/rd/1"; -od_filter filter2 = { 16, "TXT\0HTM\0HTML\0\0" }; +od_filter filter2 = { 22, "TXT\0HTM\0HTML\0DOCX\0\0" }; char editURL[URL_SIZE+1]; edit_box address_box = {, PADDING+TSZE*2+PADDING+6, PADDING+3, 0xffffff, @@ -519,6 +519,7 @@ bool GetLocalFileData(dword _path) void OpenPage(dword _open_URL) { char new_url[URL_SIZE+1]; + int unz_id; StopLoading(); @@ -571,6 +572,13 @@ void OpenPage(dword _open_URL) } } else { //LOCAL PAGE + if (UrlExtIs(#new_url,".docx")) { + DeleteFile("/tmp0/1/temp/word/document.xml"); + CreateDir("/tmp0/1/temp"); + unz_id = RunProgram("/sys/unz", sprintf(#param, "-o \"/tmp0/1/temp\" -h \"%s\"", #new_url)); + while (GetProcessSlot(unz_id)) pause(2); + strcpy(#new_url, "/tmp0/1/temp/word/document.xml"); + } if (!GetLocalFileData(#new_url)) { LoadInternalPage(#page_not_found, sizeof(page_not_found)); } diff --git a/programs/cmm/browser/texts.h b/programs/cmm/browser/texts.h index cc10f8ba77..960eb40d8b 100644 --- a/programs/cmm/browser/texts.h +++ b/programs/cmm/browser/texts.h @@ -1,4 +1,4 @@ -char version[]="WebView 2.41"; +char version[]="WebView 2.45"; #ifdef LANG_RUS char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0"; diff --git a/programs/cmm/lib/patterns/simple_open_dialog.h b/programs/cmm/lib/patterns/simple_open_dialog.h index f333386b46..a64c552e4f 100644 --- a/programs/cmm/lib/patterns/simple_open_dialog.h +++ b/programs/cmm/lib/patterns/simple_open_dialog.h @@ -1,7 +1,7 @@ struct od_filter { dword size; //size = len(#ext) + sizeof(dword) - char ext[16]; + char ext[25]; }; proc_info pr_inf; diff --git a/programs/demos/3DS/DATA.INC b/programs/demos/3DS/DATA.INC index 56805a8a39..06a25874ae 100644 --- a/programs/demos/3DS/DATA.INC +++ b/programs/demos/3DS/DATA.INC @@ -344,7 +344,7 @@ base_vector: if Ext=SSE2 db ' (SSE2)' end if - db ' 0.068',0 + db ' 0.069',0 labellen: STRdata db '-1 ' diff --git a/programs/demos/3DS/VIEW3DS.ASM b/programs/demos/3DS/VIEW3DS.ASM index ec8588e7d1..13cbeb3a34 100644 --- a/programs/demos/3DS/VIEW3DS.ASM +++ b/programs/demos/3DS/VIEW3DS.ASM @@ -1,5 +1,5 @@ -; application : View3ds ver. 0.068b - tiny .3ds and .asc files viewer +; application : View3ds ver. 0.069 - tiny .3ds and .asc files viewer ; with a few graphics effects demonstration. ; compiler : FASM ; system : KolibriOS @@ -3379,34 +3379,55 @@ end if read_from_disk: if USE_LFN ;- - mov eax, 70 - mov ebx, file_info - mov dword[ebx], 5 ; -> subfunction number - int 0x40 ; -> read file size - mov ebx, [fptr] - mov ebx, dword[ebx+32] - inc ebx - mov [fsize], ebx - mov eax, 68 mov ebx, 11 - int 0x40 ; -> create heap + int 0x40 ; -> init heap - mov eax, 68 - mov ebx, 12 - mov ecx, [fsize] - int 0x40 ; -> allocate memory for file - mov [fptr], eax ; -> eax = pointer to allocated mem + ;mov eax, 70 + ;mov ebx, file_info + ;mov dword[ebx], 5 ; -> subfunction number + ;int 0x40 ; -> read file size + ;mov ebx, [fptr] + ;mov ebx, dword[ebx+32] + ;inc ebx + ;mov [fsize], ebx - mov eax, 70 - mov ebx, file_info - mov dword[ebx],0 - int 0x40 ; -> read file + ;mov eax, 68 + ;mov ebx, 12 + ;mov ecx, [fsize] + ;int 0x40 ; -> allocate memory for file + ;mov [fptr], eax ; -> eax = pointer to allocated mem - mov [fsize],ebx - cmp eax,6 - jnz @f - xor eax,eax ;;;;--- + ;mov eax, 70 + ;mov ebx, file_info + ;mov dword[ebx],0 + ;int 0x40 ; -> read file + + ;mov [fsize],ebx + ;cmp eax,6 + ;jnz @f + ;xor eax,eax ;;;;--- + + ;cmp eax,6 + ;jnz @f + ;xor eax,eax ;;;;--- + + ;load kpacked files by Leency + + mov eax,68 + mov ebx,27 + mov ecx,I_Param + int 0x40 + + mov [fsize],edx + mov [file_info+16],eax + + test eax,eax + jnz .open_opened_well + mov eax,6 ;otherwise => failed + jmp @f + .open_opened_well: + xor eax,eax @@: else mov eax,58