View Single Post
  #13  
Old 03-01-2023, 03:00
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 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;



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.


.

Last edited by BLACKFIRE69; 03-04-2023 at 14:07.
Reply With Quote
The Following 5 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (06-01-2023), audiofeel (03-01-2023), Behnam2018 (24-11-2024), Gehrman (03-01-2023), hitman797 (16-12-2024)