View Single Post
  #2  
Old 03-01-2023, 03:03
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
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}

Last edited by Cesar82; 03-01-2023 at 03:05.
Reply With Quote
The Following 4 Users Say Thank You to Cesar82 For This Useful Post:
audiofeel (03-01-2023), BLACKFIRE69 (03-01-2023), ffmla (04-01-2023), Gehrman (03-01-2023)