Go Back   FileForums > Game Backup > PC Games

Reply
 
Thread Tools Display Modes
  #1  
Old 14-05-2013, 17:48
surumanboy surumanboy is offline
Registered User
 
Join Date: Apr 2013
Location: canada
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
surumanboy is on a distinguished road
Cant get inno setup to decompress archive during installation!

i finished a script and when i go to install it get the error

Compression method
"srep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8" of the current
archive "Files.cab" is not supported by the current version of unarc.dll


i assume i need and additional dll for the srep and got one from here

http://encode.ru/threads/622-ISSrep-...for-Inno-Setup)

but when i incorporate the code into this one it gives me errors within the script itself.
Reply With Quote
Sponsored Links
  #2  
Old 14-05-2013, 21:14
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,746
Thanks: 2,141
Thanked 11,093 Times in 2,295 Posts
Razor12911 is on a distinguished road
add arc.ini to installation
Reply With Quote
  #3  
Old 15-05-2013, 13:20
surumanboy surumanboy is offline
Registered User
 
Join Date: Apr 2013
Location: canada
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
surumanboy is on a distinguished road
still isint working

added arc.ini in the folder with script and added it to the files list in the script itself still getting the same error.
Reply With Quote
  #4  
Old 15-05-2013, 13:22
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,746
Thanks: 2,141
Thanked 11,093 Times in 2,295 Posts
Razor12911 is on a distinguished road
arc.ini must be like this

Code:
[External compressor:srep]
header = 0
packcmd   = srep {options} -m3f -a2 $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep {options} -d -s - - <stdin> <stdout>
include arc.ini in [Files]
extract file during installation.

done!
Reply With Quote
  #5  
Old 15-05-2013, 13:54
surumanboy surumanboy is offline
Registered User
 
Join Date: Apr 2013
Location: canada
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
surumanboy is on a distinguished road
i did same problem

in arc.ini i have

[External compressor:srep]
header = 0
packcmd = srep {options} -m3f -a2 $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep {options} -d -s - - <stdin> <stdout>




in files section in script

Source: arc.ini; DestDir: {tmp}; Flags: dontcopy


same problem
Reply With Quote
  #6  
Old 15-05-2013, 13:57
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,746
Thanks: 2,141
Thanked 11,093 Times in 2,295 Posts
Razor12911 is on a distinguished road
add line ExtractTemporaryFile('arc.ini')

under Procedure InitializeWizard
Reply With Quote
  #7  
Old 15-05-2013, 14:04
surumanboy surumanboy is offline
Registered User
 
Join Date: Apr 2013
Location: canada
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
surumanboy is on a distinguished road
this is my Procedure InitializeWizard section



Procedure InitializeWizard();
Begin
// Create controls to show extended info

StatusLabel:= CreateLabel(WizardForm.InstallingPage,false,false, true,'',[],0,0,0,0,0, WizardForm.StatusLabel);
FileNameLabel:= CreateLabel(WizardForm.InstallingPage,false,false, true,'',[],0,0,0,0,0, WizardForm.FileNameLabel);
WizardForm.StatusLabel.Top:= WizardForm.ProgressGauge.Top; WizardForm.FileNameLabel.Top:= WizardForm.ProgressGauge.Top; // прячем под прогрессбар, тогда все события WM_PAINT перехватываются
with WizardForm.ProgressGauge do begin
StatusInfo:= CreateLabel(WizardForm.InstallingPage, false, true, true, '', [], 0, 0, Top + ScaleY(32), Width, 0, Nil);
ProgressBar := TNewProgressBar.Create(WizardForm);
ProgressBar.SetBounds(Left, StatusInfo.Top + StatusInfo.Height + ScaleY(16), Width, Height);
ProgressBar.Parent := WizardForm.InstallingPage;
ProgressBar.max := 65536;
ProgressBar.Hide; // будет показан при обработке нескольких архивов
ExtractTemporaryFile('arc.ini')
ExtractFile:= CreateLabel(WizardForm.InstallingPage, false, true, true, '', [], 0, 0, ProgressBar.Top + ScaleY(32), Width, 0, Nil);
end;




still same problem
Reply With Quote
  #8  
Old 15-05-2013, 14:10
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,746
Thanks: 2,141
Thanked 11,093 Times in 2,295 Posts
Razor12911 is on a distinguished road
gimme script along with files
Reply With Quote
  #9  
Old 15-05-2013, 15:43
surumanboy surumanboy is offline
Registered User
 
Join Date: Apr 2013
Location: canada
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
surumanboy is on a distinguished road
script

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

#define MyAppName "Dead Island"
#define MyAppVersion "1.3.0"
#define Archives "{src}\Dead Island.cab;DestDir:{app}\;Disk:1"

