DLL IS7zEx - Advanced 7-Zip Extraction API for Inno Setup

BLACKFIRE69

Новичок
IS7zEx - Advanced 7-Zip Extraction API for Inno Setup
===================================================

Overview:

IS7zEx is a high-performance extraction library meticulously crafted for Inno Setup. It provides a robust interface for handling 7z archives, offering advanced progress tracking, multi-part archive support, and precise extraction metrics that standard tools are often lacking.

Specifications:
Version : v0.1
Author : BLACKFIRE69
Build : 6997A400
Compatibility : Inno Setup v6.0 or later (Required)
License : Proprietary (See LICENSE file for details)
Tested Engine : 7-Zip v26.00 (Latest)

Key Features:
• Flexible Extraction Modes: Full support for Normal archives and Splitted (.001, .002) archives
• Advanced Progress Tracking: Real-time metrics for Overall Progress, Current Disk Progress, and Extracted/Total File Counts
• Performance Metrics: Accurate Current and Average Speed (MB/s)
• Time Management: Intelligent "Time Remaining" and "Elapsed Time" tracking with three customizable display formats
• Process Control: Built-in functions to Suspend, Resume, or Stop the extraction process safely
• UI Stability: Includes "Calc Accuracy" reduction logic to prevent erratic jumping in speed and ETA displays
• Localization: Easily switch between languages using external .ini configuration files

Important - Split Archive Handling:

Unlike the RAR format, the 7-Zip API requires split parts to be merged before extraction can begin. IS7zEx handles this by creating a local temporary file.

Single Directory:
If all parts (.001, .002...) are in one folder, detection is automatic.

Multiple Directories:
If parts are spread across different disks (nested structure), use IS7zExSetSplitPartCount to manually define the total part count.

Temporary Path:
You can override the temp file location using IS7zExSetSplitTmpPath if the destination drive lacks sufficient space for both the temp file and extracted data.

Supported File Structures:

Форматирование (BB-код):
[ROOT]
 ├── data1.7z
 ├── Disks/
 │ ├── Disk1/
 │ │ ├── Sonic 2.7z.001
 │ │ └── Sonic 2.7z.002
 │ └── Disk2/
 │ ├── Sonic 2.7z.003
 │ └── Sonic 2.7z.004
 ├── data3.7z
 └── Setup.exe

Distribution Files:

IS7zEx.dll
Core API Library

7z_32.dll
7-Zip engine integration

IS7zEx.iss
Header for Inno Setup

English.ini / Russian.ini
Language configuration files

---

Quick Start Examples

Example 1: Normal Archives

Форматирование (BB-код):
{Code}
#include "IS7zEx.iss"

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssInstall then
  begin
    // ADDING DISKS
    repeat
      if not AddArchiveEntry('data1.7z') then Break;
      if not AddArchiveEntry('data2.7z') then Break;
      if not AddArchiveEntry('data3.7z') then Break;
    until true;

    // INITIALIZE & EXTRACT
    if IS7zExInitEx(2, @ProgressCallbackEx) then
    begin
      repeat
        for i := 1 to IS7zExDiskCount do
        begin
          if not IS7zExExtract(i) then Break;
        end;
      until true;
      IS7zExStop;
    end;
  end;
end;

Example 2: Normal + Splitted (Simple Structure)

Форматирование (BB-код):
{Code}
#include "IS7zEx.iss"

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssInstall then
  begin
    // ADDING DISKS
    repeat
      if not AddArchiveEntry('data1.7z') then Break;
      // All parts (.001, .002, etc.) are in the same directory.
      // Detection is automatic.
      if not AddArchiveEntry('Sonic 2.7z.001') then Break;
      if not AddArchiveEntry('data3.7z') then Break;
    until true;

    // INITIALIZE & EXTRACT
    if IS7zExInitEx(2, @ProgressCallbackEx) then
    begin
      repeat
        for i := 1 to IS7zExDiskCount do
        begin
          if not IS7zExExtract(i) then Break;
        end;
      until true;
      IS7zExStop;
    end;
  end;
end;

Example 3: Normal + Splitted (Nested Structure)

Форматирование (BB-код):
{Code}
#include "IS7zEx.iss"

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssInstall then
  begin
    // ADDING DISKS
    repeat
      if not AddArchiveEntry('data1.7z') then Break;

      if not AddArchiveEntry('Sonic2.7z.001') then
        Break
      else
      begin
        // Required for split parts spread across multiple directories
        IS7zExSetSplitPartCount(IS7zExDiskCount, 10);

        // Set custom temp path if disk space is limited
        IS7zExSetSplitTmpPath(IS7zExDiskCount, ExpandConstant('{src}'));
      end;

      if not AddArchiveEntry('data3.7z') then Break;
    until true;

    // INITIALIZE & EXTRACT
    if IS7zExInitEx(2, @ProgressCallbackEx) then
    begin
      repeat
        for i := 1 to IS7zExDiskCount do
        begin
          if not IS7zExExtract(i) then Break;
        end;
      until true;
      IS7zExStop;
    end;
  end;
end;

1.png
2.png
3.png
4.png
5.png
 

Вложения

Назад
Сверху