Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
3363 leency 1
 
2
{
3
	byte id, key, started=false;
4
	goto _INSTALL_DRAW;
5
6
 
7
	{
8
			case evButton:
9
					id=GetButtonID();
10
					if(id == 1) ExitProcess();
11
					if (id == 11) RunProgram("/sys/htmlv", "http://kolibri-n.org/donate.php");
12
					if (id == 10) HalloLoop();
13
					break;
14
			case evKey:
15
					key = GetKey();
16
					break;
17
18
 
19
					if !(DefineWindow("Installation Started", "Stop")) break;
20
					if (started) break;
21
					started = true;
22
					Install();
23
	}
24
}
25
26
 
27
 
28
void ShowProgress(dword text1)
29
{
30
	iclock[0]>
31
	_PutImage(WIN_W+LOGOW/2, WIN_H+LOGOH/2, LOGOW,LOGOH, LOGOW*LOGOH*3*iclock[0]+ #logo);
32
	if (text1)
33
	{
34
		DrawBar(TEXTX, BLACK_H+30, Form.cwidth-TEXTX, 12, 0xFFFfff);
35
		DrawBar(TEXTX, BLACK_H+50, Form.cwidth-TEXTX, 12, 0xFFFfff);
36
		WriteText(TEXTX, BLACK_H+30, 0x80, 0, text1);
37
	}
38
}
39
40
 
41
 
42
{
43
	int i;
44
	proc_info Process;
45
46
 
47
	if (TmpDiskAdd(9, 100)!=0) RunProgram("/sys/tmpdisk", "a9s100");
48
	for (i=2; i<256; i++;)
49
	{
50
		GetProcessInfo(#Process, i);
51
		if (i==Form.ID) || (strcmp(#Process.name, "OS")==0) continue;
3877 leency 52
		KillProcess(i);
3363 leency 53
	}
54
	//RunProgram("/sys/develop/board", NULL); //temp============
3440 leency 55
	RunProgram("/sys/REFRSCRN", NULL);
3363 leency 56
	pause(100);
57
	ShowProgress("Copying files...");
58
	copyf("/sys/docpack", "/tmp9/1/docpack");
3440 leency 59
	DeleteFile("/sys/docpack");
3363 leency 60
	copyf(abspath("sys"), "/rd/1");
3444 leency 61
	copyf(abspath("tmp"), "/tmp9/1");
3440 leency 62
	ShowProgress("Post install actions...");
3363 leency 63
	RunProgram("/sys/launcher", NULL);
64
	SetSystemSkin("/tmp9/1/skins/latte.skn");
65
	EndLoop();
66
}
67
68
 
3434 leency 69
{
70
	if (CheckEvent()==evReDraw) { DefineWindow("Installation Started", "Stop"); ShowProgress("Copying files..."); }
71
	ShowProgress(NULL);
72
	DrawBar(TEXTX, BLACK_H+50, Form.cwidth-TEXTX, 12, 0xFFFfff);
73
	WriteText(TEXTX, BLACK_H+50, 0x80, 0, filename);
74
}
75
3363 leency 76
 
3434 leency 77
 
3363 leency 78
{
79
	byte id, key;
80
81
 
82
83
 
84
	{
85
			case evButton:
86
					id=GetButtonID();
87
					if(id == 1) ExitProcess();
88
					if (id == 11) RunProgram("/sys/htmlv", "http://kolibri-n.org/index.php");
89
					if (id == 10) ExitProcess();
90
					break;
91
			case evKey:
92
					key = GetKey();
93
					break;
94
95
 
96
					if !(DefineWindow("Installation complete", "Exit")) break;
97
					WriteText(TEXTX, BLACK_H*2, 0x80, 0, "KolibriN install complete.");
98
					WriteText(TEXTX, BLACK_H*2+40, 0x80, 0, "I spent a lot of time improving KolibriN, so I hope you'll like it.");
99
					WriteText(TEXTX, BLACK_H*2+55, 0x80, 0, "Please, donate as much as you can to help me further improve Kolibri,");
100
					WriteText(TEXTX, BLACK_H*2+70, 0x80, 0, "the project I love so much. Visit my site for more information:");
101
					DrawLink(TEXTX, BLACK_H*2+85, 0x80, 11, "http://kolibri-n.org/donate.php");
102
	}
103
}
104