ISDone

DLL ISDone 0.6 final

Нет прав для скачивания

DABEAN

Мимокрокодил
помогите вот такая картина и ни туда не суда bandicam 2016-08-15 23-13-38-618.jpg bandicam 2016-08-15 23-14-07-475.jpg как это исправить подскажите
 

SBalykov

Старожил
помогите вот такая картина и ни туда не суда Посмотреть вложение 3218 Посмотреть вложение 3219 как это исправить подскажите
Скрипт лучше отображать в текстовом виде, а не картинкой.
Пробуйте так:
Код:
if not ISArcExtract(0, 0, ExpandConstant('{src}\disk.gsa'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), notPCFonFLY{PCFonFLY}) then break;
 
Последнее редактирование:

PrinceGupta2000

Мимокрокодил
hey guys im working on the new reflate (one that shelwein posted two days back) with isdone

i already compressed files with reflate + arc

bt now the problem actually now reflate makes two files ie .raw and .out
and im not been able to restore them using reflate since i have to supply two instances of same filename bt with different extensions and i do not know how to do it
moreover i want to use ppx2 for these

cmd line be like

the dir / s / b | ppx2 {-I} -P% NUMBER_OF_PROCESSORS % -L 1 reflate d "{} .out" " {} .raw" "{}"

and the files to be processed is like
Characters.vpp_pc.out
Characters.vpp_pc.raw

both of the above files should be specified onto cmdline
thanks in advance
 
Последнее редактирование:

PrinceGupta2000

Мимокрокодил
okay guys

Solved using These

