Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #16  
Old 03-01-2023, 04:03
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,027
Thanks: 1,738
Thanked 2,194 Times in 751 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 04: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)
Sponsored Links
  #17  
Old 03-01-2023, 04:31
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,400 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
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.


.

guys, can you tell me is this lib detected as a virus?

Last edited by BLACKFIRE69; 03-01-2023 at 04:34.
Reply With Quote
  #18  
Old 05-01-2023, 08:40
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,400 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Arrow ISArcEx - Updates

VER: 0.4.0.1

Code:
What's new:

 - Improved performance, percentage and times.


( this version is not compatible with the old version (v.0.4) )
Attached Files
File Type: 7z ISArcEx v0.4.0.1 + Example.7z (3.11 MB, 115 views)
Reply With Quote
The Following 5 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (16-05-2023), audiofeel (05-01-2023), ffmla (05-01-2023), Gehrman (05-01-2023), hitman797 (05-01-2023)
  #19  
Old 05-01-2023, 10:37
ffmla ffmla is offline
Registered User
 
Join Date: Nov 2014
Location: Digital world
Posts: 112
Thanks: 602
Thanked 65 Times in 41 Posts
ffmla is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
guys, can you tell me is this lib detected as a virus?
My K7 AV didn't detect anything..
VirusTotal report the following things.
Attached Images
File Type: png image_2023-01-05_231009371.png (59.2 KB, 377 views)
Reply With Quote
The Following 2 Users Say Thank You to ffmla For This Useful Post:
ADMIRAL (06-01-2023), BLACKFIRE69 (05-01-2023)
  #20  
Old 05-01-2023, 11:13
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,167
Thanks: 284
Thanked 1,359 Times in 616 Posts
Masquerade is on a distinguished road
I've tried updating my script to reflect the new changes however now for some reason the error flag will instantly trigger leading to a failed installation.

There is no log written or IsArcEx error message box that could indicate the problem.

Please may you take a look at my changes and see if anything is incorrect? The old strings are commented out with //.

Thank you!

Code:
//function ISArcExAddDisks(Inputfile, Password: Widestring): boolean;
function ISArcExAddDisks(Inputfile, Password, OutputPath: Widestring): boolean;
  external 'ISArcExAddDisks@files:ISArcEx.dll stdcall';
//function ISArcExExtract(DiskNumber: Integer; OutputPath, CfgFile, WorkPath: Widestring): boolean;
function ISArcExExtract(DiskNumber: Integer; CfgFile, WorkPath: Widestring): boolean;
  external 'ISArcExExtract@files:ISArcEx.dll stdcall';
Code:
    #ifdef Data1
      if FileExists(ExpandConstant('{src}\{#Data1}')) then
      begin
        ISArcDiskAddingFalied:= ISArcExAddDisks(ExpandConstant('{src}\{#Data1}'), '{#DiskPassword}', ExpandConstant('{app}'));
        if ISArcDiskAddingFalied then break;
        ISArcExDiskCount:= ISArcExDiskCount + 1;
      end;
    #endif
Code:
for i:= 1 to ISArcExDiskCount do
        begin
          //ISArcExError := not ISArcExExtract(i, ExpandConstant('{app}\'), ExpandConstant('{tmp}\ARC.INI'), ExpandConstant('{app}'));
          ISArcExError := not ISArcExExtract(i, ExpandConstant('{tmp}\ARC.INI'), ExpandConstant('{app}'));
          if ISArcExError then break;
        end;
Reply With Quote
  #21  
Old 05-01-2023, 14:27
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,400 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
I've tried updating my script to reflect the new changes however now for some reason the error flag will instantly trigger leading to a failed installation.

There is no log written or IsArcEx error message box that could indicate the problem.

Please may you take a look at my changes and see if anything is incorrect? The old strings are commented out with //.

Thank you!

Code:
//function ISArcExAddDisks(Inputfile, Password: Widestring): boolean;
function ISArcExAddDisks(Inputfile, Password, OutputPath: Widestring): boolean;
  external 'ISArcExAddDisks@files:ISArcEx.dll stdcall';
//function ISArcExExtract(DiskNumber: Integer; OutputPath, CfgFile, WorkPath: Widestring): boolean;
function ISArcExExtract(DiskNumber: Integer; CfgFile, WorkPath: Widestring): boolean;
  external 'ISArcExExtract@files:ISArcEx.dll stdcall';
