Quote:
Originally Posted by audiofeel
is everything done in a tricky way there. can't you figure it out without 100 grams. if you change the constant, it will change for all archives
Code:
ISArcExDiskCount:= 0;
if FileExists(ExpandConstant('{src}\{#Data1Path}')) then
begin
ISArcDiskAddingFalied:= ISArcExAddDisks(ExpandConstant('{src}\{#Data1Path}'), '{#DiskPassword}');
if ISArcDiskAddingFalied then break;
ISArcExDiskCount:= ISArcExDiskCount + 1;
end;
for i:= 1 to ISArcExDiskCount do
begin
ISArcExError:= not ISArcExExtract(i, ExpandConstant('{app}\'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'));
if ISArcExError then break;
end;
|
Code:
ISArcExDiskCount:= 0;
if FileExists(ExpandConstant('{src}\{#Data1Path}')) then
begin
ISArcDiskAddingFalied:= ISArcExAddDisks(ExpandConstant('{src}\{#Data1Path}'), '{#DiskPassword}');
if ISArcDiskAddingFalied then break;
ISArcExDiskCount:= ISArcExDiskCount + 1;
end;
for i:= 1 to ISArcExDiskCount do
begin
case i of
1 : ISArcExError:= not ISArcExExtract(i, ExpandConstant('{app}\'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'));
2 : ISArcExError:= not ISArcExExtract(i, ExpandConstant('{userdocs}\'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{userdocs}'));
3 : ISArcExError:= not ISArcExExtract(i, ExpandConstant('{tmp}\'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{tmp}'));
else
ISArcExError:= not ISArcExExtract(i, ExpandConstant('{app}\'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'));
end;
if ISArcExError then break;
end;
first data file to {app}
second data file to {userdocs}
third data file to {tmp}
all others data file to {app}