[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={{C16937B2-EA3D-44A7-96D3-A4C367B9058C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputDir=C:\Users\predator\Desktop
OutputBaseFilename=setup
SetupIconFile=C:\Users\predator\Desktop\Dead-Island.ico


[Languages]
Name: "eng"; MessagesFile: "compilerefault.isl"

[CustomMessages]
eng.ArcBreak=Installation cancelled!
eng.ArcError=Decompression failed with error code %1
eng.ErrorUnknownError=Error occured while extracting archives. Please contact the author of this program.
eng.ErrorCompressMethod=Compression method "%1" of the acrhive "%2" is not supported by the current version of unarc.dll.
eng.ErrorOutBlockSize=Output block is too small for the archive "%1".
eng.ErrorNotEnoughRAMMemory=Not enough memory to unpack "%1" archive.
eng.ErrorReadData=Archive "%1" data read error.
eng.ErrorBadCompressedData=Data can't be extracted from the archive "%1".
eng.ErrorNotImplement=Required action isn't supported by the current version of unarc.dll.
eng.ErrorDataAlreadyDecompress=Data block of the archive "%1" is already decompressed.
eng.ErrorUnpackTerminated=User cancelled the operation.
eng.ErrorWriteData=Error occured while processing the archive "%1".
eng.ErrorBadCRC=Bad CRC in the archive "%1".
eng.ErrorBadPassword=Applied password for archive "%1" isn't correct.
eng.ErrorBadHeader=Header of the archive "%1" is corrupted.
eng.ErrorCodeException=Raised a code exception. Please contact the author of this program.
eng.ErrorNotEnoughFreeSpace=Not enough free space to unpack "%1".
eng.ArcTitle=Extracting FreeArc archives...
eng.StatusInfo=Files: %1%2, progress %3%%, remaining time %4
eng.ArcInfo=Disk %1 of %2, archive %3 of %4, %5%% of archive processed
eng.ArcFinish=Unpacked archives: %1, received files: %2 [%3]
eng.InsertDisk=Please insert disk № %1 with file "%2" and press OK.
eng.taskbar=%1%%, %2 remains
eng.ending=Ending
eng.hour= hours
eng.min= mins
eng.sec= secs

[ISToolPreCompile]
#define isFalse(any S) (S = LowerCase(Str(S))) == "no" || S == "false" || S == "off" ? "true" : "false"

[Files]
Source: "D:\Games\Dead Island\deadislandgame.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: arc.ini; DestDir: {tmp}; Flags: dontcopy
Source: InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef precomp
;если указано, что архивы созданы с PRECOMP, в инсталлятор включаются необходимые при распаковке файлы
Source: {#External}; DestDir: {sys}; Flags: deleteafterinstall
Source: {#GetEnv("ProgramFiles")}\FreeArc\bin\arc.ini; DestDir: c:\; Flags: deleteafterinstall
#endif

[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: {commondesktop}\Dead Island; Filename: {app}\deadislandgame.exe; Tasks: desktopicon;

[Tasks]
Name: desktopicon; Description: Create Shortcuts

[Code]
type
#ifdef UNICODE
#define A "W"
#else
#define A "A" ;
// точка входа в SetWindowText, {#A} меняется на A или W в зависимости от версии
#if Ver < 84084736
PAnsiChar = PChar; // Required for Inno Setup 5.3.0 and lower. (требуется для Inno Setup версии 5.3.0 и ниже)
#endif
#endif
#if Ver < 84018176
AnsiString = String; // There is no need for this line in Inno Setup 5.2.4 and above (для Inno Setup версий 5.2.4 и выше эта строка не нужна)
#endif

TMessage = record hWnd: HWND; msg, wParam: Word; lParam: LongWord; Time: TFileTime; pt: TPoint; end;
TFreeArcCallback = function (what: PAnsiChar; int1, int2: Integer; str: PAnsiChar): Integer;
TArc = record Path, Dest, comp, task, pass: string; allMb: Integer; Disks: Integer; UnPack, UnPacked: Boolean; end;
TBarInfo = record stage, name: string; size: Extended; perc: Integer; end;
TFAProgressInfo = record DiskSize, CurPos, LastPos, AllPos, FilesCount: Integer; LastSize, AllSize: Extended; end;
TFADiskStatus = record LastMaxCount, MaxCount, CurDisk, NextArc, RemainsArc: Integer; end;
TCWPSTRUCT = record lParam: LongWord; wParam: Word; Msg: LongWord; hwnd: HWnd; end;
TCWPSTRUCTProc = procedure(Code: Integer; wParam: Word; lParam: TCWPSTRUCT);
TTimerProc = procedure(HandleW, Msg, idEvent, TimeSys: LongWord);

var
StatusLabel, FileNameLabel, ExtractFile, StatusInfo: TLabel;
ProgressBar: TNewProgressBar;
CancelCode, n, ArcInd, UnPackError, StartInstall, LastTimerEvent, lastMb, baseMb: Integer;
FreeMB, TotalMB: Cardinal;
WndHookID, TimerID: LongWord;
Arcs, AllArchives: array of TArc;
msgError, CompressMethod: string;
Status: TBarInfo; Progress: TFAProgressInfo; DS: TFADiskStatus;
FreezeTimer, SuspendUpdate: Boolean;
origsize: Integer; // total uncompressed size of archive data in mb

const
CP_ACP = 0; CP_UTF8 = 65001;
oneMB=1024*1024;
Period = 250; // частота обновления кнопки таскбара и строки статуса
VK_ESCAPE = 27;
HC_ACTION = 0;
WM_PAINT = $F;
CancelDuringInstall = {#isFalse(SetupSetting("AllowCancelDuringInstall") )};

function WrapFreeArcCallback (callback: TFreeArcCallback; paramcount: integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function FreeArcExtract (callback: longword; cmd1,cmd2,cmd3,cmd4,cmd5,cmd6,cmd7,cmd8,cmd9,cmd10 : PAnsiChar): integer; external 'FreeArcExtract@files:unarc.dll cdecl';

Function OemToChar(lpszSrc, lpszDst: AnsiString): longint; external '[email protected] stdcall';
Function MultiByteToWideChar(CodePage: UINT; dwFlags: DWORD; lpMultiByteStr: PAnsiChar; cbMultiByte: integer; lpWideCharStr: PAnsiChar; cchWideChar: integer): longint; external '[email protected] stdcall';
Function WideCharToMultiByte(CodePage: UINT; dwFlags: DWORD; lpWideCharStr: PAnsiChar; cchWideChar: integer; lpMultiByteStr: PAnsiChar; cbMultiByte: integer; lpDefaultChar: integer; lpUsedDefaultChar: integer): longint; external '[email protected] stdcall';

function PeekMessage(var lpMsg: TMessage; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external '[email protected] stdcall';
function TranslateMessage(const lpMsg: TMessage): BOOL; external '[email protected] stdcall';
function DispatchMessage(const lpMsg: TMessage): Longint; external '[email protected] stdcall';

function GetTickCount: DWord; external 'GetTickCount@kernel32';
function GetWindowLong(hWnd, nIndex: Integer): Longint; external 'GetWindowLongA@user32 stdcall delayload';
function SetWindowText(hWnd: Longint; lpString: String): Longint; external 'SetWindowText{#A}@user32 stdcall delayload';
function GetKeyState(nVirtKey: Integer): ShortInt; external 'GetKeyState@user32 stdcall delayload';
function GetCurrentThreadID: LongWord; external 'GetCurrentThreadId@kernel32 stdcall delayload';

function CallNextWNDPROC(idHook: LongWord; Code: Integer; wParam: Word; lParam: TCWPSTRUCT): LongWord; external 'CallNextHookEx@user32 stdcall delayload';
function SetWindowsHookEx(idHook: LongWord; callback: LongWord; hMod: LongWord; dwThreadID: HWND): LongWord; external 'SetWindowsHookExW@user32 stdcall delayload';
function UnhookWindowsHookEx(idHook: LongWord): LongWord; external 'UnhookWindowsHookEx@user32 stdcall delayload';
function WrapCWPSTRUCTProc(callback:TCWPSTRUCTProc; paramcount:integer): longword; external 'wrapcallback@files:innocallback.dll';
function WrapTimerProc(callback: TTimerProc; Paramcount: Integer): longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): longword; external 'SetTimer@user32';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32 stdcall delayload';

procedure AppProcessMessage;
var Msg: TMessage;
begin
if not PeekMessage(Msg, 0, 0, 0, 1) then Exit;
TranslateMessage(Msg); DispatchMessage(Msg);
end;

Function FreeArcCmd(callback: longword; cmd1,cmd2,cmd3,cmd4,cmd5,cmd6,cmd7,cmd8,cmd9,cmd10 : PAnsiChar): integer;
Begin
CancelCode:= 0; AppProcessMessage;
try
Result:= FreeArcExtract(callback, cmd1,cmd2,cmd3,cmd4,cmd5,cmd6,cmd7,cmd8,cmd9,cmd10 ); // Pass the specified arguments to 'unarc.dll'
if CancelCode < 0 then Result:= CancelCode;
except
Result:= -63; // ArcFail
end;
End;

// Sets the TaskBar title
Procedure SetTaskBarTitle(Title: String); var h: Integer;
Begin
h:= GetWindowLong(MainForm.Handle, -8); if h <> 0 then SetWindowText(h, Title);
End;

// Перевод числа в строку с точностью 2 знака (%.2n) с округлением дробной части, если она есть
Function NumToStr(Float: Extended): String;
Begin
Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, Length(Result)-1);
End;

Function ByteOrTB(Bytes: Extended; noMB: Boolean): String; {Перевод числа в значение бт/Кб/Мб/Гб/Тб (до 2х знаков после запятой)}
Begin
if not noMB then Result:= NumToStr(Int(Bytes)) +' Mb' else
if Bytes < 1024 then if Bytes = 0 then Result:= '0' else Result:= NumToStr(Int(Bytes)) +' Bt' else
if Bytes/1024 < 1024 then Result:= NumToStr(round((Bytes/1024)*10)/10) +' Kb' else
If Bytes/oneMB < 1024 then Result:= NumToStr(round(Bytes/oneMB*100)/100) +' Mb' else
If Bytes/oneMB/1000 < 1024 then Result:= NumToStr(round(Bytes/oneMB/1024*1000)/1000) +' Gb' else
Result:= NumToStr(round(Bytes/oneMB/oneMB*1000)/1000) +' Tb';
End;

Function StringToArray(Text, Cut: String): array of String; var i, k: Integer; // поместить строки текста в элементы массив. шаблон перевода строк может быть любым. шаблон в начале/конце текста игнорируются
Begin
SetArrayLength(Result, 0); if Cut = '' then Cut:= #1310; //если шаблон пуст, считаем переводы строк
Repeat k:= Pos(Cut,Text);
if k = 1 then begin Delete(Text, 1, Length(Cut)); CONTINUE
end;
SetArrayLength(Result, GetArrayLength(Result) +1); i:= GetArrayLength(Result) -1;
if k = 0 then
Result[i]:=Text
else begin
Result[i]:= Copy(Text, 1, k -1); Delete(Text, 1, Length(Result[i]) + Length(Cut));
end;
Until Length(Text) * k = 0;
End;

Function CreateLabel(Parent: TWinControl; AutoSize, WordWrap, Transparent: Boolean; FontName: String; FontStyle: TFontStyles; FontColor: TColor; Left, Top, Width, Height: Integer; Prefs: TObject): TLabel;
Begin
Result:=TLabel.Create(Parent); Result.parent:= Parent;
if Prefs <> Nil then begin
Top:= TWinControl(Prefs).Top; Left:= TWinControl(Prefs).Left; Width:= TWinControl(Prefs).Width; Height:= TWinControl(Prefs).Height;
end;
if Top > 0 then result.Top:=Top; if Left > 0 then result.Left:= Left; if Width > 0 then result.Width:= Width; if Height > 0 then result.Height:= Height;
if FontName <> '' then result.Font.Name:= FontName; if FontColor > 0 then result.Font.Color:= FontColor; if FontStyle <> [] then result.Font.Style:= FontStyle;
result.AutoSize:= AutoSize; result.WordWrap:= WordWrap; result.Transparent:=Transparent; result.ShowHint:= true;
End;

// Converts milliseconds to human-readable time
// Конвертирует милисекунды в человеко-читаемое изображение времени
Function TicksToTime(Ticks: DWord; h,m,s: String; detail: Boolean): String;
Begin
if detail then {hh:mm:ss format}
Result:= PADZ(IntToStr(Ticks/3600000), 2) +':'+ PADZ(IntToStr((Ticks/1000 - Ticks/1000/3600*3600)/60), 2) +':'+ PADZ(IntToStr(Ticks/1000 - Ticks/1000/60*60), 2)
else if Ticks/3600 >= 1000 then {more than hour}
Result:= IntToStr(Ticks/3600000) +h+' '+ PADZ(IntToStr((Ticks/1000 - Ticks/1000/3600*3600)/60), 2) +m
else if Ticks/60 >= 1000 then {1..60 minutes}
Result:= IntToStr(Ticks/60000) +m+' '+ IntToStr(Ticks/1000 - Ticks/1000/60*60) +s
else Result:= Format('%.1n', [Abs(Ticks/1000)]) +s {less than one minute}
End;

Function ExpandENV(string: String): String; var n: UINT; Begin // ExpandConstant + развёртывание DOS-переменных типа %SystemRoot%
if Pos('{',string) * Pos('}',string) = 0 then Result:= String else Result:= ExpandConstant(String); n:= Pos('%',result); if n = 0 then Exit;
Delete(result, n,1); Result:= Copy(Result,1, n-1) + ExpandConstant('{%'+Copy(Result, n, Pos('%',result) -n) +'}') + Copy(Result, Pos('%',result) +1, Length(result))
End;

Function cm(Message: String): String; Begin Result:= ExpandConstant('{cm:'+ Message +'}') End;
Function LoWord(lw: LongWord): LongWord; Begin Result:= lw shr 16; End;

// Converts OEM encoded string into ANSI (Преобразует OEM строку в ANSI кодировку)
function OemToAnsiStr(strSource: AnsiString): AnsiString;
begin
SetLength(Result, Length(strSource));
OemToChar(strSource, Result);
end;

// Converts ANSI encoded string into UTF-8 (Преобразует строку из ANSI в UTF-8 кодировку) by CTAC-Ko
function AnsiToUtf8(strSource: string): string;
var
nRet, nRet2: integer; WideCharBuf, MultiByteBuf: AnsiString;
begin
SetLength(WideCharBuf, Length(strSource) * 2);
SetLength(MultiByteBuf, Length(strSource) * 2);
nRet:= MultiByteToWideChar(CP_ACP, 0, strSource, -1, WideCharBuf, Length(WideCharBuf));
nRet2:= WideCharToMultiByte(CP_UTF8, 0, WideCharBuf, -1, MultiByteBuf, Length(MultiByteBuf), 0, 0);
//nRet2 возвращает число обработанных знаков (исключая различный мусор в конце строки)
MultiByteBuf:=Copy(MultiByteBuf, 1, nRet2); //Вот мы и обрубаем строку до этого числа знаков
Result:= MultiByteBuf;
end;

// ArcInd - текущий архив, счёт с 0
// baseMb - записано из пред. архива на диск
// lastMb - извлечено из тек. архива на диск
// Status.mb - позиция в текущем архиве
// Status.allsize - объём всех архивов
// Status.size - всего извлечено Мб на текущий момент
// totalUncompressedSize - точный объём данных в архивах
// общий прогресс нарастает по мере записи данных из архива на диск (точка 'write')
// прогресс архивов двигается в соответствии с позицией в текущем архиве (точка 'read')

Procedure UpdateStatus(Flags: Integer); // выполняется с периодичностью, заданной константой Period
var
Remaining, p: Integer; i, t: string;
Begin
if Flags and $1 > 0 then FreezeTimer:= Flags and $2 = 0; // bit 0 = 1 change start/stop, bit 1 = 0 stop, bit 1 = 1 start
if (Flags and $4 > 0) or (Status.size <> baseMb+lastMb) then LastTimerEvent:= 0; // bit 2 = 1 UpdateNow // обновить по флагу или записи из архива на диск
if (FreezeTimer=True)or(GetTickCount - LastTimerEvent <= Period)or(SuspendUpdate=True) then Exit else LastTimerEvent:= GetTickCount;
Status.size := baseMb+lastMb; // извлечено на текущий момент
Progress.Allsize:= Progress.LastSize + lastMb; //Извлечено всего
with WizardForm.ProgressGauge do begin
if Progress.DiskSize > 0 then begin
Progress.CurPos:= round(Max * Status.size/Progress.DiskSize);
if Progress.CurPos > Progress.LastPos then begin
Progress.AllPos:= Progress.AllPos + ((Progress.CurPos-Progress.LastPos)/DS.MaxCount);
Progress.LastPos:=Progress.CurPos
end;
Position:= Progress.AllPos
end;
n:= (Max - Min)/1000; if n > 0 then Status.perc:= (Position-Min)/n; // 1000 процентов
#ifndef External
// к сожалению, этот код иногда сбоит на очень больших архивах, созданных с использованием внешних упаковщиков
if Position > 0 then Remaining:= ((Max-Position)*(GetTickCount-StartInstall))/Position else
#endif
Remaining:= 0; t:= cm('ending'); i:= AnsiLowerCase(t);
if Remaining > 0 then begin
t:= FmtMessage(cm('taskbar'), [IntToStr(Status.perc/10), TicksToTime(Remaining, 'h', 'm', 's', false)])
i:= TicksToTime(Remaining, cm('hour'), cm('min'), cm('sec'), false)
end;
end;
SetTaskBarTitle(t); // проценты и оставшееся время на кнопке инсталлятора
StatusInfo.Caption:= FmtMessage(cm('StatusInfo'), [IntToStr(Progress.FilesCount), ' ['+ ByteOrTB(Progress.Allsize*oneMB, true) +']', Format('%.1n', [Abs(Status.perc/10)]), i]);
// второй прогрессбар движется по мере считывания текущего архива
if (Status.stage = cm('ArcTitle')) and (GetArrayLength(Arcs) > 0) then begin
if (Arcs[ArcInd].allMb > 0) then p:= ((LastMb*100)/Arcs[ArcInd].AllMb);
ExtractFile.Caption:= FmtMessage(cm('ArcInfo'), [IntToStr(DS.CurDisk), IntToStr(DS.MaxCount), IntToStr(ArcInd+1), IntToStr(GetArrayLength(Arcs)), IntToStr(p)]);
ProgressBar.Position:= LastMb;
end;
End;

Procedure MyTimerProc(h, msg, idevent, dwTime: Longword);
Begin
if WizardForm.CurPageID = wpInstalling then UpdateStatus(0);
End;

Procedure OnWndHook(Code: Integer; wParam: Word; lParam: TCWPSTRUCT);
Begin
if (Code = HC_ACTION) and (LoWord(lParam.msg) = WM_PAINT) then begin // подготовка данных для последующего отображения по таймеру
if (Status.name <> WizardForm.FileNameLabel.Caption) and (WizardForm.FileNameLabel.Caption <> '') then begin // имя файла, названия ярлыка и прочее
FileNameLabel.Caption:= WizardForm.FileNameLabel.Caption;
Status.name:= WizardForm.FileNameLabel.Caption; // начало извлечения или распаковки очередного файла
Case Status.stage of
SetupMessage(msgStatusExtractFiles): // этап извлечения файлов инсталлятором
Progress.FilesCount:= Progress.FilesCount +1; // кол-во файлов
End;
end;
if (Status.stage <> WizardForm.StatusLabel.Caption) and (WizardForm.StatusLabel.Caption <> '') then begin
StatusLabel.Caption:= WizardForm.StatusLabel.Caption;
Status.stage:= WizardForm.StatusLabel.Caption; // текущий этап установки
if Status.stage = SetupMessage(msgStatusRollback) then begin
WizardForm.StatusLabel.Hide; WizardForm.FileNameLabel.Hide; StatusInfo.Hide; ExtractFile.Hide; ProgressBar.Hide;
end;
end;
UpdateStatus(0);
end;
CallNextWNDPROC(WndHookID, Code, wParam, lParam) {освобождение события}
End;

// compsize: в Mb объём архива
// total_files: в int2 ? число файлов в архиве
// origsize: в Mb общий объём данных в архиве
// write: в Mb число записанных (распакованных из архива) на диск мегабайт
// read: в Mb число обработанных мегабайт, в int2 размер текущего архива
// filename: вызывается перед обработкой каждого файла

// The main callback function for unpacking FreeArc archives
function FreeArcCallback(what: PAnsiChar; Mb, int2: Integer; str: PAnsiChar): Integer; // вызывается не менее 100 раз в секунду, что заменяет вызов по таймеру
begin
case string(what) of
'origsize': origsize:= Mb; // данных в тек. архиве (при распаковке не вызывается)
'total_files': Null;
'filename': begin // Update FileName label
WizardForm.FileNameLabel.Caption:= OemToAnsiStr(str); // извлекаемый файл, их имена пишутся в журнал установки
Progress.FilesCount:= Progress.FilesCount + 1; // кол-во файлов, этап распаковки
end;
'read': Null; // позиция в текущем архиве
'write': lastMb:= Mb; // Assign to Mb *total* amount of data extracted to the moment from all archives
'quit': if (Mb = -2) then CompressMethod:= str;
end;
if WizardForm.CurPageID = wpInstalling then UpdateStatus(0); // обновить страницу установки, не сбрасывая таймер
if (GetKeyState(VK_ESCAPE) < 0) and not CancelDuringInstall then
WizardForm.Close; // опрашиваем Cancel (если разрешена отмена установки)
AppProcessMessage;
Result:= CancelCode;
end;

Function DeleteChars(S, Char: String): String; begin if (Pos(Char, S)>0) then
begin while (Pos(Char, S)>0) do StringChange(S, Char, ''); end; Result:=S; end;

Function CutStr(var S: String; Index, Length: Integer): String; var str: string;
begin str:= Copy(S, Index, Length); Delete(S, Index, Length); Result:=Str; end;

Function CutStrEx(var S: String; Code: String): String;
var str: string; pos1, pos2: integer; begin pos1:= Pos(Code, S); If (pos1>0) then begin
pos2:=pos1; while S[pos2]<>';' do if pos2<>length(S) then pos2:=pos2+1; str:=cutStr(S, pos1, (pos2-pos1)+1);
StringChange(str, Code, ''); if str[Length(str)]=';' then Setlength(str, Length(str)-1); end; Result:=str; end;

Function ArcDecode(Line: String): array of TArc; // разбор строки Archives
var tmp: array of String; cut: string; i, n: integer;
begin
SetArrayLength(Result, 0); If Line = '' then Exit;
tmp:= StringToArray(Line, '|');
for n:=0 to GetArrayLength(tmp)-1 do begin
i:= GetArrayLength(Result); SetArrayLength(Result, i+1); cut:=tmp[n]+';';
if (Pos('Tasks:', cut)>0) then Result[i].task:= DeleteChars(CutStrEx(cut, 'Tasks:'), ';');
if (Pos('Components:', cut)>0) then Result[i].comp:= DeleteChars(CutStrEx(cut, 'Components:'), ';');
if (Pos('Password:', cut)>0) then Result[i].pass:= DeleteChars(CutStrEx(cut, 'Password:'), ';');
if (Pos('Disk:', cut)>0) then Result[i].disks:= StrToInt(DeleteChars(CutStrEx(cut, 'Disk:'), ';')) else Result[i].disks:=1;
if (Pos('DestDir:', cut)>0) then Result[i].dest:= DeleteChars(CutStrEx(cut, 'DestDir:'), ';');
cut:=DeleteChars(cut, ';');
if (ExtractFileDrive(ExpandEnv(cut)) = '')and(ExpandEnv(cut) = cut) then
Result[i].Path:= '{src}\'+cut else Result[i].Path:= cut;
Result[i].Dest:= ExpandENV(result[i].Dest); Result[i].Path:= ExpandENV(result[i].Path);
end;
end;

// Scans the specified folders for archives and add them to list
function AddArcs(File: TArc; var ErrCode: Integer): Integer; // добавление архивов в общий список и подсчёт объёма распакованных данных
var i: integer; Password: string;
Begin
if FileExists(File.Path) then begin
Result:= 0; i:= GetArrayLength(Arcs);
if File.pass <> '' then Password:= '-p'+AnsiToUtf8(File.pass) else Password:= '';
SetArrayLength(Arcs, i +1); Arcs[i]:=File;
if Password <> '' then
ErrCode:= FreeArcCmd(WrapFreeArcCallback(@FreeArcCallback,4) ,'l',Password,'--',AnsiToUtf8(Arcs[i].Path),'','','','','','')
else
ErrCode:= FreeArcCmd(WrapFreeArcCallback(@FreeArcCallback,4) ,'l','--',AnsiToUtf8(Arcs[i].Path),'','','','','','',''); // код ошибки
if ErrCode >= 0 then begin Arcs[i].allMb:= origsize; result:= Arcs[i].allMb; origsize:=0; end;// размер распакованных данных успешно считан
end;
End;

function DispatchError(ErrorCode: Integer; Arc: TArc): String;
var ArcFile: String;
begin
ArcFile:= ExtractFilename(Arc.Path);
if (ErrorCode = -2) then StringChange(CompressMethod, 'ERROR: unsupported compression method ', '')
case ErrorCode of
-1: Result:= cm('ErrorUnknownError');
-2: Result:= FmtMessage(cm('ErrorCompressMethod'), [CompressMethod, ArcFile]);
-3: Null;
-4: Result:= FmtMessage(cm('ErrorOutBlockSize'), [ArcFile]);
-5: Result:= FmtMessage(cm('ErrorNotEnoughRAMMemory'), [ArcFile]);
-6: Result:= FmtMessage(cm('ErrorReadData'), [ArcFile]);
-7: Result:= FmtMessage(cm('ErrorBadCompressedData'), [ArcFile]);
-8: Result:= cm('ErrorNotImplement');
-9: Result:= FmtMessage(cm('ErrorDataAlreadyDecompress'), [ArcFile]);
-10: Result:= cm('ErrorUnpackTerminated');
-11: Result:= FmtMessage(cm('ErrorWriteData'), [ArcFile]);
-12: Result:= FmtMessage(cm('ErrorBadCRC'), [ArcFile]);
-13: Result:= FmtMessage(cm('ErrorBadPassword'), [ArcFile]);
-14: Result:= FmtMessage(cm('ErrorBadHeader'), [ArcFile]);
-15: Null;
-63: Result:= cm('ErrorCodeException');
-112: Result:= FmtMessage(cm('ErrorNotEnoughFreeSpace'), [ArcFile]);
end;
end;

function UnPackArchive(Archive: TArc): Integer;
var callback: longword; Password: String;
Begin
// если отмена установки разрешена, кнопка Cancel станет доступна
WizardForm.CancelButton.Enabled:= not CancelDuringInstall;
if Archive.pass <> '' then Password:= '-p'+AnsiToUtf8(Archive.pass) else Password:= '';
callback:= WrapFreeArcCallback(@FreeArcCallback,4); //FreeArcCallback has 4 arguments
if Password <> '' then
Result:= FreeArcCmd(callback,'x','-o+','-dp'+AnsiToUtf8(Archive.Dest),'-w'+AnsiToUtf8(Archive.Dest),Password,'--',AnsiToUtf8(Archive.Path),'','','')
else // код ошибки
Result:= FreeArcCmd(callback,'x','-o+','-dp'+AnsiToUtf8(Archive.Dest),'-w'+AnsiToUtf8(Archive.Dest),'--',AnsiToUtf8(Archive.Path),'','','','')
// Error occured
if Result = 0 then Exit;
msgError:= FmtMessage(cm('ArcError'), [IntToStr(Result)]);
WizardForm.StatusLabel.Caption:= msgError;
WizardForm.FileNameLabel.Caption:= ExtractFileName(Archive.Path);
GetSpaceOnDisk(ExtractFileDrive(Archive.Dest), True, FreeMB, TotalMB);
if FreeMB < (Archive.allMb-lastMb) then Result:= -112;
MsgError:= msgError+#13#10#13+DispatchError(Result, Archive)
Log(msgError); // записываем ошибку в лог, а также показываем её текст на странице завершения
End;

procedure SetUnpacked(File: TArc); var i: integer; begin
for i:=0 to GetArrayLength(AllArchives)-1 do begin
if(File.Path=AllArchives[i].Path)and(File.Dest=AllArchives[i].Dest)
then begin AllArchives[i].UnPacked:=True; Break; end; end; end;

function UpdateArcsList(): Integer;
var m, ErrorCode: integer; begin
AppProcessMessage; SetArrayLength(Arcs,0); Progress.DiskSize:=0; for m:=0 to (GetArrayLength(AllArchives)-1) do try
if (AllArchives[m].UnPack)and(AllArchives[m].UnPacked=False) then Progress.DiskSize:= Progress.DiskSize + AddArcs(AllArchives[m], ErrorCode);
if (ErrorCode < 0) then begin Result:=ErrorCode; Break; end; Except Result:=-63; end; end;

// Extracts all found archives
function UnPack(): Integer;
begin
Progress.CurPos:=0; Progress.LastPos:=0; baseMb:= 0; // обнулить полученные мегабайты, если ранее вёлся подсчёт объёма файлов инсталлятора
if (DS.LastMaxCount<>DS.MaxCount)and(DS.CurDisk>1) then begin
Progress.AllPos:= (WizardForm.ProgressGauge.Max/(DS.MaxCount))*(DS.CurDisk-1); end;
UpdateStatus(7); // немедленно обновить строку статуса
for ArcInd:= 0 to GetArrayLength(Arcs) -1 do begin // архивы в текущей папке, константы раскрыты в ArcDecode
lastMb:= 0; SuspendUpdate:=False; //отключаем паузу автоапдейта по таймеру на время распаковки
ProgressBar.Max:=Arcs[ArcInd].allMb;
Result:= UnPackArchive(Arcs[ArcInd]); // код ошибки
Progress.LastSize:= Progress.AllSize; SetUnPacked(Arcs[ArcInd]);
SuspendUpdate:=True; //ставим автоапдейт по таймеру на паузу - распаковка окончена (возможно временно)
if Result <> 0 then Break; // прервать цикл распаковки
baseMb:= baseMb + lastMb; // общий объём распакованных файлов
// отработанный архив автоматически удаляется, если находится в папке {app} или {tmp}
if (Pos(AnsiLowercase(ExpandConstant('{app}')), AnsiLowercase(Arcs[ArcInd].Path)) > 0) or (Pos(AnsiLowercase(ExpandConstant('{tmp}')), AnsiLowercase(Arcs[ArcInd].Path)) > 0) then
DeleteFile(Arcs[ArcInd].Path);
end;
end;

Function CheckBools(Bools: array of Boolean): Integer;
var c,l: integer; begin Result:=0; for l:=0 to GetArrayLength(Bools)-1 do begin
if (Bools[l] = True) then c:=c+1; end; if (c=(GetArrayLength(Bools)))then Result:=1;end;

function GetRemainArcs(): integer;
var c: integer; Begin Result:=0; for c:=0 to GetArrayLength(AllArchives)-1 do begin
If (AllArchives[c].UnPack)and(not AllArchives[c].UnPacked)then Result:=Result+1; end; end;

Function GetNextArc(): Integer;
var c: Integer; Begin Result:=0; for c:=0 to GetArrayLength(AllArchives)-1 do begin
if (AllArchives[c].UnPack)and(not AllArchives[c].UnPacked) then begin Result:=c; Exit; end; end; end;

Function GetUnpackedArcs(): Integer;
var c: Integer; Begin Result:=0; for c:=0 to GetArrayLength(AllArchives)-1 do begin
if (AllArchives[c].UnPack)and(AllArchives[c].UnPacked) then Result:=Result+1; end; Result:=Result+1; end;

Function SetStatus(Value: String): Boolean;
begin WizardForm.StatusLabel.Caption:=Value; StatusLabel.Caption:=Value; Status.stage:=Value; end;

Function UnPackWithPrompts(Archives: string): Integer;
var MsBox, MaxArcs: Integer; FADiskMessage: string;
TmpArc: array of TArc; z, f, q, k, x, LastDisk: Integer; OneDisk, DiskCheck: Boolean;
begin
AppProcessMessage; SetStatus(cm('ArcTitle')) // начало этапa распаковки
ExtractFile.Show; ProgressBar.Show; StatusInfo.Show;
Progress.FilesCount:=0; MsBox:=IDOK; z:=0; OneDisk:=False;
AllArchives:= ArcDecode(Archives); DS.LastMaxCount:=DS.MaxCount;
MaxArcs:= GetArrayLength(AllArchives)-1; LastDisk:=1; q:=0; k:=0; x:=0;
DS.CurDisk:=1; DS.MaxCount:= AllArchives[MaxArcs].disks; DiskCheck:=False;
WizardForm.ProgressGauge.Position:=0; UpdateStatus(7); SuspendUpdate:=True;
WizardForm.ProgressGauge.Max:= 100000;
//инициализация параметров архивов
for f:=0 to MaxArcs do begin
AllArchives[f].UnPack:=True; AllArchives[f].UnPacked:=False; //Сначала активируем все архивы
if (AllArchives[f].comp<>'')and(not IsComponentSelected(AllArchives[f].comp)) then AllArchives[f].UnPack:=False; //Если компонент не выбран то деактивируем этот архив
if (AllArchives[f].task<>'')and(not IsTaskSelected(AllArchives[f].task)) then Allarchives[f].UnPack:=False; //То же что и выше, только с задачей (Task)
z:=z+CheckBools([FileExists(AllArchives[f].Path)]); k:=k+CheckBools([AllArchives[f].UnPack]);
x:=x+CheckBools([AllArchives[f].UnPack, FileExists(AllArchives[f].Path)]);
end;
if (z=(MaxArcs+1)) then begin DS.LastMaxCount:=DS.MaxCount; DS.MaxCount:=DS.CurDisk; OneDisk:=True; end;
if (x=k) then begin DS.LastMaxCount:=DS.MaxCount; DS.MaxCount:=DS.CurDisk; OneDisk:=True; end;
DS.NextArc:= GetNextArc; DS.RemainsArc:= GetRemainArcs;
//распаковка архивов на дисках
while (Result = 0) and (DS.RemainsArc>0) do begin
if (not OneDisk) then begin x:=0;
//проверка если на текущем диске находятся все требующиеся архивы (исключая уже распакованные)
for f:= DS.NextArc to MaxArcs do begin
x:=x+CheckBools([(AllArchives[f].UnPack), FileExists(AllArchives[f].Path)]);
if (x=((MaxArcs+1)-DS.NextArc)) then begin DS.LastMaxCount:=DS.MaxCount; DS.MaxCount:=DS.CurDisk; end; end;
end;
while (msBox=IDOK)and(not(FileExists(AllArchives[DS.NextArc].Path))and(AllArchives[DS.NextArc].UnPack)) do begin
FADiskMessage:= FmtMessage(cm('InsertDisk'),[IntToStr(DS.CurDisk), ExtractFilename(AllArchives[DS.NextArc].Path)])
MsBox:= MsgBox(FADiskMessage, mbConfirmation, MB_OKCANCEL)
end;
//Отмена распаковки
if MsBox = IDCANCEL then Result:= -10;
//Проверка числа дисков
if (not OneDisk) then begin
//Если на n-ом диске находтся архивы привязанные к одному компоненту и этот компонент не выбран (проверяется один раз)
if (DS.MaxCount>1)and(DS.CurDisk<>DS.MaxCount)and(not DiskCheck) then begin
while (LastDisk<=DS.MaxCount)and(q<(MaxArcs+1)) do begin
SetArraylength(TmpArc, 0); k:=0;
for z:=q to GetArrayLength(AllArchives)-1 do begin
if AllArchives[z].disks=LastDisk then begin SetArrayLength(TmpArc, GetArrayLength(TmpArc)+1); TmpArc[GetArrayLength(TmpArc)-1]:= AllArchives[z]; end; end;
for z:=0 to GetArrayLength(tmpArc)-1 do begin if (not TmpArc[z].Unpack) then k:=k+1; end;
if k=GetArrayLength(tmpArc) then begin DS.LastMaxCount:= DS.MaxCount; DS.MaxCount:= DS.MaxCount-1; q:=q+GetArrayLength(TmpArc) end;
LastDisk:=LastDisk+1; end;
DiskCheck:=True; end;
//Если на текущем диске должен быть архив а его нет
if (DS.CurDisk=DS.MaxCount) then begin
SetArraylength(TmpArc, 0); k:=0;
for z:=DS.NextArc to GetArrayLength(AllArchives)-1 do begin
if AllArchives[z].disks=DS.CurDisk then begin SetArrayLength(TmpArc, GetArrayLength(TmpArc)+1); TmpArc[GetArrayLength(TmpArc)-1]:= AllArchives[z]; end; end;
for z:=0 to GetArrayLength(tmpArc)-1 do begin if (TmpArc[z].UnPack)and(FileExists(TmpArc[z].Path)) then k:=k+1 end;
if k<GetArrayLength(TmpArc)then begin DS.LastMaxCount:= DS.MaxCount; DS.MaxCount:= DS.MaxCount+1; end;
end;
end;
//Сама распаковка
if (MsBox<>IDCANCEL)and(DS.RemainsArc>0) then begin Result:=UpdateArcsList; Result:= UnPack(); DS.CurDisk:= DS.CurDisk+1; DS.NextArc:= GetNextArc; DS.RemainsArc:= GetRemainArcs; end;
end;
//Конец распаковки, скрытие надписей и прогрессбара
if (Result = 0) then begin WizardForm.StatusLabel.Caption:= FmtMessage(cm('ArcFinish'), [IntToStr(GetUnpackedArcs), IntToStr(Progress.FilesCount), ByteOrTB(Progress.AllSize*oneMB, true)]);
StatusInfo.Hide; ExtractFile.Hide; ProgressBar.Hide; end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssInstall then begin
StartInstall:= GetTickCount {время начала извлечения файлов}
WndHookID:= SetWindowsHookEx(4, WrapCWPSTRUCTProc(@OnWndHook, 3), 0, GetCurrentThreadID); {установка SendMessage хука}
TimerID:= SetTimer(0, 0, 500 {полсекунды}, WrapTimerProc(@MyTimerProc, 4)); {установка таймера}
end;
if CurStep = ssPostInstall then
begin
StartInstall:= GetTickCount {время начала распаковки}
UnPackError:= UnPackWithPrompts('{#Archives}')
if UnPackError <> 0 then begin // Error occured, uninstall it then
if not {#isFalse(SetupSetting("Uninstallable"))} then // деинсталляция разрешёна
Exec(ExpandConstant('{uninstallexe}'), '/SILENT','', sw_Hide, ewWaitUntilTerminated, n); // откат установки из-за ошибки unarc.dll
WizardForm.caption:= SetupMessage(msgErrorTitle) +' - '+ cm('ArcBreak')
SetTaskBarTitle(SetupMessage(msgErrorTitle))
end else
SetTaskBarTitle(SetupMessage(msgSetupAppTitle));
end;
end;

#ifdef Texture
#include "FATexture.iss"
#endif

Procedure CurPageChanged(CurPageID: Integer);
Begin
#ifdef Texture
SetTexture(CurPageID)
#endif
if (CurPageID = wpFinished) and (UnPackError <> 0) then
begin // Extraction was unsuccessful (распаковщик вернул ошибку)
// Show error message
WizardForm.FinishedLabel.Font.Color:= $0000C0; // red (красный)
WizardForm.FinishedLabel.Height:= WizardForm.FinishedLabel.Height * 2;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) + #13#10#13#10 + msgError;
end;
End;

procedure WizardClose(Sender: TObject; var Action: TCloseAction);
Begin
Action:= caNone; // так надо
if Status.stage = cm('ArcTitle') then begin // распаковка на этапе ssPostInstall
UpdateStatus(1); // остановить таймер
if MsgBox(SetupMessage(msgExitSetupMessage), mbInformation, MB_YESNO) = IDYES then
CancelCode:= -10; // прервать распаковку
UpdateStatus(7); // обновить информацию
end else
MainForm.Close; // стандартное нажатие кнопки закрытия окна, отмены или Escape.
End;

Procedure InitializeWizard();
Begin
// Create controls to show extended info

StatusLabel:= CreateLabel(WizardForm.InstallingPage,false,false, true,'',[],0,0,0,0,0, WizardForm.StatusLabel);
FileNameLabel:= CreateLabel(WizardForm.InstallingPage,false,false, true,'',[],0,0,0,0,0, WizardForm.FileNameLabel);
WizardForm.StatusLabel.Top:= WizardForm.ProgressGauge.Top; WizardForm.FileNameLabel.Top:= WizardForm.ProgressGauge.Top; // прячем под прогрессбар, тогда все события WM_PAINT перехватываются
with WizardForm.ProgressGauge do begin
StatusInfo:= CreateLabel(WizardForm.InstallingPage, false, true, true, '', [], 0, 0, Top + ScaleY(32), Width, 0, Nil);
ProgressBar := TNewProgressBar.Create(WizardForm);
ProgressBar.SetBounds(Left, StatusInfo.Top + StatusInfo.Height + ScaleY(16), Width, Height);
ProgressBar.Parent := WizardForm.InstallingPage;
ProgressBar.max := 65536;
ProgressBar.Hide; // будет показан при обработке нескольких архивов
ExtractTemporaryFile('arc.ini')
ExtractFile:= CreateLabel(WizardForm.InstallingPage, false, true, true, '', [], 0, 0, ProgressBar.Top + ScaleY(32), Width, 0, Nil);
end;
WizardForm.OnClose:= @WizardClose // позволяет прервать распаковку архивов стандартными способами
#ifdef Texture
CreateTexture();
#endif
End;

Procedure DeInitializeSetup;
Begin
KillTimer(0, TimerID) {удаление таймера}
UnhookWindowsHookEx(WndHookID) {удаление SendMessage хука}
End;
Reply With Quote
  #10  
Old 15-05-2013, 21:26
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,746
Thanks: 2,141
Thanked 11,093 Times in 2,295 Posts
Razor12911 is on a distinguished road
hmm, I see, you have the old version of this script, here is the latest.
Attached Files
File Type: 7z ISFreeArcExtract v.4.2b.7z (725.3 KB, 207 views)
Reply With Quote
  #11  
Old 19-05-2013, 19:34
surumanboy surumanboy is offline
Registered User
 
Join Date: Apr 2013
Location: canada
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
surumanboy is on a distinguished road
how do i get the uninstall file to delete the archive files aswell? also to include the archive in the space required before installation in the setup wizard
Reply With Quote
  #12  
Old 19-05-2013, 21:26
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,746
Thanks: 2,141
Thanked 11,093 Times in 2,295 Posts
Razor12911 is on a distinguished road
add this

[UninstallDelete]
Type: filesandordirs; Name: {app}
Reply With Quote
  #13  
Old 24-05-2013, 14:12
surumanboy surumanboy is offline
Registered User
 
Join Date: Apr 2013
Location: canada
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
surumanboy is on a distinguished road
how to make sure

how do you make sure it says the correct hard drive space requirements in the setup menu, mine exludes the archive and shows a 2mb installation
Reply With Quote
  #14  
Old 24-05-2013, 14:21
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,746
Thanks: 2,141
Thanked 11,093 Times in 2,295 Posts
Razor12911 is on a distinguished road
ExtraDiskSpaceRequired=1048576 under [setup]

size is in kb

Last edited by Razor12911; 24-05-2013 at 14:26.
Reply With Quote
  #15  
Old 27-05-2013, 14:15
surumanboy surumanboy is offline
Registered User
 
Join Date: Apr 2013
Location: canada
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
surumanboy is on a distinguished road
Incorrect version of precomp.exe

Incorrect version of precomp.exe is displayed when extracting an archive compressed with following parameters -mprecomp+srep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
Reply With Quote
Reply

Tags
freearc, inno setup, precomp, srep

Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57
Tutorial using CI 8.0.0 yener90 Conversion Tutorials 424 21-10-2014 09:49



All times are GMT -7. The time now is 05:59.


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