From aa456d953dfb23eb8b3799d0d764cf4081ec56de Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 14 May 2019 13:07:29 +0000 Subject: [PATCH] add KolibriNext installer to ISO git-svn-id: svn://kolibrios.org@7654 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 2 + data/common/KolibriNext/settings/app_plus.ini | 42 +++++++++++++++++++ data/common/KolibriNext/settings/docky.ini | 1 + data/common/KolibriNext/settings/icon.ini | 1 + data/common/settings/app_plus.ini | 4 +- data/common/settings/games.ini | 4 +- data/rus/settings/games.ini | 4 +- programs/cmm/barscfg/barscfg.c | 4 +- programs/cmm/installer/Tupfile.lua | 2 +- programs/cmm/installer/_compile_en.bat | 9 ++-- programs/cmm/installer/_compile_ru.bat | 9 ++-- programs/cmm/installer/install.c | 30 +++++++++++++ programs/cmm/installer/installer.c | 37 ---------------- programs/cmm/lib/patterns/restart_process.h | 2 +- .../cmm/software_widget/software_widget.c | 2 +- 15 files changed, 95 insertions(+), 58 deletions(-) create mode 100644 data/common/KolibriNext/settings/app_plus.ini create mode 100644 data/common/KolibriNext/settings/docky.ini create mode 100644 data/common/KolibriNext/settings/icon.ini create mode 100644 programs/cmm/installer/install.c delete mode 100644 programs/cmm/installer/installer.c diff --git a/data/Tupfile.lua b/data/Tupfile.lua index fb60bd02c5..9c19ba9df7 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -214,6 +214,7 @@ extra_files = { {"kolibrios/drivers/i915/", "common/drivers/i915/*"}, {"kolibrios/drivers/test/", "common/drivers/test/*"}, {"kolibrios/drivers/vmware/", "common/drivers/vmware/*"}, + {"kolibrios/KolibriNext/settings/*", "common/KolibriNext/settings/*"}, {"kolibrios/lib/avcodec-56.dll", "common/lib/avcodec-56.dll"}, {"kolibrios/lib/avdevice-56.dll", "common/lib/avdevice-56.dll"}, {"kolibrios/lib/avformat-56.dll", "common/lib/avformat-56.dll"}, @@ -613,6 +614,7 @@ tup.append_table(extra_files, { {"kolibrios/drivers/drvinst.kex", PROGS .. "/cmm/drvinst/drvinst.com"}, {"kolibrios/games/pig/pigex", PROGS .. "/cmm/examples/pigex.com"}, {"kolibrios/games/the_bus/the_bus", PROGS .. "/cmm/the_bus/the_bus.com"}, + {"kolibrios/KolibriNext/install.kex", PROGS .. "/cmm/installer/install.com"}, {"kolibrios/utils/appearance", PROGS .. "/cmm/appearance/appearance.com"}, {"kolibrios/utils/codeview", PROGS .. "/cmm/codeview/codeview.com"}, {"kolibrios/utils/dicty.kex", PROGS .. "/cmm/dicty/dicty.com"}, diff --git a/data/common/KolibriNext/settings/app_plus.ini b/data/common/KolibriNext/settings/app_plus.ini new file mode 100644 index 0000000000..0f570d909a --- /dev/null +++ b/data/common/KolibriNext/settings/app_plus.ini @@ -0,0 +1,42 @@ +[Config] +win_width=600 +cell_w=73 +cell_h=71 +title=KolibriOS Additional Software + +[Media] +uPDF=/k/media/updf,73 +EasyShot=easyshot,62 +MidAmp=media/midamp,74 +GrafX2=/k/grafx2/grafx2,48 +Templates=file managers/Eolite|/kolibrios/res/templates,45 + + +[3D Tools and Demos] +Info3DsPro=/k/3d/info3ds/info3ds,75 +Info3DsUser=/k/3d/info3ds/info3ds_u,75 +VoxelEditor=/k/3d/voxel_editor/voxel_editor,30 +3dsHeart=/k/3D/3dsheart,78 +Cubeline=/k/3D/cubeline,78 +M2View=/k/3D/md2view/md2view,78 +Globe=/k/3D/TEXTURES1,78 + +[Misc] +DosBox=/k/emul/dosbox/dosbox,11 +KFM=File managers/KFM,3 +fNav=File managers/fNav/fNav,93 + +TextReader=txtread,85 +CncEditor=/k/utils/cnc_editor/cnc_editor,15 +Life=/k/demos/life2,13 +Calc+=/k/utils/calcplus,4 +TinyBasic=/k/develop/TinyBasic/TinyBasic,91 +Table=table,28 +FtpClient=network/ftpc,90 +VncViewer=network/vncc,77 +Timer=demos/timer,119 +IRC=network/ircc,29 +UNZ=unz,89 +ASCII View=asciivju,118 + + diff --git a/data/common/KolibriNext/settings/docky.ini b/data/common/KolibriNext/settings/docky.ini new file mode 100644 index 0000000000..e585c81fad --- /dev/null +++ b/data/common/KolibriNext/settings/docky.ini @@ -0,0 +1 @@ +[@] location=3 fsize=0 ashow=1 [AppPlus] path=/sys/app_plus param= icon=27 $=1 [KFAR] path=/sys/file managers/kfar param= icon=16 [Pixie2] path=/sys/media/pixie param= icon=65 [IconEdit] path=/sys/media/iconedit param= icon=98 [Calc] path=/sys/calc param= icon=4 [Notes] path=/kolibrios/utils/notes param= icon=117 [Dictionary] path=/kolibrios/utils/dicty.kex param= icon=79 [FB2Read] path=/sys/fb2read param= icon=44 [Animage] path=/sys/media/animage param= icon=15 [RDSave] path=/sys/rdsave param= icon=17 $=1 [Volume] path=/sys/@volume param= icon=64 [NetStatus] path=/sys/network/netstat param= icon=33 [SysMon] path=/sys/sysmon param= icon=57 [SysPanel] path=/sys/syspanel param= icon=6 \ No newline at end of file diff --git a/data/common/KolibriNext/settings/icon.ini b/data/common/KolibriNext/settings/icon.ini new file mode 100644 index 0000000000..32e016c89a --- /dev/null +++ b/data/common/KolibriNext/settings/icon.ini @@ -0,0 +1 @@ +[rbmenu] Диспетчер процессов=/sys/cpu ;Настройка стиля=/kolibrios/utils/appearance ;Настройка цветов=/sys/skincfg ;Сплошной фон=/sys/media/palitra [01] name=FILES path=/sys/File Managers/EOLITE param= ico=7 x=4 y=21 [02] name=FPLAY path=/kolibrios/media/fplay param= ico=96 x=65 y=21 [03] name=GAMES path=/sys/allgames param= ico=35 x=125 y=21 [04] name=TINYPAD path=/sys/tinypad param= ico=9 x=4 y=96 [05] name=zSEA path=/kolibrios/media/zsea/zsea param= ico=46 x=65 y=96 [06] name=WEBVIEW path=/sys/network/webview param= ico=31 x=125 y=96 ; ========= ; RIGHT TOP ; ========= [10] name=DEBUG path=/SYS/DEVELOP/MTDBG param= ico=39 x=-204 y=21 [11] name=BOARD path=/SYS/DEVELOP/BOARD param= ico=19 x=-140 y=21 [12] name=KPACK path=/SYS/KPACK param= ico=99 x=-77 y=21 [13] name=DIFF path=/sys/develop/diff param= ico=84 x=-203 y=96 [14] name=FASM path=/SYS/DEVELOP/FASM param= ico=10 x=-141 y=96 [15] name=DOCPACK path=/sys/network/webview param=/kolibrios/res/guide/guide.htm ico=8 x=-76 y=96 [16] name=SHELL path=/SYS/SHELL param= ico=1 x=-203 y=166 [17] name=HEXEDIT path=/SYS/DEVELOP/HEED param= ico=22 x=-141 y=166 [18] name=TEDIT path=/sys/develop/t_edit param= ico=58 x=-74 y=166 \ No newline at end of file diff --git a/data/common/settings/app_plus.ini b/data/common/settings/app_plus.ini index b9fde017a4..48880a4596 100644 --- a/data/common/settings/app_plus.ini +++ b/data/common/settings/app_plus.ini @@ -1,8 +1,8 @@ [Config] -window_width=600 +title=KolibriOS Additional Software +win_width=600 cell_w=73 cell_h=71 -window_title=KolibriOS Additional Software [Media] zSea=/k/media/zsea/zsea,46 diff --git a/data/common/settings/games.ini b/data/common/settings/games.ini index bcd531675a..2d4e32a780 100644 --- a/data/common/settings/games.ini +++ b/data/common/settings/games.ini @@ -1,6 +1,6 @@ [Config] -window_width=750 -window_title=KolibriOS Game Center +title=KolibriOS Game Center +win_width=750 default_icon=35 [Casual] diff --git a/data/rus/settings/games.ini b/data/rus/settings/games.ini index 529c0edfda..cf68b6d121 100644 --- a/data/rus/settings/games.ini +++ b/data/rus/settings/games.ini @@ -1,6 +1,6 @@ [Config] -window_width=750 -window_title=Игровой центр Колибри +title=Игровой центр Колибри +win_width=750 default_icon=35 [Casual] diff --git a/programs/cmm/barscfg/barscfg.c b/programs/cmm/barscfg/barscfg.c index 7ab9373a60..8db5a6439b 100644 --- a/programs/cmm/barscfg/barscfg.c +++ b/programs/cmm/barscfg/barscfg.c @@ -251,12 +251,12 @@ void RestartProcess(byte panel_type) dword proc_name1; if (panel_type == TASKBAR) { - RestartProcessByName("@taskbar", SINGLE); + RestartProcessByName("/sys/@taskbar", SINGLE); pause(50); } else { - RestartProcessByName("@docky", SINGLE); + RestartProcessByName("/sys/@docky", SINGLE); pause(120); } GetProcessInfo(#Form, SelfInfo); diff --git a/programs/cmm/installer/Tupfile.lua b/programs/cmm/installer/Tupfile.lua index b35c46f13b..08e6f2d4af 100644 --- a/programs/cmm/installer/Tupfile.lua +++ b/programs/cmm/installer/Tupfile.lua @@ -3,4 +3,4 @@ if tup.getconfig("LANG") == "ru" then C_LANG = "LANG_RUS" else C_LANG = "LANG_ENG" -- this includes default case without config end -tup.rule("installer.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "installer.com") +tup.rule("install.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "install.com") diff --git a/programs/cmm/installer/_compile_en.bat b/programs/cmm/installer/_compile_en.bat index f0247698cd..e82d55a3ff 100644 --- a/programs/cmm/installer/_compile_en.bat +++ b/programs/cmm/installer/_compile_en.bat @@ -1,10 +1,9 @@ @del lang.h-- @echo #define LANG_ENG 1 >lang.h-- -C-- installer.c -@del installer.kex -@rename installer.com installer.kex +C-- install.c +@del install.kex +@rename install.com install.kex @pause @del lang.h-- -@del warning.txt -kpack installer.kex \ No newline at end of file +@del warning.txt \ No newline at end of file diff --git a/programs/cmm/installer/_compile_ru.bat b/programs/cmm/installer/_compile_ru.bat index c0f6da318a..9833164277 100644 --- a/programs/cmm/installer/_compile_ru.bat +++ b/programs/cmm/installer/_compile_ru.bat @@ -1,10 +1,9 @@ @del lang.h-- @echo #define LANG_RUS 1 >lang.h-- -C-- installer.c -@del installer.kex -@rename installer.com installer.kex +C-- install.c +@del install.kex +@rename install.com install.kex @pause @del lang.h-- -@del warning.txt -kpack installer.kex \ No newline at end of file +@del warning.txt \ No newline at end of file diff --git a/programs/cmm/installer/install.c b/programs/cmm/installer/install.c new file mode 100644 index 0000000000..4d7f3a8d9f --- /dev/null +++ b/programs/cmm/installer/install.c @@ -0,0 +1,30 @@ +#define MEMSIZE 4096*15 +#include "..\lib\strings.h" +#include "..\lib\mem.h" +#include "..\lib\copyf.h" + +#include "..\lib\obj\libini.h" + +#include "..\lib\patterns\restart_process.h" + +void main() +{ + //#include "..\lib\added_sysdir.c"; + //SetAdditionalSystemDirectory("kolibrios", abspath("install/kolibrios")+1); + + load_dll(libini, #lib_init,1); + ini_set_int stdcall ("/sys/settings/taskbar.ini", "Flags", "Attachment", 0); + copyf(abspath("settings"), "/sys/settings"); + + RestartProcessByName("/sys/@icon", MULTIPLE); + RestartProcessByName("/sys/@taskbar", SINGLE); + RestartProcessByName("/sys/@docky", SINGLE); + + RunProgram("/sys/media/kiv", "\\S__/kolibrios/res/Wallpapers/Free yourself.jpg"); + + ExitProcess(); +} + +void Operation_Draw_Progress(dword filename) { debug("copying: "); debugln(filename); } + +stop: \ No newline at end of file diff --git a/programs/cmm/installer/installer.c b/programs/cmm/installer/installer.c deleted file mode 100644 index 2b826230be..0000000000 --- a/programs/cmm/installer/installer.c +++ /dev/null @@ -1,37 +0,0 @@ -#define MEMSIZE 4096*15 -#include "..\lib\strings.h" -#include "..\lib\mem.h" -#include "..\lib\io.h" -#include "..\lib\copyf.h" - -#include "..\lib\patterns\restart_process.h" -//#include "..\lib\added_sysdir.c"; - -void main() -{ - //SetAdditionalSystemDirectory("kolibrios", abspath("install/kolibrios")+1); - io.run("/sys/tmpdisk", "a0"); - pause(50); - - io.del("/sys/docpack"); - - copyf(abspath("rd"), "/sys"); - copyf(abspath("kos"), "/kolibrios"); - copyf(abspath("tmp"), "/tmp0/1"); - - KillProcessByName("@icon", MULTIPLE); - KillProcessByName("@taskbar", SINGLE); - KillProcessByName("@docky", SINGLE); - - RunProgram("/sys/@icon", NULL); - RunProgram("/sys/@taskbar", NULL); - RunProgram("/sys/@docky", NULL); - - io.run("/sys/media/kiv", "\\S__/kolibrios/res/Wallpapers/deink.png"); - //notify("'KolibriNext\nInstall complete'-tO"); - ExitProcess(); -} - -void Operation_Draw_Progress(dword filename) { debug("copying: "); debugln(filename); } - -stop: \ No newline at end of file diff --git a/programs/cmm/lib/patterns/restart_process.h b/programs/cmm/lib/patterns/restart_process.h index 76720886a2..e3ff537704 100644 --- a/programs/cmm/lib/patterns/restart_process.h +++ b/programs/cmm/lib/patterns/restart_process.h @@ -38,7 +38,7 @@ enum { } :void RestartProcessByName(dword proc_name, byte multiple) { - KillProcessByName(proc_name, multiple); + KillProcessByName(proc_name + strrchr(proc_name, '/'), multiple); RunProgram(proc_name, ""); } diff --git a/programs/cmm/software_widget/software_widget.c b/programs/cmm/software_widget/software_widget.c index 991a5a7612..e5bf5c388a 100644 --- a/programs/cmm/software_widget/software_widget.c +++ b/programs/cmm/software_widget/software_widget.c @@ -53,7 +53,7 @@ void load_config() list.item_w = EAX; ini_get_int stdcall (#settings_ini_path, "Config", "cell_h", 71); list.item_h = EAX; - ini_get_int stdcall (#settings_ini_path, "Config", "default_icon", 0); + ini_get_int stdcall (#settings_ini_path, "Config", "default_icon", 2); default_icon = EAX; }