Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup (создание инсталяционных пакетов)

Модерирует : gyra, Maz

Widok (25-12-2009 11:52): Лимит страниц. Продолжаем здесь.  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

vint56



Advanced Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
[Setup]
AppName=S.T.A.L.K.E.R - Shadow of Chernobyl
AppVerName=S.T.A.L.K.E.R - Shadow of Chernobyl
DefaultDirName={pf}\GSC World Publishing\S.T.A.L.K.E.R - Shadow of Chernobyl
DefaultGroupName=GSC World Publishing\S.T.A.L.K.E.R - Shadow of Chernobyl
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
SetupIconFile=stalker_cop.ico
VersionInfoVersion=1.0006
VersionInfoCompany=GSC World Publishing
VersionInfoCopyright=GSC World Publishing+Vint56
VersionInfoProductName=S.T.A.L.K.E.R - Shadow of Chernobyl
VersionInfoDescription=S.T.A.L.K.E.R - Shadow of Chernobyl
VersionInfoProductVersion=5.35
[UninstallDelete]
Type: filesandordirs; Name: {app}
 
[Languages]
Name: ru; MessagesFile: compiler:Languages\Russian.isl; LicenseFile: embedded\ruLicense.txt; InfoAfterFile: embedded\ruInfoAfter.txt
 
[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: ISSkin.dll; DestDir: {tmp}; Flags: nocompression ignoreversion dontcopy
Source: Vista.cjstyles; DestDir: {tmp}; Flags: nocompression ignoreversion dontcopy
Source: STALKER-SHOC\user.ltx; DestDir: {commondocs}\STALKER-SHOC; Flags: overwritereadonly ignoreversion
Source: STALKER-SHOC\traffic.net; DestDir: {commondocs}\STALKER-SHOC; Flags: overwritereadonly ignoreversion
Source: STALKER-SHOC\banned.ltx; DestDir: {commondocs}\STALKER-SHOC; Flags: overwritereadonly ignoreversion
Source: ..\Program Files\GSC World Publishing\S.T.A.L.K.E.R\*; DestDir: {app}; Flags: recursesubdirs ignoreversion createallsubdirs
 
 
 
 
[Icons]
Name: {commondesktop}\S.T.A.L.K.E.R - Shadow of Chernobyl; Filename: {app}\bin\XR_3DA.exe; WorkingDir: {app}\bin; Tasks: desktopicon
Name: {group}\S.T.A.L.K.E.R - Shadow of Chernobyl; Filename: {app}\bin\XR_3DA.exe; WorkingDir: {app}\bin
Name: {group}\Удалить игру; Filename: {uninstallexe}
 
[Run]
Filename: {src}\Redist\DirectX\DXSetup.exe; Parameters: /SILENT; Flags: skipifdoesntexist; StatusMsg: "Устанавливается DirectX "; Tasks: DirectX
Filename: {src}\Redist\vcredist.exe; Parameters: /Q; Flags: skipifdoesntexist; StatusMsg: Устанавливается Microsoft Visual C++ 2005; Tasks: vcredist
 
[Registry]
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC\Keys; Flags: uninsdeletekey
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: UnInstConfirm; ValueType: string
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: BonusPack2; ValueType: Dword; ValueData: $0
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: BonusPack1; ValueType: Dword; ValueData: $0
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: InstallUserName; ValueType: String
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: InstallCDKEY; ValueType: String
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: InstallVers; ValueType: string; ValueData: 1.0006; Flags: uninsdeletekey
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: InstallSource; ValueType: String; ValueData: stk-rus-pack-starforce-keydisk-r
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: InstallLang; ValueType: String; ValueData: {language}
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; ValueName: InstallPath; ValueType: String; ValueData: {app}
Root: HKLM; Subkey: Software\GSC Game World\STALKER-SHOC; Flags: uninsdeletekey
Root: HKLM; Subkey: Software\GSC Game World; Flags: uninsdeletekeyifempty
[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;
Upload: TCheckBox;
 
 
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox
procedure lblCheckBoxOnClick(Sender: TObject);
begin
  if Upload.Checked = False then
    Upload.Checked:= True else
  Upload.Checked:= False;
end;
 
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskin.dll stdcall';
 
 
procedure UnloadSkin();
external 'UnloadSkin@files:isskin.dll stdcall';
 
 
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external 'ShowWindow@user32.dll stdcall';
 
 
 
 
//////////
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;
var
  UnStr: String;
  ErrorCode, Mesages: Integer;
begin
      ExtractTemporaryFile('Vista.cjstyles');
    LoadSkin(ExpandConstant('{tmp}\Vista.cjstyles'), '');
    Result := True;
  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;
    Result := True;
  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\S.T.A.L.K.E.R - Shadow of Chernobyl_is1', 'UninstallString', UnStr) then
  begin
  If UnStr <> '' then
  begin
  Mesages := MsgBox('S.T.A.L.K.E.R - Shadow of Chernobyl уже установлена в Вашей системе.'+#10#10+'Хотите удалить приложение?', mbInformation, MB_YESNOCANCEL);
  case Mesages of
  idYes:
  begin
  UnStr := RemoveQuotes(UnStr);
  Exec(UnStr, '/silent', '', SW_Show, ewWaitUntilTerminated, ErrorCode);
  Result := True;
  end
  idNo:
  begin
  Result := True;
  end
  idCancel:
  begin
  Result := False;
end;
end;
end;
 end;
 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
  ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
  UnloadSkin();
  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;
/////////// Удаление игровых сохранений
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
  ResultStr:String;
  Binary: String;
 
begin           /////////////////////////////////////////Удаление игровых сохранений
  if CurUninstallStep=usPostUninstall then
  begin
  RegQueryStringValue(HKLM, 'Software\GSC Game World\STALKER-SHOC', 'UnInstConfirm', ResultStr)
  if DirExists(ExpandConstant('{commondocs}')+'\STALKER-SHOC') then
  if MsgBox('Удалить сохраненные игры и настройки',mbconfirmation, mb_YesNo) = IDYES then
  begin
  if not DelTree(ExpandConstant('{commondocs}')+'\STALKER-SHOC', True, True, True)
  then
  MsgBox('Папка не удалена!' #13#13 'Папка не сушествует или не задействована.', mbError, MB_OK);
  end;
  end;
end;

Всего записей: 1277 | Зарегистр. 07-10-2008 | Отправлено: 08:30 19-12-2009
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup (создание инсталяционных пакетов)
Widok (25-12-2009 11:52): Лимит страниц. Продолжаем здесь.


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru