Вопрос How do I add FreeArc decompression to a script?

EshayDev

Новичок
I currently have a basic installer that takes an input folder and compresses all the files using lzma2/ultra64, but the file size is obvously pretty large. So now I have split FA archives that were compressed using xprecomp+srep+lolz, but I can't seem to figure out how to unpack them in my script. Any guidance on what I should add to my script to get it working would be much appreciated. Script is below

code_language.pascal:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define public Dependency_NoExampleSetup
#include "CodeDependencies.iss"
#define MyAppName "Far Cry 4 Gold Edition"
#define MyAppVersion "1.10.0"
#define MyAppPublisher "Ubisoft"
#define MyAppURL "http://ubisoft.com/"
#define MyAppExeName "FarCry4.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4AC919CF-E54D-48E4-9B19-99F1BD14EB0A}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\Games\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename=setup
SetupIconFile=C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\icon.ico
Compression=lzma2/ultra64
LZMAUseSeparateProcess=yes
LZMANumBlockThreads=6
LZMADictionarySize=100000
LZMANumFastBytes=273
SolidCompression=no
DiskSpanning=yes
DiskSliceSize=max
WizardStyle=modern
SetupLogging=no
DisableWelcomePage=no
UninstallDisplayName=Far Cry 4 Gold Edition
UninstallDisplayIcon={app}\bin\FarCry4.exe
WizardImageFile=C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\banner.bmp
WizardSmallImageFile=C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\small.bmp

[Messages]
// define wizard title and tray status msg
// both are normally defined in innosetup's default.isl (install folder)
SetupAppTitle = Far Cry 4 Gold Edition Installer
SetupWindowTitle = Far Cry 4 Gold Edition Installer

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\files\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\bass.dll"; Flags: dontcopy
Source: "C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\music.mp3"; Flags: dontcopy
Source: "C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\dxwebsetup.exe"; Flags: dontcopy noencryption
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autoprograms}\Far Cry 4\Far Cry 4"; Filename: "{app}\bin\{#MyAppExeName}";
Name: "{autodesktop}\Far Cry 4"; Filename: "{app}\bin\{#MyAppExeName}"; Tasks: desktopicon;
Name: "{autoprograms}\Far Cry 4\Far Cry 4 Editor"; Filename: "{app}\bin\IGE_WPF64.exe";

[CustomMessages]
SoundCtrlButtonCaptionSoundOn=Unmute
SoundCtrlButtonCaptionSoundOff=Mute

[Code]
const
  BASS_SAMPLE_LOOP = 4;
  BASS_ACTIVE_STOPPED = 0;
  BASS_ACTIVE_PLAYING = 1;
  BASS_ACTIVE_STALLED = 2;
  BASS_ACTIVE_PAUSED  = 3;
  BASS_UNICODE = $80000000;
  BASS_CONFIG_GVOL_STREAM = 5;
const
  #ifndef UNICODE
    EncodingFlag = 0;
  #else
    EncodingFlag = BASS_UNICODE;
  #endif

type
  HSTREAM = DWORD;

function BASS_Init(device: LongInt; freq, flags: DWORD;
  win: HWND; clsid: Cardinal): BOOL;
  external 'BASS_Init@files:bass.dll stdcall';
function BASS_Start: BOOL;
  external 'BASS_Start@files:bass.dll stdcall';
function BASS_Pause: BOOL;
  external 'BASS_Pause@files:bass.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
  external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_ChannelIsActive(handle: DWORD): DWORD;
  external 'BASS_ChannelIsActive@files:bass.dll stdcall';
function BASS_Free: BOOL;
  external 'BASS_Free@files:bass.dll stdcall';
function BASS_ErrorGetCode(): Integer;
  external 'BASS_ErrorGetCode@files:bass.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
  offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  external 'BASS_StreamCreateFile@files:bass.dll stdcall';

var
  SoundStream: HSTREAM;
  SoundCtrlButton: TNewButton;

procedure SoundCtrlButtonClick(Sender: TObject);
begin
  case BASS_ChannelIsActive(SoundStream) of
    BASS_ACTIVE_PLAYING:
    begin
      if BASS_Pause then
        SoundCtrlButton.Caption :=
          ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOn}');
    end;
    BASS_ACTIVE_PAUSED:
    begin
      if BASS_Start then
        SoundCtrlButton.Caption :=
          ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
    end;
  end;
end;


procedure InitializeWizard;
begin
  ExtractTemporaryFile('music.mp3');
  if BASS_Init(-1, 44100, 0, 0, 0) then
  begin
    SoundStream := BASS_StreamCreateFile(False,
      ExpandConstant('{tmp}\music.mp3'), 0, 0, 0, 0,
      EncodingFlag or BASS_SAMPLE_LOOP);
    if SoundStream = 0 then
    begin
      Log(Format('Error playing file, error code = %d', [BASS_ErrorGetCode]));
    end;
    BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
    BASS_ChannelPlay(SoundStream, False);

    SoundCtrlButton := TNewButton.Create(WizardForm);
    SoundCtrlButton.Parent := WizardForm;
    SoundCtrlButton.Left :=
      WizardForm.OuterNotebook.Left + WizardForm.InnerNotebook.Left;
    SoundCtrlButton.Top := WizardForm.NextButton.Top;
    SoundCtrlButton.Anchors := [akLeft, akBottom];
    SoundCtrlButton.Width := WizardForm.NextButton.Width;
    SoundCtrlButton.Height := WizardForm.NextButton.Height;
    SoundCtrlButton.Caption :=
      ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
    SoundCtrlButton.OnClick := @SoundCtrlButtonClick;
  end;
end;

procedure DeinitializeSetup;
begin
  BASS_Free;
end;

function InitializeSetup: Boolean;
begin
  // add the dependencies you need
  Dependency_AddDotNet40;
  Dependency_AddVC2008;
  Dependency_AddVC2010;
  ExtractTemporaryFile('dxwebsetup.exe');
  Dependency_AddDirectX;
  // ...
  Result := True;
end;

[Run]
Filename: "{app}\bin\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
 

SakAwans

Новичок
I currently have a basic installer that takes an input folder and compresses all the files using lzma2/ultra64, but the file size is obvously pretty large. So now I have split FA archives that were compressed using xprecomp+srep+lolz, but I can't seem to figure out how to unpack them in my script. Any guidance on what I should add to my script to get it working would be much appreciated. Script is below

code_language.pascal:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define public Dependency_NoExampleSetup
#include "CodeDependencies.iss"
#define MyAppName "Far Cry 4 Gold Edition"
#define MyAppVersion "1.10.0"
#define MyAppPublisher "Ubisoft"
#define MyAppURL "http://ubisoft.com/"
#define MyAppExeName "FarCry4.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4AC919CF-E54D-48E4-9B19-99F1BD14EB0A}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\Games\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename=setup
SetupIconFile=C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\icon.ico
Compression=lzma2/ultra64
LZMAUseSeparateProcess=yes
LZMANumBlockThreads=6
LZMADictionarySize=100000
LZMANumFastBytes=273
SolidCompression=no
DiskSpanning=yes
DiskSliceSize=max
WizardStyle=modern
SetupLogging=no
DisableWelcomePage=no
UninstallDisplayName=Far Cry 4 Gold Edition
UninstallDisplayIcon={app}\bin\FarCry4.exe
WizardImageFile=C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\banner.bmp
WizardSmallImageFile=C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\small.bmp

[Messages]
// define wizard title and tray status msg
// both are normally defined in innosetup's default.isl (install folder)
SetupAppTitle = Far Cry 4 Gold Edition Installer
SetupWindowTitle = Far Cry 4 Gold Edition Installer

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\files\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\bass.dll"; Flags: dontcopy
Source: "C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\music.mp3"; Flags: dontcopy
Source: "C:\Users\Chris\Desktop\Repacking\inno-projects\fc4\inno\dxwebsetup.exe"; Flags: dontcopy noencryption
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autoprograms}\Far Cry 4\Far Cry 4"; Filename: "{app}\bin\{#MyAppExeName}";
Name: "{autodesktop}\Far Cry 4"; Filename: "{app}\bin\{#MyAppExeName}"; Tasks: desktopicon;
Name: "{autoprograms}\Far Cry 4\Far Cry 4 Editor"; Filename: "{app}\bin\IGE_WPF64.exe";

[CustomMessages]
SoundCtrlButtonCaptionSoundOn=Unmute
SoundCtrlButtonCaptionSoundOff=Mute

[Code]
const
  BASS_SAMPLE_LOOP = 4;
  BASS_ACTIVE_STOPPED = 0;
  BASS_ACTIVE_PLAYING = 1;
  BASS_ACTIVE_STALLED = 2;
  BASS_ACTIVE_PAUSED  = 3;
  BASS_UNICODE = $80000000;
  BASS_CONFIG_GVOL_STREAM = 5;
const
  #ifndef UNICODE
    EncodingFlag = 0;
  #else
    EncodingFlag = BASS_UNICODE;
  #endif

type
  HSTREAM = DWORD;

function BASS_Init(device: LongInt; freq, flags: DWORD;
  win: HWND; clsid: Cardinal): BOOL;
  external 'BASS_Init@files:bass.dll stdcall';
function BASS_Start: BOOL;
  external 'BASS_Start@files:bass.dll stdcall';
function BASS_Pause: BOOL;
  external 'BASS_Pause@files:bass.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
  external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_ChannelIsActive(handle: DWORD): DWORD;
  external 'BASS_ChannelIsActive@files:bass.dll stdcall';
function BASS_Free: BOOL;
  external 'BASS_Free@files:bass.dll stdcall';
function BASS_ErrorGetCode(): Integer;
  external 'BASS_ErrorGetCode@files:bass.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
  offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  external 'BASS_StreamCreateFile@files:bass.dll stdcall';

var
  SoundStream: HSTREAM;
  SoundCtrlButton: TNewButton;

procedure SoundCtrlButtonClick(Sender: TObject);
begin
  case BASS_ChannelIsActive(SoundStream) of
    BASS_ACTIVE_PLAYING:
    begin
      if BASS_Pause then
        SoundCtrlButton.Caption :=
          ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOn}');
    end;
    BASS_ACTIVE_PAUSED:
    begin
      if BASS_Start then
        SoundCtrlButton.Caption :=
          ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
    end;
  end;
end;


procedure InitializeWizard;
begin
  ExtractTemporaryFile('music.mp3');
  if BASS_Init(-1, 44100, 0, 0, 0) then
  begin
    SoundStream := BASS_StreamCreateFile(False,
      ExpandConstant('{tmp}\music.mp3'), 0, 0, 0, 0,
      EncodingFlag or BASS_SAMPLE_LOOP);
    if SoundStream = 0 then
    begin
      Log(Format('Error playing file, error code = %d', [BASS_ErrorGetCode]));
    end;
    BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
    BASS_ChannelPlay(SoundStream, False);

    SoundCtrlButton := TNewButton.Create(WizardForm);
    SoundCtrlButton.Parent := WizardForm;
    SoundCtrlButton.Left :=
      WizardForm.OuterNotebook.Left + WizardForm.InnerNotebook.Left;
    SoundCtrlButton.Top := WizardForm.NextButton.Top;
    SoundCtrlButton.Anchors := [akLeft, akBottom];
    SoundCtrlButton.Width := WizardForm.NextButton.Width;
    SoundCtrlButton.Height := WizardForm.NextButton.Height;
    SoundCtrlButton.Caption :=
      ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
    SoundCtrlButton.OnClick := @SoundCtrlButtonClick;
  end;
end;

procedure DeinitializeSetup;
begin
  BASS_Free;
end;

function InitializeSetup: Boolean;
begin
  // add the dependencies you need
  Dependency_AddDotNet40;
  Dependency_AddVC2008;
  Dependency_AddVC2010;
  ExtractTemporaryFile('dxwebsetup.exe');
  Dependency_AddDirectX;
  // ...
  Result := True;
end;

[Run]
Filename: "{app}\bin\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Use this script to understand the basics...
Скачать файлы можно по ссылке: https://cloud.mail.ru/public/AmFn/JVfMgLN4N
 

EshayDev

Новичок
Use this script to understand the basics...
Thank you, so I've modified it to my needs but now I'm getting an error about unsupported compression method when installing. It says I'm using xprecomp+srep+lolz+diskspan:50m:50m. I've added the tools needed and included the files in the script, but it's still not working. Script is below

