Code:
procedure ISDone_Unpack;
begin
ISDone_Resources;
ISDoneError:=false;
if ISDoneInit(ExpandConstant('{tmp}\records.inf'), $F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then
begin
ChangeLanguage('English');
if SrepInit(AddBackSlash(ExpandConstant('{app}')),512 ,0) and PrecompInit('',128, 0) and FileSearchInit(true) then
begin
WizardForm.ProgressGauge.Position := 0;
Wizardform.ProgressGauge.Max := 1000;
ClsSourcePath(ExpandConstant('{src}'));
ClsDiskRequest(@MyDiskRequest);
if not ISArcExtract(0, 90, ExpandConstant('{src}\data.001'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
//here dear razor
if not ISArcExtract(0, 10, ExpandConstant('{src}\data.arc'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
ISDoneError := True;
end;
ISDoneStop;
end;
if ISDoneError = True then
WizardForm.CancelButton.OnClick(nil);
end;
this part here:
Code:
if not ISArcExtract(0, 90, ExpandConstant('{src}\data.001'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
//here dear razor
if not ISArcExtract(0, 10, ExpandConstant('{src}\data.arc'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
ISDoneError := True;
to properly write it, it's something like
Code:
if not ISArcExtract(0, 90, ExpandConstant('{src}\data.001'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
if not ISArcExtract(0, 10, ExpandConstant('{src}\data.arc'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
ISDoneError := True;
means if unpacking data.001 and if unpacking fails then unpack data.arc but if data.001 gets unpacked successfully, then don't unpack data.arc, not CLS-diskspan bug but your coding mistakes
you forgot to add ISDoneError := True for data.001, so to fix it, it has to be
Code:
procedure ISDone_Unpack;
begin
ISDone_Resources;
ISDoneError:=false;
if ISDoneInit(ExpandConstant('{tmp}\records.inf'), $F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then
begin
ChangeLanguage('English');
if SrepInit(AddBackSlash(ExpandConstant('{app}')),512 ,0) and PrecompInit('',128, 0) and FileSearchInit(true) then
begin
WizardForm.ProgressGauge.Position := 0;
Wizardform.ProgressGauge.Max := 1000;
ClsSourcePath(ExpandConstant('{src}'));
ClsDiskRequest(@MyDiskRequest);
if not ISArcExtract(0, 90, ExpandConstant('{src}\data.001'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
ISDoneError := True; // that is what you missed
if not ISArcExtract(0, 10, ExpandConstant('{src}\data.arc'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
ISDoneError := True;
end;
ISDoneStop;
end;
if ISDoneError = True then
WizardForm.CancelButton.OnClick(nil);
end;
Didn't run test, but it seemed like the obvious source of the problem in the script.
|