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;
|
ok, i'll let you change the output directory when adding disks.
Code:
<--- Change --->
1. syntax:
function ISArcExAddDisks(Inputfile, Password, OutputPath: Widestring): boolean;
function ISArcExExtract(DiskNumber: Integer; CfgFile, WorkPath: Widestring): boolean;
2. example:
// Disk Adding part
repeat
if FileExists(ExpandConstant('{src}\data1.bf')) then
begin
ISArcDiskAddingFalied:= ISArcExAddDisks(ExpandConstant('{src}\data1.bf'),
'{#DiskPassword}', ExpandConstant('{app}'));
if ISArcDiskAddingFalied then break;
ISArcExDiskCount := ISArcExDiskCount + 1;
end;
...
#ifdef Components
if IsComponentSelected('something1\something2') then
begin
ISArcDiskAddingFalied:= ISArcExAddDisks(ExpandConstant('{src}\ConfigShit.bf'),
'{#DiskPassword}', ExpandConstant('{userdocs}\BFGames'));
if ISArcDiskAddingFalied then break;
ISArcExDiskCount := ISArcExDiskCount + 1;
end;
...
#endif
until true;
.....
// Extraction
for i := 1 to ISArcExDiskCount do
begin
ISArcExError := not ISArcExExtract(i, ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\temp'));
if ISArcExError then break;
end;
.....
Code:
summary:
data1.bf ---> {app}
...
configShit.bf ---> {userdocs}\BFGames}
...
Note: just replacing the library (.dll) is not enough. update your previous scripts as well.
.