Compare commits

..
Author SHA1 Message Date
IgorA efddb79976 resolve menu conflict
Test PR / Build (en_US) (pull_request) Successful in 1m58s
Test PR / Build (ru_RU) (pull_request) Successful in 3m34s
Test PR / Build (es_ES) (pull_request) Successful in 4m8s
removed unused functions from debug.inc during compilation
2026-10-05 15:29:18 +03:00
13 changed files with 315 additions and 503 deletions

No files matched your search

+1 -1
View File
@@ -353,7 +353,7 @@ if build_type == "ru_RU" then tup.append_table(extra_files, {
{"Docs/Hot_Keys.txt", build_type .. "/docs/Hot_Keys.txt"},
{"Docs/Install.txt", build_type .. "/docs/Install.txt"},
{"Docs/Credits.txt", build_type .. "/docs/Credits.txt"},
{"Docs/SysFuncs.txt", "../kernel/trunk/docs/sysfuncs.txt"},
{"Docs/SysFuncs.txt", VAR_PROGS .. "/system/docpack/SysFuncs.txt"},
{"HD_Load/9x2klbr/", SRC_PROGS .. "/hd_load/9x2klbr/readme.txt"},
{"HD_Load/mtldr/install.txt", SRC_PROGS .. "/hd_load/mtldr/install_eng.txt"},
{"HD_Load/USB_Boot/readme.txt", SRC_PROGS .. "/hd_load/usb_boot/readme_eng.txt"},
+4 -4
View File
@@ -20,13 +20,13 @@
<a href="hardware_support.htm">Поддержка оборудования</a>
<strong>Разработка</strong>
<a href="/sys/docpack|s">Справочник по системным функциям Колибри</a>
<a href="/sys/docpack|d">Использование отладчика</a>
<a href="/sys/docpack|d">Справочник по системным функциям Колибри</a>
<a href="/sys/docpack|c">Использование отладчика</a>
<a href="/kolibrios/develop/fasm/fasm.txt">Руководство FASM</a>
<strong>Использование библиотек</strong>
<a href="/sys/docpack|i">Ini</a>
<a href="/sys/docpack|o">Диалог открытия файла OpenDial</a>
<a href="/sys/docpack|g">Ini</a>
<a href="/sys/docpack|h">Диалог открытия файла OpenDial</a>
<strong>Смотрите также</strong>
Вики проекта <a href="http://wiki.kolibrios.org/">wiki.kolibrios.org</a>
+7 -2
View File
@@ -31,6 +31,7 @@ macro debug_print_dec arg
dpd fix debug_print_dec
;---------------------------------
if used debug_outdec
debug_outdec: ;(eax - num, edi-str)
push 10 ;2
pop ecx ;1
@@ -59,7 +60,9 @@ debug_outchar: ; al - char
popad
popf
ret
end if
if used debug_outstr
debug_outstr:
mov eax,63
mov ebx,1
@@ -72,7 +75,7 @@ debug_outstr:
jmp @b
@@:
ret
end if
macro newline
{
@@ -112,6 +115,7 @@ macro debug_print_hex arg
}
dph fix debug_print_hex
if used debug_outhex
debug_outhex:
; eax - number
mov edx, 8
@@ -130,4 +134,5 @@ debug_outhex:
ret
__hexdigits:
db '0123456789ABCDEF'
db '0123456789ABCDEF'
end if
+12 -3
View File
@@ -104,8 +104,12 @@ START:
load_libraries l_libs_start,end_l_libs
cmp eax,-1
jz close
cmp [lib1.status_lib],0
jnz close
cmp [lib2.status_lib],0
jnz close
cmp [lib4.status_lib],0
jnz close
mcall SF_SET_EVENTS_MASK,0x80000067 ; 1100111b
;---------------------------------------------------------
@@ -222,9 +226,14 @@ include 'menu.inc'
;-----------------------------------------------------------
;------------variables and data of program------------------
;-----------------------------------------------------------
name_of_program db 'ANIMAGE graphics editor v1.54',0
mouse_pos_x db 'X='
mouse_pos_y db 'Y='
new_text1 db 'Picture size X'
new_text2 db 'Picture size Y'
ok_text db 'OK'
include 'lib_data.inc'
include 'panel_data.inc'
include 'brushes.inc'
include 'spray.inc'
include 'width_lines.inc'
@@ -3,8 +3,23 @@
;---------------------------------------------
align 4
mouse:
cmp [lib3.status_lib],0 ; test load library
jnz .m_end
cld
stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
mov eax,[main_menu]
cmp dword[eax+16],-1
je @f
mov [m_lost],1
jmp still
@@:
cmp [m_lost],0
je .m_end
dec [m_lost]
jmp still
.m_end:
or ecx,-1
mcall SF_THREAD_INFO,procinfo
+19 -24
View File
@@ -1,15 +1,13 @@
macro square_width_put
{
local .no_put_to_screen
local .next_color_put
local .vertical_width_put
local .horizontal_width_put
align 4
square_width_put:
mov ebx,[ReserveArray]
mov eax,[ebx]
test eax,eax
jz .no_put_to_screen
mov ecx,[ebx]
cmp ecx,[Picture_SizeX]
jg .no_put_to_screen ;if ecx > screen size return
add ebx,4
xor ebp,ebp
@@ -48,13 +46,10 @@ local .horizontal_width_put
jnz .next_color_put
.no_put_to_screen:
}
ret
macro square_width_save
{
local .next_color_save
local .vertical_width_save
local .horizontal_width_save
align 4
square_width_save:
mov ebx,[ReserveArray]
mov [ebx],eax
mov ecx,eax
@@ -93,7 +88,7 @@ local .horizontal_width_save
add ebx,4
dec ecx
jnz .next_color_save
}
ret
macro draw_calc_pixels brush
{
@@ -680,7 +675,7 @@ TakeButtonInstruments:
no_new_line_xy:
;put saved pixels
square_width_put
call square_width_put
;calculate line
mov ebx,[ReserveArray]
@@ -712,7 +707,7 @@ TakeButtonInstruments:
call calculate_line
;save color pixels in ReserveArray
square_width_save
call square_width_save
;draw calculated pixels on work arrea
draw_calc_pixels width_pixels
@@ -746,7 +741,7 @@ TakeButtonInstruments:
no_new_rectangle_xy:
;put saved pixels
square_width_put
call square_width_put
;calculate line
mov ebx,[ReserveArray]
@@ -778,7 +773,7 @@ TakeButtonInstruments:
call calculate_rectangle
;save color pixels in ReserveArray
square_width_save
call square_width_save
;draw calculated pixels on work arrea
draw_calc_pixels width_pixels_rectangle
@@ -812,7 +807,7 @@ TakeButtonInstruments:
no_new_circle_xy:
;put saved pixels
square_width_put
call square_width_put
mov esi,[ScreenX]
mov edi,[ScreenY]
@@ -931,7 +926,7 @@ TakeButtonInstruments:
call calculate_circle
;save color pixels in ReserveArray
square_width_save
call square_width_save
;draw calculated pixels on work arrea
draw_calc_pixels width_pixels
@@ -1311,7 +1306,7 @@ end if
no_new_konture_xy:
;put saved pixels
square_width_put
call square_width_put
;calculate line
mov ebx,[ReserveArray]
@@ -1343,7 +1338,7 @@ end if
call calculate_line
;save color pixels in ReserveArray
square_width_save
call square_width_save
;draw calculated pixels on work arrea
draw_calc_pixels width_pixels
@@ -1384,7 +1379,7 @@ end if
no_new_ellips_xy:
;put saved pixels
square_width_put
call square_width_put
mov esi,[ScreenX]
@@ -1495,7 +1490,7 @@ end if
call calculate_ellips
;save color pixels in ReserveArray
square_width_save
call square_width_save
;draw calculated pixels on work arrea
draw_calc_pixels width_pixels
+8
View File
@@ -15,6 +15,8 @@ no_set:
}
init_main_menu:
cmp [lib3.status_lib],0 ; test load library
jnz @f
stdcall [kmenu_init], syscolors
stdcall [ksubmenu_new]
@@ -110,10 +112,14 @@ init_main_menu:
; add 'Reflection' menu to main
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_Filters, [main_menu_filters]
stdcall [ksubmenu_add], [main_menu], eax
@@:
ret
put_main_menu:
cmp [lib3.status_lib],0 ; test load library
jnz @f
stdcall [kmainmenu_draw], [main_menu]
@@:
ret
button_handler_main_menu:
@@ -145,11 +151,13 @@ button_handler_main_menu:
.end_handler:
ret
align 4
main_menu dd 0
main_menu_file dd 0
main_menu_edit dd 0
main_menu_instr dd 0
main_menu_filters dd 0
m_lost db 0
sz_main_menu_File db 'File', 0
sz_main_menu_File_New db 'New', 0
-9
View File
@@ -1,9 +0,0 @@
;**********************************************************
;------------------TEXT DATA-------------------------------
;**********************************************************
name_of_program db 'ANIMAGE graphics editor v1.53',0
mouse_pos_x db 'X='
mouse_pos_y db 'Y='
new_text1 db 'PICTURE SIZE X'
new_text2 db 'PICTURE SIZE Y'
ok_text db 'OK'
+17 -4
View File
@@ -1,8 +1,21 @@
if tup.getconfig("NO_FASM") ~= "" then return end
if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("BUILD_TYPE") == "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
lang = (tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")
deps = (lang == "ru_RU") and tup.rule("../../../kernel/trunk/docs/sysfuncr.txt", "iconv -f utf-8 -t cp866 %f > %o", "SysFuncr.txt") or {}
tup.rule({"docpack.asm", extra_inputs = deps}, FASM .. " -dlang=" .. lang .. " %f %o " .. tup.getconfig("KPACK_CMD"), "docpack")
deps = tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
DOCDIR = "../../../data/" .. tup.getconfig("BUILD_TYPE") .. "/docs/"
if tup.getconfig("TUP_PLATFORM") == "win32"
then env_prefix = "set DOCDIR=$(DOCDIR)&&"; cp_cmd = "copy %f %o"
else env_prefix = "DOCDIR=$(DOCDIR) "; cp_cmd = "cp %f %o"
end
if tup.getconfig("LANG") == "ru_RU"
then tup.append_table(deps,
tup.rule("../../../kernel/trunk/docs/sysfuncr.txt", "iconv -f utf-8 -t cp866 %f > %o", "SysFuncr.txt"))
else tup.append_table(deps,
tup.rule("../../../kernel/trunk/docs/sysfuncs.txt", cp_cmd, "SysFuncs.txt"))
end
tup.append_table(deps,
tup.rule("../../../kernel/trunk/docs/stack.txt", cp_cmd, "Stack.txt")
)
tup.rule({"docpack.asm", extra_inputs = deps}, env_prefix .. FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "docpack")
+6
View File
@@ -0,0 +1,6 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@fasm -m 32768 docpack.asm docpack
@erase lang.inc
@kpack docpack
@pause
+6
View File
@@ -0,0 +1,6 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@fasm -m 32768 docpack.asm docpack
@erase lang.inc
@kpack docpack
@pause
+203 -456
View File
@@ -1,479 +1,226 @@
; SPDX-License-Identifier: NOASSERTION
;
; DocPack - KolibriOS documentation
; Copyright (C) 2006-2026 KolibriOS team
;---------------------------------------------------------------------
;
; Authors: Ivushkin Andrey aka Willow, Burer
; DOCPAK FOR KOLIBRI v1.2
; Written in pure assembly by Ivushkin Andrey aka Willow
;
; DOCPACK window with the documents and the online documentation
; DOCPACK x open the document or the link of the hotkey x
;---------------------------------------------------------------------
; ====================================================================
FILE_COUNT=0
DEF_FILE equ 'f'
include "../../macros.inc"
include "../../KOSfuncs.inc"
include "../../encoding.inc"
macro embed_docdir_file fn
{
forward
local label,label2,label3
dd label2-label
dd label-label3
label3:
db fn
label:
file '%DOCDIR%' # fn
label2:
FILE_COUNT=FILE_COUNT+1
}
macro embed_local_file fn
{
forward
local label,label2,label3
dd label2-label
dd label-label3
label3:
db fn
label:
file fn
label2:
FILE_COUNT=FILE_COUNT+1
}
format meos 01
entry START
stack 512
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd start ; start of code
dd I_END ; size of image
dd I_END+0x400 ; memory for app
dd I_END+0x400 ; esp
dd my_param , 0x0 ; I_Param , I_Icon
include '../../macros.inc'
include 'lang.inc' ; Language support for locales: ru_RU, en_US.
; ====================================================================
start:
cmp [my_param],0
je red
cmp [my_param],'a'
jb .par_a
cmp [my_param],'z'
jbe .ok2
.par_a:
mov [my_param],DEF_FILE
.ok2:
movzx ecx,[my_param]
mov [my_param],'*'
.open:
sub ecx,'a'-1
mov edx,embedded
xor esi,esi
.list:
lea edx,[edx+esi+8]
mov esi,[edx-8]
add edx,[edx-4]
test esi,esi
jz .close
loop .list
push edx
; convert number in esi to decimal representation
mov ecx, 10
push -'0'
mov eax, esi
@@:
xor edx, edx
div ecx
push edx
test eax, eax
jnz @b
mov edi, fsize
@@:
pop eax
add al, '0'
stosb
jnz @b
mcall 70,fileinfo
mov ecx,eax
mcall 5,20
pop edx
mcall 60,2
cmp [my_param],'*'
jne still
.close:
mcall -1
START:
; "DOCPACK x" opens the item of the hotkey x and exits, any letter case
GetCommandLine eax
mov al, [eax]
or al, 'a' - 'A'
red:
mov [my_param],'a'
mov edi, letters
mov ecx, ITEMS
repne scasb
jne .window
mcall 48, 3, sc, sizeof.system_colors
sub edi, letters + 1
mov ecx, edi
call open
jmp exit
mcall 12,1
; no item: the window, its keys come as scancodes
.window:
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1
jmp redraw
BTN_H equ 21
; ====================================================================
mov edx,[sc.work]
or edx,0x34000000
mcall 0, <220,141>, <30,FILECOUNT*(BTN_H+3)+37>, , ,title
mov ecx,FILECOUNT
mov ebx,23 shl 16+100
mov esi,[sc.work_button]
mov edi,5 shl 16+BTN_H
mov edx,10
mov eax,8
.btnlp:
push ecx
mcall ,,edi
add edi,(BTN_H+3) shl 16
inc edx
pop ecx
loop .btnlp
mov ecx,FILECOUNT
mov edx,embedded
xor edi,edi
mov ebx,30 shl 16+8
mov eax,4
.list:
lea edx,[edx+edi+8]
mov edi,[edx-8]
pusha
sub ebx,20 shl 16
mov ecx, [sc.work_text]
or ecx, 0x30000000
mcall ,,,my_param,1
inc [my_param]
popa
push ecx
mov esi, [edx-4]
sub esi, 4 ;remove .txt extension
mov ecx, [sc.work_button_text]
or ecx, 0x30000000
mcall
pop ecx
add esi, 4
add edx, esi
add ebx,(BTN_H+3)
loop .list
mcall 12,2
still:
mcall SF_WAIT_EVENT
cmp al, EV_REDRAW
je redraw
cmp al, EV_KEY
je key
cmp al, EV_BUTTON
je button
jmp still
; ====================================================================
key:
mcall SF_GET_KEY
cmp ah, KEY_ESC
je exit
; the item of the hotkey, if it is one
mov al, ah
mov edi, scancodes
mov ecx, ITEMS
repne scasb
jne still
sub edi, scancodes + 1
mov ecx, edi
call open
jmp still
; ====================================================================
button:
mcall SF_GET_BUTTON
cmp ah, 1
je exit
; the item of the button
movzx ecx, ah
sub ecx, ITEM_ID
cmp ecx, ITEMS
jae still
call open
jmp still
exit:
mcall SF_TERMINATE_PROCESS
; ====================================================================
; ecx = number of the item: the documents, then the links
open:
cmp ecx, FILECOUNT
jae .link
; find the document: each one is its size, then its text
mov edx, embedded
jecxz .found
.next:
add edx, [edx]
add edx, 4
loop .next
.found:
mov esi, [edx]
add edx, 4
mcall SF_FILE, cedit_run
test eax, eax
js .no_cedit
; then the text by IPC, once CEdit has set its IPC area
mov ecx, eax
mov edi, SEND_TRIES
.send:
mcall SF_SLEEP, SEND_DELAY
mcall SF_IPC, SSF_SEND_MESSAGE
test eax, eax
jz .done
; 1: no IPC area yet, 2: it is locked
cmp eax, 2
ja .done
dec edi
jnz .send
ret
; a link: WebView with its URL
.link:
mov eax, [urls + ecx*4 - FILECOUNT*4]
mov [webview_run.url], eax
mcall SF_FILE, webview_run
test eax, eax
jns .done
mov [notify_run.text], notify_webview
jmp .notify
.no_cedit:
mov [notify_run.text], notify_cedit
.notify:
mcall SF_FILE, notify_run
.done:
ret
; ====================================================================
redraw:
mcall SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
mcall SF_REDRAW, SSF_BEGIN_DRAW
; the window in the centre of the screen
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
mov esi, eax
add esi, WINDOW_H
mcall SF_GET_SCREEN_SIZE
movzx ecx, ax
sub ecx, esi
shr ecx, 1
shl ecx, 16
add ecx, esi
shr eax, 16
sub eax, WINDOW_W
shr eax, 1
shl eax, 16
mov ebx, eax
add ebx, WINDOW_W
mov edx, [sc.work]
or edx, WINDOW_STYLE
mcall SF_CREATE_WINDOW, , , , 0, title
; the frames of the groups with their titles
xor ebp, ebp
.group:
mov ebx, [boxes + ebp*8]
mov ecx, [boxes + ebp*8 + 4]
call group_box
inc ebp
cmp ebp, GROUPS
jb .group
; the buttons of the items with their labels
xor ebp, ebp
.button:
movzx ebx, [place + ebp*4]
movzx edi, [place + ebp*4 + 2]
shl ebx, 16
add ebx, BTN_W - 1
mov ecx, edi
shl ecx, 16
add ecx, BTN_H - 1
mov edx, ebp
add edx, ITEM_ID
mcall SF_DEFINE_BUTTON, , , , [sc.work_light]
and ebx, 0xFFFF0000
add ebx, (GAP shl 16) + TEXT_DY
add ebx, edi
mov ecx, ebp
mov edx, labels
call nth_string
mov ecx, [sc.work_text]
or ecx, FONT
mcall SF_DRAW_TEXT
inc ebp
cmp ebp, ITEMS
jb .button
mcall SF_REDRAW, SSF_END_DRAW
jmp still
; ====================================================================
; group box: a frame, the title over its top line
; ebp = number of the title, ebx = x shl 16 + width, ecx = y shl 16 + height
group_box:
mcall SF_DRAW_RECT, , , [sc.work_graph]
add ebx, (1 shl 16) - 2
add ecx, (1 shl 16) - 2
mcall SF_DRAW_RECT, , , [sc.work]
; a space, then the letters start where the buttons do
shr ecx, 16
sub ecx, 1 + TITLE_DY
and ebx, 0xFFFF0000
add ebx, (GAP - CHAR_W - 1) shl 16
add ebx, ecx
mov ecx, ebp
mov edx, groups
call nth_string
mov ecx, [sc.work_text]
or ecx, FONT + FILL
mcall SF_DRAW_TEXT, , , , , [sc.work]
ret
; edx = string number ecx of the zero separated list at edx
nth_string:
jecxz .done
.next:
inc edx
cmp byte [edx - 1], 0
jnz .next
loop .next
.done:
ret
; ====================================================================
; font: 8x16, the capitals are its rows 2..11
CHAR_W = 8
CAPS_Y = 2
CAPS_H = 10
; layout
GAP = 12
BTN_H = 24
BTN_W = LABEL_CHARS*CHAR_W + GAP*2
ROW = BTN_H + GAP
ROWS = 5
TEXT_DY = (BTN_H - CAPS_H)/2 - CAPS_Y ; the capitals centred in a button
; the frame of a group crosses the capitals of its title
TITLE_DY = CAPS_Y + CAPS_H/2
TITLE_ABOVE = TITLE_DY - CAPS_Y
TITLE_BELOW = CAPS_Y + CAPS_H - TITLE_DY
; two groups of the documents, GAP from the top to the capitals of the titles
GROUP_Y = GAP + TITLE_ABOVE
GROUP_W = 1 + GAP + BTN_W + GAP + 1
GROUP_H = TITLE_BELOW + GAP + ROWS*ROW + 1
COL1 = GAP + 1 + GAP ; x of the buttons
COL2 = COL1 + GROUP_W + GAP
BTN_Y = GROUP_Y + TITLE_BELOW + GAP ; y of the first row
; the group of the links below them, full width
LINKS_Y = GROUP_Y + GROUP_H + GAP + TITLE_ABOVE
LINKS_H = TITLE_BELOW + GAP + BTN_H + GAP + 1
LINK_Y = LINKS_Y + TITLE_BELOW + GAP
; window
CLIENT_W = GAP + GROUP_W + GAP + GROUP_W + GAP
CLIENT_H = LINKS_Y + LINKS_H + GAP
WINDOW_W = CLIENT_W + 9 ; the borders of a skinned window
WINDOW_H = CLIENT_H + 4 ; and the skin height
WINDOW_STYLE = 0x34000000 ; skinned, fixed size, caption, client coordinates
; text
FONT = 0xB0000000 ; zero terminated, 8x16 UTF-8
FILL = 0x40000000 ; draw the background of the text
; items: the documents, then the links
GROUPS = 3
LINKS = 2
ITEMS = FILECOUNT + LINKS
ITEM_ID = 10 ; the button of the item 0
KEY_ESC = 0x01 ; scancode
; CEdit
SEND_TRIES = 20
SEND_DELAY = 10 ; CEdit waits 2 s for the text
DOC_MAX = 524288 ; the size in cedit_param
; ====================================================================
FILE_COUNT = 0
; a document: its size, then its text
macro embed_file path
{
local label, label2
dd label2 - label
label:
file path
label2:
assert label2 - label <= DOC_MAX
FILE_COUNT = FILE_COUNT + 1
}
; a document of data/<language>/docs
macro embed_doc name
{
if lang eq ru_RU
embed_file "../../../data/ru_RU/docs/" # name
else if lang eq es_ES
embed_file "../../../data/es_ES/docs/" # name
else
embed_file "../../../data/en_US/docs/" # name
end if
}
; ====================================================================
cedit_run:
dd SSF_START_APP
mcall 10
cmp eax,1
je red
cmp eax,2
jne .nokey
mcall 2
cmp ah,27 ;Esc
je start.close
cmp ah,'a'
jb still
cmp ah,'a'+FILECOUNT
jae still
jmp .cxax
.nokey:
mcall 17
cmp ah,1
je start.close
sub ah,10-'a'
.cxax:
movzx ecx,ah
jmp start.open
fileinfo:
dd 7
dd 0
dd cedit_param
dd 0, 0
db "/sys/develop/cedit", 0
dd param
dd 0 ,0
db '/sys/develop/cedit',0
webview_run:
dd SSF_START_APP
dd 0
.url dd 0
dd 0, 0
db "/sys/network/webview", 0
param db '*'
fsize:
times 10 db '0'
db 0
notify_run:
dd SSF_START_APP
dd 0
.text dd 0
dd 0, 0
db "/sys/@notify", 0
; the links
urls dd url_wiki, url_fasm
assert ($ - urls)/4 = LINKS
url_fasm db "https://flatassembler.net/docs.php?article=manual", 0
; the hotkeys of the items: on the command line and as scancodes,
; so they work in any layout and case
letters db "lhkcdsniowf"
assert $ - letters = ITEMS
scancodes db 0x26, 0x23, 0x25, 0x2E, 0x20, 0x1F, 0x31, 0x17, 0x18, 0x11, 0x21
assert $ - scancodes = ITEMS
; x shl 16 + width, y shl 16 + height of the groups
boxes dd (GAP shl 16) + GROUP_W, (GROUP_Y shl 16) + GROUP_H
dd ((GAP + GROUP_W + GAP) shl 16) + GROUP_W, (GROUP_Y shl 16) + GROUP_H
dd (GAP shl 16) + CLIENT_W - GAP*2, (LINKS_Y shl 16) + LINKS_H
assert ($ - boxes)/8 = GROUPS
; x, y of the buttons of the items
place dw COL1, BTN_Y, COL1, BTN_Y + ROW, COL1, BTN_Y + 2*ROW, COL1, BTN_Y + 3*ROW
dw COL2, BTN_Y, COL2, BTN_Y + ROW, COL2, BTN_Y + 2*ROW, COL2, BTN_Y + 3*ROW
dw COL2, BTN_Y + 4*ROW
dw COL1, LINK_Y, COL2, LINK_Y
assert ($ - place)/4 = ITEMS
; CEdit takes the size of its IPC buffer after "*", the text comes with
; its own size, so one size for all the documents
cedit_param db "*524288", 0
; ====================================================================
; the labels in the order of the embedded files, then the ones of the links
if lang eq ru_RU
LABEL_CHARS = 21 ; the longest label with its "X | "
title db 3, "Документация KolibriOS", 0
groups db " Общее ", 0, " Разработка ", 0, " Онлайн-документация ", 0
url_wiki db "https://wiki.kolibrios.org/wiki/For_developers/ru", 0
notify_cedit cp866 "'DocPack\nНе удалось запустить /sys/develop/cedit' -tE", 0
notify_webview cp866 "'DocPack\nНе удалось запустить /sys/network/webview' -tE", 0
labels db "L | Лицензия", 0, "H | Горячие клавиши", 0, "K | Клавиши KFar", 0, "C | Благодарности", 0
db "D | Отладчик", 0, "S | Системные функции", 0, "N | Сетевые функции", 0
db "I | Файлы INI", 0, "O | Диалог открытия", 0
db "W | Вики KolibriOS", 0, "F | Руководство FASM", 0
else if lang eq es_ES
LABEL_CHARS = 25
title db 3, "Documentación de KolibriOS", 0
groups db " General ", 0, " Desarrollo ", 0, " Documentación en línea ", 0
url_wiki db "https://wiki.kolibrios.org/wiki/For_developers/en", 0
notify_cedit db "'DocPack\nNo se pudo iniciar /sys/develop/cedit' -tE", 0
notify_webview db "'DocPack\nNo se pudo iniciar /sys/network/webview' -tE", 0
labels db "L | Licencia", 0, "H | Atajos de teclado", 0, "K | Teclas de KFar", 0, "C | Créditos", 0
db "D | Depurador", 0, "S | Funciones del sistema", 0, "N | Funciones de red", 0
db "I | Archivos INI", 0, "O | Diálogo de apertura", 0
db "W | Wiki de KolibriOS", 0, "F | Manual de FASM", 0
else
LABEL_CHARS = 21
title db 3, "KolibriOS Documentation", 0
groups db " General ", 0, " Development ", 0, " Online documentation ", 0
url_wiki db "https://wiki.kolibrios.org/wiki/For_developers/en", 0
notify_cedit db "'DocPack\nCould not start /sys/develop/cedit' -tE", 0
notify_webview db "'DocPack\nCould not start /sys/network/webview' -tE", 0
labels db "L | License", 0, "H | Hotkeys", 0, "K | KFar keys", 0, "C | Credits", 0
db "D | Debugger", 0, "S | System functions", 0, "N | Network functions", 0
db "I | INI files", 0, "O | Open dialog", 0
db "W | KolibriOS Wiki", 0, "F | FASM manual", 0
end if
; ====================================================================
; the documents with their hotkeys
embedded:
embed_doc "Copying.txt" ; L
embed_doc "Hot_Keys.txt" ; H
embed_doc "KFAR_Keys.txt" ; K
embed_doc "Credits.txt" ; C
embed_doc "Mtdbg.txt" ; D
if lang eq ru_RU
embed_file "SysFuncr.txt" ; S
else
embed_file "../../../kernel/trunk/docs/sysfuncs.txt" ; S
end if
embed_file "../../../kernel/trunk/docs/stack.txt" ; N
embed_doc "INI.txt" ; I
embed_doc "OpenDial.txt" ; O
; Please use only filenames w/o path!
; -- Start of embedding area ------
embed_docdir_file 'Copying.txt' ;a
embed_docdir_file 'Hot_Keys.txt' ;b
embed_docdir_file 'Mtdbg.txt' ;c
if lang eq ru_RU
embed_local_file 'SysFuncr.txt' ;d
else ; Default to en_US
embed_local_file 'SysFuncs.txt' ;d
end if
embed_local_file 'Stack.txt' ;e
embed_docdir_file 'KFAR_Keys.txt' ;f
embed_docdir_file 'INI.txt' ;g
embed_docdir_file 'OpenDial.txt' ;h
embed_docdir_file 'Credits.txt' ;i
; -- End of embedding area -------
dd 0
FILECOUNT = FILE_COUNT
; ====================================================================
if ~ FILECOUNT>0
error 'No embedded files'
end if
sc system_colors
my_param db 0
rb 256
I_END:
title db 'Doc Pack',0
sc system_colors
+17
View File
@@ -0,0 +1,17 @@
#!gmake
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=docpack
SOURCE=${FILE}.asm
OUT=${FILE}.bin
ru:
echo "lang fix ru_RU" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
clean:
rm -f ${LANG} ${OUT}