читать дальше »
procedure CurStepChanged(CurStep: TSetupStep);
var
res:Integer;
s,s1:string;
begin
If CurStep=ssInstall
then
begin
if (FileExists(AddBackslash(ExpandConstant('{src}')) + 'data1.bin')) and (FileExists(AddBackslash(ExpandConstant('{src}')) + 'data.bin')) then
begin
s:=ExpandConstant('{src}')+'\data.bin';
s1:=ExpandConstant('{app}');
Exec(s, '-y -o"'+ s1 + '"', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 1
s:=ExpandConstant('{src}')+'\data1.bin';
s1:=ExpandConstant('{app}');
Exec(s, '-y -o"'+ s1 + '"', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 3
Exec(ExpandConstant('{app}\zone\russian\pre.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 6
s:=ExpandConstant('{src}')+'\data2.bin';
s1:=ExpandConstant('{app}');
Exec(s, '-y -o"'+ s1 + '"', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 8
Exec(ExpandConstant('{app}\zone\russian\pre.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
DeleteFile(ExpandConstant('{app}\zone\russian\msvcr80.dll'));
DeleteFile(ExpandConstant('{app}\zone\russian\packjpg_dll.dll'));
DeleteFile(ExpandConstant('{app}\zone\russian\zlib1.dll'));
DeleteFile(ExpandConstant('{app}\zone\russian\precomp.exe'));
DeleteFile(ExpandConstant('{app}\zone\russian\pre.bat'));
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 11
s:=ExpandConstant('{src}')+'\data3.bin';
s1:=ExpandConstant('{app}');
Exec(s, '-y -o"'+ s1 + '"', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 13
Exec(ExpandConstant('{app}\main\1.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 14
Exec(ExpandConstant('{app}\main\2.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 15
s:=ExpandConstant('{src}')+'\data4.bin';
s1:=ExpandConstant('{app}');
Exec(s, '-y -o"'+ s1 + '"', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 17
Exec(ExpandConstant('{app}\main\3.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
DeleteFile(ExpandConstant('{app}\msvcr80.dll'));
DeleteFile(ExpandConstant('{app}\packjpg_dll.dll'));
DeleteFile(ExpandConstant('{app}\zlib1.dll'));
DeleteFile(ExpandConstant('{app}\precomp.exe'));
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 19
s:=ExpandConstant('{src}')+'\data5.bin';
s1:=ExpandConstant('{app}');
Exec(s, '-y -o"'+ s1 + '"', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 20
Exec(ExpandConstant('{app}\main\dec1.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 23
Exec(ExpandConstant('{app}\main\dec2.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 26
Exec(ExpandConstant('{app}\main\dec3.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 29
Exec(ExpandConstant('{app}\main\4.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 30
Exec(ExpandConstant('{app}\main\5.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 31
Exec(ExpandConstant('{app}\main\6.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 32
Exec(ExpandConstant('{app}\main\7.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 33
Exec(ExpandConstant('{app}\main\8.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 34
Exec(ExpandConstant('{app}\main\9.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 35
Exec(ExpandConstant('{app}\main\10.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 37
s:=ExpandConstant('{src}')+'\data6.bin';
s1:=ExpandConstant('{app}');
Exec(s, '-y -o"'+ s1 + '"', '', SW_HIDE, ewWaitUntilTerminated, res);
WizardForm.StatusLabel.Caption:='Распаковка файлов...';
ProgressBar1.Position := 39
end else begin
MsgBox(ExpandConstant('{cm:file}'), mbInformation, MB_OK);
Abort;
end;
end;
end;