code_language.pascal:
#define NeedSize "300000"

#define NeedMem 4096

#define SecondPB

#ifdef SecondPB
  #define PbLblCount 1
#else
  #define PbLblCount 0
#endif

;#define Components

;#define records

;#define facompress
;#define PrecompInside
#define SrepInside
;#define precomp "0.42"
;#define unrar
;#define XDelta
;#define PackZIP

;#define  FAZIP
;#define  MSC_FROG
;#define  MSC_TAK
;#define  PZLIB
;#define  PZLIB_DLL
;#define  REFLATE
;#define  ZSTD
;#define  LZ4
;#define  LZ5
;#define  XZ
;#define  RAZOR_PRECOMP_MT
;#define  PPX2
;#define  OFR
;#define  KAOS_DDS
#define  LOLZ
#define  XPRECOMP
#define  DISKSPAN

[Setup]
AppName=BCU
AppVerName=1.0.0
DefaultDirName={pf}\BCU
DefaultGroupName=BCU
OutputDir=.
OutputBaseFilename=setup
VersionInfoCopyright=EDiSO
SolidCompression=no
#ifdef NeedSize
  ExtraDiskSpaceRequired={#NeedSize}
#endif

#ifdef Components
[Types]
  Name: full; Description: Full installation; Flags: iscustom

[Components]
  Name: text; Description: Base Files; Types: full; Flags: fixed
#endif

[Files]
Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\arc.ini; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy

#ifdef records
  Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PrecompInside
  Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef SrepInside
  Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef MSCInside
  Source: Include\CLS-MSC.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef facompress
  Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef precomp
  #if precomp == "0.38"
    Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
  #else
    #if precomp == "0.4"
      Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
    #else
      #if precomp == "0.41"
        Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
      #else
        #if precomp == "0.42"
          Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
        #else
          Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
          Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
          Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
          Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
        #endif
      #endif
    #endif
  #endif
#endif

#ifdef unrar
  Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef XDelta
  Source: Include\XDelta3.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PackZIP
  Source: Include\7z.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\packZIP.exe; DestDir: {tmp}; Flags: dontcopy
#endif


#ifdef MSC_FROG
Source: Include\CLS-MSC_FROG.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef MSC_TAK
Source: Include\CLS-MSC_TAK.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef FAZIP
Source: Include\Addons\fazip.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\fazip64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef LZ4
Source: Include\Addons\lz4.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\lz464.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef LZ5
Source: Include\Addons\lz5.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\lz564.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PZLIB
Source: Include\Addons\pzlib.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\pzlib64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PZLIB_dll
Source: Include\Addons\hif2raw_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\raw2hif_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\hif2raw_dll64.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\raw2hif_dll64.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef SREP
  Source: Include\Addons\srep.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\srep64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef XZ
  Source: Include\Addons\xz.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\xz64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef ZSTD
  Source: Include\Addons\zstd.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\zstd64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef REFLATE
  Source: Include\Addons\reflate.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\reflateN_x32.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\reflateN_x64.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PPX2
  Source: Include\Addons\ppx2.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef KAOS_DDS
  Source: Include\Addons\rebuild_d.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef OFR
  Source: Include\Addons\ofr.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\ofr64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef RAZOR_PRECOMP_MT
  Source: Include\Addons\CLS-PRECOMPMT.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\CLS-PRECOMPMT.ini; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef LOLZ
  Source: Include\cls-lolz.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\cls-lolz_x64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef XPRECOMP
  Source: Include\xtool.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef DISKSPAN
  Source: Include\cls-diskspan.dll; DestDir: {tmp}; Flags: dontcopy
#endif

[CustomMessages]
russian.ExtractedFile=Extracting:
russian.Extracted=Process In Progress...
russian.CancelButton=Cancel Installation
russian.Error=UnKown Error Occured!
russian.ElapsedTime=Time:
russian.RemainingTime=Time Left:
russian.EstimatedTime=Total Time:
russian.AllElapsedTime=All Elapsed Time:

[Languages]
Name: russian; MessagesFile: compiler:Default.isl

[UninstallDelete]
Type: filesandordirs; Name: {app}

[Code]
const
  PCFonFLY    = true;
  notPCFonFLY = false;
  PbLblCount  = {#PbLblCount};
var
  LblTime      :   array [0..2]             of TLabel;
  LblPct       :   array [0..{#PbLblCount}] of TLabel;
  ISDonePB     :   array [0..{#PbLblCount}] of TNewProgressBar;
  ISDoneCancel :   integer;
  ISDoneError  :   boolean;
  PCFVer       :   double;

type
  TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;
  external 'wrapcallback@files:ISDone.dll stdcall delayload';

function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean;
  external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean;
  external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean;
  external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean;
  external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean;
  external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile, DeleteDiffFile:boolean):boolean;
  external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean;
  external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean;
  external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean;
  external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer;
  external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean;
  external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar;
  external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean;
  external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean;
  external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean;
  external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean;
  external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean;
  external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean;
  external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean;
  external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean;
  external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean;
  external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean;
  external 'ResumeProc@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
    if OveralPct<=1000  then ISDonePB[0].Position := OveralPct;
    LblPct[0].Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
  #ifdef SecondPB
    if CurrentPct<=1000 then ISDonePB[1].Position := CurrentPct;
    LblPct[1].Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
  #endif
  WizardForm.FileNamelabel.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, WizardForm.FileNamelabel.Font, WizardForm.FileNamelabel.Width-ScaleX(100));
  LblTime[0].Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
  LblTime[1].Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
  LblTime[2].Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
  Result := ISDoneCancel;
end;

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
  if CurPageID = wpInstalling then
  begin
    SuspendProc;
    Confirm := False;
    Cancel := False;
    if ExitSetupMsgBox then ISDoneCancel:=1;
    ResumeProc;
  end;
end;

procedure HideControls;
var
  i :integer;
begin
    for i := 0 to PbLblCount do
    begin
      ISDonePB[i].Hide;
      LblPct[i].Hide;
    end;
  for i := 0 to 1 do LblTime[i].Hide;
end;

procedure CreateControls;
var
  i :integer;
begin
  WizardForm.FileNamelabel.SetBounds(ScaleX(0), ScaleY(30), ScaleX(395), ScaleY(14));

    for i := 0 to PbLblCount do
    begin
      ISDonePB[i] := TNewProgressBar.Create(WizardForm);
      with ISDonePB[i] do
      begin
        Parent   := WizardForm.InstallingPage;
        SetBounds(ScaleX(0), ScaleY(50+i*57), ScaleX(365), ScaleY(21));
        Max      := 1000;
      end;

      LblPct[i] := TLabel.Create(WizardForm);
      with LblPct[i] do
      begin
        Parent    := WizardForm.InstallingPage;
        AutoSize  := False;
        SetBounds(ScaleX(370), ScaleY(52+i*57), ScaleX(80), ScaleY(14));
      end;
    end;

  for i := 0 to 2 do
  begin
    LblTime[i] := TLabel.Create(WizardForm);
    with LblTime[i] do
    begin
      AutoSize := False;
      Alignment := taCenter;
        case i of
        0, 1 :
        begin
          Parent := WizardForm.InstallingPage;
          SetBounds(ScaleX(0), ScaleY(75+i*17), ScaleX(395), ScaleY(14));
        end;
        2 :
        begin
          Parent := WizardForm.FinishedPage;
          SetBounds(ScaleX(180), ScaleY(200), ScaleX(300), ScaleY(14));
        end;
      end;
    end;
  end;
end;

Procedure CurPageChanged(CurPageID: Integer);
Begin
  if (CurPageID = wpFinished) and ISDoneError then
  begin
    LblTime[2].Hide;
    WizardForm.Caption:= ExpandConstant('{cm:Error}');
    WizardForm.FinishedLabel.Font.Color:= clRed;
    WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
  end;
end;

function CheckError:boolean;
begin
  result:= not ISDoneError;
end;

procedure Extract(const Filename : string);
begin
 if not IsWin64 then
   ExtractTemporaryFile(Filename + '.exe')
 else begin
    ExtractTemporaryFile(Filename + '64.exe');
   RenameFile(ExpandConstant('{tmp}\')+Filename+'64.exe',ExpandConstant('{tmp}\')+Filename+'.exe');
 end;
end;

procedure Extractdll(const Filename : string);
begin
 if not IsWin64 then
   ExtractTemporaryFile(Filename + '.dll')
 else begin
    ExtractTemporaryFile(Filename + '64.dll');
   RenameFile(ExpandConstant('{tmp}\'+Filename+'64.dll'),ExpandConstant('{tmp}\'+Filename+'.dll'));
 end;
end;

function EXEC_UNPACK( const Exec , Option , inFiles, outDir : string; Deldest : boolean): boolean;
var
  ExecError :boolean;
  FindHandle1, ColFiles1, CurIndex1 : Integer;
  InFilePath, OutFilePath, OutFileName : PAnsiChar;
  temp : string;
  #ifdef ppx2
    Str : array of string;
    cmd : string;
    i : integer;
  #endif
begin
  FindHandle1:=ISFindFiles(0,inFiles,ColFiles1);
  ExecError:=false;
  #ifndef ppx2
    while not ExecError and ISPickFilename(FindHandle1,outDir,CurIndex1,DelDest) do
    begin
      temp := option;
      InFilePath:=ISGetName(0);
      OutFilePath:=ISGetName(1);
      OutFileName:=ISGetName(2);
      StringChangeEx(temp,'<infile>',InFilePath,true);
      StringChangeEx(temp,'<outfile>',OutFilePath,true);
      ExecError:=not ISExec(0, 0, 0, Exec,temp,ExpandConstant('{tmp}'),OutFileName,false);
    end;
  #else
    i := 1;
    CreateDir(ExpandConstant('{tmp}\Bat'));
    while not ExecError and ISPickFilename(FindHandle1,outDir,CurIndex1,false) do
    begin
      temp := option;
      InFilePath:=ISGetName(0);
      OutFilePath:=ISGetName(1);
      OutFileName:=ISGetName(2);
      StringChangeEx(temp,'<infile>',InFilePath,true);
      StringChangeEx(temp,'<outfile>',OutFilePath,true);
      Cmd := '"' + Exec + '" ' + temp;
      SaveStringToFile(ExpandConstant('{tmp}\bat\rest'+inttostr(i)+'.bat'),Cmd,False);
      i := i + 1;
      temp := '';
    end;
    if delDest then
      setArrayLength(Str,3)
    else
      setArrayLength(Str,2);
    Str[0] := 'title Restoring File';
    Str[1] := 'dir /b *rest*bat | "' + ExpandConstant('{tmp}\ppx2.exe') + '" -I {} -P %NUMBER_OF_PROCESSORS% -L 1 "{}"';
    if deldest then
      Str[3] := 'del /q /s  ' + inFiles ;
    SaveStringsToFile(ExpandConstant('{tmp}\Bat\Cmd_Master.bat'),Str,false);
    MsgBox('Wainting',mbInformation,mrOk);
    ExecError := not ISExec( 0, 0, 0, ExpandConstant('{tmp}\bat\Cmd_Master.bat'), '', ExpandConstant('{tmp}'), 'Restoring Files..',false) ; // Launches Batch File
    deltree(ExpandConstant('{tmp}\Bat'),true,true,true);
  #endif
  ISFindFree(FindHandle1);
  Result := ExecError;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
  Comps1, Comps2, Comps3, TmpValue       : cardinal;
  FindHandle1, ColFiles1, CurIndex1, tmp : integer;
  ExecError                              : boolean;
  InFilePath, OutFilePath, OutFileName   : PAnsiChar;
begin
  if CurStep = ssInstall then //Åñëè íåîáõîäèìî, ìîæíî ïîìåíÿòü íà ssPostInstall
  begin 
    WizardForm.ProgressGauge.Hide;
    CreateControls;
    WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
    ISDoneCancel:=0;

  // Ðàñïàêîâêà âñåõ íåîáõîäèìûõ ôàéëîâ â ïàïêó {tmp}.

    ExtractTemporaryFile('unarc.dll');
    ExtractTemporaryFile('arc.ini');

    #ifdef PrecompInside
      ExtractTemporaryFile('CLS-precomp.dll');
      ExtractTemporaryFile('packjpg_dll.dll');
      ExtractTemporaryFile('packjpg_dll1.dll');
      ExtractTemporaryFile('precomp.exe');
      ExtractTemporaryFile('zlib1.dll');
    #endif

    #ifdef SrepInside
      ExtractTemporaryFile('CLS-srep.dll');
    #endif

    #ifdef MSCInside
      ExtractTemporaryFile('CLS-MSC.dll');
    #endif

    #ifdef facompress
      ExtractTemporaryFile('facompress.dll'); //óñêîðÿåò ðàñïàêîâêó .arc àðõèâîâ.
    #endif
    #ifdef records
      ExtractTemporaryFile('records.inf');
    #endif

    #ifdef precomp
      #if precomp == "0.38"
        ExtractTemporaryFile('precomp038.exe');
      #else
        #if precomp == "0.4"
          ExtractTemporaryFile('precomp040.exe');
        #else
          #if precomp == "0.41"
            ExtractTemporaryFile('precomp041.exe');
          #else
            #if precomp == "0.42"
              ExtractTemporaryFile('precomp042.exe');
            #else
              ExtractTemporaryFile('precomp038.exe');
              ExtractTemporaryFile('precomp040.exe');
              ExtractTemporaryFile('precomp041.exe');
              ExtractTemporaryFile('precomp042.exe');
            #endif
          #endif
        #endif
      #endif
    #endif

    #ifdef unrar
      ExtractTemporaryFile('Unrar.dll');
    #endif

    #ifdef XDelta
      ExtractTemporaryFile('XDelta3.dll');
    #endif

    #ifdef PackZIP
      ExtractTemporaryFile('7z.dll');
      ExtractTemporaryFile('PackZIP.exe');
    #endif

    #ifdef FAZIP
     Extract('fazip');
    #endif

    #ifdef LZ4
     Extract('lz4');
    #endif

    #ifdef LZ5
     Extract('lz5');
    #endif

    #ifdef PZLIB
     Extract('pzlib');
    #endif

    #ifdef PZLIB_DLL
     Extractdll('raw2hif_dll');
     Extractdll('hif2raw_dll');
    #endif

    #ifdef MSC_FROG
        ExtractTemporaryFile('CLS-MSC_FROG.dll');
      #else
      #ifdef MSC_TAK
        ExtractTemporaryFile('CLS-MSC_TAK.dll');
      #endif
    #endif

    #ifdef REFLATE
      ExtractTemporaryFile('reflate.exe');
      ExtractTemporaryFile('reflateN_x32.dll');
      ExtractTemporaryFile('reflateN_x64.dll');
    #endif

    #ifdef SREP
      Extract('srep');
    #endif

    #ifdef XZ
      Extract('xz');
    #endif

    #ifdef ZSTD
      Extract('zstd');
    #endif

    #ifdef KAOS_DDS
      ExtractTemporaryFile('rebuild_d.exe');
    #endif

    #ifdef OFR
      Extract('ofr');
    #endif

    #ifdef PPX2
      ExtractTemporaryFile('ppx2.exe');
    #endif

    #ifdef RAZOR_PRECOMP_MT
      ExtractTemporaryFile('CLS-precompmt.ini');
    #endif

    #ifdef LOLZ
      ExtractTemporaryFile('cls-lolz.dll');
    #endif

    #ifdef XPRECOMP
      ExtractTemporaryFile('xtool.exe');
    #endif

    #ifdef DISKSPAN
      ExtractTemporaryFile('cls-diskspan.dll');
    #endif

     ExtractTemporaryFile('English.ini');

// Ïîäãîòàâëèâàåì ïåðåìåííóþ, ñîäåðæàùóþ âñþ èíôîðìàöèþ î âûäåëåííûõ êîìïîíåíòàõ äëÿ ISDone.dll
// ìàêñèìóì 96 êîìïîíåíòîâ.
  Comps1:=0; Comps2:=0; Comps3:=0;

  #ifdef precomp
    PCFVer:={#precomp};
  #else
    PCFVer:=0;
  #endif
    ISDoneError:=true;
    if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1, Comps2, Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then
    begin
      repeat
        ChangeLanguage('English');
        if not SrepInit('',512,0) then break;
        if not PrecompInit('',128,PCFVer) then break;
        if not FileSearchInit(true) then break;
        if not ShowChangeDiskWindow ('1/2', ExpandConstant('{src}'),'data1.bin') then break;
        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data1.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
        if not ShowChangeDiskWindow ('2/2', ExpandConstant('{src}'),'data2.bin') then break;
        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data2.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;

        ISDoneError:=false;
      until true;
      ISDoneStop;
    end;
    HideControls;
  end;
  if (CurStep=ssPostInstall) and ISDoneError then
  begin
    Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
  end;
end;
 

SakAwans

Новичок
Thank you, so I've modified it to my needs but now I'm getting an error about unsupported compression method when installing. It says I'm using xprecomp+srep+lolz+diskspan:50m:50m. I've added the tools needed and included the files in the script, but it's still not working. Script is below

code_language.pascal:
#define NeedSize "300000"

#define NeedMem 4096

#define SecondPB

#ifdef SecondPB
  #define PbLblCount 1
#else
  #define PbLblCount 0
#endif

;#define Components

;#define records

;#define facompress
;#define PrecompInside
#define SrepInside
;#define precomp "0.42"
;#define unrar
;#define XDelta
;#define PackZIP

;#define  FAZIP
;#define  MSC_FROG
;#define  MSC_TAK
;#define  PZLIB
;#define  PZLIB_DLL
;#define  REFLATE
;#define  ZSTD
;#define  LZ4
;#define  LZ5
;#define  XZ
;#define  RAZOR_PRECOMP_MT
;#define  PPX2
;#define  OFR
;#define  KAOS_DDS
#define  LOLZ
#define  XPRECOMP
#define  DISKSPAN

[Setup]
AppName=BCU
AppVerName=1.0.0
DefaultDirName={pf}\BCU
DefaultGroupName=BCU
OutputDir=.
OutputBaseFilename=setup
VersionInfoCopyright=EDiSO
SolidCompression=no
#ifdef NeedSize
  ExtraDiskSpaceRequired={#NeedSize}
#endif

#ifdef Components
[Types]
  Name: full; Description: Full installation; Flags: iscustom

[Components]
  Name: text; Description: Base Files; Types: full; Flags: fixed
#endif

[Files]
Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\arc.ini; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy

#ifdef records
  Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PrecompInside
  Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef SrepInside
  Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef MSCInside
  Source: Include\CLS-MSC.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef facompress
  Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef precomp
  #if precomp == "0.38"
    Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
  #else
    #if precomp == "0.4"
      Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
    #else
      #if precomp == "0.41"
        Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
      #else
        #if precomp == "0.42"
          Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
        #else
          Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
          Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
          Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
          Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
        #endif
      #endif
    #endif
  #endif
#endif

#ifdef unrar
  Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef XDelta
  Source: Include\XDelta3.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PackZIP
  Source: Include\7z.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\packZIP.exe; DestDir: {tmp}; Flags: dontcopy
#endif


#ifdef MSC_FROG
Source: Include\CLS-MSC_FROG.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef MSC_TAK
Source: Include\CLS-MSC_TAK.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef FAZIP
Source: Include\Addons\fazip.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\fazip64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef LZ4
Source: Include\Addons\lz4.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\lz464.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef LZ5
Source: Include\Addons\lz5.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\lz564.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PZLIB
Source: Include\Addons\pzlib.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\pzlib64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PZLIB_dll
Source: Include\Addons\hif2raw_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\raw2hif_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\hif2raw_dll64.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\Addons\raw2hif_dll64.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef SREP
  Source: Include\Addons\srep.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\srep64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef XZ
  Source: Include\Addons\xz.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\xz64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef ZSTD
  Source: Include\Addons\zstd.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\zstd64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef REFLATE
  Source: Include\Addons\reflate.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\reflateN_x32.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\reflateN_x64.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PPX2
  Source: Include\Addons\ppx2.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef KAOS_DDS
  Source: Include\Addons\rebuild_d.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef OFR
  Source: Include\Addons\ofr.exe; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\ofr64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef RAZOR_PRECOMP_MT
  Source: Include\Addons\CLS-PRECOMPMT.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\Addons\CLS-PRECOMPMT.ini; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef LOLZ
  Source: Include\cls-lolz.dll; DestDir: {tmp}; Flags: dontcopy
  Source: Include\cls-lolz_x64.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef XPRECOMP
  Source: Include\xtool.exe; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef DISKSPAN
  Source: Include\cls-diskspan.dll; DestDir: {tmp}; Flags: dontcopy
#endif

[CustomMessages]
russian.ExtractedFile=Extracting:
russian.Extracted=Process In Progress...
russian.CancelButton=Cancel Installation
russian.Error=UnKown Error Occured!
russian.ElapsedTime=Time:
russian.RemainingTime=Time Left:
russian.EstimatedTime=Total Time:
russian.AllElapsedTime=All Elapsed Time:

[Languages]
Name: russian; MessagesFile: compiler:Default.isl

[UninstallDelete]
Type: filesandordirs; Name: {app}

[Code]
const
  PCFonFLY    = true;
  notPCFonFLY = false;
  PbLblCount  = {#PbLblCount};
var
  LblTime      :   array [0..2]             of TLabel;
  LblPct       :   array [0..{#PbLblCount}] of TLabel;
  ISDonePB     :   array [0..{#PbLblCount}] of TNewProgressBar;
  ISDoneCancel :   integer;
  ISDoneError  :   boolean;
  PCFVer       :   double;

type
  TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;
  external 'wrapcallback@files:ISDone.dll stdcall delayload';

function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean;
  external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean;
  external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean;
  external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean;
  external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean;
  external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile, DeleteDiffFile:boolean):boolean;
  external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean;
  external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean;
  external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean;
  external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer;
  external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean;
  external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar;
  external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean;
  external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean;
  external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean;
  external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean;
  external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean;
  external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean;
  external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean;
  external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean;
  external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean;
  external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean;
  external 'ResumeProc@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
    if OveralPct<=1000  then ISDonePB[0].Position := OveralPct;
    LblPct[0].Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
  #ifdef SecondPB
    if CurrentPct<=1000 then ISDonePB[1].Position := CurrentPct;
    LblPct[1].Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
  #endif
  WizardForm.FileNamelabel.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, WizardForm.FileNamelabel.Font, WizardForm.FileNamelabel.Width-ScaleX(100));
  LblTime[0].Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
  LblTime[1].Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
  LblTime[2].Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
  Result := ISDoneCancel;
end;

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
  if CurPageID = wpInstalling then
  begin
    SuspendProc;
    Confirm := False;
    Cancel := False;
    if ExitSetupMsgBox then ISDoneCancel:=1;
    ResumeProc;
  end;
end;

procedure HideControls;
var
  i :integer;
begin
    for i := 0 to PbLblCount do
    begin
      ISDonePB[i].Hide;
      LblPct[i].Hide;
    end;
  for i := 0 to 1 do LblTime[i].Hide;
end;

procedure CreateControls;
var
  i :integer;
begin
  WizardForm.FileNamelabel.SetBounds(ScaleX(0), ScaleY(30), ScaleX(395), ScaleY(14));

    for i := 0 to PbLblCount do
    begin
      ISDonePB[i] := TNewProgressBar.Create(WizardForm);
      with ISDonePB[i] do
      begin
        Parent   := WizardForm.InstallingPage;
        SetBounds(ScaleX(0), ScaleY(50+i*57), ScaleX(365), ScaleY(21));
        Max      := 1000;
      end;

      LblPct[i] := TLabel.Create(WizardForm);
      with LblPct[i] do
      begin
        Parent    := WizardForm.InstallingPage;
        AutoSize  := False;
        SetBounds(ScaleX(370), ScaleY(52+i*57), ScaleX(80), ScaleY(14));
      end;
    end;

  for i := 0 to 2 do
  begin
    LblTime[i] := TLabel.Create(WizardForm);
    with LblTime[i] do
    begin
      AutoSize := False;
      Alignment := taCenter;
        case i of
        0, 1 :
        begin
          Parent := WizardForm.InstallingPage;
          SetBounds(ScaleX(0), ScaleY(75+i*17), ScaleX(395), ScaleY(14));
        end;
        2 :
        begin
          Parent := WizardForm.FinishedPage;
          SetBounds(ScaleX(180), ScaleY(200), ScaleX(300), ScaleY(14));
        end;
      end;
    end;
  end;
end;

Procedure CurPageChanged(CurPageID: Integer);
Begin
  if (CurPageID = wpFinished) and ISDoneError then
  begin
    LblTime[2].Hide;
    WizardForm.Caption:= ExpandConstant('{cm:Error}');
    WizardForm.FinishedLabel.Font.Color:= clRed;
    WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
  end;
end;

function CheckError:boolean;
begin
  result:= not ISDoneError;
end;

procedure Extract(const Filename : string);
begin
 if not IsWin64 then
   ExtractTemporaryFile(Filename + '.exe')
 else begin
    ExtractTemporaryFile(Filename + '64.exe');
   RenameFile(ExpandConstant('{tmp}\')+Filename+'64.exe',ExpandConstant('{tmp}\')+Filename+'.exe');
 end;
end;

procedure Extractdll(const Filename : string);
begin
 if not IsWin64 then
   ExtractTemporaryFile(Filename + '.dll')
 else begin
    ExtractTemporaryFile(Filename + '64.dll');
   RenameFile(ExpandConstant('{tmp}\'+Filename+'64.dll'),ExpandConstant('{tmp}\'+Filename+'.dll'));
 end;
end;

function EXEC_UNPACK( const Exec , Option , inFiles, outDir : string; Deldest : boolean): boolean;
var
  ExecError :boolean;
  FindHandle1, ColFiles1, CurIndex1 : Integer;
  InFilePath, OutFilePath, OutFileName : PAnsiChar;
  temp : string;
  #ifdef ppx2
    Str : array of string;
    cmd : string;
    i : integer;
  #endif
begin
  FindHandle1:=ISFindFiles(0,inFiles,ColFiles1);
  ExecError:=false;
  #ifndef ppx2
    while not ExecError and ISPickFilename(FindHandle1,outDir,CurIndex1,DelDest) do
    begin
      temp := option;
      InFilePath:=ISGetName(0);
      OutFilePath:=ISGetName(1);
      OutFileName:=ISGetName(2);
      StringChangeEx(temp,'<infile>',InFilePath,true);
      StringChangeEx(temp,'<outfile>',OutFilePath,true);
      ExecError:=not ISExec(0, 0, 0, Exec,temp,ExpandConstant('{tmp}'),OutFileName,false);
    end;
  #else
    i := 1;
    CreateDir(ExpandConstant('{tmp}\Bat'));
    while not ExecError and ISPickFilename(FindHandle1,outDir,CurIndex1,false) do
    begin
      temp := option;
      InFilePath:=ISGetName(0);
      OutFilePath:=ISGetName(1);
      OutFileName:=ISGetName(2);
      StringChangeEx(temp,'<infile>',InFilePath,true);
      StringChangeEx(temp,'<outfile>',OutFilePath,true);
      Cmd := '"' + Exec + '" ' + temp;
      SaveStringToFile(ExpandConstant('{tmp}\bat\rest'+inttostr(i)+'.bat'),Cmd,False);
      i := i + 1;
      temp := '';
    end;
    if delDest then
      setArrayLength(Str,3)
    else
      setArrayLength(Str,2);
    Str[0] := 'title Restoring File';
    Str[1] := 'dir /b *rest*bat | "' + ExpandConstant('{tmp}\ppx2.exe') + '" -I {} -P %NUMBER_OF_PROCESSORS% -L 1 "{}"';
    if deldest then
      Str[3] := 'del /q /s  ' + inFiles ;
    SaveStringsToFile(ExpandConstant('{tmp}\Bat\Cmd_Master.bat'),Str,false);
    MsgBox('Wainting',mbInformation,mrOk);
    ExecError := not ISExec( 0, 0, 0, ExpandConstant('{tmp}\bat\Cmd_Master.bat'), '', ExpandConstant('{tmp}'), 'Restoring Files..',false) ; // Launches Batch File
    deltree(ExpandConstant('{tmp}\Bat'),true,true,true);
  #endif
  ISFindFree(FindHandle1);
  Result := ExecError;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
  Comps1, Comps2, Comps3, TmpValue       : cardinal;
  FindHandle1, ColFiles1, CurIndex1, tmp : integer;
  ExecError                              : boolean;
  InFilePath, OutFilePath, OutFileName   : PAnsiChar;
begin
  if CurStep = ssInstall then //Åñëè íåîáõîäèìî, ìîæíî ïîìåíÿòü íà ssPostInstall
  begin 
    WizardForm.ProgressGauge.Hide;
    CreateControls;
    WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
    ISDoneCancel:=0;

  // Ðàñïàêîâêà âñåõ íåîáõîäèìûõ ôàéëîâ â ïàïêó {tmp}.

    ExtractTemporaryFile('unarc.dll');
    ExtractTemporaryFile('arc.ini');

    #ifdef PrecompInside
      ExtractTemporaryFile('CLS-precomp.dll');
      ExtractTemporaryFile('packjpg_dll.dll');
      ExtractTemporaryFile('packjpg_dll1.dll');
      ExtractTemporaryFile('precomp.exe');
      ExtractTemporaryFile('zlib1.dll');
    #endif

    #ifdef SrepInside
      ExtractTemporaryFile('CLS-srep.dll');
    #endif

    #ifdef MSCInside
      ExtractTemporaryFile('CLS-MSC.dll');
    #endif

    #ifdef facompress
      ExtractTemporaryFile('facompress.dll'); //óñêîðÿåò ðàñïàêîâêó .arc àðõèâîâ.
    #endif
    #ifdef records
      ExtractTemporaryFile('records.inf');
    #endif

    #ifdef precomp
      #if precomp == "0.38"
        ExtractTemporaryFile('precomp038.exe');
      #else
        #if precomp == "0.4"
          ExtractTemporaryFile('precomp040.exe');
        #else
          #if precomp == "0.41"
            ExtractTemporaryFile('precomp041.exe');
          #else
            #if precomp == "0.42"
              ExtractTemporaryFile('precomp042.exe');
            #else
              ExtractTemporaryFile('precomp038.exe');
              ExtractTemporaryFile('precomp040.exe');
              ExtractTemporaryFile('precomp041.exe');
              ExtractTemporaryFile('precomp042.exe');
            #endif
          #endif
        #endif
      #endif
    #endif

    #ifdef unrar
      ExtractTemporaryFile('Unrar.dll');
    #endif

    #ifdef XDelta
      ExtractTemporaryFile('XDelta3.dll');
    #endif

    #ifdef PackZIP
      ExtractTemporaryFile('7z.dll');
      ExtractTemporaryFile('PackZIP.exe');
    #endif

    #ifdef FAZIP
     Extract('fazip');
    #endif

    #ifdef LZ4
     Extract('lz4');
    #endif

    #ifdef LZ5
     Extract('lz5');
    #endif

    #ifdef PZLIB
     Extract('pzlib');
    #endif

    #ifdef PZLIB_DLL
     Extractdll('raw2hif_dll');
     Extractdll('hif2raw_dll');
    #endif

    #ifdef MSC_FROG
        ExtractTemporaryFile('CLS-MSC_FROG.dll');
      #else
      #ifdef MSC_TAK
        ExtractTemporaryFile('CLS-MSC_TAK.dll');
      #endif
    #endif

    #ifdef REFLATE
      ExtractTemporaryFile('reflate.exe');
      ExtractTemporaryFile('reflateN_x32.dll');
      ExtractTemporaryFile('reflateN_x64.dll');
    #endif

    #ifdef SREP
      Extract('srep');
    #endif

    #ifdef XZ
      Extract('xz');
    #endif

    #ifdef ZSTD
      Extract('zstd');
    #endif

    #ifdef KAOS_DDS
      ExtractTemporaryFile('rebuild_d.exe');
    #endif

    #ifdef OFR
      Extract('ofr');
    #endif

    #ifdef PPX2
      ExtractTemporaryFile('ppx2.exe');
    #endif

    #ifdef RAZOR_PRECOMP_MT
      ExtractTemporaryFile('CLS-precompmt.ini');
    #endif

    #ifdef LOLZ
      ExtractTemporaryFile('cls-lolz.dll');
    #endif

    #ifdef XPRECOMP
      ExtractTemporaryFile('xtool.exe');
    #endif

    #ifdef DISKSPAN
      ExtractTemporaryFile('cls-diskspan.dll');
    #endif

     ExtractTemporaryFile('English.ini');

// Ïîäãîòàâëèâàåì ïåðåìåííóþ, ñîäåðæàùóþ âñþ èíôîðìàöèþ î âûäåëåííûõ êîìïîíåíòàõ äëÿ ISDone.dll
// ìàêñèìóì 96 êîìïîíåíòîâ.
  Comps1:=0; Comps2:=0; Comps3:=0;

  #ifdef precomp
    PCFVer:={#precomp};
  #else
    PCFVer:=0;
  #endif
    ISDoneError:=true;
    if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1, Comps2, Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then
    begin
      repeat
        ChangeLanguage('English');
        if not SrepInit('',512,0) then break;
        if not PrecompInit('',128,PCFVer) then break;
        if not FileSearchInit(true) then break;
        if not ShowChangeDiskWindow ('1/2', ExpandConstant('{src}'),'data1.bin') then break;
        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data1.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
        if not ShowChangeDiskWindow ('2/2', ExpandConstant('{src}'),'data2.bin') then break;
        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data2.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;

        ISDoneError:=false;
      until true;
      ISDoneStop;
    end;
    HideControls;
  end;
  if (CurStep=ssPostInstall) and ISDoneError then
  begin
    Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
  end;
end;
Seems like u are using a UltraArc to compress the files right?
 

EshayDev

Новичок
Ok! send me your script and compressor.and tell me what exactly the method did u use for compression
I selected the split option and used xprecomp+srep+lolz as custom method.
 

Вложения

SakAwans

Новичок
I selected the split option and used xprecomp+srep+lolz as custom method.
Can you upload the compressor to this thread? because i can't download it from github
 

EshayDev

Новичок
It now says I can't download it because it's in violation of the Google Drive TOS. Can you try uploading to pixeldrain or workupload?
EDIT: sorry for being a pain in the ass, google is pretty strict when it comes to certain stuff, so please take your time if you need to.
 
Последнее редактирование:

SakAwans

Новичок
It now says I can't download it because it's in violation of the Google Drive TOS. Can you try uploading to pixeldrain or workupload?
EDIT: sorry for being a pain in the ass, google is pretty strict when it comes to certain stuff, so please take your time if you need to.
Nahhh it's fine...
I send the file link to your gmail
 

EshayDev

Новичок
Ok so its working pretty well (thanks by the way) but there's still one issue. It extracts the first bin file just fine and then asks to select data2.bin manually from your files. I can select it and it continues on, but I'd prefer if it didn't ask at all. I found that putting data2.bin in the temp setup directory solves this issue. How do I make it always look for the next bin file in {src} instead of {tmp} ?
EDIT: Adding a command in the [Run] section that adds a symlink seems to work. If there's a better fix, please let me know
 
Последнее редактирование:

SakAwans

Новичок
In the bottom of the script there is a setup event call CurStepChanged in that section u need to find ISArcExtract line. copy that line and paste it on the bottom of the first line (ISArcExtract( 0, 0, ExpandConstant('{src}\Data1.bin}') bla bla bla) and change that line ExpandConstant('{src}\Data1.bin}') to Data2.bin so if you do that setup is always looking for 1,2 bin files to unpack.and there is no need to put your *.bin files in temp folder.

Important!
The first *.zip (ISDone.zip) file i sent you has some documents about ISDone and Pascal scripting, you should read those documents and learn about these kind of basic stuff...
 

EshayDev

Новичок
In the bottom of the script there is a setup event call CurStepChanged in that section u need to find ISArcExtract line. copy that line and paste it on the bottom of the first line (ISArcExtract( 0, 0, ExpandConstant('{src}\Data1.bin}') bla bla bla) and change that line ExpandConstant('{src}\Data1.bin}') to Data2.bin so if you do that setup is always looking for 1,2 bin files to unpack.and there is no need to put your *.bin files in temp folder.

Important!
The first *.zip (ISDone.zip) file i sent you has some documents about ISDone and Pascal scripting, you should read those documents and learn about these kind of basic stuff...
I already tried that but it still asks for the next bin file. Also offtopic, but I can't seem to compress anything with xprecomp, it just either hangs or gives an unknown error.
 
Сверху