Code:
    #ifdef Data1
      if FileExists(ExpandConstant('{src}\{#Data1}')) then
      begin
        ISArcDiskAddingFalied:= ISArcExAddDisks(ExpandConstant('{src}\{#Data1}'), '{#DiskPassword}', ExpandConstant('{app}'));
        if ISArcDiskAddingFalied then break;
        ISArcExDiskCount:= ISArcExDiskCount + 1;
      end;
    #endif
Code:
for i:= 1 to ISArcExDiskCount do
        begin
          //ISArcExError := not ISArcExExtract(i, ExpandConstant('{app}\'), ExpandConstant('{tmp}\ARC.INI'), ExpandConstant('{app}'));
          ISArcExError := not ISArcExExtract(i, ExpandConstant('{tmp}\ARC.INI'), ExpandConstant('{app}'));
          if ISArcExError then break;
        end;

yes, there's something incorrect. see the hint below.

Code:
v0.4.0.0 (Old)  >>  ISArcDiskAddingFalied

v0.4.0.1 (New)  >>  ISArcDiskAddingSuccess
let me know if you need more help.



Quote:
Originally Posted by Masquerade View Post
There is no log written or IsArcEx error message box that could indicate the problem.

add this before the ISArcExInit. you'll see the error. (sorry, i put the error message in the wrong place in the script)

Code:
if ISArcExDiskCount = 0 then
   MsgBox('There is no any archive found for unpacking.', mbError, MB_OK);
Reply With Quote
  #22  
Old 05-01-2023, 14:40
kj911 kj911 is offline
Registered User
 
Join Date: Apr 2010
Location: world
Posts: 182
Thanks: 133
Thanked 63 Times in 44 Posts
kj911 is on a distinguished road
Typo error?? --> ISArcDiskAddingFalied ! Correct? No. --> ISArcDiskAddingFailed
Reply With Quote
The Following User Says Thank You to kj911 For This Useful Post:
Masquerade (05-01-2023)
  #23  
Old 05-01-2023, 16:15
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,167
Thanks: 284
Thanked 1,359 Times in 616 Posts
Masquerade is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
yes, there's something incorrect. see the hint below.

Code:
v0.4.0.0 (Old)  >>  ISArcDiskAddingFalied

v0.4.0.1 (New)  >>  ISArcDiskAddingSuccess
Maybe I am not following, but I don't see how changing the name of the Boolean for the disk adding command will fix the issue.
Reply With Quote
  #24  
Old 05-01-2023, 22:11
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,400 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Maybe I am not following, but I don't see how changing the name of the Boolean for the disk adding command will fix the issue.

i know it's a bit confusing. but note that it's not just changing the variable name, the ISArcExAddDisks function has also changed.


1).
in the previous version (v0.4) ISArcExAddDisks function returns error state when adding the disks.

i.e. it returns true if a disk was added unsuccessfully (failed). so you need to catch the error state.
Code:
ISArcDiskAddingFalied:= ISArcExAddDisks(...);
if ISArcDiskAddingFalied then break;

2).
the new version (v0.4.0.1) returns the success of adding disks.

i.e. it returns true if a disk was added successfully.

Code:
ISArcDiskAddingSuccess:= ISArcExAddDisks(...);
if not ISArcDiskAddingSuccess then break;

3).
this is the summarized difference.

Code:
v0.4
procedure CurStepChanged(CurStep: TSetupStep);
begin
   ...
   ISArcDiskAddingFalied := True;
   ...
   repeat
      if FileExists(...) then 
      begin
        ISArcDiskAddingFalied:= ISArcExAddDisks(...);
        if ISArcDiskAddingFalied then break;
        ISArcExDiskCount := ISArcExDiskCount + 1;
      end;
      ...
   until true;
 
   if (not ISArcDiskAddingFalied) and ISArcExInit(...) then
   begin
    ...
   end;
end;
Code:
v0.4.0.1
procedure CurStepChanged(CurStep: TSetupStep);
begin
   ...
   ISArcDiskAddingSuccess := False;
   ...
   repeat
      if FileExists(...) then 
      begin
        ISArcDiskAddingSuccess:= ISArcExAddDisks(...);
        if not ISArcDiskAddingSuccess then break;
        ISArcExDiskCount := ISArcExDiskCount + 1;
      end;
      ...
   until true;
  
   if (ISArcDiskAddingSuccess) and ISArcExInit(...) then
   begin
    ...
   end;
