Rev 3433 | 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 | "sys /sys", |
||
43 | "tmp /tmp9/1", |
||
44 | 0 |
||
45 | |||
46 | |||
47 | |||
48 | |||
49 | { |
||
50 | int i; |
||
51 | proc_info Process; |
||
52 | |||
53 | |||
54 | if (TmpDiskAdd(9, 100)!=0) RunProgram("/sys/tmpdisk", "a9s100"); |
||
55 | for (i=2; i<256; i++;) |
||
56 | { |
||
57 | GetProcessInfo(#Process, i); |
||
58 | if (i==Form.ID) || (strchr(#Process.name, '/')) || (strchr(#Process.name, 'Z')) continue; |
||
59 | KillProcess(i); |
||
60 | } |
||
61 | RunProgram("/sys/REFRSCRN", NULL); |
||
62 | pause(100); |
||
63 | ShowProgress("Copying files..."); |
||
64 | copyf("/sys/docpack /tmp9/1/docpack"); |
||
65 | DeleteFile("/sys/docpack"); |
||
66 | for (i = 0; copyfiles[i]!=0; i++) copyf(copyfiles[i]); |
||
67 | ShowProgress("Post install actions..."); |
||
68 | RunProgram("/sys/launcher", NULL); |
||
69 | SetSystemSkin("/tmp9/1/skins/latte.skn"); |
||
70 | EndLoop(); |
||
71 | } |
||
72 | |||
73 | |||
3434 | leency | 74 | { |
75 | if (CheckEvent()==evReDraw) { DefineWindow("Installation Started", "Stop"); ShowProgress("Copying files..."); } |
||
76 | ShowProgress(NULL); |
||
77 | DrawBar(TEXTX, BLACK_H+50, Form.cwidth-TEXTX, 12, 0xFFFfff); |
||
78 | WriteText(TEXTX, BLACK_H+50, 0x80, 0, filename); |
||
79 | } |
||
80 | |||
3363 | leency | 81 | |
3434 | leency | 82 | |
3363 | leency | 83 | { |
84 | byte id, key; |
||
85 | |||
86 | |||
87 | |||
88 | |||
89 | { |
||
90 | case evButton: |
||
91 | id=GetButtonID(); |
||
92 | if(id == 1) ExitProcess(); |
||
93 | if (id == 11) RunProgram("/sys/htmlv", "http://kolibri-n.org/index.php"); |
||
94 | if (id == 10) ExitProcess(); |
||
95 | break; |
||
96 | case evKey: |
||
97 | key = GetKey(); |
||
98 | break; |
||
99 | |||
100 | |||
101 | if !(DefineWindow("Installation complete", "Exit")) break; |
||
102 | WriteText(TEXTX, BLACK_H*2, 0x80, 0, "KolibriN install complete."); |
||
103 | WriteText(TEXTX, BLACK_H*2+40, 0x80, 0, "I spent a lot of time improving KolibriN, so I hope you'll like it."); |
||
104 | WriteText(TEXTX, BLACK_H*2+55, 0x80, 0, "Please, donate as much as you can to help me further improve Kolibri,"); |
||
105 | WriteText(TEXTX, BLACK_H*2+70, 0x80, 0, "the project I love so much. Visit my site for more information:"); |
||
106 | DrawLink(TEXTX, BLACK_H*2+85, 0x80, 11, "http://kolibri-n.org/donate.php"); |
||
107 | } |
||
108 | }256;> |
||
109 |