1) Added license text to kfm.asm 
2) Compilation with default system macros.inc 
3) Add build.sh for Linux 
4) Corrected kfm.ini

git-svn-id: svn://kolibrios.org@1851 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2011-02-06 13:55:34 +00:00
parent 2f0a3dc835
commit 0be14cc928
5 changed files with 103 additions and 297 deletions

14
programs/fs/kfm/trunk/build.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# This script does for linux the same as build.bat for DOS,
# it compiles the KoOS kernel, hopefully ;-)
echo "lang fix en"
echo "lang fix en" > lang.inc
fasm -m 16384 kfm.asm kfm
kpack kfm
rm -f lang.inc
exit 0

View File

@ -1,7 +1,33 @@
;**************************************************************
;*****************************************************************************
; KFM - Kolibri File Manager
;**************************************************************
; Copyright (c) 2006 - 2010, Marat Zakiyanov aka Mario79, aka Mario
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
; * Neither the name of the <organization> nor the
; names of its contributors may be used to endorse or promote products
; derived from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;*****************************************************************************
use32
org 0x0
db 'MENUET01'
dd 0x01
dd START
@ -13,7 +39,10 @@ use32
;include 'lang.inc'
;include 'kglobals.inc'
include 'macros.inc'
;include 'macros.inc'
include '../../../macros.inc'
include '../../../config.inc' ;for nightbuild
include 'editbox.inc'
;use_edit_box
use_edit_box procinfo
@ -118,7 +147,7 @@ draw_window:
; mov ecx,[temp_esi]
test [window_status],10b
jnz @f
mcall 71, 1 , header
mcall 71, 1 , header_text
; create_dir_name
; start_parameter
; file_name

View File

@ -70,6 +70,7 @@ djvu 0006
iw4 0006
wav 0007
mp3 0007
xm 0007
mid 0007
midi 0007
aif 0007
@ -81,6 +82,14 @@ wma 0007
wm 0007
avi 0011
mpg 0011
mov 0011
flv 0011
wmv 0011
vob 0011
mkv 0011
mp4 0011
mpeg 0011
3gp 0011
img 0005
ima 0005
imz 0005
@ -126,32 +135,55 @@ skn 0017
<>end
<>files_associations
asm /rd/1/tinypad
inc /rd/1/tinypad
txt /rd/1/tinypad
ini /rd/1/tinypad
log /rd/1/tinypad
dat /rd/1/tinypad
inf /rd/1/tinypad
bat /rd/1/tinypad
jpg /rd/1/jpegview
jpeg /rd/1/jpegview
jpe /rd/1/jpegview
gif /rd/1/gifview
wav /rd/1/ac97snd
mp3 /rd/1/ac97snd
mid /rd/1/midamp
bmp /rd/1/mv
png /rd/1/@rcher
rtf /rd/1/rtfread
3ds /rd/1/3d/view3ds
lif /rd/1/demos/life2
skn /rd/1/desktop
avi /rd/1/kvid.kex
asm /sys/tinypad
inc /sys/tinypad
txt /sys/tinypad
ini /sys/tinypad
log /sys/tinypad
dat /sys/tinypad
inf /sys/tinypad
bat /sys/tinypad
jpg /sys/media/kiv
jpeg /sys/media/kiv
jpe /sys/media/kiv
gif /sys/media/kiv
wav /sys/media/ac97snd
mp3 /sys/media/ac97snd
xm /sys/media/ac97snd
mid /sys/media/midamp
bmp /sys/media/kiv
png /sys/media/kiv
ico /sys/media/kiv
cur /sys/media/kiv
pcx /sys/media/kiv
rtf /sys/rtfread
3ds /sys/3d/view3ds
lif /sys/demos/life2
skn /sys/desktop
avi /hd0/1/fplay.kex
mpg /hd0/1/fplay.kex
mov /hd0/1/fplay.kex
flv /hd0/1/fplay.kex
wmv /hd0/1/fplay.kex
vob /hd0/1/fplay.kex
mkv /hd0/1/fplay.kex
mp4 /hd0/1/fplay.kex
mpeg /hd0/1/fplay.kex
3gp /hd0/1/fplay.kex
m3u /sys/media/listplay
lap /sys/media/listplay
asf /sys/media/listplay
cvs /sys/graph
obj /sys/develop/cObj
nes /sys/fceu
sna /sys/e80
htm /sys/HTMLv
html /sys/HTMLv
kla /sys/games/klavisha
<>end
<>files_association1
bmp /rd/1/animage
bmp /sys/media/animage
<>end
end

View File

@ -1,269 +0,0 @@
; new application structure
macro meos_app_start
{
use32
org 0x0
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
dd 0x0
}
MEOS_APP_START fix meos_app_start
macro code
{
__start:
}
CODE fix code
macro data
{
__data:
}
DATA fix data
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
macro mov arg1,arg2
{
if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0'))
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
dw ? ; +52 - reserved
.client_left dd ? ; +54
.client_top dd ? ; +58
.client_width dd ? ; +62
.client_height dd ? ; +66
.wnd_state db ? ; +70
rb (1024-71)
}
;struct process_information
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
;struct system_colors
; constants
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b

View File

@ -1,4 +1,4 @@
header db 'KFM - Kolibri File Manager v0.47b',0
header_text db 'KFM - Kolibri File Manager v0.47b',0
;---------------------------------------------------------------------
fbutton_name:
.f1 db '1 Help',0