Black666angel
 
  
  Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору кто небуть может разобрать на состовляющие это:   #define GameID "{E6D22FE1-AB5F-42CA-9480-6F70B96DDD88}"      #define GameName "Need for Speed™ Undercover"   #define GameVerName "Need for Speed™ Undercover [v 1.0.1.17]"      #define NeedSize "6315"      #define Processor "3000"   #define VideoCard "128"   #define RAM "512"   #define WinVerMajor "5"   #define WinVerMinor "1"   #define ServicePack "2"      #define ArcLocation "{src}\*.arc"      [Setup]   AppId={{#GameID}   AppName={#GameName}   AppVerName={#GameName}   AppPublisher=Electronic Arts   AppPublisherURL=http://www.ea.com   AppVersion=1.0.1.17   AppSupportURL={app}\Support\EA Help\Ru\EA_HELP_RU.htm   AppUpdatesURL=http://www.needforspeed.com/downloads   AppReadmeFile={group}\ReadMe.lnk   DefaultDirName={pf}\EA Games\Need for Speed Undercover   DefaultGroupName=EA Games\Need for Speed™ Undercover   OutputBaseFilename=setup   DirExistsWarning=no   MinVersion=0,5.01   VersionInfoDescription={#GameName}   ;SetupIconFile=G:\nfs_icon.ico   DiskSpanning=yes   SlicesPerDisk=3   DiskSliceSize=1566000000   DisableReadyPage=True      [Files]   Source: "InstallFiles\*"; Flags: dontcopy;   Source: "Slides\*"; Flags: dontcopy;   Source: "Icons\*"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;      Source: "InstallFiles\WizardImage.jpg"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\botva2.dll"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\ProgressBackground.png"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\ProgressImg.png"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\StatusPanel2.png"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\StatusPanel.png"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\Button.png"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\Tiger.cjstyles"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\Workspace.png"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\ISSkin.dll"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;   Source: "InstallFiles\InnoCallback.dll"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;      ;Source: {win}\help\*; DestDir: {app}\Files; Flags: external recursesubdirs createallsubdirs;   Source: calc.exe; DestDir: {app}; DestName: nfs.exe; Flags: external;      ;Source: "C:\Program Files\EA Games\Need for Speed Undercover\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ;      [Languages]   Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl"      [Messages]   rus.WinVersionTooLowError=Программа установки несовместима с версией Вашей операционной системы.   rus.SetupWindowTitle={#GameName}   rus.ExitSetupMessage=Вы действительно хотите отменить установку игры {#GameName}?   rus.SelectDirDesc=В какую папку Вы хотите установить игру {#GameName}?   rus.NoProgramGroupCheck2=Не создавать папку в меню «Пуск»   rus.InstallingLabel=Пожалуйста, подождите, пока игра установится на Ваш компьютер.   rus.UninstallAppTitle=Удаление   rus.UninstallAppFullTitle={#GameName}   rus.ConfirmUninstall=Вы действительно хотите удалить игру {#GameName}?   rus.UninstalledAll=Игра {#GameName} была полностью удалена с Вашего компьютера.   rus.UninstalledMost=Удаление игры {#GameName} завершено.%n%nЧасть элементов не удалось удалить. Вы можете удалить их самостоятельно.      rus.ButtonBack=< Назад   rus.ButtonNext=Далее >   rus.ButtonInstall=Установить   rus.ButtonFinish=Завершить   rus.ButtonWizardBrowse=Обзор...      [CustomMessages]   rus.Welcome=Приветствие   rus.System=Система   rus.Catalogue=Каталог   rus.StartMenu=Меню «Пуск»   rus.Task=Задачи   rus.Installing=Установка   rus.Uninstalling=Удаление   rus.Finish=Завершение   rus.Welcome1=Вас приветствует Мастер установки игры%n{#GameName}   rus.Welcome2=Программа установит игру {#GameVerName} на Ваш компьютер.%n%nРекомендуется закрыть антивирусные пакеты, а также все прочие приложения перед тем, как продолжить.%n%nНажмите «Далее», чтобы продолжить, или  «Отмена», чтобы выйти из программы установки.   rus.Requirements1=Проверка системных требований   rus.Requirements2=Программа установки обнаружила следующие необходимые компоненты   rus.Requirements3=Все компоненты удовлетворяют требованиям игры.   rus.Requirements4=Компоненты, выделенные красным, не удовлетворяют требованиям игры.   rus.DeviceDriver=Драйвер устройства не обнаружен   rus.Processor=Процессор   rus.VideoCard=Видеоадаптер   rus.SoundCard=Звуковая карта   rus.RAM=Память (ОЗУ)   rus.OperationSystem=Операционная система   rus.TotalSpace=Размер жесткого диска:   rus.FreeSpace=Доступно места на диске:   rus.NeedSpace=Требуется места на диске:   rus.SelectTasksLabel=Выберите дополнительные задачи, которые должны выполниться при установке игры, после этого нажмите «Установить».   rus.Language=Выберите язык игры:   rus.LanguageRus=Русский   rus.LanguageUS=English   rus.StartMenuLbl=Нажмите «Установить», чтобы продолжить. Если Вы хотите выбрать другую папку, нажмите «Обзор».   rus.TasksName=Выберите дополнительные задачи   rus.TasksDescription=Какие дополнительные задачи необходимо выполнить?   rus.DirectX=Обновить DirectX   rus.QuickLaunch=Создать ярлык в Панели быстрого запуска   rus.Desktop=Создать ярлык на Рабочем столе   rus.DirectXInstall=Идет обновление DirectX...   rus.AllProgress=Прогресс распаковки файлов:   rus.Remains=Осталось ждать   rus.Hour=час   rus.Min=мин   rus.Sec=сек   rus.FinishedHeading=Установка игры {#GameName} успешно завершена.   rus.FinishedLabel=Игра {#GameVerName} была успешно установлена на Ваш компьютер. Для ее запуска выберите соответствующий ярлык в меню «Пуск» или на Рабочем столе.   rus.FinishedLabel2=Нажмите «Завершить», чтобы выйти из программы установки.   rus.Uninstall=Удалить {#GameName}   rus.DeleteSave=Удалить сохраненные игры и профили?   rus.WizardUninst=Состояние удаления   rus.UninstDescript=Пожалуйста, подождите, пока игра будет удалена с Вашего компьютера.   rus.StatusUninst=Удаление игры {#GameName}...   rus.AllProgressUninst=Общий прогресс удаления игры:      [Icons]   Name: "{group}\{#GameName}"; Filename: "{app}\nfs.exe"; WorkingDir: {app}; Comment: "Запустить игру"; Check: NoIcons   Name: "{group}\Открыть файл ReadMe"; Filename: "{app}\Support\ReadMe.txt"; WorkingDir: "{app}\Support"; IconFilename: "{app}\1.ico"; Comment: "Просмотреть файл ReadMe.txt"; Check: NoIcons   Name: "{group}\Поиск обновлений"; Filename: "{app}\Update.url"; WorkingDir: "{app}"; IconFilename: "{app}\2.ico"; Comment: "Поиск обновлений игры в интернете"; Check: NoIcons   Name: "{group}\Техническая поддержка"; Filename: "{app}\Support\EA Help\Electronic_Arts_Technical_Support.htm"; WorkingDir: "{app}\Support\EA Help"; IconFilename: "{app}\3.ico"; Comment: "Просмотреть файл Технической поддержки"; Check: NoIcons   Name: "{group}\Веб-сайт издателя"; Filename: "{app}\publisher.url"; WorkingDir: "{app}"; IconFilename: "{app}\2.ico"; Comment: "Посетить Веб-сайт издателя"; Check: NoIcons   Name: "{group}\Регистрация"; Filename: "{app}\Support\EAregister.exe"; WorkingDir: "{app}\Support"; IconFilename: "{app}\4.ico"; Comment: "Зарегистрировать игру"; Check: NoIcons   Name: "{group}\{cm:Uninstall}"; Filename: "{uninstallexe}"; IconFilename: "{app}\5.ico"; Comment: "Удалить игру"; Check: NoIcons   Name: "{userdesktop}\{#GameName}"; Filename: "{app}\nfs.exe"; WorkingDir: {app}; Check: Desktop;   Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#GameName}"; Filename: "{app}\nfs.exe";  WorkingDir: {app}; Check: QuickLaunch;      [INI]   FileName: "{app}\publisher.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.ea.com";   FileName: "{app}\Update.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.needforspeed.com/downloads";      [UninstallDelete]   Type: files; Name: "{app}\publisher.url"   Type: files; Name: "{app}\Update.url"      [Run]   Filename: "{src}\DirectX\DXSETUP.exe"; WorkingDir: "{src}\DirectX"; Parameters: "/silent"; Check: DirectX; Flags: waituntilterminated; BeforeInstall: DirectXProgress;      [Registry]   Root: HKLM; SubKey: SOFTWARE\EA Games; Flags: uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: DisplayName; ValueData: Need for Speed™ Undercover; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: CD Drive; ValueData: {drive:{src}} ; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: ProductName; ValueData: Need for Speed™ Undercover; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Folder; ValueData: {group}; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Installed From; ValueData: {src}; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Locale; ValueData: en_US; Check: not Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Locale; ValueData: Ru; Check: Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Language; ValueData: English (US); Check: not Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Language; ValueData: Russian; Check: Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Patch URL; ValueData: http://www.needforspeed.com/downloads; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Product GUID; ValueData: {{E6D22FE1-AB5F-42CA-9480-6F70B96DDD88}; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Suppression Exe; ValueData: nfs.exe; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover; ValueType: string; ValueName: Registration; ValueData: Software\Electronic Arts\EA Games\Need for Speed Undercover\ergc; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover\1.0; ValueType: string; ValueName: DisplayName; ValueData: Need for Speed Undercover; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover\1.0; ValueType: dword; ValueName: Language; ValueData: 1; Check: not Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover\1.0; ValueType: dword; ValueName: Language; ValueData: 16; Check: Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover\1.0; ValueType: string; ValueName: LanguageName; ValueData: English (US); Check: not Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover\1.0; ValueType: string; ValueName: LanguageName; ValueData: Russian; Check: Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Undercover\1.0; ValueType: string; ValueName: ProgramGroup; ValueData: {group}; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\Electronic Arts; Flags: uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\Electronic Arts\EA Core; Flags: uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\Electronic Arts\EA Core\Installed Games; Flags: uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\Electronic Arts\EA Core\Installed Games\PUT_YOUR_CONTENTID_HERE; ValueType: string; ValueName: lang; ValueData: ru; Check: Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\Electronic Arts\EA Core\Installed Games\PUT_YOUR_CONTENTID_HERE; ValueType: string; ValueName: lang; ValueData: en-us; Check: not Lang; Flags: uninsdeletevalue uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\Electronic Arts\EA Games; Flags: uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\Electronic Arts\EA Games\Need for Speed Undercover; Flags: uninsdeletekeyifempty   Root: HKLM; SubKey: SOFTWARE\Electronic Arts\EA Games\Need for Speed Undercover\ergc; ValueType: string; ValueData: XX6EEMEQUH6TKCUKEBPN; Flags: uninsdeletevalue uninsdeletekeyifempty      [code]      type     TTimerProc = procedure (h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);     TBtnEventProc = procedure (h:HWND);     TPBProc = function  (h:hWnd;Msg,wParam,lParam:Longint):Longint;        TImgPB = record       Left,       Top,       Width,       Height,       MaxWidth  : integer;       img1,img2 : Longint;     end;        TALabel = array of TLabel;        const     BtnClickEventID      = 1;     BtnMouseEnterEventID = 2;     LanguageButtonCount  = 2;     BASS_ACTIVE_PAUSED   = 3;     BASS_SAMPLE_LOOP     = 4;     WFDiskTimerID        = 1;     WFSysReqTimerID      = 2;      var     SystemPage, SelectTasksPage: TWizardPage;        Rus: boolean;     MusicButton,     hCancelBtn, hNextBtn, hBackBtn, hDirBrowseBtn, hGroupBrowseBtn,  hCancelUninstBtn,     NoIconsCheck, DesktopCheck, QuickLaunchCheck, DirectXCheck, mp3Handle: HWND;        WFButtonFont, UPFButtonFont: TFont;     CurrentImage, ProgressStep: integer;     mp3Name, OldDisk, TimeLeft: string;          Welcome, System, Catalogue, StartMenu, Tasks, Installing, Finish, Uninstalling,        PageNameLabel, PageDescriptionLabel,     WelcomeLabel1, WelcomeLabel2,     RequirementsLbl, ProcessorLbl, VideoCardLbl, SoundCardLbl, RAMLbl, SystemLbl,     ProcessorNameLbl, VideoCardNameLbl, SoundCardNameLbl, RAMTotalLbl, SystemNameLbl,        SelectDirBrowseLabel, DirEditLabel, TotalSpaceLabel, NeedSpaceLabel, FreeSpaceLabel,     SelectStartMenuFolderBrowseLabel, GroupEditLabel, NoIconsLabel,     SelectTasksLabel, DesktopLabel, QuickLaunchLabel, DirectXLabel, LanguageLabel, LngNameLbl,     FilenameLabel, StatusLabel, ProgressInfoLabel,     FinishedHeadingLabel, FinishedLabel,     WizardUninstLabel, UninstPageDescriptLabel, StatusUninstLabel : TLabel;        StatusPanel, RequirementsPanel, Edit,DirFolder,HardDrivePanel,     GroupFolder,WizardImg,OldPosition, HDD, PBOldProc: Longint;        FreeMB, TotalMB: Cardinal;     sTime, eTime: DWORD;     NewPB: TImgPB;     AImg: array of Longint;     LanguageButton: array [1..LanguageButtonCount] of HWND;     ASysReq, ADisk: TALabel;     Keys: TArrayOfString;     LastTimerEvent: DWORD;        function WrapBtnCallback(Callback: TBtnEventProc; ParamCount: Integer): Longword; external 'wrapcallback@{tmp}\innocallback.dll stdcall delayload';   function BtnCreate(hParent:HWND; Left,Top,Width,Height:integer; FileName:PAnsiChar; ShadowWidth:integer; IsCheckBtn:boolean):HWND;  external 'BtnCreate@{tmp}\botva2.dll stdcall delayload';   procedure BtnRefresh(h:HWND); external 'BtnRefresh@{tmp}\botva2.dll stdcall delayload';   function BtnGetChecked(h:HWND):boolean; external 'BtnGetChecked@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetChecked(h:HWND; Value:boolean); external 'BtnSetChecked@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetText(h:HWND; Text:PAnsiChar);  external 'BtnSetText@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetVisibility(h:HWND; Value:boolean); external 'BtnSetVisibility@{tmp}\botva2.dll stdcall delayload';   function BtnGetEnabled(h:HWND):boolean; external 'BtnGetEnabled@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetEnabled(h:HWND; Value:boolean); external 'BtnSetEnabled@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetFont(h:HWND; Font:Cardinal); external 'BtnSetFont@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetFontColor(h:HWND; NormalFontColor, FocusedFontColor, PressedFontColor, DisabledFontColor: Cardinal); external 'BtnSetFontColor@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetEvent(h:HWND; EventID:integer; Event:Longword); external 'BtnSetEvent@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetCursor(h:HWND; hCur:Cardinal); external 'BtnSetCursor@{tmp}\botva2.dll stdcall delayload';   procedure BtnSetPosition(h:HWND; NewLeft, NewTop, NewWidth, NewHeight: integer); external 'BtnSetPosition@{tmp}\botva2.dll stdcall delayload';   function GetSysCursorHandle(id:integer):Cardinal; external 'GetSysCursorHandle@{tmp}\botva2.dll stdcall delayload';      function ImgLoad(Wnd :HWND; FileName  AnsiChar; Left, Top, Width, Height :integer; Stretch, IsBkg :boolean) :Longint; external 'ImgLoad@{tmp}\botva2.dll stdcall delayload';   procedure ImgSetPosition(img :Longint; NewLeft, NewTop, NewWidth, NewHeight :integer); external 'ImgSetPosition@{tmp}\botva2.dll stdcall delayload';   procedure ImgRelease(img :Longint); external 'ImgRelease@{tmp}\botva2.dll stdcall delayload';   procedure ImgSetVisibility(img :Longint; Visible :boolean); external 'ImgSetVisibility@{tmp}\botva2.dll stdcall delayload';   function ImgGetVisibility(img:Longint):boolean; external 'ImgGetVisibility@{tmp}\botva2.dll stdcall delayload';   procedure ImgApplyChanges(h:HWND); external 'ImgApplyChanges@{tmp}\botva2.dll stdcall delayload';   procedure gdipShutdown;  external 'gdipShutdown@{tmp}\botva2.dll stdcall delayload';      function sndPlaySound(lpszSoundName: AnsiString; uFlags: cardinal):integer; external 'sndPlaySoundA@winmm.dll stdcall';      function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';   function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';   function WrapTimerProc(callback:TTimerProc; paramcount:integer):LongWord; external 'wrapcallback@{tmp}\innocallback.dll stdcall delayload';      function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';   function CallBackProc(P:TPBProc;ParamCount:integer):LongWord; external 'wrapcallback@{tmp}\innocallback.dll stdcall delayload';   function CallWindowProc(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam, lParam: Longint): Longint; external 'CallWindowProcA@user32.dll stdcall';   function GetTickCount: DWord; external 'GetTickCount@kernel32 stdcall';      procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar); external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';   procedure UnloadSkin; external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';   function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';      //================== Подключение модулей ==================//     #include "AutoRun.iss"     #include "FreeArc.iss"   //================== Подключение модулей ==================//      function InitializeSetup: Boolean;   begin     ExtractTemporaryFile('botva2.dll');     ExtractTemporaryFile('innocallback.dll');     ExtractTemporaryFile('Click.wav');     ExtractTemporaryFile('isskin.dll');     ExtractTemporaryFile('Tiger.cjstyles');        LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');     Result:=AutoRunExec;//При отключении модуля "AutoRun", исправить на Result:=True;   end;      //************************************************ [Начало - Вставка изображений] ***************************************************//      procedure CreateWizardImage;   var     i: integer;   begin     WizardForm.ClientWidth:=ScaleX(798);     WizardForm.ClientHeight:=ScaleY(543);     WizardForm.Center;     WizardForm.OuterNotebook.Hide;     WizardForm.InnerNotebook.Hide;     WizardForm.Bevel.Hide;        ExtractTemporaryFile('WizardImage.jpg');     ExtractTemporaryFile('button.png');     ExtractTemporaryFile('MusicButton.png');     ExtractTemporaryFile('StatusPanel.png');     ExtractTemporaryFile('StatusPanel2.png');     ExtractTemporaryFile('Workspace.png');     ExtractTemporaryFile('RequirementsPanel.png');     ExtractTemporaryFile('Edit.png');     ExtractTemporaryFile('DirFolder.png');     ExtractTemporaryFile('HardDrivePanel.png');     ExtractTemporaryFile('HDD.png');     ExtractTemporaryFile('GroupFolder.png');     ExtractTemporaryFile('CheckBox.png');     ExtractTemporaryFile('ru.png');     ExtractTemporaryFile('us.png');     ExtractTemporaryFile('ProgressBackground.png');     ExtractTemporaryFile('ProgressImg.png');        ExtractTemporaryFile('WFEnter.wav');     ExtractTemporaryFile('Check.wav');     ExtractTemporaryFile('Music.mp3');     ExtractTemporaryFile('BASS.dll');          ExtractTemporaryFile('1.jpg');     ExtractTemporaryFile('2.jpg');     ExtractTemporaryFile('3.jpg');     ExtractTemporaryFile('4.jpg');     ExtractTemporaryFile('5.jpg');        WizardImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\WizardImage.jpg'),ScaleX(0),ScaleY(0),WizardForm.ClientWidth,WizardForm.ClientHeight,True,True);        SetArrayLength(AImg,5);     for i:=0 to GetArrayLength(AImg)-1 do begin       AImg[i]:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\'+IntToStr(i+1)+'.jpg'),0,0,WizardForm.ClientWidth,WizardForm.ClientHeight,True,True);       ImgSetVisibility(AImg[i],False);     end;        ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\StatusPanel.png'),ScaleX(0), ScaleY(95),WizardForm.ClientWidth,ScaleY(20),True,True);     StatusPanel:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\StatusPanel2.png'),ScaleX(0), ScaleY(95),ScaleX(114),ScaleY(20),True,True);     ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Workspace.png'),ScaleX(42), ScaleY(160),ScaleX(714),ScaleY(309),True,True);     RequirementsPanel:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\RequirementsPanel.png'),ScaleX(100), ScaleY(292),ScaleX(601),ScaleY(146),True,True);     Edit:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Edit.png'),ScaleX(120), ScaleY(305),ScaleX(460),ScaleY(22),True,True);     DirFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\DirFolder.png'),ScaleX(60), ScaleY(260),ScaleX(50),ScaleY(70),True,True);     HardDrivePanel:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\HardDrivePanel.png'),ScaleX(120), ScaleY(363),ScaleX(460),ScaleY(70),True,True);     HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\HDD.png'),ScaleX(60), ScaleY(372),ScaleX(50),ScaleY(50),True,True);     GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\GroupFolder.png'),ScaleX(60), ScaleY(260),ScaleX(50),ScaleY(70),True,True);        ImgApplyChanges(WizardForm.Handle);   end;      //************************************************ [Конец - Вставка изображений] ***************************************************//      //************************************************ [Начало - Текстуры кнопок] ***************************************************//      procedure SetStateNewButtons;   begin     with WizardForm.BackButton do begin       BtnSetText(hBackBtn,PAnsiChar(Caption));       BtnSetVisibility(hBackBtn,Visible);       BtnSetEnabled(hBackBtn,Enabled);     end;     with WizardForm.NextButton do begin       BtnSetText(hNextBtn,PAnsiChar(Caption));       BtnSetVisibility(hNextBtn,Visible);       BtnSetEnabled(hNextBtn,Enabled);     end;     with WizardForm.CancelButton do begin       BtnSetText(hCancelBtn,PAnsiChar(Caption));                BtnSetVisibility(hCancelBtn,Visible);       BtnSetEnabled(hCancelBtn,Enabled);     end;     BtnSetText(hDirBrowseBtn,PAnsiChar(WizardForm.DirBrowseButton.Caption));     BtnSetText(hGroupBrowseBtn,PAnsiChar(WizardForm.GroupBrowseButton.Caption));   end;      procedure WizardFormBtnClick(hBtn:HWND);   var     Btn:TButton;   begin     sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001);     case hBtn of       hCancelBtn: Btn:=WizardForm.CancelButton;       hNextBtn: Btn:=WizardForm.NextButton;       hBackBtn: Btn:=WizardForm.BackButton;       hDirBrowseBtn: Btn:=WizardForm.DirBrowseButton;       hGroupBrowseBtn: Btn:=WizardForm.GroupBrowseButton;     end;     Btn.OnClick(Btn);     SetStateNewButtons;     BtnRefresh(hBtn);   end;      procedure WFBtnEnter(hBtn:HWND);   begin     sndPlaySound(ExpandConstant('{tmp}\WFEnter.wav'),$0001);   end;      procedure ButtonsTextures;   begin     WFButtonFont:=TFont.Create;     WFButtonFont.Style:=[fsBold];        with WizardForm.BackButton do begin       hBackBtn:=BtnCreate(WizardForm.Handle,Left+205,Top+160,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);       BtnSetEvent(hBackBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));       BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));       BtnSetFont(hBackBtn,WFButtonFont.Handle);       BtnSetFontColor(hBackBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);       BtnSetCursor(hBackBtn,GetSysCursorHandle(32649));       Width:=0;       Height:=0;     end;        with WizardForm.NextButton do begin       hNextBtn:=BtnCreate(WizardForm.Handle,Left+230,Top+160,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);       BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));       BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));       BtnSetFont(hNextBtn,WFButtonFont.Handle);       BtnSetFontColor(hNextBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);       BtnSetCursor(hNextBtn,GetSysCursorHandle(32649));       Width:=0;       Height:=0;     end;        with WizardForm.CancelButton do begin       hCancelBtn:=BtnCreate(WizardForm.Handle,Left+245,Top+160,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);       BtnSetEvent(hCancelBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));       BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));       BtnSetFont(hCancelBtn,WFButtonFont.Handle);       BtnSetFontColor(hCancelBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);       BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649));       Width:=0;       Height:=0;     end;        with WizardForm.DirBrowseButton do begin       hDirBrowseBtn:=BtnCreate(WizardForm.Handle,Left+280,Top+215,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);       BtnSetEvent(hDirBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));       BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));       BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle);       BtnSetFontColor(hDirBrowseBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);       BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(32649));       Width:=0;       Height:=0;     end;        with WizardForm.GroupBrowseButton do begin       hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,Left+280,Top+215,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);       BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));       BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));       BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle);       BtnSetFontColor(hGroupBrowseBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);       BtnSetCursor(hGroupBrowseBtn,GetSysCursorHandle(32649));       Width:=0;       Height:=0;     end;   end;      //************************************************ [Конец - Текстуры кнопок] ***************************************************//      //************************************************ [Начало - Музыка] ***************************************************//      function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload';   function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset: DWORD; length: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';   function BASS_Start: Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload';   function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';   function BASS_ChannelIsActive(handle: DWORD): Integer; external 'BASS_ChannelIsActive@files:BASS.dll stdcall delayload';   function BASS_ChannelPause(handle: DWORD): Boolean; external 'BASS_ChannelPause@files:BASS.dll stdcall delayload';   function BASS_Pause: Boolean; external 'BASS_Pause@files:BASS.dll stdcall delayload';   function BASS_Stop: Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';   function BASS_Free: Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';      procedure MusicButtonClick(hBtn:HWND);   begin     sndPlaySound(ExpandConstant('{tmp}\Click.wav'), $0001);     if BtnGetChecked(MusicButton) then BASS_ChannelPause(mp3Handle)       else if BASS_ChannelIsActive(mp3Handle)=BASS_ACTIVE_PAUSED then BASS_ChannelPlay(mp3Handle, False);   end;      procedure InsertMusic;   begin     MusicButton:=BtnCreate(WizardForm.Handle,ScaleX(758),ScaleY(5),ScaleX(36),ScaleY(36),ExpandConstant('{tmp}\MusicButton.png'),0,True);     BtnSetEvent(MusicButton,BtnClickEventID,WrapBtnCallback(@MusicButtonClick,1));     BtnSetEvent(MusicButton,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));     BtnSetVisibility(MusicButton,True);     BtnSetCursor(MusicButton,GetSysCursorHandle(32649));        mp3Name:=ExpandConstant('{tmp}\Music.mp3');     BASS_Init(-1,44100,0,0,0);     mp3Handle:=BASS_StreamCreateFile(FALSE,PAnsiChar(mp3Name),0,0,BASS_SAMPLE_LOOP);     BASS_Start;     BASS_ChannelPlay(mp3Handle,False);   end;      //************************************************ [Конец - Музыка] ***************************************************//      //************************************************ [Начало - Панель] ***************************************************//      procedure CreateStatusPanel;   begin     Welcome := TLabel.Create(WizardForm);     with Welcome do begin       AutoSize:=False;       SetBounds(ScaleX(13), ScaleY(96), ScaleX(114), ScaleY(20));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 10;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:Welcome}');       Parent := WizardForm;     end;        System := TLabel.Create(WizardForm);     with System do begin       AutoSize:=False;       SetBounds(ScaleX(143), ScaleY(96), ScaleX(114), ScaleY(20));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 10;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:System}');       Parent := WizardForm;     end;        Catalogue := TLabel.Create(WizardForm);     with Catalogue do begin       AutoSize:=False;       SetBounds(ScaleX(260), ScaleY(96), ScaleX(114), ScaleY(20));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 10;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:Catalogue}');       Parent := WizardForm;     end;        StartMenu := TLabel.Create(WizardForm);     with StartMenu do begin       AutoSize:=False;       SetBounds(ScaleX(357), ScaleY(96), ScaleX(114), ScaleY(20));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 10;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:StartMenu}');       Parent := WizardForm;     end;        Tasks := TLabel.Create(WizardForm);     with Tasks do begin       AutoSize:=False;       SetBounds(ScaleX(490), ScaleY(96), ScaleX(114), ScaleY(20));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 10;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:Task}');       Parent := WizardForm;     end;        Installing := TLabel.Create(WizardForm);     with Installing do begin       AutoSize:=False;       SetBounds(ScaleX(593), ScaleY(96), ScaleX(114), ScaleY(20));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 10;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:Installing}');       Parent := WizardForm;     end;        Finish := TLabel.Create(WizardForm);     with Finish do begin       AutoSize:=False;       SetBounds(ScaleX(703), ScaleY(96), ScaleX(114), ScaleY(20));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 10;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:Finish}');       Parent := WizardForm;     end;   end;      //************************************************ [Конец - Панель] ***************************************************//      //************************************************ [Начало - Компоненты страниц] ***************************************************//      function DetectHardware: Integer; external 'hwc_DetectHardware@files:get_hw_caps.dll stdcall';   function GetProcessorName: PAnsiChar; external 'hwc_GetProcessorName@files:get_hw_caps.dll stdcall';   function GetProcessorFreq: Integer; external 'hwc_GetProcessorFreq@files:get_hw_caps.dll stdcall';   function GetVideoCardName: PAnsiChar; external 'hwc_GetVideoCardName@files:get_hw_caps.dll stdcall';   function GetVidMemLocal: Integer; external 'hwc_GetVidMemLocal@files:get_hw_caps.dll stdcall';   function GetPdmWidth: Integer; external 'hwc_GetPdmWidth@files:get_hw_caps.dll stdcall';   function GetPdmHeight: Integer; external 'hwc_GetPdmHeight@files:get_hw_caps.dll stdcall';   function GetSoundCards: Integer; external 'hwc_GetSoundCards@files:get_hw_caps.dll stdcall';   function GetSoundCardName: PAnsiChar; external 'hwc_GetSoundCardName@files:get_hw_caps.dll stdcall';   function GetSystemPhys: Integer; external 'hwc_GetSystemPhys@files:get_hw_caps.dll stdcall';   function GetWindowsName: PAnsiChar; external 'hwc_GetWindowsName@files:get_hw_caps.dll stdcall';      function DelSp(s: string): string;   begin     while Pos('  ',s)>0 do StringChange(s,'  ',' ');     Result:=Trim(s);   end;      procedure GroupChange(Sender: TObject);   begin     GroupEditLabel.Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);   end;      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 MbOrTB(Float: Extended): string;   begin     if Float<1024 then Result:=NumToStr(Float)+' MB'     else if (Float/1024)<1024 then Result:=NumToStr(Float/1024)+' GB'     else if (Float/(1024*1024))<1024 then Result:=NumToStr(Float/(1024*1024))+' TB'   end;      procedure SysReqFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);   var     i:integer;   begin     for i:= 0 to GetArrayLength(ASysReq)-1 do       if ASysReq[i].Font.Color=$FFFFFF then ASysReq[i].Font.Color:=$0000FF else ASysReq[i].Font.Color:=$FFFFFF;   end;      procedure DiskFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);   var     i:integer;   begin     for i:= 0 to GetArrayLength(ADisk)-1 do       if ADisk[i].Font.Color=$FFFFFF then ADisk[i].Font.Color:=$0000FF else ADisk[i].Font.Color:=$FFFFFF;   end;      function GetElementIndex(a:TALabel; lbl:TLabel):integer;   var     i:integer;     f:boolean;   begin     Result:=-1;     f:=False;     for i:=0 to GetArrayLength(a)-1 do       if a[i]=lbl then begin         f:=True;         Break;       end;     if f then Result:=i;   end;      procedure AddLabelToArray(var a:TALabel; lbl:TLabel);   begin     if GetElementIndex(a,lbl)=-1 then begin       SetArrayLength(a,GetArrayLength(a)+1);       a[GetArrayLength(a)-1]:=lbl;     end;   end;      procedure DeleteLabelFromArray(var a:TALabel; lbl:integer);   var     Last,i:integer;   begin     if lbl<>-1 then begin       Last:=GetArrayLength(a)-1;       if lbl<Last then         for i:=lbl to Last-1 do a[i]:=a[i+1];       SetArrayLength(a,Last);     end;   end;      procedure GetFreeSpaceCaption(Sender: TObject);   var     CurrentDisk: String;     i:integer;   begin     CurrentDisk:=ExtractFileDrive(WizardForm.DirEdit.Text);     DirEditLabel.Caption:=MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);     if not GetSpaceOnDisk(CurrentDisk,True,FreeMB,TotalMB) then begin       KillTimer(WizardForm.Handle,WFDiskTimerID);       SetArrayLength(ADisk,0);       TotalSpaceLabel.Visible:=False;       FreeSpaceLabel.Visible:=False;       BtnSetEnabled(hNextBtn,False);       WizardForm.NextButton.Enabled:=False;       OldDisk:=CurrentDisk;       Exit;     end;        TotalSpaceLabel.Visible:=True;     FreeSpaceLabel.Visible:=True;        if CurrentDisk<>OldDisk then begin       OldDisk:=CurrentDisk;       TotalSpaceLabel.Caption := ExpandConstant('{cm:TotalSpace} ') + MbOrTB(TotalMb);       FreeSpaceLabel.Caption := ExpandConstant('{cm:FreeSpace} ') + MbOrTB(FreeMb) + ' (' + IntToStr((FreeMb*100) div TotalMB) + ' %)';          if WizardForm.CurPageID = wpSelectDir then begin         if FreeMB>={#NeedSize} then begin           i:=GetElementIndex(ADisk,FreeSpaceLabel);           if i<>-1 then begin             DeleteLabelFromArray(ADisk,i);             FreeSpaceLabel.Font.Color:=$FFFFFF;             if GetArrayLength(ADisk)=0 then KillTimer(WizardForm.Handle,WFDiskTimerID);           end;         end else AddLabelToArray(ADisk,FreeSpaceLabel);            if TotalMb>={#NeedSize} then begin           i:=GetElementIndex(ADisk,TotalSpaceLabel);           if i<>-1 then begin             DeleteLabelFromArray(ADisk,i);             TotalSpaceLabel.Font.Color:=$FFFFFF;             if GetArrayLength(ADisk)=0 then KillTimer(WizardForm.Handle,WFDiskTimerID);           end;         end else AddLabelToArray(ADisk,TotalSpaceLabel);            if GetArrayLength(ADisk)>0 then SetTimer(WizardForm.Handle,WFDiskTimerID,1000,WrapTimerProc(@DiskFlashing,4));         BtnSetEnabled(hNextBtn,not (GetArrayLength(ADisk)>0));         WizardForm.NextButton.Enabled:=not (GetArrayLength(ADisk)>0);       end;     end;   end;      function NoIcons: Boolean;   begin     Result:= BtnGetEnabled(hGroupBrowseBtn);   end;      function Desktop: Boolean;   begin     Result:= BtnGetChecked(DesktopCheck);   end;      function QuickLaunch: Boolean;   begin     Result:= BtnGetChecked(QuickLaunchCheck);   end;      function DirectX: Boolean;   begin     ProgressInfoLabel.Visible:=False;     FilenameLabel.Hide;     Result:= BtnGetChecked(DirectXCheck);   end;      function Lang: Boolean;   begin     Result:= Rus;   end;      procedure NoIconsClick(hBtn:HWND);   var     Check:boolean;   begin     sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);     Check:=BtnGetChecked(hBtn);     BtnSetEnabled(hGroupBrowseBtn, not Check);     GroupEditLabel.Enabled:=not Check;     if Check then NoIconsLabel.Font.Color:=$00FFFF else NoIconsLabel.Font.Color:=$FFFFFF;   end;      procedure NoIconsLabelClick(Sender:TObject);   begin     BtnSetChecked(NoIconsCheck, not BtnGetChecked(NoIconsCheck));     NoIconsClick(NoIconsCheck);   end;        procedure DesktopClick(hBtn:HWND);   begin     sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);     if BtnGetChecked(hBtn) then DesktopLabel.Font.Color:=$00FFFF else DesktopLabel.Font.Color:=$FFFFFF;   end;      procedure DesktopLabelClick(Sender:TObject);   begin     BtnSetChecked(DesktopCheck, not BtnGetChecked(DesktopCheck));     DesktopClick(DesktopCheck);   end;      procedure QuickLaunchClick(hBtn:HWND);   begin     sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);     if BtnGetChecked(hBtn) then QuickLaunchLabel.Font.Color:=$00FFFF else QuickLaunchLabel.Font.Color:=$FFFFFF;   end;                                         procedure QuickLaunchLabelClick(Sender:TObject);   begin     BtnSetChecked(QuickLaunchCheck, not BtnGetChecked(QuickLaunchCheck));     QuickLaunchClick(QuickLaunchCheck);   end;      procedure DirectXClick(hBtn:HWND);   begin     sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);     if BtnGetChecked(hBtn) then DirectXLabel.Font.Color:=$00FFFF else DirectXLabel.Font.Color:=$FFFFFF;   end;      procedure DirectXLabelClick(Sender:TObject);   begin     BtnSetChecked(DirectXCheck, not BtnGetChecked(DirectXCheck));     DirectXClick(DirectXCheck);   end;      procedure SelectLanguage(hBtn:HWND);   begin     sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001);     BtnSetChecked(hBtn,True);     if hBtn=LanguageButton[1] then begin       BtnSetChecked(LanguageButton[2],False);       LngNameLbl.Caption:=ExpandConstant('{cm:LanguageRus}');       Rus:= True;     end else begin       BtnSetChecked(LanguageButton[1],False);       LngNameLbl.Caption:=ExpandConstant('{cm:LanguageUS}');       Rus:= False;     end;   end;      procedure DirectXProgress;   begin     StatusLabel.Caption:=ExpandConstant('{cm:DirectXInstall}')   end;      procedure CreatePageComponents;   var     Pdm: string;     vr,VidRam : Longint;     Version: TWindowsVersion;   begin     PageNameLabel:=TLabel.Create(WizardForm);     with PageNameLabel do begin       AutoSize:= False;       SetBounds(ScaleX(70), ScaleY(185), ScaleX(400), ScaleY(30));       Transparent:=True;       Font.Name:= 'Georgia';       Font.Size:= 13;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Parent:=WizardForm;     end;        PageDescriptionLabel:=TLabel.Create(WizardForm);     with PageDescriptionLabel do begin       AutoSize:= False;       SetBounds(ScaleX(100), ScaleY(215), ScaleX(600), ScaleY(50));       Wordwrap:= True;       Transparent:=True;       Font.Name:= 'Georgia';       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];       Parent:=WizardForm;     end;        ////////////////////// WelcomePage //////////////////////        WelcomeLabel1:= TLabel.Create(WizardForm);     with WelcomeLabel1 do begin       AutoSize:=False       SetBounds(ScaleX(75), ScaleY(185), ScaleX(648), ScaleY(65));       WordWrap:=True       Alignment := taCenter;       Transparent:=True       Font.Name:='Georgia';       Font.Size:= 16;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold]       Caption:= ExpandConstant('{cm:Welcome1}');       Parent:=WizardForm     end;        WelcomeLabel2:=TLabel.Create(WizardForm);     with WelcomeLabel2 do begin       AutoSize:=False       SetBounds(ScaleX(75), ScaleY(275), ScaleX(648), ScaleY(200));       WordWrap:=True       Transparent:=True       Font.Name:='Georgia';       Font.Size:= 11;       Font.Color:=$FFFFFF;       Font.Style := [fsBold, fsItalic];       Caption:= ExpandConstant('{cm:Welcome2}');       Parent:=WizardForm     end;      ////////////////////// WelcomePage //////////////////////      ////////////////////// SystemPage //////////////////////        SystemPage:=CreateCustomPage(wpLicense, ExpandConstant('{cm:Requirements1}'), ExpandConstant('{cm:Requirements2}'));        RequirementsLbl := TLabel.Create(WizardForm);     with RequirementsLbl do begin       AutoSize:=False;       SetBounds(ScaleX(100), ScaleY(250), ScaleX(605), ScaleY(50));       Transparent:=True;       Font.Name:= 'Georgia';                         Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];       Caption := ExpandConstant('{cm:Requirements3}');       Parent:=WizardForm;     end;        //================= Начало - Процессор =================//        ProcessorLbl := TLabel.Create(WizardForm);     with ProcessorLbl do begin       AutoSize:=False;       SetBounds(ScaleX(107), ScaleY(296), ScaleX(150), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:Processor}');       Parent := WizardForm;     end;        ProcessorNameLbl := TLabel.Create(WizardForm);     with ProcessorNameLbl do begin       AutoSize:=False;       SetBounds(ScaleX(278), ScaleY(296), ScaleX(400), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;                            Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := DelSP(GetProcessorName) + ' @' + IntToStr(GetProcessorFreq) + ' MHz';       Parent := WizardForm;     end;        RegGetSubkeyNames(HKLM, 'Hardware\Description\System\CentralProcessor', Keys)        if (GetProcessorFreq*GetArrayLength(Keys)) < {#Processor} then     begin       RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}');       AddLabelToArray(AsysReq,ProcessorNameLbl);     end;      //================= Конец - Процессор =================//      //================= Начало - Видеоадаптер =================//        VideoCardLbl := TLabel.Create(WizardForm);     with VideoCardLbl do begin       AutoSize:=False;       SetBounds(ScaleX(107), ScaleY(327), ScaleX(150), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:VideoCard}');       Parent := WizardForm;     end;        VideoCardNameLbl := TLabel.Create(WizardForm);     with VideoCardNameLbl do begin       AutoSize:=False;       SetBounds(ScaleX(280), ScaleY(327), ScaleX(400), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := GetVideoCardName;       Parent := WizardForm;     end;        Pdm:=' ['+IntToStr(GetPdmWidth)+'x'+IntToStr(GetPdmHeight)+']';        VidRam:=GetVidMemLocal/1000000;     if (VidRam<63) or (VidRam>1100) then vr:=VidRam     else if VidRam<100 then vr:=64     else if VidRam<200 then vr:=128     else if VidRam<300 then vr:=256     else if VidRam<400 then vr:=384     else if VidRam<600 then vr:=512     else if VidRam<800 then vr:=792     else if VidRam>800 then vr:=1024;        if VidRam=0 then VideoCardNameLbl.Caption:=ExpandConstant('{cm:DeviceDriver}')       else VideoCardNameLbl.Caption:=DelSp(VideoCardNameLbl.Caption)+' ~'+IntToStr(vr)+' MB'+Pdm;     if vr<{#VideoCard} then begin       RequirementsLbl.Caption:=ExpandConstant('{cm:Requirements4}');       AddLabelToArray(ASysReq,VideoCardNameLbl);     end;      //================= Конец - Видеоадаптер =================//      //================= Начало - Звуковая карта =================//        SoundCardLbl := TLabel.Create(WizardForm);     with SoundCardLbl do begin       AutoSize:=False;       SetBounds(ScaleX(107), ScaleY(358), ScaleX(150), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:SoundCard}');       Parent := WizardForm;     end;        SoundCardNameLbl := TLabel.Create(WizardForm);     with SoundCardNameLbl do begin       AutoSize:=False;       SetBounds(ScaleX(278), ScaleY(358), ScaleX(400), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := GetSoundCardName;       Parent := WizardForm;                          end;        if GetSoundCards = 0 then begin       RequirementsLbl.Caption:= ExpandConstant('{cm:Requirements4}');       SoundCardNameLbl.Caption:= ExpandConstant('{cm:DeviceDriver}');       AddLabelToArray(ASysReq,SoundCardNameLbl);     end;      //================= Конец - Звуковая карта =================//      //================= Начало - ОЗУ =================//        RAMLbl := TLabel.Create(WizardForm);     with RAMLbl do begin       AutoSize:=False;       SetBounds(ScaleX(107), ScaleY(389), ScaleX(150), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:RAM}');       Parent := WizardForm;     end;        RAMTotalLbl := TLabel.Create(WizardForm);     with RAMTotalLbl do begin       AutoSize:=False;       SetBounds(ScaleX(279), ScaleY(389), ScaleX(400), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := IntToStr(GetSystemPhys + 1) + ' MB';       Parent := WizardForm;     end;        if (GetSystemPhys+1)<{#RAM} then begin       RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}');       AddLabelToArray(ASysReq,RAMTotalLbl);     end;      //================= Конец - ОЗУ =================//      //================= Начало - Операционная система =================//        SystemLbl := TLabel.Create(WizardForm);     with SystemLbl do begin       AutoSize:=False;       SetBounds(ScaleX(107), ScaleY(420), ScaleX(150), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := ExpandConstant('{cm:OperationSystem}');       Parent := WizardForm;     end;        SystemNameLbl := TLabel.Create(WizardForm);     with SystemNameLbl do begin       AutoSize:=False;       SetBounds(ScaleX(279), ScaleY(420), ScaleX(400), ScaleY(22));       Transparent:=True;       Font.Name:= 'Arial';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := GetWindowsName;       Parent := WizardForm;                    end;        GetWindowsVersionEx(Version);        if not Version.NTPlatform or        (Version.NTPlatform and (Version.Major<{#WinVerMajor})) or       (Version.NTPlatform and (Version.Major={#WinVerMajor}) and (Version.Minor<{#WinVerMinor})) or       (Version.NTPlatform and (Version.Major={#WinVerMajor}) and (Version.Minor={#WinVerMinor}) and (Version.ServicePackMajor<{#ServicePack})) then begin       RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}');       AddLabelToArray(ASysReq,SystemNameLbl);     end;      //================= Конец - Операционная система =================//      ////////////////////// SystemPage //////////////////////             ////////////////////// SelectDirPage //////////////////////        SelectDirBrowseLabel := TLabel.Create(WizardForm);     with SelectDirBrowseLabel do begin       AutoSize:=False;       SetBounds(ScaleX(120), ScaleY(250), ScaleX(600), ScaleY(50));       WordWrap:= True;       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];                                 Caption:= WizardForm.SelectDirBrowseLabel.Caption;       Parent := WizardForm;     end;        DirEditLabel := TLabel.Create(WizardForm);     with DirEditLabel do begin       AutoSize:=False;       SetBounds(ScaleX(127), ScaleY(308), ScaleX(446), ScaleY(15));       WordWrap:= True;       ShowAccelChar := False;       Transparent:=True;       Font.Name:= 'Arial'       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);       Parent := WizardForm;     end;                                TotalSpaceLabel := TLabel.Create(WizardForm);     with TotalSpaceLabel do begin       AutoSize:=False;       SetBounds(ScaleX(130), ScaleY(370), ScaleX(500), ScaleY(17));       Transparent:=True;       Font.Name:= 'Georgia';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];       Parent := WizardForm;     end;        FreeSpaceLabel := TLabel.Create(WizardForm);     with FreeSpaceLabel do begin       AutoSize:=False;       SetBounds(ScaleX(130), ScaleY(390), ScaleX(500), ScaleY(17));       Transparent:=True;       Font.Name:= 'Georgia';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];       Parent := WizardForm;     end;        NeedSpaceLabel := TLabel.Create(WizardForm);     with NeedSpaceLabel do begin       AutoSize:=False;       SetBounds(ScaleX(130), ScaleY(410), ScaleX(500), ScaleY(17));       Transparent:=True;       Font.Name:= 'Georgia';       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];       Caption := ExpandConstant('{cm:NeedSpace} ') + MbOrTB({#NeedSize});       Parent := WizardForm;     end;      ////////////////////// SelectDirPage //////////////////////      ////////////////////// SelectProgramGroupPage //////////////////////        SelectStartMenuFolderBrowseLabel := TLabel.Create(WizardForm);     with SelectStartMenuFolderBrowseLabel do begin       AutoSize:=False;       SetBounds(ScaleX(120), ScaleY(250), ScaleX(600), ScaleY(50));       WordWrap:= True;       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];       Caption:= WizardForm.SelectStartMenuFolderBrowseLabel.Caption;       Parent := WizardForm;     end;                                    GroupEditLabel := TLabel.Create(WizardForm);     with GroupEditLabel do begin       AutoSize:=False;       SetBounds(ScaleX(127), ScaleY(308), ScaleX(446), ScaleY(15));       WordWrap:= True;       ShowAccelChar := False;       Transparent:=True;       Font.Name:= 'Arial'       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold];       Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);       Parent := WizardForm;     end;        NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(75),ScaleY(430),ScaleX(28),ScaleY(28),ExpandConstant('{tmp}\CheckBox.png'),8,True);     BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCallback(@NoIconsClick,1));     BtnSetEvent(NoIconsCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));     BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649));        NoIconsLabel := TLabel.Create(WizardForm);     with NoIconsLabel do begin       AutoSize:=False;       SetBounds(ScaleX(115), ScaleY(437), ScaleX(275), ScaleY(17));       OnClick:= @NoIconsLabelClick;       Cursor:= CrHand;       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold,fsItalic];       Caption := WizardForm.NoIconsCheck.Caption;       Parent := WizardForm;     end;        WizardForm.DirEdit.OnChange := @GetFreeSpaceCaption;     WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text;     WizardForm.GroupEdit.OnChange := @GroupChange;      ////////////////////// SelectProgramGroupPage //////////////////////      ////////////////////// SelectTasksPade //////////////////////        SelectTasksPage := CreateCustomPage(wpSelectProgramGroup, ExpandConstant('{cm:TasksName}'), ExpandConstant('{cm:TasksDescription}'));     SelectTasksLabel := TLabel.Create(WizardForm);     with SelectTasksLabel do begin       AutoSize:=False;       SetBounds(ScaleX(120), ScaleY(250), ScaleX(600), ScaleY(50));       WordWrap:= True;       Transparent:=True;       Font.Name:= 'Georgia'                   Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];       Caption:= ExpandConstant('{cm:SelectTasksLabel}');       Parent := WizardForm;     end;        DesktopCheck:=BtnCreate(WizardForm.Handle,ScaleX(75),ScaleY(303),ScaleX(28),ScaleY(28),ExpandConstant('{tmp}\CheckBox.png'),8,True);     BtnSetEvent(DesktopCheck,BtnClickEventID,WrapBtnCallback(@DesktopClick,1));     BtnSetEvent(DesktopCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));     BtnSetCursor(DesktopCheck,GetSysCursorHandle(32649));          DesktopLabel := TLabel.Create(WizardForm);     with DesktopLabel do begin       AutoSize:=False;       SetBounds(ScaleX(115), ScaleY(310), ScaleX(265), ScaleY(17));       OnClick:= @DesktopLabelClick;       Cursor:= CrHand;       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold,fsItalic];       Caption := ExpandConstant('{cm:Desktop}');       Parent := WizardForm;     end;          QuickLaunchCheck:=BtnCreate(WizardForm.Handle,ScaleX(75),ScaleY(333),ScaleX(28),ScaleY(28),ExpandConstant('{tmp}\CheckBox.png'),8,True);     BtnSetEvent(QuickLaunchCheck,BtnClickEventID,WrapBtnCallback(@QuickLaunchClick,1));     BtnSetEvent(QuickLaunchCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));     BtnSetCursor(QuickLaunchCheck,GetSysCursorHandle(32649));        QuickLaunchLabel := TLabel.Create(WizardForm);     with QuickLaunchLabel do begin       AutoSize:=False;       SetBounds(ScaleX(115), ScaleY(340), ScaleX(345), ScaleY(17));       OnClick:= @QuickLaunchLabelClick;       Cursor:= CrHand;       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold,fsItalic];       Caption := ExpandConstant('{cm:QuickLaunch}');       Parent := WizardForm;     end;        DirectXCheck:=BtnCreate(WizardForm.Handle,ScaleX(75),ScaleY(363),ScaleX(28),ScaleY(28),ExpandConstant('{tmp}\CheckBox.png'),8,True);     BtnSetEvent(DirectXCheck,BtnClickEventID,WrapBtnCallback(@DirectXClick,1));     BtnSetEvent(DirectXCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));     BtnSetCursor(DirectXCheck,GetSysCursorHandle(32649));        DirectXLabel := TLabel.Create(WizardForm);     with DirectXLabel do begin       AutoSize:=False;       SetBounds(ScaleX(115), ScaleY(370), ScaleX(145), ScaleY(17));       OnClick:= @DirectXLabelClick;       Cursor:= CrHand;       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$00FFFF;       Font.Style:=[fsBold,fsItalic];       Caption := ExpandConstant('{cm:DirectX}');                 Parent := WizardForm;     end;        LanguageLabel := TLabel.Create(WizardForm);     with LanguageLabel do begin       AutoSize:=False;       SetBounds(ScaleX(115), ScaleY(410), ScaleX(400), ScaleY(17));       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold, fsItalic];       Caption:= ExpandConstant('{cm:Language}');       Parent := WizardForm;     end;        LngNameLbl := TLabel.Create(WizardForm);     with LngNameLbl do begin       AutoSize:=False;       SetBounds(ScaleX(300), ScaleY(410), ScaleX(100), ScaleY(17));       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$00FFFF;       Font.Style:=[fsBold, fsItalic];       Caption:= ExpandConstant('{cm:LanguageRus}');       Parent := WizardForm;     end;        LanguageButton[1]:=BtnCreate(WizardForm.Handle,ScaleX(395),ScaleY(403),ScaleX(48),ScaleY(36),ExpandConstant('{tmp}\ru.png'),0,True);     BtnSetEvent(LanguageButton[1],BtnClickEventID,WrapBtnCallback(@SelectLanguage,1));     BtnSetEvent(LanguageButton[1],BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));     BtnSetCursor(LanguageButton[1],GetSysCursorHandle(32649));          LanguageButton[2]:=BtnCreate(WizardForm.Handle,ScaleX(460),ScaleY(403),ScaleX(48),ScaleY(36),ExpandConstant('{tmp}\us.png'),0,True);     BtnSetEvent(LanguageButton[2],BtnClickEventID,WrapBtnCallback(@SelectLanguage,1));     BtnSetEvent(LanguageButton[2],BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));     BtnSetCursor(LanguageButton[2],GetSysCursorHandle(32649));        BtnSetChecked(LanguageButton[1],True);      ////////////////////// SelectTasksPade //////////////////////      ////////////////////// InstallingPage //////////////////////             StatusLabel := TLabel.Create(WizardForm);     with StatusLabel do begin       AutoSize:=False;       SetBounds(ScaleX(120), ScaleY(245), ScaleX(558), ScaleY(17));       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold,fsItalic];       Parent := WizardForm;     end;        FilenameLabel := TLabel.Create(WizardForm);     with FilenameLabel do begin       AutoSize:=False;       SetBounds(ScaleX(120), ScaleY(270), ScaleX(558), ScaleY(17));       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 9;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold,fsItalic];       Parent := WizardForm;     end;        ProgressInfoLabel := TLabel.Create(WizardForm);     with ProgressInfoLabel do     begin       AutoSize:=False;       SetBounds(ScaleX(80), ScaleY(355), ScaleX(638), ScaleY(17));       Alignment := taCenter;       Transparent:=True;       Font.Name:= 'Georgia'       Font.Size:= 10;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold,fsItalic];       Parent := WizardForm;     end;      ////////////////////// InstallingPage //////////////////////      ////////////////////// FinishedPage //////////////////////        FinishedHeadingLabel:= TLabel.Create(WizardForm);     with FinishedHeadingLabel do begin       AutoSize:=False       SetBounds(ScaleX(75), ScaleY(185), ScaleX(648), ScaleY(65));       WordWrap:=True       Alignment := taCenter;       Transparent:=True       Font.Name:='Georgia';       Font.Size:= 16;       Font.Color:=$FFFFFF;       Font.Style:=[fsBold]       Caption:= ExpandConstant('{cm:FinishedHeading}');       Parent:=WizardForm     end;                         FinishedLabel:=TLabel.Create(WizardForm);     with FinishedLabel do begin       AutoSize:=False       SetBounds(ScaleX(75), ScaleY(275), ScaleX(648), ScaleY(200));       WordWrap:=True       Transparent:=True       Font.Name:='Georgia';       Font.Size:= 11;       Font.Color:=$FFFFFF;       Font.Style := [fsBold, fsItalic];       Caption:= ExpandConstant('{cm:FinishedLabel}')+#13#13+ExpandConstant('{cm:FinishedLabel2}');       Parent:=WizardForm     end;   end;      ////////////////////// FinishedPage //////////////////////      ////////////////////// UninstallingPage //////////////////////      function InitializeUninstall: Boolean;   begin     FileCopy(ExpandConstant('{app}\botva2.dll'), ExpandConstant('{tmp}\botva2.dll'), False);     FileCopy(ExpandConstant('{app}\InnoCallback.dll'), ExpandConstant('{tmp}\InnoCallback.dll'), False);     FileCopy(ExpandConstant('{app}\isskin.dll'), ExpandConstant('{tmp}\isskin.dll'), False);     FileCopy(ExpandConstant('{app}\Tiger.cjstyles'), ExpandConstant('{tmp}\Tiger.cjstyles'), False);     LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');     Result:=True;   end;      //================== Удаление сохранений ==================//      procedure DeleteSavedGames(CurUninstallStep: TUninstallStep);   begin     if CurUninstallStep=usUninstall then     if DirExists(ExpandConstant('{userdocs}')+'\NFS Undercover') then     if MsgBox(ExpandConstant('{cm:DeleteSave}'), mbInformation, MB_YESNO) = idYes then     DelTree(ExpandConstant('{userdocs}')+'\NFS Undercover', True, True, True)   end;      //================== Удаление сохранений ==================//      procedure InitializeUninstallProgressForm;   var     h:HWND;   begin     with UninstallProgressForm do     begin       ClientWidth:=ScaleX(798);       ClientHeight:=ScaleY(543);       BorderStyle:=bsSingle       BorderIcons:=[biSystemMenu]       OuterNotebook.Hide;       InnerNotebook.Hide;       Center;       Bevel.Hide;       CancelButton.Left:=ScaleX(660);       CancelButton.Top:=ScaleY(495);       CancelButton.Width:=CancelButton.Width+15;          WizardUninstLabel := TLabel.Create(UninstallProgressForm);       with WizardUninstLabel do begin         AutoSize:=False;         SetBounds(ScaleX(70), ScaleY(185), ScaleX(400), ScaleY(30));         Transparent:=True;         Font.Name:= 'Georgia'         Font.Size:= 13;         Font.Color:=$FFFFFF;         Font.Style:=[fsBold];         Caption:= ExpandConstant('{cm:WizardUninst}');         Parent := UninstallProgressForm;       end;          UninstPageDescriptLabel := TLabel.Create(UninstallProgressForm);       with UninstPageDescriptLabel do begin         AutoSize:=False;         SetBounds(ScaleX(100), ScaleY(215), ScaleX(600), ScaleY(50));         WordWrap:= True;         Transparent:=True;         Font.Name:= 'Georgia'         Font.Size:= 10;         Font.Color:=$FFFFFF;         Font.Style:=[fsBold, fsItalic];         Caption:= ExpandConstant('{cm:UninstDescript}');         Parent := UninstallProgressForm;       end;          StatusUninstLabel := TLabel.Create(UninstallProgressForm);       with StatusUninstLabel do begin         AutoSize:=False;         SetBounds(ScaleX(120), ScaleY(250), ScaleX(560), ScaleY(17));         Transparent:=True;         Font.Name:= 'Georgia'         Font.Size:= 10;         Font.Color:=$FFFFFF;         Font.Style:=[fsBold, fsItalic];         Caption:= ExpandConstant('{cm:StatusUninst}');         Parent := UninstallProgressForm;       end;          Installing := TLabel.Create(UninstallProgressForm);       with  Installing do begin         AutoSize:=False;         SetBounds(ScaleX(170), ScaleY(96), ScaleX(114), ScaleY(20));         Transparent:=True;         Font.Name:= 'Arial';         Font.Size:= 10;         Font.Color:=$FFFFFF;         Font.Style:=[fsBold];         Caption := ExpandConstant('{cm:Installing}');         Parent := UninstallProgressForm;       end;          Uninstalling := TLabel.Create(UninstallProgressForm);       with  Uninstalling do begin         AutoSize:=False;         SetBounds(ScaleX(570), ScaleY(96), ScaleX(114), ScaleY(20));         Transparent:=True;         Font.Name:= 'Arial';         Font.Size:= 10;         Font.Color:=$00FFFF;         Font.Style:=[fsBold];         Caption := ExpandConstant('{cm:Uninstalling}');         Parent := UninstallProgressForm;       end;          ProgressInfoLabel := TLabel.Create(UninstallProgressForm);       with ProgressInfoLabel do begin         AutoSize:=False;         SetBounds(ScaleX(120), ScaleY(355), ScaleX(560), ScaleY(17));         Alignment := taCenter;         Transparent:=True;         Font.Name:= 'Georgia';         Font.Size:= 10;         Font.Color:=$FFFFFF;         Font.Style:=[fsBold,fsItalic];         Parent := UninstallProgressForm;       end;          h:=UninstallProgressForm.Handle;          FileCopy(ExpandConstant('{app}\WizardImage.jpg'), ExpandConstant('{tmp}\WizardImage.jpg'), False);       FileCopy(ExpandConstant('{app}\Workspace.png'), ExpandConstant('{tmp}\Workspace.png'), False);       FileCopy(ExpandConstant('{app}\StatusPanel.png'), ExpandConstant('{tmp}\StatusPanel.png'), False);       FileCopy(ExpandConstant('{app}\StatusPanel2.png'), ExpandConstant('{tmp}\StatusPanel2.png'), False);       FileCopy(ExpandConstant('{app}\button.png'), ExpandConstant('{tmp}\button.png'), False);            ImgLoad(h,ExpandConstant('{tmp}\WizardImage.jpg'),ScaleX(0),ScaleY(0),UninstallProgressForm.ClientWidth,UninstallProgressForm.ClientHeight,True,True);       ImgLoad(h,ExpandConstant('{tmp}\Workspace.png'),ScaleX(42), ScaleY(160),ScaleX(714),ScaleY(309),True,True);       ImgLoad(h,ExpandConstant('{tmp}\StatusPanel.png'),ScaleX(0), ScaleY(95),UninstallProgressForm.ClientWidth,ScaleY(20),True,True);       ImgLoad(h,ExpandConstant('{tmp}\StatusPanel2.png'),ScaleX(399), ScaleY(95),ScaleX(399), ScaleY(20),True,True);            UPFButtonFont:=TFont.Create;       UPFButtonFont.Style:=[fsBold];          UninstallProgressForm.CancelButton.Visible:=False;       with UninstallProgressForm.CancelButton do begin         hCancelUninstBtn:=BtnCreate(h,Left-8,Top-8,Width+16,Height+16,ExpandConstant('{tmp}\button.png'),18,False);         BtnSetText(hCancelUninstBtn, UninstallProgressForm.CancelButton.Caption);         BtnSetFont(hCancelUninstBtn,UPFButtonFont.Handle);         BtnSetFontColor(hCancelUninstBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);         BtnSetEnabled(hCancelUninstBtn,False);       end;     end;     ImgApplyChanges(h);   end;      ////////////////////// UninstallingPage //////////////////////      procedure HideComponents;   begin     WelcomeLabel1.Hide;     WelcomeLabel2.Hide;     RequirementsLbl.Hide;     ProcessorLbl.Hide;     ProcessorNameLbl.Hide;     VideoCardLbl.Hide;     VideoCardNameLbl.Hide;     SoundCardLbl.Hide;     SoundCardNameLbl.Hide;     RAMLbl.Hide;     RAMTotalLbl.Hide;     SystemLbl.Hide;     SystemNameLbl.Hide;     SelectDirBrowseLabel.Hide;     DirEditLabel.Hide;     TotalSpaceLabel.Hide;     FreeSpaceLabel.Hide;     NeedSpaceLabel.Hide;     NoIconsLabel.Hide;     SelectStartMenuFolderBrowseLabel.Hide;     WizardForm.GroupBrowseButton.Hide;     GroupEditLabel.Hide;     SelectTasksLabel.Hide;     DesktopLabel.Hide;     QuickLaunchLabel.Hide;     DirectXLabel.Hide;     LanguageLabel.Hide;     LngNameLbl.Hide;     StatusLabel.Hide;     FilenameLabel.Hide;     FinishedHeadingLabel.Hide;     FinishedLabel.Hide;     ProgressInfoLabel.Hide;   end;      procedure ShowComponents(CurPageID: Integer);   begin     PageNameLabel.Caption:=WizardForm.PageNameLabel.Caption     PageDescriptionLabel.Caption:=WizardForm.PageDescriptionLabel.Caption        case CurPageID of       wpWelcome:       begin         Welcome.Font.Color := $00FFFF;         ImgSetPosition(StatusPanel,ScaleX(0),ScaleY(95),ScaleX(114),ScaleY(20));         WelcomeLabel1.Show         WelcomeLabel2.Show       end;              SystemPage.ID:       begin         System.Font.Color := $00FFFF;         ImgSetPosition(StatusPanel,ScaleX(114),ScaleY(95),ScaleX(114),ScaleY(20));         ImgSetVisibility(RequirementsPanel,True);         RequirementsLbl.Show;         ProcessorLbl.Show;         ProcessorNameLbl.Show;         VideoCardLbl.Show;         VideoCardNameLbl.Show;         SoundCardLbl.Show;         SoundCardNameLbl.Show;         RAMLbl.Show;         RAMTotalLbl.Show;         SystemLbl.Show;         SystemNameLbl.Show;       end;              wpSelectDir:       begin         Catalogue.Font.Color := $00FFFF;         ImgSetPosition(StatusPanel,ScaleX(228),ScaleY(95),ScaleX(114),ScaleY(20));         ImgSetVisibility(Edit,True);         ImgSetVisibility(DirFolder,True);         ImgSetVisibility(HardDrivePanel,True);         ImgSetVisibility(HDD,True);         BtnSetVisibility(hDirBrowseBtn,True);         SelectDirBrowseLabel.Show         DirEditLabel.Show;         TotalSpaceLabel.Show;         FreeSpaceLabel.Show;         NeedSpaceLabel.Show;       end;              wpSelectProgramGroup:       begin         StartMenu.Font.Color := $00FFFF;         ImgSetPosition(StatusPanel,ScaleX(342),ScaleY(95),ScaleX(114),ScaleY(20));         ImgSetVisibility(GroupFolder,True);         ImgSetVisibility(Edit,True);         BtnSetVisibility(hGroupBrowseBtn,True);         BtnSetVisibility(NoIconsCheck,True);         SelectStartMenuFolderBrowseLabel.Show;         WizardForm.GroupBrowseButton.Show;         GroupEditLabel.Show;         NoIconsLabel.Show;       end;              SelectTasksPage.ID:       begin         Tasks.Font.Color := $00FFFF;         ImgSetPosition(StatusPanel,ScaleX(456),ScaleY(95),ScaleX(114),ScaleY(20));         BtnSetVisibility(DesktopCheck,True);         BtnSetVisibility(QuickLaunchCheck,True);         BtnSetVisibility(DirectXCheck,True);         BtnSetVisibility(LanguageButton[1],True);         BtnSetVisibility(LanguageButton[2],True);         BtnSetChecked(DirectXCheck,True);         SelectTasksLabel.Show;         DesktopLabel.Show;         QuickLaunchLabel.Show;         DirectXLabel.Show;         LanguageLabel.Show;         LngNameLbl.Show;         WizardForm.NextButton.Caption:=SetupMessage(msgButtonInstall);       end;              wpInstalling:       begin         Installing.Font.Color := $00FFFF;         ImgSetPosition(StatusPanel,ScaleX(570),ScaleY(95),ScaleX(114),ScaleY(20));         StatusLabel.Show;         FilenameLabel.Show;         ProgressInfoLabel.Show;       end;              wpFinished:       begin         Finish.Font.Color := $00FFFF;         ImgSetPosition(StatusPanel,ScaleX(684),ScaleY(95),ScaleX(114),ScaleY(20));         BtnSetPosition(hNextBtn, ScaleX(657),ScaleY(487),ScaleX(106),ScaleY(39));         FinishedHeadingLabel.Show;         FinishedLabel.Show;       end     end;   end;      //************************************************ [Конец - Компоненты страниц] ***************************************************//      //************************************************ [Начало - ПрогрессБары] ***************************************************//      function LongintToStringTime(t:Longint):string;   var     h,m,s:integer;   begin     h:=t div 3600;     t:=t-h*3600;     m:=t div 60;     s:=t-m*60;     Result:='';     if h>0 then Result:=Result+IntToStr(h)+ExpandConstant(' {cm:Hour} ');     if (m>0) or (h>0) then Result:=Result+IntToStr(m)+ExpandConstant(' {cm:Min} ');     if (m>0) or (h>0) or (s>0) then Result:=Result+IntToStr(s)+ExpandConstant(' {cm:Sec}');   end;      function ImgPBCreate(hParent :HWND; bk, pb :ansistring; Left, Top, Width, Height :integer):TImgPB;   begin     Result.Left:=Left+ScaleX(3);     Result.Top:=Top+ScaleY(3);     Result.Width:=0;     Result.Height:=Height-ScaleY(6);     Result.MaxWidth:=Width-ScaleX(6);     if Length(pb)>0 then Result.img1:=ImgLoad(hParent,pb,Result.Left,Result.Top,0,Result.Height,True,False) else Result.img1:=0;     if Length(bk)>0 then Result.img2:=ImgLoad(hParent,bk,Left,Top,Width,Height,True,False) else Result.img2:=0;   end;      procedure ImgPBSetPosition(var PB :TImgPB; Percent :Extended);   var     NewWidth:integer;   begin     if PB.img1<>0 then begin       NewWidth:=Round(PB.MaxWidth*Percent/100);       if PB.Width<>NewWidth then begin         PB.Width:=NewWidth;         ImgSetPosition(PB.img1,PB.Left,PB.Top,PB.Width,PB.Height);       end;     end;   end;      procedure ImgPBDelete(var PB :TImgPB);   begin     if PB.img1<>0 then ImgRelease(PB.img1);     if PB.img2<>0 then ImgRelease(PB.img2);     PB.img1:=0;     PB.img2:=0;   end;      function PBProc(h:hWnd;Msg,wParam,lParam:Longint):Longint;   var     dt,at,pr,i1,i2: Extended;     lt: Longint;     p: string;     tc: DWORD;   begin     Result:=CallWindowProc(PBOldProc,h,Msg,wParam,lParam);     if (Msg=$402) and (WizardForm.ProgressGauge.Position>WizardForm.ProgressGauge.Min) then begin       i1:=WizardForm.ProgressGauge.Position-WizardForm.ProgressGauge.Min;       i2:=WizardForm.ProgressGauge.Max-WizardForm.ProgressGauge.Min;          tc:=GetTickCount;       if tc-eTime>=1000 then begin         dt:=(tc-sTime)/1000;         at:=i2*dt/i1;         lt:=Round(at-dt)         TimeLeft:=LongintToStringTime(lt);         eTime:=tc;                                      end;          pr:=i1*100/i2;       p:=Format('%f',[pr])+' %. ';       if Length(TimeLeft)>0 then ProgressInfoLabel.Caption:=ExpandConstant('{cm:AllProgress} ')+p+ExpandConstant('{cm:Remains} ')+TimeLeft;          if StatusLabel.Caption<>WizardForm.StatusLabel.Caption then StatusLabel.Caption:=WizardForm.StatusLabel.Caption;       if FileNameLabel.Caption<>WizardForm.FilenameLabel.Caption then FileNameLabel.Caption:=WizardForm.FilenameLabel.Caption;          //Cлайд-шоу по процентам       //Использовать при отключении модуля "FreeArc"              {if pr-OldPosition>=ProgressStep then begin         OldPosition:=OldPosition+ProgressStep;         ImgSetVisibility(AImg[CurrentImage],False);         CurrentImage:=CurrentImage+1;         if CurrentImage>GetArrayLength(AImg)-1 then CurrentImage:=0;         ImgSetVisibility(AImg[CurrentImage],True);       end;}              //Cлайд-шоу по таймеру       //Использовать при подключении модуля "FreeArc"          if GetTickCount-LastTimerEvent>5000{5 секунд} then begin         LastTimerEvent:= GetTickCount;         ImgSetVisibility(AImg[CurrentImage],False);         CurrentImage:=CurrentImage+1;         if CurrentImage=GetArrayLength(AImg) then CurrentImage:=0;         ImgSetVisibility(AImg[CurrentImage],True);       end;              ImgPBSetPosition(NewPB,pr);       ImgApplyChanges(WizardForm.Handle);     end;   end;      function PBProcUninst(h:hWnd;Msg,wParam,lParam:Longint):Longint;   var     pr,i1,i2:Extended;     p:string;   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:=Format('%f',[pr])+' %';       ProgressInfoLabel.Caption:=ExpandConstant('{cm:AllProgressUninst} ')+p;       ImgPBSetPosition(NewPB,pr);       ImgApplyChanges(UninstallProgressForm.Handle);     end;   end;      procedure AllCancel;   begin     SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);     ImgSetVisibility(AImg[CurrentImage],False);     ImgSetVisibility(WizardImg,True);     ImgPBDelete(NewPB);     ImgApplyChanges(WizardForm.Handle);   end;      procedure CurStepChanged(CurStep: TSetupStep);   begin     UnpackingArc(CurStep);//Закомментировать строку при отключении модуля "FreeArc"     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);            ExtractTemporaryFile('ProgressBackground.png');         ExtractTemporaryFile('ProgressImg.png');         NewPB:=ImgPBCreate(WizardForm.Handle, ExpandConstant('{tmp}\ProgressBackground.png'), ExpandConstant('{tmp}\ProgressImg.png'),ScaleX(119),ScaleY(300),ScaleX(560),ScaleY(25));            ImgApplyChanges(WizardForm.Handle);           sTime:=GetTickCount;         eTime:=sTime;         ProgressStep:=100 div GetArrayLength(AImg);                  PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,CallBackProc(@PBProc,4));       end;       ssPostInstall: AllCancel;     end;   end;      procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);   begin     DeleteSavedGames(CurUninstallStep);     case CurUninstallStep of       usUninstall: begin         UninstallProgressForm.ProgressBar.Visible:=False;            FileCopy(ExpandConstant('{app}\ProgressBackground.png'), ExpandConstant('{tmp}\ProgressBackground.png'), False);         FileCopy(ExpandConstant('{app}\ProgressImg.png'), ExpandConstant('{tmp}\ProgressImg.png'), False);            NewPB:=ImgPBCreate(UninstallProgressForm.Handle, ExpandConstant('{tmp}\ProgressBackground.png'), ExpandConstant('{tmp}\ProgressImg.png'),ScaleX(119),ScaleY(300),ScaleX(560),ScaleY(25));         ImgApplyChanges(UninstallProgressForm.Handle);         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;         WizardForm.CancelButton.Enabled:=False;       end;     end;   end;      //************************************************ [Конец - ПрогрессБары] ***************************************************//      procedure InitializeWizard;   begin     CreateStatusPanel;     CreateWizardImage;     ButtonsTextures;     InsertMusic;     CreatePageComponents;     CreateArcComponents;//Закомментировать строку при отключении модуля "FreeArc"   end;      procedure CurPageChanged(CurPageID: Integer);     begin     SetStateNewButtons;     Welcome.Font.Color := $FFFFFF;     System.Font.Color := $FFFFFF;     Catalogue.Font.Color := $FFFFFF;     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);     BtnSetVisibility(LanguageButton[1],False);     BtnSetVisibility(LanguageButton[2],False);          ShowComponents(CurPageID);     ImgApplyChanges(WizardForm.Handle);        UnpackingArcFinished(CurPageID);//Закомментировать строку при отключении модуля "FreeArc"          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);   end;      procedure DeinitializeSetup;   begin     gdipShutdown;     if ContinueInstall then begin//Закомментировать строку при отключении модуля "AutoRun"       BASS_Stop;       BASS_Free;       WFButtonFont.Free;       ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')),0);         UnloadSkin;         SetArrayLength(AImg,0);     end;//Закомментировать строку при отключении модуля "AutoRun"   end;      procedure DeinitializeUninstall;   begin     gdipShutdown;     UnloadSkin;     if Assigned(UPFButtonFont) then UPFButtonFont.Free;   end;      Добавлено:   не давно скочал прогу IS Game Script Generator а есть ли пофункционалиней и чтоб читала *.iss      Добавлено:   не давно скочал прогу IS Game Script Generator а есть ли пофункционалиней и чтоб читала *.iss |