Subversion Repositories Kolibri OS

Rev

Rev 7219 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7219 Rev 7422
Line 6... Line 6...
6
 
6
 
7
void main()
7
void main()
8
{   
8
{   
9
	dword dirbuf, fcount, filename, i;
9
	dword dirbuf, fcount, filename, i;
10
	dword dirbuf2, fcount2, filename2, j;
10
	dword dirbuf2, fcount2, filename2, j;
11
	char cd_path[4096];
11
	char drive_name[4096];
12
	char install_path[4096];
-
 
Line 13... Line 12...
13
	signed int result;
12
	char install_path[4096];
14
 
13
 
Line 15... Line 14...
15
	pause(200);
14
	pause(200);
16
	GetDir(#dirbuf, #fcount, "/", DIRS_ONLYREAL);
15
	GetDir(#dirbuf, #fcount, "/", DIRS_ONLYREAL);
17
 
-
 
18
	for (i=0; i
16
 
19
	{
-
 
20
		filename = i*304+dirbuf+72;
17
	for (i=0; i
21
		if (!strstr(filename, "fd"))
18
	{
22
		{
19
		strcpy(#drive_name, "/");
23
			strcpy(#cd_path, "/");
20
		strcat(#drive_name, i*304+dirbuf+72);
Line 24... Line 21...
24
			strcat(#cd_path, filename);
21
		if (!strcmp(#drive_name, "/fd")) continue;
25
			free(dirbuf2);
22
		free(dirbuf2);
26
			GetDir(#dirbuf2, #fcount2, #cd_path, DIRS_ONLYREAL);
-
 
27
 
-
 
28
			for (j=0; j
-
 
29
			{
-
 
30
				filename2 = j*304+dirbuf2+72;
23
		GetDir(#dirbuf2, #fcount2, #drive_name, DIRS_ONLYREAL);
31
				strcpy(#install_path, #cd_path);
24
 
32
				strcat(#install_path, "/");
-
 
33
				strcat(#install_path, filename2);
-
 
34
				strcat(#install_path, "/installer.kex");
25
		for (j=0; j
35
				result = RunProgram(#install_path, NULL);
26
		{
36
				if (result>0) ExitProcess();
27
			sprintf(#install_path, "%s/%s/installer.kex", #drive_name, j*304+dirbuf2+72);
37
			}
28
			if (RunProgram(#install_path, NULL) > 0) ExitProcess();
38
		}
29
		}