drvinst: v1.0, add to ISO

git-svn-id: svn://kolibrios.org@6654 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2016-11-02 18:18:50 +00:00
parent 7ce6f6bd28
commit 0db7a95137
5 changed files with 69 additions and 51 deletions

View File

@ -205,6 +205,8 @@ extra_files = {
{"kolibrios/grafx2/scripts/libs/", "common/media/grafx2/scripts/*"}, {"kolibrios/grafx2/scripts/libs/", "common/media/grafx2/scripts/*"},
{"kolibrios/grafx2/skins/", "common/media/grafx2/skins/*"}, {"kolibrios/grafx2/skins/", "common/media/grafx2/skins/*"},
{"kolibrios/grafx2/", "common/media/grafx2/*"}, {"kolibrios/grafx2/", "common/media/grafx2/*"},
{"kolibrios/drivers/drvinf.ini", "common/drivers/drvinf.ini"},
{"kolibrios/drivers/drvinst.kex", "common/drivers/drvinst.com"},
{"kolibrios/drivers/ahci/", "common/drivers/ahci/*"}, {"kolibrios/drivers/ahci/", "common/drivers/ahci/*"},
{"kolibrios/drivers/atikms/", "common/drivers/atikms/*"}, {"kolibrios/drivers/atikms/", "common/drivers/atikms/*"},
{"kolibrios/drivers/i915/", "common/drivers/i915/*"}, {"kolibrios/drivers/i915/", "common/drivers/i915/*"},

View File

@ -0,0 +1,22 @@
[AHCI]
ver=ver rc06
description=<EFBFBD>®¨áª ª®­â஫«¥à®¢ ¨ ®¯à¥¤¥«¥­¨¥ ¯®¤ª«îçñ­­ëå €’€ ¤¨áª®¢. á«ãç ¥ ãᯥå , ¤¥« ¥â ¢¨¤¨¬ë¬¨ ¢ Š«®¡¨à¨ ¦¥á⪨¥ ¤¨áª¨ ¯®¤ª«î祭­ë¥ ç¥à¥§ ACHI.
install=/kolibrios/drivers/ahci/ahci
[Video ATI KMS]
ver=ver 4.4
description=„à ©¢¥à  ¤«ï ¢¨¤¥®ª àâ ATI Radeon. <20>®¤¤¥à¦¨¢ îâáï ¤¨áªà¥â­ë¥ ¨ ¨­â¥£à¨à®¢ ­­ë¥ 稯á¥âë ᥬ¥©á⢠ATI R100-R600, Evergreen, Northern Islands, Southern Islands. “áâ ­ ¢«¨¢ ¥â ¢¨¤¥®à¥¦¨¬  ¯à¨ ¯¥à¢®¬ § ¯ã᪥ ¨ ¤¥« ¥â ¤®áâã¯­ë¬ á¬¥­ã ¢¨¤¥®à¥¦¨¬  ¢ ¯à®æ¥áᥠࠡ®âë (SYSPANEL -> VideoMode).
readme=/kolibrios/drivers/atikms/readme.txt
install=/kolibrios/drivers/atikms/atikms
[Video Intel i915]
ver=ver 4.4.1
description=„à ©¢¥à  ¤«ï ¢¨¤¥®ª àâ Intel. <20>®¤¤¥à¦¨¢ îâáï ¢á¥ PCI Express ¢¨¤¥®ï¤à  Intel ®â i915 ¤® Skylake. “áâ ­ ¢«¨¢ ¥â ¢¨¤¥®à¥¦¨¬  ¯à¨ ¯¥à¢®¬ § ¯ã᪥ ¨ ¤¥« ¥â ¤®áâã¯­ë¬ á¬¥­ã ¢¨¤¥®à¥¦¨¬  ¢ ¯à®æ¥áᥠࠡ®âë (SYSPANEL -> VideoMode).
readme=/kolibrios/drivers/i915/readme.txt
install=/kolibrios/drivers/i915/i915
[Video VmWare]
ver=ver 3.14-rc2
description=„à ©¢¥à ¤«ï VMware SVGA II.
readme=/kolibrios/drivers/vmware/readme.txt
install=/kolibrios/drivers/vmware/vmwgfx

View File

@ -16,6 +16,7 @@ SkinConfig=skincfg,59
Volume=@VOLUME,64 Volume=@VOLUME,64
Panels=panels_cfg,63 Panels=panels_cfg,63
Mouse=/sys/mouse_cfg,54 Mouse=/sys/mouse_cfg,54
DriverInstall=/kolibrios/driver/drvinst.kex,71
[Monitoring] [Monitoring]
Debug Board=/sys/develop/board,19 Debug Board=/sys/develop/board,19

View File

@ -1,27 +0,0 @@
[ahci]
title=ACHI
ver=rc06
description=Поиск контроллеров и определение подключённых АТА дисков. В случае успеха, делает видимыми в Клобири жесткие диски подключенные через ACHI.
readme=ahci/readme.txt
app=ahci/ahci
[atikms]
title=ATI KMS
ver=4.4
description=Драйвера для видеокарт ATI Radeon. Поддерживаются дискретные и интегрированные чипсеты семейств ATI R100-R600, Evergreen, Northern Islands, Southern Islands. Устанавливает видеорежима при первом запуске и делает доступным смену видеорежима в процессе работы (SYSPANEL -> VideoMode).
readme=atikms/readme.txt
app=atikms/atikms
[i915]
title=Intel i915
ver=4.4.1
description=Драйвера для видеокарт Intel. Поддерживаются все PCI Express видеоядра Intel от i915 до Skylake. Устанавливает видеорежима при первом запуске и делает доступным смену видеорежима в процессе работы (SYSPANEL -> VideoMode).
readme=i915/readme.txt
app=i915/i915
[vmware]
title=VmWare
ver=3.14-rc2
description=Драйвера для видеокарт Intel. Поддерживаются все PCI Express видеоядра Intel от i915 до Skylake. Устанавливает видеорежима при первом запуске и делает доступным смену видеорежима в процессе работы (SYSPANEL -> VideoMode).
readme=i915/readme.txt
app=i915/i915

View File

@ -11,6 +11,8 @@
#include "../lib/obj/box_lib.h" #include "../lib/obj/box_lib.h"
#include "../lib/obj/libio_lib.h" #include "../lib/obj/libio_lib.h"
#include "../lib/obj/libini.h" #include "../lib/obj/libini.h"
#include "../lib/collection.h"
#include "../lib/io.h"
#include "../lib/patterns/select_list.h" #include "../lib/patterns/select_list.h"
//===================================================// //===================================================//
@ -37,6 +39,14 @@ proc_info Form;
#define WINDOW_STEP_DRIVER_LIST 2; #define WINDOW_STEP_DRIVER_LIST 2;
char window_step = WINDOW_STEP_INTRO; char window_step = WINDOW_STEP_INTRO;
collection ini_sections;
char drvinf_path[4096] = "/sys/drvinf.ini";
char cur_version[64];
char cur_description[1024];
char cur_readme_path[4096];
char cur_install_path[4096];
//===================================================// //===================================================//
// // // //
// CODE // // CODE //
@ -45,18 +55,14 @@ char window_step = WINDOW_STEP_INTRO;
void GetIniData() void GetIniData()
{ {
ini_enum_sections stdcall ("/sys/drvinf.ini", #process_sections); select_list.count = 0;
ini_enum_sections stdcall (#drvinf_path, #process_sections);
} }
byte process_sections(dword sec_name, f_name) byte process_sections(dword sec_name, f_name)
{ {
ini_enum_keys stdcall (f_name, sec_name, #process_keys); select_list.count++;
return true; ini_sections.add(sec_name);
}
byte process_keys(dword key_value, key_name, sec_name, f_name)
{
debugln(key_value);
return true; return true;
} }
@ -66,12 +72,12 @@ void main()
load_dll(libio, #libio_init,1); load_dll(libio, #libio_init,1);
load_dll(libini, #lib_init,1); load_dll(libini, #lib_init,1);
load_dll(boxlib, #box_lib_init,0); load_dll(boxlib, #box_lib_init,0);
//GetIniData(); GetIniData();
SetEventMask(0x27); SetEventMask(0x27);
loop() switch(WaitEvent()) loop() switch(WaitEvent())
{ {
case evMouse: case evMouse:
if (!CheckActiveProcess(Form.ID)) return; if (!CheckActiveProcess(Form.ID)) break;
SelectList_ProcessMouse(); SelectList_ProcessMouse();
break; break;
@ -109,22 +115,24 @@ void draw_intro_window()
void draw_driver_list_window() void draw_driver_list_window()
{ {
int PADDING = 12; int PADDING = 12;
int right_frame_x = Form.cwidth/2 + PADDING + calc(PADDING/2); int right_frame_x = Form.cwidth*46/100;
int readme_w = 0;
//LEFT FRAME //LEFT FRAME
select_list.count = 4;
SelectList_Init(PADDING, SelectList_Init(PADDING,
PADDING, PADDING,
Form.cwidth/2 - PADDING - scroll1.size_x, right_frame_x - PADDING - PADDING - 8 - scroll1.size_x,
Form.cheight - PADDING - PADDING, Form.cheight - PADDING - PADDING,
false); false);
SelectList_Draw(); SelectList_Draw();
//RIGHT FRAME //RIGHT FRAME
WriteTextB(right_frame_x, PADDING+3, 0x81, system.color.work_text, "ATI KMS"); GetCurrentSectionData();
WriteText(right_frame_x, PADDING+23, 0x80, MixColors(system.color.work, system.color.work_text,120), "ver 4.4"); DrawBar(right_frame_x, PADDING+3, Form.cwidth - right_frame_x - PADDING, 80, system.color.work);
DrawTextViewArea(right_frame_x-2, PADDING+53, Form.cwidth - right_frame_x - PADDING, Form.cheight-100, WriteTextB(right_frame_x, PADDING+3, 0x81, system.color.work_text, ini_sections.get(select_list.cur_y));
T_CAUTION_PARAGRAPH, -1, system.color.work_text); WriteText(right_frame_x, PADDING+23, 0x80, system.color.work_text, #cur_version);
right_frame_x += DrawStandartCaptButton(right_frame_x, Form.cheight-40, BUTTON_ID_README, T_README); if(cur_readme_path[0]) readme_w = DrawStandartCaptButton(right_frame_x, PADDING+45, BUTTON_ID_README, T_README);
DrawStandartCaptButton(right_frame_x, Form.cheight-40, BUTTON_ID_INSTALL, T_INSTALL); DrawStandartCaptButton(right_frame_x + readme_w, PADDING+45, BUTTON_ID_INSTALL, T_INSTALL);
DrawTextViewArea(right_frame_x-2, PADDING+83, Form.cwidth - right_frame_x - PADDING, Form.cheight-PADDING-PADDING,
#cur_description, system.color.work, system.color.work_text);
} }
void SelectList_DrawLine(dword i) void SelectList_DrawLine(dword i)
@ -136,18 +144,27 @@ void SelectList_DrawLine(dword i)
if (select_list.cur_y-select_list.first==i) if (select_list.cur_y-select_list.first==i)
{ {
DrawBar(select_list.x, yyy, select_list.w, select_list.item_h, system.color.work_button); DrawBar(select_list.x, yyy, select_list.w, select_list.item_h, system.color.work_button);
WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,system.color.work_button_text, "Hello"); WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,system.color.work_button_text, ini_sections.get(i));
} }
else else
{ {
DrawBar(select_list.x,yyy,select_list.w, select_list.item_h, 0xFFFfff); DrawBar(select_list.x,yyy,select_list.w, select_list.item_h, 0xFFFfff);
WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,0, "Hello"); WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,0, ini_sections.get(i));
} }
} }
void SelectList_LineChanged() void SelectList_LineChanged()
{ {
SelectList_Draw(); draw_driver_list_window();
}
void GetCurrentSectionData()
{
dword cur_section_name = ini_sections.get(select_list.cur_y);
ini_get_str stdcall (#drvinf_path, cur_section_name, "ver", #cur_version, sizeof(cur_version), 0);
ini_get_str stdcall (#drvinf_path, cur_section_name, "description", #cur_description, sizeof(cur_description), 0);
ini_get_str stdcall (#drvinf_path, cur_section_name, "readme", #cur_readme_path, sizeof(cur_readme_path), 0);
ini_get_str stdcall (#drvinf_path, cur_section_name, "install", #cur_install_path, sizeof(cur_install_path), 0);
} }
//===================================================// //===================================================//
@ -161,6 +178,9 @@ void Event_DrawWindow()
system.color.get(); system.color.get();
DefineAndDrawWindow(215, 100, 600, 400, 0x33, system.color.work, WINDOW_TITLE); DefineAndDrawWindow(215, 100, 600, 400, 0x33, system.color.work, WINDOW_TITLE);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;
if (Form.width < 450) { MoveSize(OLD,OLD,450,OLD); return; }
if (Form.height < 250) { MoveSize(OLD,OLD,OLD,250); return; }
if (window_step == WINDOW_STEP_INTRO) draw_intro_window(); if (window_step == WINDOW_STEP_INTRO) draw_intro_window();
if (window_step == WINDOW_STEP_DRIVER_LIST) draw_driver_list_window(); if (window_step == WINDOW_STEP_DRIVER_LIST) draw_driver_list_window();
return; return;
@ -174,10 +194,10 @@ void Event_AsseptRisk()
void Event_ShowReadme() void Event_ShowReadme()
{ {
return; io.run("/sys/textreader", #cur_readme_path);
} }
void Event_RunInstall() void Event_RunInstall()
{ {
return; io.run(#cur_install_path, NULL);
} }