Subversion Repositories Kolibri OS

Rev

Rev 4870 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3363 leency 1
#define MEMSIZE 0x9000
2
#include "..\lib\kolibri.h"
3
#include "..\lib\strings.h"
4
#include "..\lib\mem.h"
5
#include "..\lib\file_system.h"
6
 
7
 
8
void main()
9
{
10
	dword dirbuf, fcount, filename, i;
11
	dword dirbuf2, fcount2, filename2, j;
12
	char cd_path[4096];
13
	char install_path[4096];
14
	signed int result;
15
 
16
	mem_Init();
3444 leency 17
	GetDir(#dirbuf, #fcount, "/", DIRS_ONLYREAL);
3363 leency 18
 
19
	for (i=0; i
20
	{
21
		filename = i*304+dirbuf+72;
22
		if (!strstr(filename, "fd"))
23
		{
24
			strcpy(#cd_path, "/");
25
			strcat(#cd_path, filename);
26
			free(dirbuf2);
3444 leency 27
			GetDir(#dirbuf2, #fcount2, #cd_path, DIRS_ONLYREAL);
3363 leency 28
 
29
			for (j=0; j
30
			{
31
				filename2 = j*304+dirbuf2+72;
32
				strcpy(#install_path, #cd_path);
33
				strcat(#install_path, "/");
34
				strcat(#install_path, filename2);
35
				strcat(#install_path, "/installer.kex");
36
				result = RunProgram(#install_path, NULL);
37
				if (result>0) ExitProcess();
38
			}
39
		}
40
	}
4885 leency 41
	notify("'KolibriN\nНе могу найти installer.kex ни в одном корне диска!\nПопробуйте найти и запустить его вручную.' -dtE");
3363 leency 42
	ExitProcess();
43
}
44
 
45
 
46
stop: