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