Автор: Str33t
Дата сообщения: 09.05.2014 15:21
[more] [more] [more]
#define GameID "{C7A27B39-8776-4A6C-9B4B-E3784D1AF4B8}"
#define GameName "GTA"
#define GameVerName "GTA"
#define GameUninstall "chemax"
#define Gamefolder "GTA"
#define GameUninstall_ "GTA"
#define RePacker "456465"
#define Company "Rockstar Games"
#define GameEXE_1 "chemax.exe"
#define GameDir_1 "{app}"
;#define Splash
#define Dell_Info
#define Start_x64
#define WinTB
#define Priority
#define NeedSize "3745"
#define TNeedSize "745"
#define Processor "2500"
#define VideoCard "128"
#define RAM "512"
#define NeedMem "512"
#define WinVerMajor "5"
#define WinVerMinor "1"
#define ServicePack "2"
#define ArcLocation "{src}\*.arc"
#define SlidesCount "5"
#define SlidesSecond "100000"
;#define Autorun
;#define FreeArc
#define ISDone
#define records
#define precomp04
;#define precomp038
;#define unrar
[Setup]
AppID={{#GameID}}
AppName={#GameName}
AppVerName={#GameName}
VersionInfoCompany={#Company} | RePack by {#RePacker}
AppCopyright=© {#Company}
VersionInfoVersion=
VersionInfoDescription={#GameName}
DirExistsWarning=auto
MinVersion=0,5.01
SetupIconFile=Icons\gta.ico
UsePreviousTasks=no
DiskSpanning=true
SlicesPerDisk=3
DiskSliceSize=1566000000
DisableReadyPage=true
CreateAppDir=true
EnableDirDoesntExistWarning=false
Compression=lzma
InternalCompressLevel=max
UsePreviousAppDir=false
UninstallRestartComputer=false
UninstallFilesDir={app}\Uninstall
[Files]
Source: "D:\CheMaxRus12.3\chemax.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CheMaxRus12.3\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "D:\setup\FreeArc\bin\arc.ini"; DestDir: {tmp}; Flags: dontcopy
Source: Data.arc; DestDir: {src}; Flags: recursesubdirs ignoreversion createallsubdirs
Source: InstallFiles\DLL\*; Flags: dontcopy deleteafterinstall
Source: InstallFiles\MusicFiles\*; Flags: dontcopy deleteafterinstall
Source: InstallFiles\ImageFiles\*; Flags: dontcopy deleteafterinstall
Source: Slides\*; Flags: dontcopy deleteafterinstall
Source: Icons\*; DestDir: {app}; Flags: ignoreversion deleteafterinstall
#ifdef Splash
Source: InstallFiles_2\Splash\*; Flags: dontcopy deleteafterinstall
#endif
#ifdef WinTB
Source: InstallFiles_2\WinTB\*; Flags: dontcopy deleteafterinstall
#endif
Source: InstallFiles\ImageFiles\WizardImage.jpg; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\DLL\botva2.dll; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\ImageFiles\ProgressBackground.png; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\ImageFiles\ProgressImg.png; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\ImageFiles\StatusPanel2.png; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\ImageFiles\StatusPanel.png; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\ImageFiles\Button.png; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\Skin\Tiger.cjstyles; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\ImageFiles\Workspace.png; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\Skin\ISSkin.dll; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\DLL\innocallback.dll; DestDir: {sys}; Flags: ignoreversion; Attribs: hidden system;
[Icons]
Name: {group}\{#GameUninstall}; Filename: {app}\{#GameEXE_1}; IconFilename: {sys}\gta2.ico; WorkingDir: {#GameDir_1}; Comment: Запустить игру; Check: NoIcons
Name: {group}\Веб-сайт игры; Filename: {app}\URL\publisher.url; WorkingDir: {app}\URL IconFilename: {sys}\2.ico; Comment: Посетить Веб-сайт игры; Check: NoIcons
Name: {group}\Удалить {#GameUninstall_}; Filename: {uninstallexe}; IconFilename: {sys}\5.ico; Comment: Удалить игру; Check: NoIcons
Name: {userdesktop}\{#GameUninstall}; Filename: {app}\{#GameEXE_1}; IconFilename: {sys}\gta2.ico; WorkingDir: {#GameDir_1}; Check: Desktop
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#GameUninstall}; Filename: {app}\{#GameEXE_1}; IconFilename: {sys}\gta2.ico; WorkingDir: {#GameDir_1}; Check: QuickLaunch
[INI]
FileName: {app}\URL\Publisher.url; Section: InternetShortcut; Key: URL; String: asdw.wa; Check: not Install
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Run]
Filename: {src}\Soft\sa-mp.exe; WorkingDir: {src}\Soft; Check: DirectX and not Install; Flags: waituntilterminated; BeforeInstall: DirectXProgress
Filename: {src}\Soft\directx.exe; WorkingDir: {src}\Soft; Check: DirectX and not Install; Flags: waituntilterminated; BeforeInstall: DirectXProgress
[Registry]
Root: HKLM; SubKey: SOFTWARE\Rockstar Games\gta; ValueType: string; ValueName: GDFBinary; ValueData: {app}\GDFBinary_ru_RU.dll; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Rockstar Games\gta; ValueType: string; ValueName: DisplayName; ValueData: gta™; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Rockstar Games\gta; ValueType: string; ValueName: Locale; ValueData: ru_RU; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Rockstar Games\gta; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Rockstar Games\gta\InstallOptSelect; ValueType: string; ValueName: InstallPB; ValueData: 1; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Rockstar Games\gta\InstallOptSelect; ValueType: string; ValueData: 1; Flags: uninsdeletevalue uninsdeletekeyifempty
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Code]
#ifdef Splash
procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
#endif
#include "Modules_ISS\Function.iss"
#include "Modules_ISS\Messages.iss"
#include "Modules_ISS\botva2.iss"
#include "Modules_ISS\PB.iss"
#include "Modules_ISS\Inserting images.iss"
#include "Modules_ISS\Texture buttons.iss"
#include "Modules_ISS\Panel.iss"
#ifdef Autorun
#include "AutoRun.iss"
#endif
#ifdef ISDone
#include "IsDone\ISDone_Example.iss"
#endif
#ifdef FreeArc
#include "FreeArc.iss"
#endif
#include "Modules_ISS\Page.iss"
#ifdef WinTB
#include "Modules_ISS\WinTB.iss"
#endif
function InitializeSetup: Boolean;
begin
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
if not FileExists(ExpandConstant('{tmp}\innocallback.dll')) then ExtractTemporaryFile('innocallback.dll');
if not FileExists(ExpandConstant('{tmp}\Click.wav')) then ExtractTemporaryFile('Click.wav');
if not FileExists(ExpandConstant('{tmp}\isskin.dll')) then ExtractTemporaryFile('isskin.dll');
if not FileExists(ExpandConstant('{tmp}\Tiger.cjstyles')) then ExtractTemporaryFile('Tiger.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');
#ifdef Autorun
Result:=AutoRunExec;
#else
Result:=true;
#endif
end;
#ifdef Dell_Info
type
TWFProc = function(h:hWnd;Msg,wParam,lParam:Longint):Longint;
function CallWindowProc1(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam: Longint; lParam: Longint): Longint; external 'CallWindowProcA@user32.dll stdcall';
function SetWindowLong1(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
function WrapWFProc(Callback: TWFProc; ParamCount: Integer): Longword; external 'wrapcallbackaddr@files:CallbackCtrl1.dll stdcall';
var
OldProc:Longint;
procedure AboutSetupClick;
begin
MsgBox('gta | RePack by 456465', mbInformation, MB_OK);
end;
function WFWndProc(h:HWND;Msg,wParam,lParam:Longint):Longint;
begin
if (Msg=$112) and (wParam=9999) then begin
Result:=0;
AboutSetupClick;
end else begin
if Msg=$2 then SetWindowLong(WizardForm.Handle,-4,OldProc);
Result:=CallWindowProc(OldProc,h,Msg,wParam,lParam);
end;
end;
procedure Info_Prog();
begin
OldProc:=SetWindowLong(WizardForm.Handle,-4,WrapWFProc(@WFWndProc,4));
end;
#endif
#ifdef Priority
const
NORMAL_PRIORITY_CLASS = $00000020;
IDLE_PRIORITY_CLASS = $00000040;
HIGH_PRIORITY_CLASS = $00000080;
REALTIME_PRIORITY_CLASS = $00000100;
function SetPriorityClass(hProcess: THandle; dwPriorityClass: DWORD): BOOL; external 'SetPriorityClass@kernel32';
function GetCurrentProcess: THandle; external 'GetCurrentProcess@kernel32';
procedure Priority();
begin
SetPriorityClass(GetCurrentProcess, HIGH_PRIORITY_CLASS);
end;
#endif
#ifdef WinTB
const
IMAGE_ICON = 1;
LR_LOADFROMFILE = $0010;
var
hback, hnext, hcancel: integer;
hIcon1, hIcon2, hIcon3, hIcon4, hIcon5: LongWord;
function LoadImage(hInst: LongWord; ImageName: PAnsiChar; ImageType: LongWord; X, Y: Integer; Flags: LongWord): LongWord;
external 'LoadImageA@user32.dll stdcall';
function DestroyIcon(hIcon: Longint): Longint;
external 'DestroyIcon@user32.dll stdcall';
procedure BtnOnClick(Btn: integer);
begin
case Btn of
hback: WizardForm.BackButton.OnClick(WizardForm.BackButton);
hnext: WizardForm.NextButton.OnClick(WizardForm.NextButton);
hcancel: WizardForm.CancelButton.OnClick(WizardForm.CancelButton);
end;
end;
procedure WinTB();
begin
ExtractTemporaryFile('WinTB.dll');
ExtractTemporaryFile('CallbackCtrl.dll');
ExtractTemporaryFile('1_1.ico');
ExtractTemporaryFile('2_2.ico');
ExtractTemporaryFile('3_3.ico');
ExtractTemporaryFile('4_4.ico');
ExtractTemporaryFile('5_5.ico');
TaskBarV10(MainForm.Handle, WizardForm.Handle, false, false, 0, 0, _m_);
SetTaskBarProgressState(0, TBPF_INDETERMINATE);
hIcon1 := LoadImage(0, ExpandConstant('{tmp}\1_1.ico'), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
hIcon2 := LoadImage(0, ExpandConstant('{tmp}\2_2.ico'), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
hIcon3 := LoadImage(0, ExpandConstant('{tmp}\3_3.ico'), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
hIcon4 := LoadImage(0, ExpandConstant('{tmp}\4_4.ico'), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
hIcon5 := LoadImage(0, ExpandConstant('{tmp}\5_5.ico'), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
hback :=TaskBarAddButton(hIcon1, 'Назад', WrapBtnCallbackaddr(@BtnOnClick, 1));
hnext :=TaskBarAddButton(hIcon2, 'Далее', WrapBtnCallbackaddr(@BtnOnClick, 1));
hcancel :=TaskBarAddButton(hIcon3, 'Отмена', WrapBtnCallbackaddr(@BtnOnClick, 1));
TaskBarUpdateButtons(0);
end;
#endif
function PBProcUninst(h:hWnd;Msg,wParam,lParam:Longint):Longint;
var
pr,i1,i2:Extended;
p:string;
w : integer;
begin
if Msg=$2 then SetWindowLong(h,-4,PBOldProc);
Result:=CallWindowProc(PBOldProc,h,Msg,wParam,lParam);
if (Msg=$402) and (UninstallProgressForm.ProgressBar.Position>UninstallProgressForm.ProgressBar.Min) then begin
i1:=UninstallProgressForm.ProgressBar.Position-UninstallProgressForm.ProgressBar.Min;
i2:=UninstallProgressForm.ProgressBar.Max-UninstallProgressForm.ProgressBar.Min;
pr:=i1*100/i2;
p:=IntToStr(Round(pr))+' %';
ProgressInfoLabel.Caption:=ExpandConstant('{cm:AllProgressUninst} ')+p;
w:=Round(558*pr/100);
ImgSetPosition(PB3Img,120,302,w,21);
ImgApplyChanges(UninstallProgressForm.Handle);
end;
end;
procedure AllCancel;
begin
SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);
ImgSetVisibility(AImg[CurrentImage],False);
ImgSetVisibility(WizardImg,True);
ImgSetVisibility(PBImg,False);
ImgSetVisibility(PBBkgImg,False);
ImgApplyChanges(WizardForm.Handle);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
#ifdef ISDone
UnpackingISDone(CurStep);
#endif
#ifdef FreeArc
UnpackingArc(CurStep);
#endif
case CurStep of
ssInstall: begin
if GetArrayLength(ADisk)>0 then begin
KillTimer(WizardForm.Handle,WFDiskTimerID);
SetArrayLength(ADisk,0);
end;
if GetArrayLength(ASysReq)>0 then begin
KillTimer(WizardForm.Handle,WFSysReqTimerID);
SetArrayLength(ASysReq,0);
end;
WizardForm.ProgressGauge.Visible:=False;
OldPosition:=0;
CurrentImage:=0;
ImgSetVisibility(WizardImg,False);
ImgSetVisibility(AImg[0],True);
#ifndef ISDone
#ifndef FreeArc
PBBkgImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressBackground.png'),119,300,560,25,True,True);
ImgApplyChanges(WizardForm.Handle);
PBImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),120,302,558,21,True,True);
PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,CallBackProc(@PBProc,4));
#endif
#endif
sTime:=GetTickCount;
eTime:=sTime;
ProgressStep:=100 div GetArrayLength(AImg);
end;
ssPostInstall: AllCancel;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
case CurUninstallStep of
usUninstall: begin
UninstallProgressForm.ProgressBar.Visible:=False;
PB3Img:=ImgLoad(UninstallProgressForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),120,302,558,21,True,True);
PBOldProc:=SetWindowLong(UninstallProgressForm.ProgressBar.Handle,-4,CallBackProc(@PBProcUninst,4));
end;
end;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
if CurPageID=wpInstalling then begin
Confirm:=False;
Cancel:=ExitSetupMsgBox;
if Cancel then begin
AllCancel;
StatusLabel.Caption:=SetupMessage(msgStatusRollback);
FilenameLabel.Hide;
ProgressInfoLabel.Hide;
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
WizardForm.CancelButton.Enabled:=False;
end;
end;
end;
procedure InitializeWizard;
begin
#ifdef Splash
begin
ExtractTemporaryFile('Splash.png');
ExtractTemporaryFile('isgsg.dll');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\Splash.png',1000,3000,1000,0,255,False,$FFFFFF,10);
end;
#endif
CreateStatusPanel;
CreateWizardImage;
ButtonsTextures;
CreatePageComponents;
#ifdef ISDone
CreateISDoneComponents;
#endif
#ifdef FreeArc
CreateArcComponents;
#endif
#ifdef WinTB
WinTB();
#endif
#ifdef Priority
Priority();
#endif
#ifdef Dell_Info
Info_Prog();
#endif
end;
procedure CurPageChanged(CurPageID: Integer);
begin
SetStateNewButtons;
Welcome.Font.Color := $FFFFFF;
System.Font.Color := $FFFFFF;
Catalogue.Font.Color := $FFFFFF;
#ifdef Components
Components.Font.Color := $FFFFFF;
#endif
StartMenu.Font.Color := $FFFFFF;
Tasks.Font.Color := $FFFFFF;
Installing.Font.Color :=$FFFFFF;
Finish.Font.Color := $FFFFFF;
HideComponents;
ImgSetVisibility(RequirementsPanel,False);
ImgSetVisibility(Edit,False);
ImgSetVisibility(DirFolder,False);
BtnSetVisibility(hDirBrowseBtn,False);
ImgSetVisibility(HardDrivePanel,False);
ImgSetVisibility(HDD,False);
ImgSetVisibility(GroupFolder,False);
BtnSetVisibility(hGroupBrowseBtn,False);
BtnSetVisibility(NoIconsCheck,False);
BtnSetVisibility(DesktopCheck,False);
BtnSetVisibility(QuickLaunchCheck,False);
BtnSetVisibility(DirectXCheck,False);
ShowComponents(CurPageID);
ImgApplyChanges(WizardForm.Handle);
#ifdef ISDone
UnpackingISDoneFinished(CurPageID);
#endif
#ifdef FreeArc
UnpackingArcFinished(CurPageID);
#endif
if GetArrayLength(ASysReq)>0 then
if CurPageID=SystemPage.ID then SetTimer(WizardForm.Handle,WFSysReqTimerID,1000,WrapTimerProc(@SysReqFlashing,4))
else KillTimer(WizardForm.Handle,WFSysReqTimerID);
if CurPageID=wpSelectDir then begin
OldDisk:='';
GetFreeSpaceCaption(nil);
end else if GetArrayLength(ADisk)>0 then KillTimer(WizardForm.Handle,WFDiskTimerID);
#ifdef WinTB
case CurPageID of
wpWelcome: TaskBarButtonEnabled(hback, false);
wpSelectDir: begin
TaskBarButtonEnabled(hback, true);
TaskBarButtonIcon(hnext, hIcon2);
TaskBarButtonToolTip(hnext, 'Далее');
end;
wpReady: begin
TaskBarButtonIcon(hnext, hIcon4);
TaskBarButtonToolTip(hnext, 'Установить');
end;
wpInstalling: begin
TaskBarButtonEnabled(hback, false);
TaskBarButtonEnabled(hnext, false);
end;
wpFinished: begin
TaskBarButtonEnabled(hnext, true);
TaskBarButtonEnabled(hcancel, false);
TaskBarButtonIcon(hnext, hIcon5);
TaskBarButtonToolTip(hnext, 'Завершить');
end;
end;
#endif
end;
procedure DeinitializeSetup;
begin
#ifdef Autorun
if ContinueInstall then begin
#endif
WFButtonFont.Free;
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')),0);
UnloadSkin;
SetArrayLength(AImg,0);
gdipShutdown;
#ifdef Autorun
end;
#endif
#ifdef WinTB
TaskBarV10Kill;
DestroyIcon(hIcon1);
DestroyIcon(hIcon2);
DestroyIcon(hIcon3);
DestroyIcon(hIcon4);
DestroyIcon(hIcon5);
TaskBarDelButtons;
#endif
end;
procedure DeinitializeUninstall;
begin
gdipShutdown;
UnloadSkin;
if Assigned(UPFButtonFont) then UPFButtonFont.Free;
end;
[/more]
Код установщика
Привет всем нужна помощь не могу не как соединить свои arc архивы ошибку выдает. Hе найдено ни одного файла указанного для ISArcExtract. Файл бросил в папку с файлами IsDone.iss и т.д.
Помогите буду благодарен сильно!
[more]
[Files]
#ifdef ISDone
Source: InstallFiles_2\ISDone\facompress.dll; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles_2\ISDone\ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#endif
Source: InstallFiles_2\ISDone\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: "D:\setup\Установщик\IsDone\srep.exe"; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: InstallFiles_2\ISDone\records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp04
Source: InstallFiles_2\ISDone\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles_2\ISDone\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles_2\ISDone\precomp04.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp038
Source: InstallFiles_2\ISDone\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles_2\ISDone\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles_2\ISDone\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles_2\ISDone\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef unrar
Source: InstallFiles_2\ISDone\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif
[Code]
const
PCFonFLY=true;
notPCFonFLY=false;
var
LabelPct, LabelCurrFileName, LabelStatusRollback, LabelStatus, LabelTime3: TLabel;
OveralPct, n, Cancel: integer;
CancelUnpackingBtn: HWND;
Comps1,Comps2,Comps3, TmpValue: longword;
MyError: boolean;
msgError: string;
PCFVer: double;
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
TMessage = record hWnd: HWND; msg, wParam: Word; lParam: LongWord; Time: TFileTime; pt: TPoint; end;
function PeekMessage(var lpMsg: TMessage; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external 'PeekMessageA@user32.dll stdcall';
function TranslateMessage(const lpMsg: TMessage): BOOL; external 'TranslateMessage@user32.dll stdcall';
function DispatchMessage(const lpMsg: TMessage): Longint; external 'DispatchMessageA@user32.dll stdcall';
function WrapMyCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:innocallback.dll stdcall';
function ISArcExtract(CurComponent:longword; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: BOOL ):BOOL; external 'ISArcExtract@files:ISDone.dll stdcall';
function IS7ZipExtract(CurComponent:longword; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):BOOL; external 'IS7zipExtract@files:ISDone.dll stdcall';
function ISRarExtract(CurComponent:longword; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):BOOL; external 'ISRarExtract@files:ISDone.dll stdcall';
function ISPrecompExtract(CurComponent:longword; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):BOOL; external 'ISPrecompExtract@files:ISDone.dll stdcall';
function ISSRepExtract(CurComponent:longword; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):BOOL; external 'ISSrepExtract@files:ISDone.dll stdcall';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):BOOL; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall';
function ISDoneInitialize(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:longword; PrecompVers: double; RecursiveSubDir:boolean; WinHandle, NeededMem:longint; callback:TCallback):BOOL; external 'ISDoneInitialize@files:ISDone.dll stdcall';
function ISDoneStop:BOOL; external 'ISDoneStop@files:ISDone.dll stdcall';
function GetWindowLong(hWnd, nIndex: Integer): Longint; external 'GetWindowLongA@user32 stdcall delayload';
function SetWindowText(hWnd: Longint; lpString: AnsiString): Longint; external 'SetWindowTextA@user32 stdcall delayload';
function cm(Message: String): String; Begin Result:= ExpandConstant('{cm:'+ Message +'}') End;
Procedure SetTaskBarTitle(Title: AnsiString); var h: Integer;
begin
h:= GetWindowLong(MainForm.Handle, -8); if h <> 0 then SetWindowText(h, Title);
end;
procedure AppProcessMessage;
var
Msg: TMessage;
begin
while PeekMessage(Msg, 0, 0, 0, 1) do begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
var
pr: Extended;
w, w1: integer;
p: string;
begin
w:=Round(458*OveralPct/1000);
ImgSetPosition(PB3Img,120,302,w,21);
LabelCurrFileName.Caption :=ExpandConstant('{app}\')+CurrentFile;
if LabelCurrFileName.Caption<>WizardForm.FilenameLabel.Caption then
LabelCurrFileName.Caption:=MinimizePathName(LabelCurrFileName.Caption, LabelCurrFileName.Font, 560);
p :=IntToStr(OveralPct div 10)+' %.';
LabelPct.Caption :=ExpandConstant('{cm:AllProgress} ')+p+ExpandConstant(' {cm:Remains} ')+TimeStr1;
LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime} ')+TimeStr3;
if GetTickCount-LastTimerEvent>{#SlidesSecond} then begin
LastTimerEvent:= GetTickCount;
ImgSetVisibility(AImg[CurrentImage],False);
CurrentImage:=CurrentImage+1;
if CurrentImage=GetArrayLength(AImg) then CurrentImage:=0;
ImgSetVisibility(AImg[CurrentImage],True);
end;
ImgApplyChanges(WizardForm.Handle);
AppProcessMessage;
Result := Cancel;
end;
procedure CancelUnpackingOnEnter(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\WFEnter.wav'),$0001);
end;
procedure CancelUnpackingOnClick(hBtn:HWND);
begin
if MsgBox( SetupMessage( msgExitSetupMessage ), mbConfirmation, MB_YESNO ) = IDYES then Cancel:= -1;
end;
procedure HideComponent;
begin
LabelStatusRollback.Show;
LabelPct.Hide;
LabelCurrFileName.Hide;
LabelStatus.Hide;
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
ProgressInfoLabel.Hide;
StatusLabel.Hide;
ProgressInfoLabel.Hide;
FilenameLabel.Hide;
ImgSetVisibility(PBBkg1Img,False);
ImgSetVisibility(PBBkg2Img,False);
ImgSetVisibility(PB1Img,False);
ImgSetVisibility(PB2Img,False);
ImgSetVisibility(PB3Img,False);
BtnSetVisibility(CancelUnpackingBtn, False);
BtnSetVisibility(hCancelBtn, True);
ImgApplyChanges(WizardForm.Handle);
end;
procedure Error;
var n:integer;
begin
Exec(ExpandConstant('{uninstallexe}'), '/SILENT','', sw_Hide, ewWaitUntilTerminated, n);
end;
procedure CreateISDoneComponents;
begin
CancelUnpackingBtn:=BtnCreate(WizardForm.Handle,ScaleX(652),ScaleY(487),ScaleX(111),ScaleY(39),ExpandConstant('{tmp}\button.png'),18,False);
BtnSetEvent(CancelUnpackingBtn,BtnMouseEnterEventID,WrapBtnCallback(@CancelUnpackingOnEnter,1));
BtnSetEvent(CancelUnpackingBtn,BtnClickEventID,WrapBtnCallback(@CancelUnpackingOnClick,1));
BtnSetFont(CancelUnpackingBtn,WFButtonFont.Handle);
BtnSetFontColor(CancelUnpackingBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);
BtnSetCursor(CancelUnpackingBtn,GetSysCursorHandle(32649));
BtnSetVisibility(CancelUnpackingBtn, False);
LabelPct := TLabel.Create(WizardForm);
with LabelPct do begin
AutoSize:=False;
SetBounds(ScaleX(80), ScaleY(355), ScaleX(638), ScaleY(19));
Alignment := taCenter;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Parent := WizardForm;
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
AutoSize:=False;
SetBounds(ScaleX(119), ScaleY(270), ScaleX(560), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Caption:= '';
Parent := WizardForm;
Hide;
end;
LabelStatusRollback := TLabel.Create(WizardForm);
with LabelStatusRollback do begin
Parent := WizardForm;
AutoSize := False;
SetBounds(ScaleX(120), ScaleY(245), ScaleX(400), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 11;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Caption := cm('TitleBack');
end;
LabelStatus := TLabel.Create(WizardForm);
with LabelStatus do begin
Parent := WizardForm;
AutoSize := False;
SetBounds(ScaleX(120), ScaleY(245), ScaleX(400), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Caption := cm('ArcTitle');
end;
LabelTime3 := TLabel.Create(WizardForm);
with LabelTime3 do begin
AutoSize:=False;
SetBounds(ScaleX(80), ScaleY(405), ScaleX(638), ScaleY(19));
Alignment := taCenter;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Parent := WizardForm;
end;
end;
Procedure UnpackingISDoneFinished(CurPageID: Integer);
begin
if (CurPageID = wpFinished) and MyError then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:ISDoneError}');
SetTaskBarTitle(SetupMessage(msgErrorTitle));
FinishedHeadingLabel.Caption:=cm('FinishedHeading1');
FinishedLabel.Caption:= msgError + ExpandConstant(' {cm:Trouble}') + #10#13#10#13+ExpandConstant('{cm:FinishedLabel2}');
SetTimer(WizardForm.Handle,WFDiskTimerID,1000,WrapTimerProc(@FinishFlashing,4));
end;
if (CurPageID = wpFinished) and (Cancel <> 0) then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:ISDoneError1}');
SetTaskBarTitle(SetupMessage(msgErrorTitle));
FinishedHeadingLabel.Caption:=cm('FinishedHeading1');
FinishedLabel.Caption:= msgError + ExpandConstant(' {cm:Trouble}') + #10#13#10#13+ExpandConstant('{cm:FinishedLabel2}');
SetTimer(WizardForm.Handle,WFDiskTimerID,1000,WrapTimerProc(@FinishFlashing,4));
end;
end;
procedure UnpackingISDone(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
if MyError then Error;
if CurStep = ssInstall then begin
PBBkg1Img:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressBackground.png'),119,300,460,25,True,True);
PBBkg2Img:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressBackground2.png'),581,300,98,25,True,True);
ImgApplyChanges(WizardForm.Handle);
PB3Img:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),120,302,458,21,True,True);
PB2Img:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),582,302,96,21,True,True);
PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,CallBackProc(@PBProc,4));
ImgSetVisibility(PB2Img,False);
LabelStatus.Show;
BtnSetText(CancelUnpackingBtn,WizardForm.CancelButton.Caption);
BtnSetVisibility(CancelUnpackingBtn, True);
BtnSetVisibility(hCancelBtn, False);
LabelPct.Show;
LabelCurrFileName.Show;
ProgressInfoLabel.Hide;
Cancel:=0;
// Распаковка всех необходимых файлов в папку {tmp}.
ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов.
ExtractTemporaryFile('arc.ini');
ExtractTemporaryFile('srep.exe');
#ifdef records
ExtractTemporaryFile('records.inf');
#endif
#ifdef precomp04
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('RTconsole.exe');
ExtractTemporaryFile('precomp04.exe');
#endif
#ifdef precomp038
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('RTconsole.exe');
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef unrar
ExtractTemporaryFile('Unrar.dll');
#endif
// Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для ISDone.dll
// максимум 96 компонентов.
Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef Components
TmpValue:=1;
//if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue; //компонент 1
//if Comp1 then Comps1:=Comps1+TmpValue; //компонент 1
TmpValue:=TmpValue*2;
//if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue; //компонент 2
if Comp2 then Comps1:=Comps1+TmpValue; //компонент 2
TmpValue:=TmpValue*2;
//if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue; //компонент 3
if Comp3 then Comps1:=Comps1+TmpValue; //компонент 3
TmpValue:=TmpValue*2;
//if IsComponentSelected('voice\rus') then Comps1:=Comps1+TmpValue; //компонент 4
//if Comp4 then Comps1:=Comps1+TmpValue; //компонент 4
TmpValue:=TmpValue*2;
//if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue; //компонент 5
if Comp5 then Comps1:=Comps1+TmpValue; //компонент 5
TmpValue:=TmpValue*2;
//if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue; //компонент 5
if Comp6 then Comps1:=Comps1+TmpValue; //компонент 6
// .....
#endif
#ifdef precomp04
PCFVer:=0.4;
#else
#ifdef precomp038
PCFVer:=0.38;
#else
PCFVer:=0;
#endif
#endif
repeat
MyError:=true;
if not ISDoneInitialize(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, 0, false, MainForm.Handle, {#NeedMem}, @ProgressCallback) then break;
repeat
//************************************************ [Архивы ISDone] ***************************************************//
// if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Data-1.arc'), ExpandConstant('{app}'), false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY} ) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Data.arc'), ExpandConstant('{app}\'), false, '', '', '', notPCFonFLY ) then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\Data.srep'), ExpandConstant('{app}\Data.pcf'), true ) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\Data.pcf'), ExpandConstant('{app}\Data.7z'), true ) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{app}\Data.7z'), ExpandConstant('{app}\Data'), true, '' ) then break;
//************************************************ [Архивы ISDone] ***************************************************//
//************************************************ [Примеры различный способов распаковки] ***************************************************//
(*
//Распаковка архивов, учитывая выбранные компоненты:
Comps1:=0; Comps2:=0; Comps3:=0;
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
ISDoneError:=true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
repeat
if not FileSearchInit(false) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\BasicData.arc'), ExpandConstant('{app}\'), '', false, '', '', '', notPCFonFLY) then break;
if not ISArcExtract ( 1, 0, ExpandConstant('{src}\rustext.arc'), ExpandConstant('{app}'), '', false, '', '', '', notPCFonFLY) then break;
if not ISArcExtract ( 2, 0, ExpandConstant('{src}\engtext.arc'), ExpandConstant('{app}'), '', false, '', '', '', notPCFonFLY) then break;
if not ISArcExtract ( 3, 0, ExpandConstant('{src}\rusvoice.arc'), ExpandConstant('{app}'), '', false, '', '', '', notPCFonFLY) then break;
if not ISArcExtract ( 4, 0, ExpandConstant('{src}\engvoice.arc'), ExpandConstant('{app}'), '', false, '', '', '', notPCFonFLY) then break;
ISDoneError:=false;
until true;
ISDoneStop;
end;
//Распаковка архивов, учитывая выбранные компоненты.
//-------------------------------------------------------------
//Описание:
В данном примере имеется 4 действующих компонента. Перед инициализацией бибилиотеки состояния чекбоксов компонентов загружаются в переменную Comps1.
Сначала при любом выборе компонентов распаковывается архив BasicData.arc, у которого нет к ним привязки (первый параметр равен 0);
далее уже в зависимости от выбранных пользователем чекбоксов будет распаковываться:
rustext.arc, если был выбран компонент 'text\rus';
engtext.arc, если был выбран компонент 'text\eng';
rusvoice.arc, если был выбран компонент 'voice\rus';
engvoice.arc, если был выбран компонент 'voice\eng';
Вне зависимости от выбора пользователя, прогрессбар автоматически подстраивается под выбранные компоненты, чтобы отображение было без равков и граничным состоянием было 100%.
Это достигается тем, что после тестового прохода вся информация о времени выполнения каждого компонента сохраняется в файл records.inf,
и перед началом реальной установки уже известно какие компоненты не были выбраны и, соответственно, их время будет интерполироваться на все остальные операции,
которые точно будут выполнены в процессе установки.
//Описание.
*)
//==================================================================================
(*
//Просто различные комбинации параметров в функциях распаковки №1:
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Spider.arc'), ExpandConstant('{app}'), false, '', '', ExpandConstant('{app}'), notPCFonFLY ) then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data.srp'), ExpandConstant('{app}\data.pcf'), true ) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data.pcf'), ExpandConstant('{app}\'), true ) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\bin\data1.bin'), ExpandConstant('{app}'), false, '', '', ExpandConstant('{app}'), notPCFonFLY ) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\data64.7z'), ExpandConstant('{app}'), false, '' ) then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data1.srp'), ExpandConstant('{app}\data1.pcf'), true ) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{app}\data64.arc'), ExpandConstant('{app}\'), true, '', '', '', notPCFonFLY ) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data1.pcf'), ExpandConstant('{app}'), true ) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{app}\data.7z'), ExpandConstant('{app}'), true, '' ) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\bin\data2.bin'), ExpandConstant('{app}'), false, '', '', '', notPCFonFLY ) then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data2.srp'), ExpandConstant('{app}\data2.pcf'), true ) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data2.pcf'), ExpandConstant('{app}'), true ) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{app}\data1\CODMW2.7z'), ExpandConstant('{app}\data1'), true, '' ) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\bin\data3.bin'), ExpandConstant('{app}'), false, '', '', '', notPCFonFLY ) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data3.pcf'), ExpandConstant('{app}'), true ) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\bin\data4.bin'), ExpandConstant('{app}'), false, '', '', '', notPCFonFLY ) then break;
//Просто различные комбинации параметров в функциях распаковки №1.
//Пример использования всплывающего запроса следующего диска:
if not ShowChangeDiskWindow('Пожалуйста, вставьте диск 2 и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW2_Disk2.arc' ) then break;
if not ShowChangeDiskWindow('Пожалуйста, вставьте диск 3 и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW2_Disk2.arc' ) then break;
if not ShowChangeDiskWindow('Пожалуйста, вставьте диск 4 и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW2_Disk2.arc' ) then break;
if not ShowChangeDiskWindow('Пожалуйста, вставьте диск 5 и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW2_Disk2.arc' ) then break;
//Пример использования всплывающего запроса следующего диска.
//Просто различные комбинации параметров в функциях распаковки №2:
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\sds_ru2.arc'), ExpandConstant('{app}\data1'), false, '', '', ExpandConstant('{app}\data1'), PCFonFLY) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\sds_ru.arc'), ExpandConstant('{app}\data1'), false, '', '', ExpandConstant('{app}\data1'), PCFonFLY) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{src}\data1\*.pcf'), ExpandConstant('{src}\data1'), false) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\data1\sds_ru.7z'), ExpandConstant('{src}\data1'), true, '') then break;
if not ISRarExtract ( 0, 0, ExpandConstant('{src}\data_*.rar'), ExpandConstant('{app}'), false, '' ) then break;
if not ISRarExtract ( 0, 0, ExpandConstant('{src}\*part1.rar'), ExpandConstant('{app}'), false, 'Password' ) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\data*.7z'), ExpandConstant('{app}\data1'), false, '' ) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\sound.7z'), ExpandConstant('{app}\data1'), false, '' ) then break;
if not ISArcExtract ( 0, 33, ExpandConstant('{src}\dataR.arc'), ExpandConstant('{app}\data1'), false, '', '', '',notPCFonFLY) then break;
if not ISArcExtract ( 0, 33, ExpandConstant('{src}\CODMW_*.arc'), ExpandConstant('{app}\data1'), false, '', '', '',notPCFonFLY) then break;
if not ISArcExtract ( 0, 34, ExpandConstant('{src}\dataR.arc'), ExpandConstant('{app}\data1\'), false, '', '', '',notPCFonFLY) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{src}\*.pcf'), ExpandConstant('{app}\data1'), false) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{src}\data0.pcf'), ExpandConstant('{app}\data1'), false) then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{src}\*.srep'), ExpandConstant('{app}\data1\'), false) then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{src}\data02.srep'), ExpandConstant('{app}\data1\data.pcf'), false) then break;
//Просто различные комбинации параметров в функциях распаковки №2.
*)
//************************************************ [Конец - Примеры различный способов распаковки] ***************************************************//
MyError:=false;
until true;
ISDoneStop;
until true;
BtnSetVisibility(CancelUnpackingBtn, False);
BtnSetVisibility(hCancelBtn, True);
BtnSetEnabled(hCancelBtn, False);
ImgSetVisibility(PB2Img,True);
LabelStatus.Hide;
LabelPct.Hide;
LabelCurrFileName.Hide;
ProgressInfoLabel.Show;
if (Cancel <> 0) or MyError then HideComponent;
end;
end;
[/more]
Код IsDone [/more]