end;

Last edited by BLACKFIRE69; 05-01-2023 at 22:32.
Reply With Quote
The Following User Says Thank You to BLACKFIRE69 For This Useful Post:
Gehrman (06-01-2023)
  #25  
Old 06-01-2023, 02:48
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,167
Thanks: 284
Thanked 1,359 Times in 616 Posts
Masquerade is on a distinguished road
@BLACKFIRE69

Thank you for the expansion of your little hint (steps 1 and 2) it was more than sufficient to help me understand the logic behind the instructions. Thanks again and apologies.
Reply With Quote
The Following User Says Thank You to Masquerade For This Useful Post:
BLACKFIRE69 (06-01-2023)
  #26  
Old 20-03-2023, 12:48
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,400 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Arrow ISArcEx - Updates

ISArcEx - Quality Updates

Code:
How to Update:

- Just replace the old DLL(v0.4.0.1 - 2023-Jan-05) 
     with the new DLL(v0.4.0.1 - 2023-Mar-20).

Last edited by BLACKFIRE69; 03-04-2023 at 15:08.
Reply With Quote
The Following 6 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (16-05-2023), audiofeel (20-03-2023), ffmla (17-05-2023), hitman797 (22-03-2023), Lord.Freddy (20-03-2023), ScOOt3r (20-03-2023)
  #27  
Old 09-05-2023, 04:43
audiofeel's Avatar
audiofeel audiofeel is online now
Registered User
 
Join Date: Jan 2013
Location: Russia
Posts: 369
Thanks: 443
Thanked 856 Times in 311 Posts
audiofeel is on a distinguished road
the number of extracted files can somehow be displayed as percentages
let's say - the total number of 78 extracted 41
41/78
Reply With Quote
  #28  
Old 15-05-2023, 14:15
Tihiy_Don Tihiy_Don is offline
Registered User
 
Join Date: Mar 2023
Location: Los Angeles Lakers
Posts: 42
Thanks: 89
Thanked 23 Times in 16 Posts
Tihiy_Don is on a distinguished road
Excellent DDL, switched to it from isDone. Thank you.
Reply With Quote
The Following User Says Thank You to Tihiy_Don For This Useful Post:
BLACKFIRE69 (11-06-2023)
  #29  
Old 23-06-2023, 00:20
Tihiy_Don Tihiy_Don is offline
Registered User
 
Join Date: Mar 2023
Location: Los Angeles Lakers
Posts: 42
Thanks: 89
Thanked 23 Times in 16 Posts
Tihiy_Don is on a distinguished road
I ask you to change the ISArcExCancel variable to boolean to match the general concept by analogy with ISArcExError.

Accordingly, if the installation was canceled, it is not an error.
Why not cancel the example and make the download of an excellent unpacking by example:
Quote:
if (CurStep = ssPostInstall) and (ISArcExCancel>0), then....
?

Last edited by Tihiy_Don; 23-06-2023 at 00:23.
Reply With Quote
  #30  
Old 01-08-2023, 08:53
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,400 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Arrow ISArcEx - Updates

Update Available!

Code:
What's New

- Some improvements.
Code:
* How to update?

>> just replace the old DLL with the new one.
.
Attached Images
File Type: png 00.png (7.7 KB, 129 views)
Attached Files
File Type: 7z ISArcEx - LibOnly [2023-July-31].7z (60.9 KB, 29 views)
Reply With Quote
The Following 5 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (01-08-2023), ffmla (05-08-2023), hitman797 (01-08-2023), Lord.Freddy (01-08-2023), Tihiy_Don (01-08-2023)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASIS: Advanced Simple Installer Script KaktoR Conversion Tutorials 1387 29-11-2024 12:27
XTool 2020 (Plugins) Razor12911 Conversion Tutorials 404 13-07-2024 09:52
Best Compression For Archiving brispuss PC Games 13 06-09-2023 06:49
Game Installer Designer by altef_4 altef_4 Conversion Tutorials 236 28-05-2021 03:54
Compression Questions yasitha Conversion Tutorials 10 09-01-2019 13:29



All times are GMT -7. The time now is 19:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com