FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   ISArcEx - A FreeArc Archive Extractor Plugin for InnoSetup (https://fileforums.com/showthread.php?t=104980)

BLACKFIRE69 05-01-2023 07:40

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) )


ffmla 05-01-2023 09:37

1 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 499650)
guys, can you tell me is this lib detected as a virus?

My K7 AV didn't detect anything..
VirusTotal report the following things.

Masquerade 05-01-2023 10:13

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;


BLACKFIRE69 05-01-2023 13:27

Quote:

Originally Posted by Masquerade (Post 499677)
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 (Post 499677)
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);


kj911 05-01-2023 13:40

Typo error?? --> ISArcDiskAddingFalied ! Correct? No. --> ISArcDiskAddingFailed

Masquerade 05-01-2023 15:15

Quote:

Originally Posted by BLACKFIRE69 (Post 499680)
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.

BLACKFIRE69 05-01-2023 21:11

Quote:

Originally Posted by Masquerade (Post 499683)
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;


Masquerade 06-01-2023 01:48

@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.

BLACKFIRE69 20-03-2023 11:48

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).


Tihiy_Don 15-05-2023 13:15

Excellent DDL, switched to it from isDone. Thank you.

Tihiy_Don 22-06-2023 23:20

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....
?

BLACKFIRE69 01-08-2023 07:53

ISArcEx - Updates
 
2 Attachment(s)
Update Available!

Code:

What's New

- Some improvements.

Code:

* How to update?

>> just replace the old DLL with the new one.

.

MMBDON 06-08-2023 12:11

Quote:

Originally Posted by BLACKFIRE69 (Post 501830)
Update Available!

Code:

What's New

- Some improvements.

Code:

* How to update?

>> just replace the old DLL with the new one.

.

Sir, plz add button click sounds to the script.

BLACKFIRE69 04-09-2023 04:44

ISArcEx - Updates
 
2 Attachment(s)
ISArcEx v0.4.0.1 - 2023-Sep-04


What's new:
Code:

* Added 'TotalFile' and 'CurrentFiles' into the callback function.

* Added new functions.
  iprocedure ISArcExReduceCalcAccuracy;
        - this procedure plays a crucial role in stabilizing the 'Time Remaining' and
          'Data Transfer Speed' calculations, ensuring they change
          smoothly and not too rapidly.


  ii. function ISArcExInitEx(WinHandle: Longint; TimeFormat: Integer;
      Callback: TCallbackEx): Boolean;

  iii. procedure ISArcExCallbackInterval(MSec: Cardinal);

* This update may support long paths and special characters in the path (not tested).

* Some improvements and bug fixing.

Code:

type
  TCallback = function(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB: Integer;
        DiskName, CurrentFile, TimeStr1, TimeStr2, TimeStr3, Speed: WideString): LongWord;

type
  TCallbackEx = function(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB,
        TotalFiles, CurFiles: Integer; DiskName, CurrentFile, TimeStr1, TimeStr2,
        TimeStr3, Speed: WideString): LongWord;


.

Fak Eid 04-09-2023 09:34

Hi @audiofeel @Blackfire69,

I use FMXModule.iss which already has IsArcEx injected. So I don't have to import IsArcEx.dll. Can anyone of you provide the latest Module with the following changes included. I also observed that speed change was an issue, even reported it way back to audiofeel as well. Thanks for the fix.


All times are GMT -7. The time now is 16:24.

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