@RESHARE: add into IMG, and to autorun, fix memory leak

QUARK: move to ISO
SYSMON: use @reshare
Various small updates and fixes

git-svn-id: svn://kolibrios.org@9428 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2021-12-16 19:08:12 +00:00
parent 3ba48914da
commit af05642a48
9 changed files with 61 additions and 54 deletions

View File

@ -651,13 +651,13 @@ end -- tup.getconfig('NO_JWASM') ~= 'full'
-- Programs that require C-- to compile. -- Programs that require C-- to compile.
if tup.getconfig('NO_CMM') ~= 'full' then if tup.getconfig('NO_CMM') ~= 'full' then
tup.append_table(img_files, { tup.append_table(img_files, {
{"@RESHARE", PROGS .. "/cmm/misc/reshare.com"},
{"APP_PLUS", PROGS .. "/cmm/app_plus/app_plus.com"}, {"APP_PLUS", PROGS .. "/cmm/app_plus/app_plus.com"},
{"EASYSHOT", PROGS .. "/cmm/misc/easyshot.com"}, {"EASYSHOT", PROGS .. "/cmm/misc/easyshot.com"},
{"MOUSECFG", PROGS .. "/cmm/mousecfg/mousecfg.com"}, {"MOUSECFG", PROGS .. "/cmm/mousecfg/mousecfg.com"},
{"BARSCFG", PROGS .. "/cmm/barscfg/barscfg.com"}, {"BARSCFG", PROGS .. "/cmm/barscfg/barscfg.com"},
{"SYSPANEL", PROGS .. "/cmm/misc/software_widget.com"}, {"SYSPANEL", PROGS .. "/cmm/misc/software_widget.com"},
{"SYSMON", PROGS .. "/cmm/sysmon/sysmon.com"}, {"SYSMON", PROGS .. "/cmm/sysmon/sysmon.com"},
{"QUARK", PROGS .. "/cmm/quark/quark.com"},
{"TMPDISK", PROGS .. "/cmm/tmpdisk/tmpdisk.com"}, {"TMPDISK", PROGS .. "/cmm/tmpdisk/tmpdisk.com"},
{"DEVELOP/CLIPVIEW", PROGS .. "/cmm/clipview/clipview.com"}, {"DEVELOP/CLIPVIEW", PROGS .. "/cmm/clipview/clipview.com"},
{"DEVELOP/MENU", PROGS .. "/cmm/menu/menu.com"}, {"DEVELOP/MENU", PROGS .. "/cmm/menu/menu.com"},
@ -686,6 +686,7 @@ tup.append_table(extra_files, {
{"kolibrios/utils/dicty.kex", PROGS .. "/cmm/dicty/dicty.com"}, {"kolibrios/utils/dicty.kex", PROGS .. "/cmm/dicty/dicty.com"},
{"kolibrios/utils/notes", PROGS .. "/cmm/notes/notes.com"}, {"kolibrios/utils/notes", PROGS .. "/cmm/notes/notes.com"},
{"kolibrios/utils/osupdate", PROGS .. "/cmm/misc/osupdate.com"}, {"kolibrios/utils/osupdate", PROGS .. "/cmm/misc/osupdate.com"},
{"kolibrios/utils/quark", PROGS .. "/cmm/quark/quark.com"},
}) })
end -- tup.getconfig('NO_CMM') ~= 'full' end -- tup.getconfig('NO_CMM') ~= 'full'

View File

@ -3,20 +3,21 @@
# Delay time means how much the system should wait, before running the next line. It is measured in 1/100 seconds. # Delay time means how much the system should wait, before running the next line. It is measured in 1/100 seconds.
# If delay is negative, wait for termination of the spawned process. Otherwise, simply wait # If delay is negative, wait for termination of the spawned process. Otherwise, simply wait
# #
#/SYS/CROPFLAT "XS800 YS480" 1 # set limits of screen #/SYS/CROPFLAT "XS800 YS480" 1 # set limits of screen
#/SYS/LOADDRV COMMOUSE 1 # serial mouse driver #/SYS/LOADDRV COMMOUSE 1 # serial mouse driver
#/SYS/DEVELOP/BOARD "" 0 # Load DEBUG board #/SYS/DEVELOP/BOARD "" 0 # Load DEBUG board
/SYS/SETUP BOOT 0 # Load device settings /SYS/SETUP BOOT 0 # Load device settings
/SYS/LOADDRV RDC 0 # videodriver for RDC M2010/M2012 /SYS/LOADDRV RDC 0 # videodriver for RDC M2010/M2012
/SYS/@TASKBAR "" 0 # Start taskbar /SYS/@TASKBAR "" 0 # Start taskbar
/SYS/ESKIN "" 0 # Set style /SYS/ESKIN "" 0 # Set style
/SYS/@ICON "" 0 # Multithread icon /SYS/@ICON "" 0 # Multithread desktop icons
/SYS/NETWORK/NETCFG A 0 # /SYS/TMPDISK A0 0 # Add virtual RAM disk /tmp0/1
/SYS/NETWORK/@ZEROCONF "" 0 # Network configuration /SYS/@RESHARE "" 0 # Shared resources
/SYS/@VOLUME "" 0 # Start volume daemon /SYS/@DOCKY "" 0 # Start docky
/SYS/@SS ASSM 0 # Screensaver /SYS/NETWORK/NETCFG A 0 # Init network driver
/SYS/@DOCKY "" 0 # Start docky /SYS/NETWORK/@ZEROCONF "" 0 # Network configuration
/SYS/TMPDISK A0 -1 # Add virtual RAM disk /tmp0/1 /SYS/@SS ASSM 0 # Screensaver
/SYS/SEARCHAP "" -1 # Search and mount additional system directory /SYS/@VOLUME "" 0 # Start volume daemon
/SYS/@HOTANGLES "" 0 # Start Hot Angles /SYS/SEARCHAP "" 0 # Search and mount additional system directory
/SYS/@HOTANGLES "" 0 # Start Hot Angles
### Hello, ASM World! ### ### Hello, ASM World! ###

View File

@ -1,22 +1,20 @@
[Quark]
exec=/sys/QUARK
icon=85
next=$TinyPad
[CodeEdit] [CodeEdit]
exec=/sys/develop/cedit exec=/sys/develop/cedit
icon=58 icon=58
next=$TinyPad next=$TinyPad
[TinyPad] [HexEditor]
exec=/sys/tinypad exec=/sys/develop/heed
icon=9 icon=22
next=$TextEditor
[Run] [Run]
exec=/sys/run exec=/sys/run
icon=55 icon=55
[KPack]
exec=/sys/kpack
icon=99
[FB2Read] [FB2Read]
exec=/sys/fb2read exec=/sys/fb2read
icon=44 icon=44
@ -26,16 +24,16 @@ exec=/sys/network/webview
icon=31 icon=31
next=$TinyPad next=$TinyPad
[zSea]
exec=/kolibrios/media/zsea/zsea
icon=46
next=$KIV
[KIV] [KIV]
exec=/sys/media/kiv exec=/sys/media/kiv
icon=70 icon=70
next=$Animage next=$Animage
[zSea]
exec=/kolibrios/media/zsea/zsea
icon=46
next=$KIV
[Animage] [Animage]
exec=/sys/media/animage exec=/sys/media/animage
icon=15 icon=15
@ -57,14 +55,6 @@ icon=40
exec=/sys/media/ac97snd exec=/sys/media/ac97snd
icon=64 icon=64
[HexEditor]
exec=/sys/develop/heed
icon=22
[KPack]
exec=/sys/kpack
icon=99
[Unz] [Unz]
exec=/sys/unz exec=/sys/unz
icon=89 icon=89
@ -82,6 +72,15 @@ exec=/kolibrios/utils/t_edit
icon=9 icon=9
next=$CodeEdit next=$CodeEdit
[Quark]
exec=/kolibrios/utils/quark
icon=85
next=$TinyPad
[TinyPad]
exec=/sys/tinypad
icon=9
next=$TextEditor
[Assoc] [Assoc]
/=/sys/file managers/eolite /=/sys/file managers/eolite

View File

@ -9,6 +9,7 @@ move *.com bin
cd bin cd bin
forfiles /S /M *.com /C "cmd /c rename @file @fname" forfiles /S /M *.com /C "cmd /c rename @file @fname"
rename software_widget syspanel rename software_widget syspanel
rename reshare @reshare
cd .. cd ..
del warning.txt del warning.txt

View File

@ -1,4 +1,4 @@
#define MEMSIZE 1024*50 #define MEMSIZE 1024*20
#define ENTRY_POINT #main #define ENTRY_POINT #main
#include "../lib/fs.h" #include "../lib/fs.h"
@ -25,12 +25,12 @@ void main()
icons16.load("/sys/icons16.png"); size16 = icons16.h * 18 * 4; icons16.load("/sys/icons16.png"); size16 = icons16.h * 18 * 4;
shared_i32 = memopen("ICONS32", size32, SHM_CREATE+SHM_WRITE); shared_i32 = memopen("ICONS32", size32, SHM_CREATE+SHM_WRITE);
debugval("@reshare shared_i32", shared_i32);
memmov(shared_i32, icons32.imgsrc, size32); memmov(shared_i32, icons32.imgsrc, size32);
img_destroy stdcall(icons32.image);
shared_i16 = memopen("ICONS18", size16, SHM_CREATE + SHM_WRITE); shared_i16 = memopen("ICONS18", size16, SHM_CREATE + SHM_WRITE);
memmov(shared_i16, icons16.imgsrc, size16); memmov(shared_i16, icons16.imgsrc, size16);
debugval("@reshare shared_i32", shared_i16); img_destroy stdcall(icons16.image);
shared_i16w = memopen("ICONS18W", size16, SHM_CREATE + SHM_WRITE); shared_i16w = memopen("ICONS18W", size16, SHM_CREATE + SHM_WRITE);
@ -40,10 +40,9 @@ UPDATE_ICONS18WORK:
$pop eax $pop eax
IF (sc.work != EAX) { IF (sc.work != EAX) {
icons16w.load("/sys/icons16.png"); icons16w.load("/sys/icons16.png");
//icons16w.replace_color(0xffFFFfff, sc.work);
//icons16w.replace_color(0xffCACBD6, MixColors(sc.work, 0, 200));
icons16w.replace_2colors(0xffFFFfff, sc.work, 0xffCACBD6, MixColors(sc.work, 0, 200)); icons16w.replace_2colors(0xffFFFfff, sc.work, 0xffCACBD6, MixColors(sc.work, 0, 200));
memmov(shared_i16w, icons16w.imgsrc, size16); memmov(shared_i16w, icons16w.imgsrc, size16);
img_destroy stdcall(icons16w.image);
} }
loop() IF(WaitEvent()==evDesktop) GOTO UPDATE_ICONS18WORK; loop() IF(WaitEvent()==evDesktop) GOTO UPDATE_ICONS18WORK;

View File

@ -1,5 +1,5 @@
@del /D=LANG_ENG sysmon @del sysmon
@c-- sysmon.c @c-- /D=LANG_RUS sysmon.c
@rename sysmon.com sysmon @rename sysmon.com sysmon
@del warning.txt @del warning.txt
@pause @pause

View File

@ -1,5 +1,5 @@
@del /D=LANG_RUS sysmon @del sysmon
@c-- sysmon.c @c-- /D=LANG_RUS sysmon.c
@rename sysmon.com sysmon @rename sysmon.com sysmon
@del warning.txt @del warning.txt
@pause @pause

View File

@ -1,10 +1,11 @@
/* /*
* System Monitor * System Monitor
* version 1.36 * version 1.37
* Author: Leency * Author: Leency
*/ */
#define MEMSIZE 4096*30 #define MEMSIZE 4096*30
#define NO_DLL_INIT
//===================================================// //===================================================//
// // // //
@ -16,7 +17,6 @@
#include "../lib/fs.h" #include "../lib/fs.h"
#include "../lib/list_box.h" #include "../lib/list_box.h"
#include "../lib/obj/libimg.h"
#include "../lib/obj/box_lib.h" #include "../lib/obj/box_lib.h"
#include "../lib/patterns/select_list.h" #include "../lib/patterns/select_list.h"
@ -78,6 +78,8 @@ int proc_list[256];
checkbox show_system = { T_SHOW_SYSTEM, false }; checkbox show_system = { T_SHOW_SYSTEM, false };
char* shared_icons_16;
sensor cpu; sensor cpu;
sensor ram; sensor ram;
sensor rd; sensor rd;
@ -95,7 +97,6 @@ int right_w;
void load_lib() void load_lib()
{ {
load_dll(libimg, #libimg_init,1);
load_dll(boxlib, #box_lib_init,0); load_dll(boxlib, #box_lib_init,0);
} }
@ -103,6 +104,7 @@ void main()
{ {
int btn; int btn;
load_lib(); load_lib();
shared_icons_16 = memopen("ICONS18W", NULL, SHM_READ);
@SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); @SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
loop() switch(@WaitEventTimeout(50)) loop() switch(@WaitEventTimeout(50))
{ {
@ -295,8 +297,12 @@ void MonitorTmp()
void DrawIconWithText(dword _x, _y, _icon, _title) void DrawIconWithText(dword _x, _y, _icon, _title)
{ {
int size = DrawIcon16(_x, _y, sc.work, _icon); if (shared_icons_16) {
WriteTextWithBg(_x+ICONGAP, _y + size - 16, 0xD0, sc.work_text, _title, sc.work); PutPaletteImage(18*18*4*_icon + shared_icons_16, 18, 18,_x, _y, 32, 0);
} else {
_x -= ICONGAP;
}
WriteTextWithBg(_x+ICONGAP, _y + 2, 0xD0, sc.work_text, _title, sc.work);
} }
dword GetCpuLoad(dword max_h) dword GetCpuLoad(dword max_h)

View File

@ -1,4 +1,4 @@
#define MEMSIZE 4096*40 #define MEMSIZE 1024*50
#include "../lib/gui.h" #include "../lib/gui.h"
#include "../lib/fs.h" #include "../lib/fs.h"