vint56
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору [Setup] AppName=Антология Return to Castle Wolfenstein AppVerName=Антология Return to Castle Wolfenstein DefaultDirName={pf}\Антология Return to Castle Wolfenstein DefaultGroupName=Антология Return to Castle Wolfenstein OutputBaseFilename=setup Compression=zip SolidCompression=true WizardImageFile=WizardImage.bmp WizardSmallImageFile=WizardSmallImage.bmp DisableProgramGroupPage=true DisableReadyPage=true DiskSpanning=true DiskSliceSize=738000000 ArchitecturesInstallIn64BitMode=x64 ArchitecturesAllowed=x64 x86 InternalCompressLevel=none VersionInfoVersion=1.0 VersionInfoCompany=Home VersionInfoDescription=Антология Return to Castle Wolfenstein VersionInfoCopyright=Vint55 VersionInfoProductName=Антология Return to Castle Wolfenstein VersionInfoProductVersion=5.35 WizardImageBackColor=clBlack SetupIconFile=MAINICON.ico OutputDir=G:\wolf [UninstallDelete] Type: filesandordirs; Name: {app} [Languages] Name: rus; MessagesFile: compiler:Default.isl, compiler:Languages\Russian.isl [Tasks] Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons} Name: DirectX; Description: "Обновить DirectX "; GroupDescription: Системные задачи Name: vcredist; Description: Установить Microsoft Visual C++2005; GroupDescription: Системные задачи [Files] ; NOTE: Don't use "Flags: ignoreversion" on any shared system files Source: bass.dll; DestDir: {tmp}; Flags: nocompression ignoreversion dontcopy Source: MusicButton.bmp; DestDir: {tmp}; Flags: nocompression ignoreversion dontcopy Source: sound.mp3; DestDir: {tmp}; Flags: nocompression ignoreversion dontcopy Source: Image2.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: logo.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: Project 51\*; DestDir: {app}\Project 51; Flags: recursesubdirs ignoreversion createallsubdirs; Components: pt51 Source: Time Gate\*; DestDir: {app}\Time Gate; Flags: recursesubdirs ignoreversion createallsubdirs; Components: tg Source: Сталинград\*; DestDir: {app}\Сталинград; Flags: recursesubdirs ignoreversion createallsubdirs; Components: c Source: OperationTrondheim\*; DestDir: {app}\OperationTrondheim; Flags: recursesubdirs ignoreversion createallsubdirs; Components: ot Source: Operation Trondheim - Red Alert\*; DestDir: {app}\Operation Trondheim - Red Alert; Flags: recursesubdirs ignoreversion createallsubdirs; Components: otra Source: Operation Trondheim - Iron Cross\*; DestDir: {app}\Operation Trondheim - Iron Cross; Flags: recursesubdirs ignoreversion createallsubdirs; Components: otic Source: Wolfenstein\*; DestDir: {app}\Wolfenstein; Flags: recursesubdirs ignoreversion createallsubdirs; Components: rtcw [Icons] Name: {userdesktop}\Return to Castle Wolfenstein; Filename: {app}\Wolfenstein\WolfSP.exe; WorkingDir: {app}\Wolfenstein; Components: RTCW Name: {userdesktop}\Operation Trondheim - Iron Cross; Filename: {app}\Operation Trondheim - Iron Cross\IronCross.exe; WorkingDir: {app}\Operation Trondheim - Iron Cross; IconFilename: {app}\Operation Trondheim - Iron Cross\cross.ico; Components: otic Name: {userdesktop}\Operation Trondheim - Red Alert; Filename: {app}\Operation Trondheim - Red Alert\RedAlert.exe; WorkingDir: {app}\Operation Trondheim - Red Alert; Components: otra Name: {userdesktop}\OperationTrondheim; Filename: {app}\OperationTrondheim\WolfSP.exe; WorkingDir: {app}\OperationTrondheim; Components: ot; Tasks: Name: {userdesktop}\Project 51; Filename: {app}\Project 51\Pro51.exe; WorkingDir: {app}\Project 51; Components: pt51 Name: {userdesktop}\Time Gate; Filename: {app}\Time Gate\WolfSP.exe; WorkingDir: {app}\Time Gate; Components: tg Name: {userdesktop}\Сталинград; Filename: {app}\Сталинград\WolfSP.exe; WorkingDir: {app}\Сталинград; Components: c Name: {group}\Return to Castle Wolfenstein; Filename: {app}\Wolfenstein\WolfSP.exe; WorkingDir: {app}\Wolfenstein; Components: RTCW Name: {group}\Operation Trondheim - Iron Cross; Filename: {app}\Operation Trondheim - Iron Cross\IronCross.exe; WorkingDir: {app}\Operation Trondheim - Iron Cross; Components: otic Name: {group}\Operation Trondheim - Red Alert; Filename: {app}\Operation Trondheim - Red Alert\RedAlert.exe; WorkingDir: {app}\Operation Trondheim - Red Alert; Components: otra Name: {group}\OperationTrondheim; Filename: {app}\OperationTrondheim\WolfSP.exe; WorkingDir: {app}\OperationTrondheim; Components: ot Name: {group}\Сталинград; Filename: {app}\Сталинград\WolfSP.exe; WorkingDir: {app}\Сталинград; Components: c Name: {group}\Project 51; Filename: {app}\Project 51\Pro51.exe; WorkingDir: {app}\Project 51; Components: pt51 Name: {group}\Time Gate; Filename: {app}\Time Gate\WolfSP.exe; WorkingDir: {app}\Time Gate; Components: tg Name: {group}\Удалить игру; Filename: {uninstallexe} [Run] Filename: {src}\Redist\DirectX\DXSetup.exe; Parameters: /SILENT; Flags: skipifdoesntexist; StatusMsg: "Устанавливается DirectX "; Tasks: DirectX; Components: Filename: {src}\Redist\vcredist.exe; Parameters: /Q; Flags: skipifdoesntexist; StatusMsg: Устанавливается Microsoft Visual C++ 2005; Tasks: vcredist [Components] Name: rtcw; Description: Return To Castle Wolfenstein; Types: full Name: otic; Description: Operation Trondheim - Iron Cross; Types: full Name: otra; Description: Operation Trondheim - Red Alert; Types: full Name: ot; Description: OperationTrondheim; Types: full Name: c; Description: Сталинград; Types: full Name: pt51; Description: Project 51; Types: full Name: tg; Description: Time Gate; Types: full [Registry] Root: HKLM; Subkey: SOFTWARE\RTCW Сталинград; ValueName: exePath; ValueType: String; ValueData: {app}\WolfSP.exe Root: HKLM; Subkey: SOFTWARE\RTCW Wolfenstein; ValueName: exePath; ValueType: String; ValueData: {app}\WolfSP.exe Root: HKLM; Subkey: SOFTWARE\RTCW Time Gate; ValueName: exePath; ValueType: String; ValueData: {app}\WolfSP.exe Root: HKLM; Subkey: SOFTWARE\RTCW Project 51; ValueName: exePath; ValueType: String; ValueData: {app}\Pro51.exe Root: HKLM; Subkey: SOFTWARE\RTCW OperationTrondheim; ValueName: exePath; ValueType: String; ValueData: {app}\WolfSP.exe Root: HKLM; Subkey: SOFTWARE\RTCW Operation Trondheim - Red Alert; ValueName: exePath; ValueType: String; ValueData: {app}\RedAlert.exe Root: HKLM; Subkey: SOFTWARE\RTCW Operation Trondheim - Iron Cross; ValueName: exePath; ValueType: String; ValueData: {app}\IronCross.exe Root: HKLM; Subkey: SOFTWARE\RTCW Operation Trondheim - Iron Cross; ValueName: InstallPath; ValueType: String; ValueData: {app} Root: HKLM; Subkey: SOFTWARE\RTCW Operation Trondheim - Red Alert; ValueName: InstallPath; ValueType: String; ValueData: {app} Root: HKLM; Subkey: SOFTWARE\RTCW OperationTrondheim; ValueName: InstallPath; ValueType: String; ValueData: {app} Root: HKLM; Subkey: SOFTWARE\RTCW Project 51; ValueName: InstallPath; ValueType: String; ValueData: {app} Root: HKLM; Subkey: SOFTWARE\RTCW Time Gate; ValueName: InstallPath; ValueType: String; ValueData: {app} Root: HKLM; Subkey: SOFTWARE\RTCW Wolfenstein; ValueName: InstallPath; ValueType: String; ValueData: {app} Root: HKLM; Subkey: SOFTWARE\RTCW Сталинград; ValueName: InstallPath; ValueType: String; ValueData: {app} [Code] var n: Integer; FreeMB, TotalMB: Cardinal; VolumeName, FileSystemName: String; VolumeSerialNo, MaxComponentLength, FileSystemFlags: Longint; ListBox: TListBox; StartMenuTreeView: TStartMenuFolderTreeView; const oneMB= 1024*1024; function GetLogicalDrives: DWord; external 'GetLogicalDrives@kernel32.dll stdcall'; function GetDriveType(nDrive: String): Longint; external 'GetDriveTypeA@kernel32.dll stdcall'; function GetVolumeInformation(PathName,VolumeName: PChar; VolumeNameSize,VolumeSerialNumber,MaxComponentLength,FileSystemFlags: Longint; FileSystemName: PChar; FileSystemNameSize: Longint): Longint; external 'GetVolumeInformationA@kernel32.dll stdcall'; function MessageBox(hWnd: Integer; lpText, lpCaption: String; uType: Cardinal): Integer; external 'MessageBoxA@user32.dll stdcall'; Function ByteOrTB(Bytes: Extended; noMB: Boolean): String; { Перевод числа в значение бт/Кб/Мб/Гб/Тб (до 3х знаков после запятой)} Begin if not noMB then Result:= FloatToStr(Int(Bytes)) +' Мб' else if Bytes < 1024 then Result:= FloatToStr(Int(Bytes)) +' Бт' else if Bytes/1024 < 1024 then Result:= FloatToStr(round((Bytes/1024)*10)/10) +' Кб' else If Bytes/oneMB < 1024 then Result:= FloatToStr(round(Bytes/oneMB*100)/100) +' Мб' else If Bytes/oneMB/1000 < 1024 then Result:= FloatToStr(round(Bytes/oneMB/1024*1000)/1000) +' Гб' else Result:= FloatToStr(round(Bytes/oneMB/oneMB*1000)/1000) +' Тб' StringChange(Result, ',', '.') End; Function DelSP(String: String): String; { Удаление начальных, конечных и повторных пробелов } Begin while (Pos(' ', String) > 0) do Delete(String, Pos(' ', String), 1); Result:= Trim(String); End; Function CutString(String: String; MaxLength: Longint): String; { Обрезать строку до заданного кол-ва символов} Begin if Length(String) > MaxLength then Result:= Copy(String, 1, 6) +'...'+ Copy(String, Length(String) - MaxLength +9, MaxLength) else Result:= String; End; Procedure GetDiskInfo(Disk: String); Begin FileSystemName:= StringOfChar(' ', 32); VolumeName:= StringOfChar(' ', 256); GetVolumeInformation(Disk, VolumeName, 255, VolumeSerialNo, MaxComponentLength, FileSystemFlags, FileSystemName, 31); FileSystemName:= DelSp(FileSystemName); VolumeName:= DelSp(VolumeName); if VolumeName='' then VolumeName:='без метки'; End; Procedure ListBoxRefresh; var FreeB, TotalB: Cardinal; Path, String: string; Begin ListBox.Items.Clear for n:= 1 to 31 do // диск 'А' пропустить if (GetLogicalDrives and (1 shl n)) > 0 then if (GetDriveType(Chr(ord('A') + n) +':\') = 2) or (GetDriveType(Chr(ord('A') + n) +':\') = 3) then if GetSpaceOnDisk(Chr(ord('A') + n) +':\', True, FreeMB, TotalMB) then ListBox.Items.Add(Chr(ord('A') + n) +':'); for n:= 0 to ListBox.Items.Count -1 do begin Path:= Copy(ListBox.Items[n],1,2) +'\' { если в накопителе нет диска, пропустить обновление } if GetSpaceOnDisk(Path, False, FreeB, TotalB) and GetSpaceOnDisk(Path, True, FreeMB, TotalMB) then begin GetDiskInfo(Path); if FreeB >= $7FFFFFFF then String:= PadL(ByteOrTB(FreeMB*oneMB, true),10) else String:= PadL(ByteOrTB(FreeB, true),10); if TotalB >= $7FFFFFFF then begin TotalB:= TotalMB; FreeB:= FreeMB; String:= PadL(ByteOrTB(TotalMB*oneMB, true),11) +' всего -'+ String end else String:= PadL(ByteOrTB(TotalB, true),11) +' всего| '+ String; ListBox.Items[n]:= Copy(Path,1,2) + String + PadL(FloatToStr(round(FreeB/TotalB*100)),3)+ '% своб|'+ PadL(FileSystemName,5)+ '| '+ CutString(VolumeName,9); end; end; End; Procedure ObjectOnClick(Sender: TObject); Begin Case TObject(Sender) of ListBox: for n:= 0 to ListBox.Items.Count-1 do if ListBox.Selected[n] then WizardForm.DirEdit.Text:= Copy(ListBox.Items[n],1,1) +Copy(WizardForm.DirEdit.Text, 2, Length(WizardForm.DirEdit.Text)) StartMenuTreeView: if StartMenuTreeView.Directory <> '' then WizardForm.GroupEdit.Text:= StartMenuTreeView.Directory else WizardForm.GroupEdit.Text:= '{#SetupSetting("DefaultGroupName")}' WizardForm.NoIconsCheck: begin WizardForm.GroupEdit.Enabled:= not(WizardForm.GroupEdit.Enabled); StartMenuTreeView.Enabled:= WizardForm.GroupEdit.Enabled; WizardForm.GroupBrowseButton.Enabled:= WizardForm.GroupEdit.Enabled end; end; End; Function NextButtonClick(CurPageID: Integer): Boolean; Begin Result:= True if (CurPageID = wpSelectDir) and (Pos(Uppercase(ExpandConstant('{win}')), Uppercase(ExpandConstant('{app}'))) > 0) then Result:= MessageBox(StrToInt(ExpandConstant('{wizardhwnd}')), ExpandConstant('{cm:SysDirSelect}'), 'Установка в системную папку', MB_YESNO or $30) = idYes; End; Procedure CurPageChanged1(CurPageID: Integer); Begin if CurPageID = wpSelectDir then ListBoxRefresh End; Procedure InitializeWizard1; Begin ListBox:= TListBox.Create(WizardForm) ListBox.SetBounds(WizardForm.DirEdit.Left, WizardForm.DirEdit.Top + WizardForm.DirEdit.Height + 8, WizardForm.DirBrowseButton.Left + WizardForm.DirBrowseButton.Width - WizardForm.DirEdit.Left, WizardForm.DiskSpaceLabel.Top - (WizardForm.DirEdit.Top + WizardForm.DirEdit.Height + 12)) ListBox.Font.Size:= 9 ListBox.Font.Style:= [] ListBox.Font.Name:= 'Courier New'; ListBox.OnClick:= @ObjectOnClick; ListBox.Parent:= WizardForm.SelectDirPage; WizardForm.NoIconsCheck.SetBounds(WizardForm.DiskSpaceLabel.Left + 96, WizardForm.DiskSpaceLabel.Top + 1, WizardForm.NoIconsCheck.Width, WizardForm.NoIconsCheck.Height) WizardForm.NoIconsCheck.OnClick:= @ObjectOnClick WizardForm.NoIconsCheck.Parent:= WizardForm.SelectProgramGroupPage WizardForm.NoIconsCheck.Show StartMenuTreeView:= TStartMenuFolderTreeView.Create(WizardForm) StartMenuTreeView.SetPaths(ExpandConstant('{userprograms}'), ExpandConstant('{commonprograms}'), ExpandConstant('{userstartup}'), ExpandConstant('{commonstartup}')); StartMenuTreeView.SetBounds(ListBox.Left, ListBox.Top, ListBox.Width, ListBox.Height) StartMenuTreeView.Parent:= WizardForm.SelectProgramGroupPage StartMenuTreeView.Cursor:= crHand StartMenuTreeView.OnChange:=@ObjectOnClick End; var Image2: TBitmapImage; procedure InitializeWizard2(); var Page: TWizardPage; begin ExtractTemporaryFile('Image2.bmp') WizardForm.WizardBitmapImage.Width:=497 WizardForm.WelcomeLabel1.Visible:=False WizardForm.WelcomeLabel2.Visible:=False WizardForm.WizardBitmapImage2.Visible:=False WizardForm.FinishedLabel.Visible:=False WizardForm.FinishedHeadingLabel.Visible:=False end; procedure CurPageChanged2(CurPageID: Integer); begin If CurPageID=wpFinished then begin Image2:=TBitmapImage.Create(WizardForm) with Image2 do begin Left:=0 Top:=0 Width:=497 Height:=313 Parent:=WizardForm.FinishedPage Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\Image2.bmp') end end end; var PageNameLabel, PageDescriptionLabel: TLabel; DesktopIcon: TCheckBox; LogoImage:TBitmapImage; LogoPanel: TPanel; LogoLabel: TLabel; ////////// procedure LogoLabelOnClick(Sender: TObject); var ErrorCode: Integer; begin ShellExec('open', 'http://megatorrents.kz/forum/index.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode) end; type TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord); var TimerID: LongWord; pfunc: LongWord; Label1:tlabel; procedure InitializeWizard3(); ///////////////// begin LogoPanel := TPanel.Create(WizardForm); with LogoPanel do begin Parent := WizardForm; Left := ScaleX(8); Top := ScaleY(327); Width := ScaleX(120); Height := ScaleY(28); BevelOuter := bvNone; end; LogoImage := TBitmapImage.Create(WizardForm); with LogoImage do begin Parent := LogoPanel; Left := ScaleX(0); Top := ScaleY(0); AutoSize:=true; ReplaceColor:=clFuchsia; ReplaceWithColor:=clBtnFace; ExtractTemporaryFile('logo.bmp'); Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo.bmp')); end; LogoLabel := TLabel.Create(WizardForm); with LogoLabel do begin Parent := LogoPanel; Width := LogoPanel.Width; Height := LogoPanel.Height; Transparent:=True; Cursor := crHand; OnClick:=@LogoLabelOnClick; end; end; procedure InitializeWizard4(); begin with WizardForm do begin with MainPanel do Height := Height - 1; with WizardSmallBitmapImage do begin Left := 0; Top := 0; Height := 58; //Размер рисунка Width := 497; // end; with PageNameLabel do begin Width := Width - 497; //Поставьте здесь значения на 0, если хотите вернуть текст Left := Left + 497; // end; with PageDescriptionLabel do begin Width := Width - 497; //Поставьте здесь значения на 0, если хотите вернуть текст Left := Left + 497; // end; end; end; const BASS_ACTIVE_STOPPED = 0; BASS_ACTIVE_PLAYING = 1; BASS_ACTIVE_STALLED = 2; BASS_ACTIVE_PAUSED = 3; BASS_SAMPLE_LOOP = 4; var mp3Handle: HWND; mp3Name: String; PlayButton, PauseButton, StopButton: TPanel; PlayImage, PauseImage, StopImage: TBitmapImage; PlayLabel, PauseLabel, StopLabel: TLabel; MouseLabel: Tlabel; 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: PChar; 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_Stop(): Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload'; function BASS_Pause(): Boolean; external 'BASS_Pause@files:BASS.dll stdcall delayload'; function BASS_Free(): Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload'; procedure PlayMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin PlayImage.Left := -96 end; procedure PlayMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin PlayImage.Left := 0 end; procedure PlayMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if PlayImage.Left <> -96 then PlayImage.Left := -192 StopImage.Left := -64 end; procedure PauseMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin PauseImage.Left := -128 end; procedure PauseMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin PauseImage.Left := -32 end; procedure PauseMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if PauseImage.Left <> -128 then PauseImage.Left := -224 StopImage.Left := -64 end; procedure StopMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin StopImage.Left := -160 end; procedure StopMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin StopImage.Left := -64 end; procedure StopMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if StopImage.Left <> -160 then StopImage.Left := -256 PlayImage.Left := 0 PauseImage.Left := -32 end; procedure MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin PlayImage.Left := 0 PauseImage.Left := -32 StopImage.Left := -64 end; function InitializeSetup(): Boolean; begin ExtractTemporaryFile('BASS.dll'); ExtractTemporaryFile('sound.mp3'); mp3Name := ExpandConstant('{tmp}\sound.mp3'); BASS_Init(-1, 44100, 0, 0, 0); mp3Handle := BASS_StreamCreateFile(FALSE, PChar(mp3Name), 0, 0, BASS_SAMPLE_LOOP); BASS_Start(); BASS_ChannelPlay(mp3Handle, False); Result := True; end; procedure PlayButtonOnClick(Sender: TObject); begin case BASS_ChannelIsActive(mp3Handle) of BASS_ACTIVE_PAUSED: begin BASS_ChannelPlay(mp3Handle, False); PlayButton.Hide PauseButton.Show end; BASS_ACTIVE_STOPPED: begin BASS_Init(-1, 44100, 0, 0, 0); mp3Handle := BASS_StreamCreateFile(FALSE, PChar(mp3Name), 0, 0, BASS_SAMPLE_LOOP); BASS_Start(); BASS_ChannelPlay(mp3Handle, False); PlayButton.Hide PauseButton.Show end; end; end; procedure PauseButtonOnClick(Sender: TObject); begin BASS_ChannelPause(mp3Handle); PauseButton.Hide PlayButton.Show end; procedure StopButtonOnClick(Sender: TObject); begin BASS_Stop(); BASS_Free(); PauseButton.Hide PlayButton.Show end; procedure InitializeWizard5(); begin ExtractTemporaryFile('MusicButton.bmp') MouseLabel := TLabel.Create(WizardForm) MouseLabel.Width := WizardForm.Width MouseLabel.Height := WizardForm.Height MouseLabel.Autosize := False MouseLabel.Transparent := True MouseLabel.OnMouseMove := @MouseMove MouseLabel.Parent := WizardForm PlayButton := TPanel.Create(WizardForm) PlayButton.Left := 150 PlayButton.Top := 320 PlayButton.Width := 32 PlayButton.Height := 33 PlayButton.Cursor := crHand PlayButton.ShowHint := True PlayButton.Hint := 'Воспроизведение музыки' PlayButton.OnClick := @PlayButtonOnClick PlayButton.Parent := WizardForm PlayImage := TBitmapImage.Create(WizardForm) PlayImage.Left := 0 PlayImage.Top := 0 PlayImage.Width := 288 PlayImage.Height := 33 PlayImage.Enabled := False PlayImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MusicButton.bmp')) PlayImage.Parent := PlayButton // PlayImage.ReplaceColor:=$E2E2E2 PlayImage.ReplaceWithColor:=clBtnFace PlayLabel := TLabel.Create(WizardForm) PlayLabel.Width := PlayButton.Width PlayLabel.Height := PlayButton.Height PlayLabel.Autosize := False PlayLabel.Transparent := True PlayLabel.OnClick := @PlayButtonOnClick PlayLabel.OnMouseDown := @PlayMouseDown PlayLabel.OnMouseUp := @PlayMouseUp PlayLabel.OnMouseMove := @PlayMouseMove PlayLabel.Parent := PlayButton PauseButton := TPanel.Create(WizardForm) PauseButton.Left := 150 PauseButton.Top := 320 PauseButton.Width := 32 PauseButton.Height := 33 PauseButton.Cursor := crHand PauseButton.ShowHint := True PauseButton.Hint := 'Приостановить музыку' PauseButton.OnClick := @PauseButtonOnClick PauseButton.Parent := WizardForm PauseImage := TBitmapImage.Create(WizardForm) PauseImage.Left := -32 PauseImage.Top := 0 PauseImage.Width := 288 PauseImage.Height := 33 PauseImage.Enabled := False PauseImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MusicButton.bmp')) PauseImage.Parent := PauseButton // PauseImage.ReplaceColor:=$E2E2E2 PauseImage.ReplaceWithColor:=clBtnFace PauseLabel := TLabel.Create(WizardForm) PauseLabel.Width := PauseButton.Width PauseLabel.Height := PauseButton.Height PauseLabel.Autosize := False PauseLabel.Transparent := True PauseLabel.OnClick := @PauseButtonOnClick PauseLabel.OnMouseDown := @PauseMouseDown PauseLabel.OnMouseUp := @PauseMouseUp PauseLabel.OnMouseMove := @PauseMouseMove PauseLabel.Parent := PauseButton StopButton := TPanel.Create(WizardForm) StopButton.Left := 180 StopButton.Top := 320 StopButton.Width := 32 StopButton.Height := 33 StopButton.Cursor := crHand StopButton.ShowHint := True StopButton.Hint := 'Остановить музыку' StopButton.OnClick := @StopButtonOnClick StopButton.Parent := WizardForm StopImage := TBitmapImage.Create(WizardForm) StopImage.Left := -64 StopImage.Top := 0 StopImage.Width := 288 StopImage.Height := 33 StopImage.Enabled := False StopImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MusicButton.bmp')) StopImage.Parent := StopButton // StopImage.ReplaceColor:=$E2E2E2 StopImage.ReplaceWithColor:=clBtnFace StopLabel := TLabel.Create(WizardForm) StopLabel.Width := StopButton.Width StopLabel.Height := StopButton.Height StopLabel.Autosize := False StopLabel.Transparent := True StopLabel.OnClick := @StopButtonOnClick StopLabel.OnMouseDown := @StopMouseDown StopLabel.OnMouseUp := @StopMouseUp StopLabel.OnMouseMove := @StopMouseMove StopLabel.Parent := StopButton end; procedure DeinitializeSetup5(); begin BASS_Stop(); BASS_Free(); end; procedure CurPageChanged(CurPageID: Integer); begin CurPageChanged1(CurPageID); CurPageChanged2(CurPageID); end; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); InitializeWizard3(); InitializeWizard4(); InitializeWizard5(); end; procedure DeinitializeSetup(); begin DeinitializeSetup5(); end; |