-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstal.pas
More file actions
361 lines (346 loc) · 12.9 KB
/
Instal.pas
File metadata and controls
361 lines (346 loc) · 12.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
unit Instal;
interface
uses
Windows, Forms, SysUtils, Graphics,
Gauges, param, SoftSel, ExtCtrls, ComCtrls, StdCtrls, Controls, Classes;
type
TInstall = class(TForm)
Timer1: TTimer;
Gauge1: TProgressBar;
Button1: TButton;
Label1: TLabel;
Animate1: TAnimate;
procedure Timer1Timer(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormActivate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Install: TInstall;
Req:integer;
implementation
uses Main, Games, VidClock, Soft;
{$R *.dfm}
procedure TInstall.Timer1Timer(Sender: TObject);
var
BSOD: TForm;
BSODLabel: Tlabel;
begin
If Gauge1.Position=0 then
Label1.Caption:='Ïîäãîòîâêà ê óñòàíîâêå...';
If Gauge1.Position=3 then
If (Random(10)=4) and ((os='Lin') or (os='BSD')) and (dataprm<>'OS') then begin
Timer1.Enabled:=false;
BSOD:=TForm.Create(self);
BSOD.Position:=poScreenCenter;
BSOD.BorderIcons:=[biSystemMenu];
BSOD.BorderStyle:=bsDialog;
BSOD.Caption:='Íåóäîâëåòâîðåííûå çàâèñèìîñòè';
BSOD.Color:=clBlack;
BSODLabel:=TLabel.Create(BSOD);
BSODLabel.Parent:=BSOD;
BSODLabel.Left:=8; BSODLabel.Top:=8;
BSODLabel.Font.Name:='FixedSys';
BSODLabel.Font.Color:=clWhite;
BSODLabel.Caption:='[root@Xcomp ~]$ rpm -ivh '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'Îøèáêà: Íóäîâëåòâîðåííûå çàâèñèìîñòè'+#13+#9+#9+'ld-2.3.3.so íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'ld-linux.so.2 íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'libc.so.6 íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'libc-2.3.2.so íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'libnsl.so.1 íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'libnsl-2.3.2.so íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'libnss_files.so.2 íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'libnss_files-2.3.2.so íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'libtermcap.so.2 íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm '+#13+#9+#9+'libtermcap.so.2.0.8 íóæåí äëÿ '+SoftSelect.ComboBox1.Text+'.rpm ';
BSOD.ClientWidth:=BSODLabel.Width+12;
BSOD.ClientHeight:=BSODLabel.Height+16;
BSOD.ShowModal;
BSOD.Free;
close;
end;
If Gauge1.Position=10 then begin
Label1.Caption:='Îïðåäåëåíèå îáîðóäîâàíèÿ...';
Timer1.Interval:=Timer1.Interval+25;
Sleep(500);
end;
If (Gauge1.Position=14) and (random(5)=2) and (ost='Win') then begin
Timer1.Enabled:=false;
BSOD:=TForm.Create(self);
BSOD.Position:=poScreenCenter;
BSOD.BorderIcons:=[biSystemMenu];
BSOD.BorderStyle:=bsDialog;
BSOD.Caption:='Blue screen of death';
BSOD.ClientHeight:=240;
BSOD.ClientWidth:=320;
BSOD.Color:=clBlue;
BSODLabel:=TLabel.Create(BSOD);
BSODLabel.Parent:=BSOD;
BSODLabel.Left:=8; BSODLabel.Top:=8;
BSODLabel.Font.Name:='FixedSys';
BSODLabel.Font.Color:=clWhite;
BSODLabel.Caption:='*** STOP: 0x000000D1 (0x00000000,'+#13+'0x000000000, 0x00000000, 0xF8BCC2A4)'+#13+#13+'DLL Base DateStmp - Name'+#13'80100000 3202c07e - ntoskrnl.exe'+#13+'80001000 31ed06b4 - atapi.sys'+#13+'fc90a000 31ec6df7 - Fs_Rec.SYS'+#13+'fefa4000 31f91a51 - mga.dll'+#13+'fc5b0000 31ec6cb1 - Serial.SYS'+#13+'fefbc000 31eed262 - NDIS.SYS'+#13+'fc708000 31ec6ccb - Msfs.sys'+#13+#13+'*** Nwiz.sys - Address F8BCCA44 base'+#13+'at F8BCC000, DateStamp 33bb8f1d';
BSOD.ShowModal;
BSOD.Free;
Close;
end;
If Gauge1.Position=25 then begin
Label1.Caption:='Êîïèðîâàíèå ôàéëîâ...';
Timer1.Interval:=Timer1.Interval+25;
Sleep(250);
end;
If Gauge1.Position=39 then
If Random(10)=4 then begin
Timer1.Enabled:=false;
Application.MessageBox('Ïðîãðàììà óñòàíîâêè âûïîëíèëà íåäîïóñòèìóþ îïåðàöèþ è áóäåò çàêðûòà.','Ïîìîùü!',MB_ICONSTOP);
close;
end;
If Gauge1.Position=70 then begin
Label1.Caption:='Çàâåðøåíèå óñòàíîâêè...';
Timer1.Interval:=Timer1.Interval-50;
Sleep(100);
end;
if gauge1.Position<100 then
Gauge1.Position:=Gauge1.Position+1
else
begin
Timer1.Enabled:=false;
Gauge1.Position:=0;
If dataprm='OS' then begin
MainForm.Label30.Caption:=SoftSelect.ComboBox1.Text;
If (os<>ost) and (os<>'') then begin
MainForm.ClearPrograms(0,ActivePartition);
AntivirusBases:='';
Game.ComboBox1.Clear;
end;
if Parts[a,b].Soft.HackPrograms=nil then
Parts[a,b].Soft.HackPrograms:=TStringList.Create;
Parts[a,b].Soft.HackPrograms.Add('ping');
Parts[a,b].Soft.HackPrograms.Add('mkdir');
Parts[a,b].Soft.HackPrograms.Add('dir');
Parts[a,b].Soft.HackPrograms.Add('cd');
Parts[a,b].Soft.HackPrograms.Add('atz');
Parts[a,b].Soft.HackPrograms.Add('atdp');
Parts[a,b].Soft.HackPrograms.Add('atdt');
Parts[a,b].Soft.HackPrograms.Add('exit');
If MainForm.Label53.Caption='Íåò' then begin
MainForm.Label53.Caption:='Ñòàíäàðòíûé';
Parts[a,b].Soft.Defragmenter:='Ñòàíäàðòíûé';
end;
if (ost='Lin') or (ost='BSD') then begin
if MainForm.Label51.Caption='Íåò' then
MainForm.Label51.Caption:='iptables';
If MainForm.Label58.Caption='Íåò' then
MainForm.Label58.Caption:='cdparanoia';
if (ost='Lin') and (MainForm.Label48.Caption='Íåò') then begin
MainForm.Label48.Caption:='Midnight Commander';
Parts[a,b].Soft.FileManager:=MainForm.Label48.Caption;
Parts[a,b].Soft.FileManagerRun:='mc';
end;
Parts[a,b].Soft.HackPrograms.Add('ifconfig');
Parts[a,b].Soft.HackPrograms.Add('rm');
Parts[a,b].Soft.HackPrograms.Add('man');
Parts[a,b].Soft.HackPrograms.Add('ls');
Parts[a,b].Soft.HackPrograms.Add('rename');
Parts[a,b].Soft.HackPrograms.Add('clear');
Parts[a,b].Soft.Firewall:=MainForm.Label51.Caption;
Parts[a,b].Soft.AudioGRabber:=MainForm.Label58.Caption;
end;
If MainForm.Label131.Caption='Íåò' then
if ost='Win' then begin
MainForm.Label131.Caption:='Internet Explorer';
MainForm.Label48.Caption:='Ïðîâîäíèê';
Parts[a,b].Soft.Browser:=MainForm.Label131.Caption;
Parts[a,b].Soft.FileManager:=MainForm.Label48.Caption;
Parts[a,b].Soft.FileManagerRun:='explorer';
end;
if ost='Win' then begin
Parts[a,b].Soft.HackPrograms.Add('ipconfig');
Parts[a,b].Soft.HackPrograms.Add('help');
Parts[a,b].Soft.HackPrograms.Add('del');
Parts[a,b].Soft.HackPrograms.Add('erase');
Parts[a,b].Soft.HackPrograms.Add('ren');
Parts[a,b].Soft.HackPrograms.Add('cls');
end;
MainForm.Label54.Caption:='fdisk';
Parts[a,b].Soft.DiskOperator:=MainForm.Label54.Caption;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
Parts[a,b].Soft.OS:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.OSType:=ost;
rating:=rating+5;
nastr:=nastr+2;
os:=ost;
end;
If dataprm='Games' then begin
If Parts[a,b].Soft.GamesList=nil then
Parts[a,b].Soft.GamesList:=TStringList.Create;
Parts[a,b].Soft.GamesList.Add(SoftSelect.ComboBox1.Text+#9+IntToStr(Req));
Game.ComboBox1.Items.Add(SoftSelect.ComboBox1.Text);
Game.ComboBox1.ItemIndex:=0;
GamesList:=Parts[ActivePartition,0].Soft.GamesList;
Game.Button2.Enabled:=true;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+5;
rating:=rating+5;
end;
If dataprm='Hacking' then begin
If Parts[a,b].Soft.HackPrograms=nil then
Parts[a,b].Soft.HackPrograms:=TStringList.Create;
Parts[a,b].Soft.HackPrograms.Add(xkCom);
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+5;
rating:=rating+5;
end;
If dataprm='Video' then begin
MainForm.Label109.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.VideoSoft:=MainForm.Label109.Caption;
Vclock.Label9.Caption:='Ïðîãðàììà äëÿ ðàçãîíà - '+MainForm.Label109.Caption;
VClock.Groupbox1.Enabled:=true;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
rating:=rating+5;
nastr:=nastr+2;
end;
If dataprm='Dev' then begin
MainForm.Label32.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.Dev:=MainForm.Label32.Caption;
rating:=rating+5;
devtype:=udevtype;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
Parts[a,b].Soft.DevType:=udevtype;
nastr:=nastr+2;
end;
If dataprm='File Manager' then begin
MainForm.Label48.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.FileManager:=MainForm.Label48.Caption;
Parts[a,b].Soft.FileManagerRun:=xkCom;
rating:=rating+5;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+2;
end;
If dataprm='Spam' then begin
MainForm.Label123.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.Antispam:=MainForm.Label123.Caption;
rating:=rating+5;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+2;
end;
If dataprm='Firewall' then begin
MainForm.Label51.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.Firewall:=MainForm.Label51.Caption;
rating:=rating+5;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+2;
end;
If dataprm='Defrag' then begin
MainForm.Label53.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.Defragmenter:=MainForm.Label53.Caption;
rating:=rating+5;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+2;
end;
If dataprm='Browser' then begin
MainForm.Label131.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.Browser:=MainForm.Label131.Caption;
rating:=rating+5;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+2;
end;
If dataprm='DiskOperator' then begin
MainForm.Label54.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.DiskOperator:=MainForm.Label54.Caption;
rating:=rating+5;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+2;
end;
If dataprm='Antivirus' then begin
MainForm.Label31.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.Antivirus:=MainForm.Label31.Caption;
AntivirusBases:=IntToStr(day)+'.'+IntToStr(month)+'.'+IntToStr(year);
Parts[a,b].Soft.AntivirusBases:=AntivirusBases;
AntivirusServer:=uAntiServer;
Parts[a,b].Soft.AntivirusServer:=AntivirusServer;
Softw.Button4.Caption:=IntToStr(Day)+'.'+IntToStr(Month)+'.'+IntToStr(Year);
Softw.Button4.Enabled:=true;
rating:=rating+5;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
nastr:=nastr+2;
end;
If dataprm='Benchmark' then begin
MainForm.Label133.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.Benchmark:=MainForm.Label133.Caption;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
rating:=rating+5;
nastr:=nastr+2;
end;
If dataprm='CopyCD' then begin
MainForm.Label56.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.CopyCD:=MainForm.Label56.Caption;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
rating:=rating+5;
nastr:=nastr+2;
end;
If dataprm='AudioEnc' then begin
MainForm.Label58.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.AudioGrabber:=MainForm.Label58.Caption;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
rating:=rating+5;
nastr:=nastr+2;
end;
If dataprm='VideoEnc' then begin
MainForm.Label57.Caption:=SoftSelect.ComboBox1.Text;
Parts[a,b].Soft.VideoEncoder:=MainForm.Label57.Caption;
Money:=Money-cCost;
Parts[a,b].Free:=Parts[a,b].Free-cSize;
rating:=rating+5;
nastr:=nastr+2;
end;
Closefile(data);
Install.Close;
SoftSelect.Close;
end;
end;
procedure TInstall.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Timer1.Enabled:=false;
Animate1.Active:=false;
end;
procedure TInstall.FormActivate(Sender: TObject);
var
speed:integer;
begin
MainForm.Timer1.Enabled:=false;
speed:=((softselect.size.progress*10)-(hardspeed+defragspeed+cpuspeed+htt+cpuclock+cdspeed*100+ramspeed*10)) div 100;
if Speed<=0 then
Timer1.Interval:=1
else
Timer1.Interval:=speed;
Gauge1.Position:=0;
Label1.Caption:='Ïîäãîòîâêà ê óñòàíîâêå...';
Animate1.Active:=true;
timer1.Enabled:=true;
end;
procedure TInstall.Button1Click(Sender: TObject);
begin
If Application.MessageBox('Âû äåéñòâèòåëüíî õîòèòå ïðåêðàòèòü óñòàíîâêó äàííîãî ïðîãðàììíîãî ïðîäóêòà?','Ïðåðâàòü?',MB_YESNO+MB_ICONQUESTION)=IDYES then begin
Install.Close;
SoftSelect.Close;
end;
end;
procedure TInstall.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If (key=VK_ESCAPE) then
Button1.OnClick(self);
end;
end.