Код:
        FindHandle1: = ISFindFiles (0, ExpandConstant ( '{src} \ * out.'), ColFiles1);
        ExecError: = false;
        while not ExecError and ISPickFilename (FindHandle1, ExpandConstant ( '{app} \'), CurIndex1, false) do
        begin
          InFilePath: = ISGetName (0);
          OutFilePath: = ISGetName (1);
          OutFileName: = ISGetName (2);
          ExecError: = not ISExec (0, 0, 0, ExpandConstant ( '{tmp} \ reflate.exe'), 'd "' + InFilePath + '" "' + ChangeFileExt (InFilePath,) + '"' 'raw.' + OutFileName, ExpandConstant ( '{tmp}'), OutFileName, false);
        end;
[/ Code]
 

PrinceGupta2000

Мимокрокодил
He guys Again:help:

this time
Код:
 BatPath: = ExpandConstant ( '{tmp}');
        FindHandle1: = ISFindFiles (0, ExpandConstant ( '{src} \ * out.'), ColFiles1);
        ExecError: = false;
        i: = 1;
        CreateDir (BatPath + '\ bat');
        while not ExecError and ISPickFilename (FindHandle1, ExpandConstant ( '{src}'), CurIndex1, false) do
        begin
          InFilePath: = ISGetName (0);
          OutFilePath: = ISGetName (1);
          OutFileName: = ISGetName (2);
          SaveStringToFile (BatPath + '\ bat \ Cmd' + inttostr (i) + '.bat', ExpandConstant ( '{tmp} \ reflate.exe') + 'd "' + InFilePath + '" "' + ChangeFileExt (InFilePath, ' .raw ') +' "" '+ OutFilePath +' " ', False);
          i: = i +1;
        end;

        SaveStringToFile (BatPath + '\ bat \ Cmd_Master.bat', 'dir * .bat / b / s | "' + ExpandConstant ( '{tmp} \ ppx2.exe') + '" -I {} -P' + Inttostr (GetProcessorCoreCount) + '-L 1 start / b / wait "{}"', False)
        if not ISExec (0, 0, 0, BatPath + '\ bat \ Cmd_Master.bat', ExpandConstant ( ''), ExpandConstant ( '{Src} \ packfiles \ pc \ cache'), '...', false) then break; [/ code]
using this for the multitasking bt whever CMD_Master Executed 100s of ppx2 launches without and bat too bt there is only
43 bat file i have 8 cores so about 8 bat files should be launch bt 100s of bat launches
another things no reflate.exe is launched

please help
 

PrinceGupta2000

Мимокрокодил
Hey sorry for ur time
again solved it myself
i don't know why whenever i post here for the help i solved it myself, wathever

Код:
        BatPath  :=  ExpandConstant('{tmp}');
        FindHandle1:=ISFindFiles(0,ExpandConstant('{src}\*.out'),ColFiles1);
        ExecError:=false;
        i :=1;
        CreateDir(ExpandConstant('{tmp}\Bat'));
        while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{src}'),CurIndex1,false) do
        begin
          InFilePath:=ISGetName(0);
          OutFilePath:=ISGetName(1);
          OutFileName:=ISGetName(2);
          SaveStringToFile(ExpandConstant('{tmp}\bat\Cmd'+inttostr(i)+'.bat'),ExpandConstant('{tmp}\reflate.exe')+' d "'+InFilePath+'" "'+ChangeFileExt(InFilePath,'.raw')+'" "'+OutFilePath+'"',False);
          if not FileExists(InfilePAth) then MSGBox(InfilePAth +' doesnot exists',mbInformation,MB_OK);
          if not FileExists(ChangeFileExt(InFilePath,'.raw')) then MSGBox(ChangeFileExt(InFilePath,'.raw') +' doesnot exists',mbInformation,MB_OK);
          i := i +1;
        end;

        for i:= 1 to 42 do if not FileExists(ExpandConstant('{tmp}\bat\Cmd'+inttostr(i)+'.bat')) then MSGBox('Can not find Cmd'+inttostr(i)+'.bat',mbInformation,MB_OK);
        if not FileExists(ExpandConstant('{tmp}\ppx2.exe')) then MSGBox('ppx2 doesnot exists',mbInformation,MB_OK);
        if not FileExists(ExpandConstant('{tmp}\reflate.exe')) then MSGBox('reflate doesnot exists',mbInformation,MB_OK);
        SaveStringToFile(ExpandConstant('{tmp}\bat\Cmd_Master.bat'),'dir *.bat /b /s | "'+ExpandConstant('{tmp}\ppx2.exe')+'" -I {} -P ' + Inttostr(GetProcessorCoreCount) + ' -L 1 "{}"',False)
        if not ISExec( 0, 0, 0,ExpandConstant('{tmp}\bat\Cmd_Master.bat'),ExpandConstant(''), ExpandConstant('{tmp}\bat'), '...',false) then break;
 

crysis_1830

Новичок
Помогите пожалуйста имеется архив в нем разжатый архив и файлы для его распаковки

Пример:

game1.data - разжатый ахив

Arc.exe

arc.ini

pzlib.exe

unpack.exe - этот для распаковки, с параметрами arc.exe x -w.\ -dp[папка]\ game1.data

Код:
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data-1.cab'), ExpandConstant('{app}'), '', false, '12345', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
 if not ISExec       ( 0, 0, 0, ExpandConstant('{app}\unpack.exe'), ExpandConstant('{app}\game1.data'), ExpandConstant('{app}\'), '...',notPCFonFLY {PCFonFLY}) then break;
проблема такова что первый архив после распаковки доходя до 100% распаковывает второй архив, но без отображении его в прогресс баре.

Как сделать так чтобы game1.data отображался в прогресс баре?
 

vint56

Ветеран
Проверенный
crysis_1830, прочитай исдона справку про проценты
 

vint56

Ветеран
Проверенный
crysis_1830,
вот как я сжимал
arc.ini
[External compressor: pzlib]
header = 0
packcmd = pZLib e -m2 -t4 - -o - <stdin> <stdout>
unpackcmd = pZLib d -t4 - -o - <stdin> <stdout>

[External compressor:srep]
;options = l%d (minimal match length, default=512)
header = 0
packcmd = srep -a1 -mem256m -m5f -l256 $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep -d $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

батник
arc.exe a -ep1 -r -ed -s; -w.\temp -mpzlib+srep+lzma:a1:mfbt4:d200m:fb273:mc10000:lc8 data.arc "pack\*"

arc.ini
[External compressor: pzlib]
header = 0
unpackcmd = pZLib d -t4 - -o - <stdin> <stdout>
...........................................................................................................................
#define pZLibInside
[Setup]

[Files]
#ifdef pZLibInside
Source: Include\arc.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\pZLib.exe; DestDir: {tmp}; Flags: dontcopy
#endif

Код:
procedure CurStepChanged(CurStep: TSetupStep);
#ifdef pZLibInside
ExtractTemporaryFile('arc.ini');
ExtractTemporaryFile('pZLib.exe');
#endif
if not ISArcExtract    ( 0, 0, ExpandConstant('{src}\data.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
 
Последнее редактирование:

crysis_1830

Новичок
vint56, значит ты понял о чем я :acute: а твой пример рабочий!

я так пытаюсь
Input = 31.9 GB > Pzlib2 = 58.8 GB > потом -msrep+lzma2:a1:mfbt4:d200m:fb128:mc1000:lc8 Srep = 8.65 GB > LZMA2 = 4.27 GB
 
Последнее редактирование:

SBalykov

Старожил
vint56,
Можешь объяснить для чего повторять параметры:
[External compressor:srep]
packcmd = srep {options} -a1 -mem256m -m5f $$arcdatafile$$.tmp $$arcpackedfile$$.tmp

батник
arc.exe a -ep1 -r -ed -s; -w.\temp -mpzlib+srep:m5f:a1:l256+lzma:a1:mfbt4:d200m:fb273:mc10000:lc8 data.arc "pack\*"
Что это дает, вообще?
 

vint56

Ветеран
Проверенный
SBalykov, повторы не нужны это мой косяк забыл поправить arc.ini
 
Последнее редактирование:

cepbl4

Мимокрокодил
Подскажите, пожалуйста.
Делаю репак игры Team Fortress 2 версию для Steam.

В скрипте реализован код поиска установленного Steam через ключ в реестре.
Также поиск открытого процесса Steam и предложение его закрыть.
И подцеплен распак архивов .arc через ISDone.
Код с ISDone на окне окончания установки добавляет текст с потраченным на распак временем. Но текст встал криво (я ничего не правил, брал готовые куски кода).
Прошу помочь с правкой текста на этом окне окончания установки. Нужно чтобы текст было видно ровно.

скрин косяка - http://joxi.ru/52ayBzEsXyzx20
Код: Запускать файл tf2.2016-isdone.iss
https://yadi.sk/d/p3qwTEJOzb6i4

Далее проблему сам решил.
Подтвердите проблему, пожалуйста.
Использую архивы .arc переименованные в .bin.
При раскомментированной строке ;#define facompress в папке с созданием exe инсталлятора все архивы .bin удаляются при открытии интсаллятора.
Если эту строку оставить закомментированной, то архивы .bin не удаляются и нормально распаковываются.
Порыскал по скрипту, не нашел как facompress может портить файлы из скрипта. Следовательно что-то напортачено в dll-ке.
Win 10 Pro со всеми обновами на сегодня
Inna 5.5.9 ANSI.
ISDone0.6final

Сам догнал. Это не проблема длл-ки и вообще к сабжу не относится.
setup-*.bin - это зарезервированные самой Инной имена файлов инсталлятора. Так называть архивы нельзя при компиляции, если они находятся рядом с главным файлом setup.exe, Инна их сносит.
 
Последнее редактирование:

Nemko

Дилетант
Модератор
cepbl4, для редактирования отображения найдите у себя часть кода и измените по вкусу:
Код:
  LabelTime3 := TLabel.Create(WizardForm);    // Текст о времени утановки
  with LabelTime3 do begin
    Parent   := WizardForm.FinishedPage;      // Место расположение
    AutoSize := False;                        // Авто Размер = нет
    Width    := 300;                          // Ширина = 300
    Left     := 180;                          // Слева  = 180
    Top      := 200;                          // Сверху = 200
  end;
P.S. У меня вообще этот текст не отображается....
 

cepbl4

Мимокрокодил
Странно, перестал распаковываться архив arc переименованный в bin.
А если оставить .arc, то распаковывает.
Также пробовал с zip переименованный в bin - также ошибка
Скрин ошибки в аттаче.
Я вообще ничего не делал. Утром еще распаковывал. Даже комп не перегружал и уже не хочет.
 

Вложения

Последнее редактирование:

cepbl4

Мимокрокодил
Nemko,
на рубоарде вот так помогли с кодом, теперь надпись ровно отображается
#define NeedSize "19430670336"

#define NeedMem 512

;#define SecondProgressBar

;#define Components

;#define records

;#define facompress

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

[Setup]
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif
AppName=Team Fortress 2 Steam version
AppVerName=Team Fortress 2
;DefaultDirName={pf}/Steam
DefaultDirName={code:GetInstallDir}
;- убрать комментирование
;DefaultGroupName=Assassin's Creed™ Dirесtоr's Cut Еditiоn
AllowNoIcons=yes
OutputDir=d:\Repacks\TF2
OutputBaseFilename=setup
SetupIconFile=ico\tf2_icon_256_full_round.ico
Compression=lzma
SolidCompression=no
DiskSpanning=yes
DiskSliceSize=max
;AppCopyright=Valve
;VersionInfoCompany=Valve
VersionInfoDescription=Team Fortress 2 Setup
;VersionInfoVersion=1.02
;UninstallLogMode=overwrite
;WizardImageFile=D:\Download\!Temp\5\Inno Setup Projects\inno\assassin_rus\2009-01-04_135907.bmp
WizardSmallImageFile=bmp\tf2_icon_256_full.bmp
;WindowVisible=yes
;SlicesPerDisk=6
;ReserveBytes=73232483
InfoBeforeFile=info\iNFO.txt
Uninstallable=no

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

[Components]
Name: text; Description: Язык субтитров; Types: full; Flags: fixed
Name: text\rus; Description: Русский; Flags: exclusive; ExtraDiskSpaceRequired: 100000000
Name: text\eng; Description: Английский; Flags: exclusive; ExtraDiskSpaceRequired: 200000000
Name: voice; Description: Язык озвучки; Types: full; Flags: fixed
Name: voice\rus; Description: Русский; Flags: exclusive; ExtraDiskSpaceRequired: 500000000
Name: voice\eng; Description: Английский; Flags: exclusive; ExtraDiskSpaceRequired: 600000000
#endif

[Registry]
;Root: HKLM; Subkey: Software\ProFrager; ValueName: path; ValueType: String; ValueData: {app}; Flags: uninsdeletekey; Check: CheckError
;Root: HKLM; Subkey: Software\ProFrager; ValueName: name; ValueType: String; ValueData: Data; Flags: uninsdeletekey; Check: CheckError

[Icons]
;Name: {group}\Удалить пример ISDone; Filename: {app}\unins000.exe; WorkingDir: {app}; Check: CheckError
;Name: {commondesktop}\Удалить пример ISDone; Filename: {app}\unins000.exe; WorkingDir: {app}; Check: CheckError

[Tasks]
;Name: VCCheck; Description: Установить Microsoft Visual C++ 2005 Redist
;Name: PhysXCheck; Description: Установить Nvidia PhysX

[Run]
;Filename: {src}\Redist\vcredist_x86.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ 2005 Redist...; Flags: skipifdoesntexist; Tasks: VCCheck; Check: CheckError
;Filename: {src}\Redist\PhysX.exe; Parameters: /qn; StatusMsg: Устанавливаем Nvidia PhysX...; Flags: skipifdoesntexist; Tasks: PhysXCheck; Check: CheckError
Filename: "{code:GetInstallDir}\steam.exe"; WorkingDir: "{code:GetInstallDir}"; Description: {cm:LaunchProgram,Steam}; Flags: shellexec postinstall skipifsilent unchecked; Check: CheckError

[Files]
Source: D:\Download\Games\TF2 test\Steam\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Check: CheckError
Source: dll\ISTask.dll; Flags: dontcopy solidbreak;
Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: dll\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

[Messages]
BeveledLabel=--- L|Steam-Rip by CEPbl4 v.2016.11.21
;SetupWindowTitle=Установка Assassin's Creed™ Dirесtоr's Cut Еditiоn
;UninstallAppFullTitle=Удаление Assassin's Creed™ Dirесtоr's Cut Еditiоn
SelectDirLabel3=Выберете папку с установленным Steam (он должен быть закрыт).

[CustomMessages]
russian.ExtractedFile=Извлекается файл:
russian.Extracted=Распаковка архивов...
russian.CancelButton=Отменить распаковку
russian.Error=Ошибка распаковки!
russian.ElapsedTime=Прошло:
russian.RemainingTime=Осталось времени:
russian.EstimatedTime=Всего:
russian.AllElapsedTime=Время установки:

[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl

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

Код:
// --- Generated by InnoSetup Script Joiner version 3.0, Jul 22 2009, (c) Bulat Ziganshin <Bulat.Ziganshin@gmail.com>. More info at [URL]http://issjoiner.codeplex.com/[/URL]

// --- Source: Распаковка архивов ISDone.iss ------------------------------------------------------------
const
  PCFonFLY=true;
  notPCFonFLY=false;
var
  LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
  ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
  LabelPct2: TLabel;
  ISDoneProgressBar2:TNewProgressBar;
#endif
  MyCancelButton: TButton;
  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 ISDoneProgressBar1.Position := OveralPct;
  LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef SecondProgressBar
  if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
  LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
#endif
  LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
  LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
  LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
  LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
  Result := ISDoneCancel;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
  SuspendProc;
  if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
  ResumeProc;
end;

procedure HideControls;
begin
  WizardForm.FileNamelabel.Hide;
  ISDoneProgressBar1.Hide;
  LabelPct1.Hide;
  LabelCurrFileName.Hide;
  LabelTime1.Hide;
  LabelTime2.Hide;
  MyCancelButton.Hide;
#ifdef SecondProgressBar
  ISDoneProgressBar2.Hide;
  LabelPct2.Hide;
#endif
end;

procedure CreateControls;
var PBTop:integer;
begin
  PBTop:=ScaleY(50);
  ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
  with ISDoneProgressBar1 do begin
    Parent   := WizardForm.InstallingPage;
    Height   := WizardForm.ProgressGauge.Height;
    Left     := ScaleX(0);
    Top      := PBTop;
    Width    := ScaleX(365);
    Max      := 1000;
  end;
  LabelPct1 := TLabel.Create(WizardForm);
  with LabelPct1 do begin
    Parent    := WizardForm.InstallingPage;
    AutoSize  := False;
    Left      := ISDoneProgressBar1.Width+ScaleX(5);
    Top       := ISDoneProgressBar1.Top + ScaleY(2);
    Width     := ScaleX(80);
  end;
  LabelCurrFileName := TLabel.Create(WizardForm);
  with LabelCurrFileName do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := ISDoneProgressBar1.Width+ScaleX(30);
    Left     := ScaleX(0);
    Top      := ScaleY(30);
  end;
#ifdef SecondProgressBar
  PBTop:=PBTop+ScaleY(25);
  ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
  with ISDoneProgressBar2 do begin
    Parent   := WizardForm.InstallingPage;
    Left     := ScaleX(0);
    Top      := PBTop+ScaleY(8);
    Width    := ISDoneProgressBar1.Width;
    Max      := 1000;
    Height   := WizardForm.ProgressGauge.Height;
  end;
  LabelPct2 := TLabel.Create(WizardForm);
  with LabelPct2 do begin
    Parent    := WizardForm.InstallingPage;
    AutoSize  := False;
    Left      := ISDoneProgressBar2.Width+ScaleX(5);
    Top       := ISDoneProgressBar2.Top + ScaleY(2);
    Width     := ScaleX(80);
  end;
#endif
  LabelTime1 := TLabel.Create(WizardForm);
  with LabelTime1 do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := ISDoneProgressBar1.Width div 2;
    Left     := ScaleX(0);
    Top      := PBTop + ScaleY(35);
  end;
  LabelTime2 := TLabel.Create(WizardForm);
  with LabelTime2 do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := LabelTime1.Width+ScaleX(40);
    Left     := ISDoneProgressBar1.Width div 2;
    Top      := LabelTime1.Top;
  end;
  LabelTime3 := TLabel.Create(WizardForm);
  with LabelTime3 do begin
    Parent   := WizardForm.FinishedPage;
    AutoSize := False;
    Width    := WizardForm.FinishedLabel.Width;
    Left     := WizardForm.FinishedLabel.Left;
  end;
  MyCancelButton:=TButton.Create(WizardForm);
  with MyCancelButton do begin
    Parent:=WizardForm;
    Width:=ScaleX(135);
    Caption:=ExpandConstant('{cm:CancelButton}');
    Left:=ScaleX(360);
    Top:=WizardForm.cancelbutton.top;
    OnClick:=@CancelButtonOnClick;
  end;
end;

Procedure CurPageChanged1(CurPageID: Integer);
Begin
  if CurPageID = wpFinished then
  begin
WizardForm.Runlist.Top := WizardForm.Runlist.Top + ScaleY(30);
WizardForm.Runlist.Height := WizardForm.Runlist.Height - ScaleY(30);
LabelTime3.Top := WizardForm.FinishedLabel.Top + WizardForm.FinishedLabel.Height;

    if ISDoneError then begin
      LabelTime3.Hide;
      WizardForm.Caption:= ExpandConstant('{cm:Error}');
      WizardForm.FinishedLabel.Font.Color:= clRed;
      WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
  end;
end;

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

procedure CurStepChanged1(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
    FindHandle1,ColFiles1,CurIndex1,tmp:integer;
    ExecError:boolean;
    InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
  if CurStep = ssInstall then begin  //Если необходимо, можно поменять на ssPostInstall
    WizardForm.ProgressGauge.Hide;
    WizardForm.CancelButton.Hide;
    CreateControls;
    WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
    ISDoneCancel:=0;

// Распаковка всех необходимых файлов в папку {tmp}.

ExtractTemporaryFile('unarc.dll');

#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

    ExtractTemporaryFile('English.ini');

// Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для ISDone.dll
// максимум 96 компонентов.
    Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef Components
    TmpValue:=1;
    if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue;     //компонент 1
    TmpValue:=TmpValue*2;
    if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue;     //компонент 2
    TmpValue:=TmpValue*2;
    if IsComponentSelected('voice\rus') then Comps1:=Comps1+TmpValue;    //компонент 3
    TmpValue:=TmpValue*2;
    if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue;    //компонент 4
//    .....
// см. справку
#endif

#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 ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;

//    далее находятся закомментированые примеры различных функций распаковки (чтобы каждый раз не лазить в справку за примерами)
(*
        if not ISArcExtract    ( 0, 0, ExpandConstant('{src}\arc.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        if not IS7ZipExtract   ( 0, 0, ExpandConstant('{src}\CODMW2.7z'), ExpandConstant('{app}\data1'), false, '') then break;
        if not ISRarExtract    ( 0, 0, ExpandConstant('{src}\data_*.rar'), ExpandConstant('{app}'), false, '') then break;
        if not ISSRepExtract   ( 0, 0, ExpandConstant('{app}\data1024_1024.srep'),ExpandConstant('{app}\data1024.arc'), true) then break;
        if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data.pcf'),    ExpandConstant('{app}\data.7z'), true) then break;
        if not ISxDeltaExtract ( 0, 0, 0, 640, ExpandConstant('{app}\in.pcf'), ExpandConstant('{app}\*.diff'),   ExpandConstant('{app}\out.dat'), false, false) then break;
        if not ISPackZIP       ( 0, 0, ExpandConstant('{app}\1a1\*'), ExpandConstant('{app}\1a1.pak'), 2, false ) then break;
        if not ISExec          ( 0, 0, 0, ExpandConstant('{tmp}\Arc.exe'), ExpandConstant('x -o+ "{src}\001.arc" "{app}\"'), ExpandConstant('{tmp}'), '...',false) then break;
        if not ShowChangeDiskWindow ('Пожалуйста, вставьте второй диск и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW_2.arc') then break;

//    распаковка группы файлов посредством внешнего приложения

        FindHandle1:=ISFindFiles(0,ExpandConstant('{app}\*.ogg'),ColFiles1);
        ExecError:=false;
        while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{app}\'),CurIndex1,true) do begin
          InFilePath:=ISGetName(0);
          OutFilePath:=ISGetName(1);
          OutFileName:=ISGetName(2);
          ExecError:=not ISExec(0, 0, 0, ExpandConstant('{tmp}\oggdec.exe'), '"'+InFilePath+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
        end;
        ISFindFree(FindHandle1);
        if ExecError then break;
*)

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

// --- Source: 1.iss ------------------------------------------------------------
// Завершение процесса по имени файла
function KillTask(ExeFileName: AnsiString): Integer;
  external 'KillTask@files:ISTask.dll stdcall';

// Проверка, запущен ли процесс по имени файла
function RunTask(FileName: AnsiString; bFullpath: Boolean): Boolean;
  external 'RunTask@files:ISTask.dll stdcall';

function InitializeSetup2(): Boolean;
begin
  Result := True;
  if RunTask('steam.exe', False) then
    if MsgBox('Для продолжения установки требуется закрыть программу Steam. Закрыть Steam?', mbConfirmation, MB_YESNO) = IDYES then
      KillTask('steam.exe')
    else
      Result := False;
end;

// --- Source: 2.iss ------------------------------------------------------------
{=====Старт. Проверка наличия установки Steam через реестр. Работает.=====}

Function GetInstallDir(Path: String ): String;
begin
RegQueryStringValue(HKCU, 'SOFTWARE\Valve\Steam\', 'SteamPath', Path); //Какой ключ реестра ищет ...
Result := Path;
end;

function InitializeSetup3(): Boolean;
begin
Result:= true;
if not RegKeyExists(HKCU, 'SOFTWARE\Valve\Steam\') then
MsgBox('Программа Steam не найдена! Укажите путь к Steam вручную!', mbinformation, mb_ok);
end;
{=====Конец. Проверка наличия установки Steam через реестр=====}

// --- Dispatching code ------------------------------------------------------------

procedure CurPageChanged(CurPageID: Integer);
begin
  CurPageChanged1(CurPageID);
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  CurStepChanged1(CurStep);
end;

function InitializeSetup(): Boolean;
begin
  Result := InitializeSetup2(); if not Result then exit;
  Result := InitializeSetup3(); if not Result then exit;
end; [/SPOILER]
 

Вложения

Последнее редактирование:

dixen18

Ветеран
Странно, перестал распаковываться архив arc переименованный в bin.
В ISDONE.iss Найдите строчку
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;

И смените bin на arc.. Замечу, что расширение может быть каким угодно, хоть ILOVEYOU
 

cepbl4

Мимокрокодил
dixen18, так и делаю. Писал же выше, что утром все распаковывалось.

Обновлено
Странно. Сегодня (на следующий) день бин-ы распаковываются отлично. Ничего не менял в скрипте.
 
Последнее редактирование:

cepbl4

Мимокрокодил
Как изменить текст, который отображается в панели задач во время распаковки?
Поправил файл include\russian.ini - это ничего не дало.
Русский язык в саму длл-ку что ли зашит?
 

Вложения

Сверху