Subversion Repositories Kolibri OS

Rev

Rev 4885 | 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();
5152 leency 17
	pause(200);
3444 leency 18
	GetDir(#dirbuf, #fcount, "/", DIRS_ONLYREAL);
3363 leency 19
 
20
	for (i=0; i
21
	{
22
		filename = i*304+dirbuf+72;
23
		if (!strstr(filename, "fd"))
24
		{
25
			strcpy(#cd_path, "/");
26
			strcat(#cd_path, filename);
27
			free(dirbuf2);
3444 leency 28
			GetDir(#dirbuf2, #fcount2, #cd_path, DIRS_ONLYREAL);
3363 leency 29
 
30
			for (j=0; j
31
			{
32
				filename2 = j*304+dirbuf2+72;
33
				strcpy(#install_path, #cd_path);
34
				strcat(#install_path, "/");
35
				strcat(#install_path, filename2);
36
				strcat(#install_path, "/installer.kex");
37
				result = RunProgram(#install_path, NULL);
38
				if (result>0) ExitProcess();
39
			}
40
		}
41
	}
4885 leency 42
	notify("'KolibriN\nНе могу найти installer.kex ни в одном корне диска!\nПопробуйте найти и запустить его вручную.' -dtE");
3363 leency 43
	ExitProcess();
44
}
45
 
46
 
47
stop: