Code:
procedure CurStepChanged(CurStep: TSetupStep);
var
i, MyRepackNumber: integer;
begin
i:= 1; // Don't touch this.
MyRepackNumber:= 3; // How many your repack games...
WizardForm.ProgressGauge.Position:=0;
WizardForm.ProgressGauge.Max:=0;
repeat
WizardForm.ProgressGauge.Max:= WizardForm.ProgressGauge.Max + 1000;
i:= i + 1;
until i = MyRepackNumber;
ISDoneError:= false;
if ISDoneInit(ExpandConstant('{tmp}\records.inf'), $F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then
begin
repeat
ChangeLanguage('English');
if not SrepInit('',512,0) then ISDoneError := True;
if not PrecompInit('',128,0) then ISDoneError := True;
if not FileSearchInit(true) then ISDoneError := True;
if not ShowChangeDiskWindow ('Please Locate Part 1 To Start Installing...', ExpandConstant('{src}'),'Setup-1.Rpk') then break;
if not ISArcExtract ( 0, 50, ExpandConstant('{src}\Setup-1.Rpk'), ExpandConstant('{app}'), '', false, '{#PassWord}', ExpandConstant('{tmp}\ISDone_Params_ExTended.ini'), ExpandConstant('{app}'),False) then break;
if not ISExec ( 0, 0, 0, ExpandConstant('{app}\Rebuild.bat'), '', ExpandConstant('{app}'), 'My comments',false) then break;
if not ShowChangeDiskWindow ('Please Locate Part 2 To Continue Installation...', ExpandConstant('{src}'),'Setup-2.Rpk') then break;
if not ISArcExtract ( 0, 50, ExpandConstant('{src}\Setup-2.Rpk'), ExpandConstant('{app}'), '', false, '{#PassWord}', ExpandConstant('{tmp}\ISDone_Params_ExTended.ini'), ExpandConstant('{app}'),False) then break;
until true;
ISDoneStop;
end;
end;