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

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

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

Widok (23-04-2007 18:02): лимит страниц. продолжаем здесь  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

Chuvakstepan



Member
Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору
#define ISSI_SplashScreen "C:\Program Files\Inno Setup\splash.bmp"
 
;; Time in seconds:
#define ISSI_SplashScreen_T 2
 
;; Image Width:
#define ISSI_SplashScreen_X 360
 
;; Image Heigth:
#define ISSI_SplashScreen_Y 480
 
#define ISSI_WizardImageFile "C:\Program Files\Inno Setup\st_wel.bmp"
#define ISSI_WizardImageFile_x 495
;; Optional: align will switches alignment of the image
#define ISSI_WizardImageFile_Align
 
 
;; (optional) This does the same for the Finished screen
#define ISSI_WizardImageFile2 "C:\Program Files\Inno Setup\st_fin.bmp"
#define ISSI_WizardImageFile2_x 495
 
 
;; The WizardSmallImageFile
#define ISSI_WizardSmallImageFile "C:\Program Files\Inno Setup\st_head.bmp"
#define ISSI_WizardSmallImageFile_x 495
 
 
;; Optional: align will switches alignment of the image
#define ISSI_WizardSmallImageFile_Align
 
 
#define ISSI_UseMyCurPageChanged
#define ISSI_UseMyInitializeSetup
#define ISSI_UseMyInitializeWizard
 
 
[Code]
 
 const
  NeedSize = 60; //Прописать, сколько мегабайт необходимо
 
  DRIVE_UNKNOWN = 0;
  DRIVE_NO_ROOT_DIR = 1;
  DRIVE_REMOVEABLE = 2;
  DRIVE_FIXED = 3;
  DRIVE_REMOTE = 4;
  DRIVE_CDROM = 5;
  DRIVE_RAMDISK = 6;
 
var
  ListBox: TListBox;
 
procedure ListBoxOnClick(Sender: TObject);
var
  NewLetter, OldString: String;
  i: Integer;
begin
  for i:= 0 to ListBox.Items.Count-1 do
    begin
      if ListBox.Selected[i] then
        begin
          NewLetter:= Copy(ListBox.Items[i], 0, 1);
          OldString:= Copy(WizardForm.DirEdit.Text, 2, Length(WizardForm.DirEdit.Text));
          WizardForm.DirEdit.Text:= NewLetter + OldString;
        end;
    end;
end;
 
 function GetLogicalDrives: DWORD;
external 'GetLogicalDrives@kernel32.dll stdcall';
 
function GetDriveType(nDrive: String): Longint;
external 'GetDriveTypeA@kernel32.dll stdcall';
 
function GetVideoCardName(): PChar;
external 'hwc_GetVideoCardName@files:get_hw_caps.dll stdcall';
 
function GetSoundCardName(): PChar;
external 'hwc_GetSoundCardName@files:get_hw_caps.dll stdcall';
 
function DetectHardware(): Integer;
external 'hwc_DetectHardware@files:get_hw_caps.dll stdcall';
 
function GetHardDriveFreeSpace(hdd: integer): Integer;
external 'hwc_GetHardDriveFreeSpace@files:get_hw_caps.dll stdcall';
 
function GetHardDriveName(hdd: integer): PChar;
external 'hwc_GetHardDriveName@files:get_hw_caps.dll stdcall';
 
function GetHardDriveTotalSpace(hdd: integer): Integer;
external 'hwc_GetHardDriveTotalSpace@files:get_hw_caps.dll stdcall';
 
function GetHardDrivesCount(): Integer;
external 'hwc_GetHardDrivesCount@files:get_hw_caps.dll stdcall';
 
function GetSoundCards(): Integer;
external 'hwc_GetSoundCards@files:get_hw_caps.dll stdcall';
 
function GetSystemPage(): Integer;
external 'hwc_GetSystemPage@files:get_hw_caps.dll stdcall';
 
function GetSystemPhys(): Integer;
external 'hwc_GetSystemPhys@files:get_hw_caps.dll stdcall';
 
function GetVidMemLocal(): Integer;
external 'hwc_GetVidMemLocal@files:get_hw_caps.dll stdcall';
 
function GetVidMemNonLocal(): Integer;
external 'hwc_GetVidMemNonLocal@files:get_hw_caps.dll stdcall';
 
function GetVideoCardDev(): Integer;
external 'hwc_GetVideoCardDev@files:get_hw_caps.dll stdcall';
 
function GetVideoCardVen(): Integer;
external 'hwc_GetVideoCardVen@files:get_hw_caps.dll stdcall';
 
function  DelSp(const s:string):string;// функция удаления пробелов в начале строки
var
  c, i: integer;
  stt, st, st1: string;
begin
  c := 0;
  st := s;
 
  for i := 1 to Length(st) do
  begin
 
    stt := copy(st, i, 1);
    if (stt = ' ') and (c >= 1) then
    begin
      st1 := st1;
      c := c + 1;
    end
    else if (stt = ' ') and (c = 0) then
    begin
      c := c + 1;
      st1 := st1 + stt;
    end
    else if (stt <> ' ') then
    begin
      c := 0;
      st1 := st1 + stt;
    end
  end;
 
  Result:= st1;
end;
 
 
 
function CheckSystemPage(PreviousPageId: Integer): Integer;
var Page: TWizardPage;
    ProcessorName:string;
    Processor,VideoCardPanel,AudioCardPanel,RAMPanel,PageFilePanel: TPanel;
    ProcessorNamePanel,VideoCardNamePanel,AudioCardNamePanel,RAMTotalPanel,PageFileTotalPanel: TPanel;
    ProcessorMHZ: Cardinal;
    StaticText,StaticText2:TNewStaticText;
    VidRam:integer;
begin
RegQueryStringValue(HKLM, 'HARDWARE\DESCRIPTION\System\CentralProcessor\0','ProcessorNameString', ProcessorName);
RegQueryDWordValue(HKLM, 'HARDWARE\DESCRIPTION\System\CentralProcessor\0','~MHz', ProcessorMHZ);
GetVidMemLocal;
GetSoundCards;
 
Page := CreateCustomPage(PreviousPageId,'Апаратное Обеспечение','Программа установки обнаружила следуюшие необходимые компоненты');
 
StaticText:=TNewStaticText.Create(Page);
with StaticText do
begin
Parent:=Page.Surface;
Caption:='Все компоненты удовлетворяют требованиям игры.';
Left:=0;
Top:=5;
AutoSize:=True;
end;
 
StaticText2:=TNewStaticText.Create(Page);
with StaticText2 do
begin
Parent:=Page.Surface;
Caption:='Когда вы будете готовы продолжить установку, нажмите Далее'
Left:=0;
Top:=210;
AutoSize:=True;
end;
 
Processor := TPanel.Create(Page);
with Processor do
begin
Parent := Page.Surface;
Caption := ' Процессор';
Left := ScaleX(0);
Top := ScaleY(32);
alignment:=taLeftJustify;
Width := ScaleX(121);
Height := ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
TabOrder := 0;
end;
 
ProcessorNamePanel := TPanel.Create(Page);
with ProcessorNamePanel do
begin
Parent := Page.Surface;
Caption :=DelSP(ProcessorName)+'  '+IntToStr(ProcessorMHZ)+'MHz' ;  //новое обработанное значение строки
//  Caption :=ProcessorName+'  '+IntToStr(ProcessorMHZ)+'MHz' ;
Left := ScaleX(128);
Top := ScaleY(32);
alignment:=taLeftJustify;
Width := ScaleX(281);
Height := ScaleY(25);
 
BevelInner := bvSpace;
BevelOuter:=bvLowered;
Color :=$ccffcc;
TabOrder := 1;
end;
 
if ProcessorMHZ<2000then
begin
ProcessorNamePanel.Color:=$ccccff;
StaticText.Caption:='Не все компоненты удовлетворяют требованиям игры.';
end;
 
VideoCardPanel:=TPanel.Create(Page);
with VideoCardPanel do
begin
Parent:=Page.Surface;
Caption:=' Видеоадаптер';
Left:=ScaleX(0);
alignment:=taLeftJustify;
Top:=Processor.Top+27;
Width:=ScaleX(121);
Height:=ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
TabOrder:=0;
end;
 
VideoCardNamePanel:=TPanel.Create(Page);
with VideoCardNamePanel do
begin
Parent:=Page.Surface;
Caption:=' '+GetVideoCardName; //+'    ОЗУ-'+inttostr(round(GetVidMemLocal/1000000))+' МБ';
//Caption:='    ОЗУ-'+inttostr(GetVidMemLocal)+' МБ';
VidrAM:= GetVidMemLocal/1000000;
 
if VidRam>127 then
 begin
  if VidRam<200 then  Caption:=Caption+'  128 МB'
  else if VidRam<300 then  Caption:=Caption+'  256 МB'
    else if VidRam<400 then  Caption:=Caption+'  384 МB'
      else if  VidRam>500 then  Caption:=Caption+'  512 МB';
 end;
 
Left:=ScaleX(128);
Top:=VideoCardPanel.Top;
alignment:=taLeftJustify;
Width:=ScaleX(281);
Height:=ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
Color :=$ccffcc;
TabOrder:=1;
end;
 
if GetVidMemLocal<127000000 then //128MB
begin
StaticText.Caption:='Не все компоненты удовлетворяют требованиям игры.';
VideoCardNamePanel.Color:=$ccccff;
end;
 
AudioCardPanel:=TPanel.Create(Page);
with AudioCardPanel do
begin
Parent:=Page.Surface;
Caption:=' Звуковая карта';
Left:=ScaleX(0);
Top:=VideoCardPanel.Top+27;
alignment:=taLeftJustify;
Width:=ScaleX(121);
Height:=ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
TabOrder:=0;
end;
 
AudioCardNamePanel:=TPanel.Create(Page);
with AudioCardNamePanel do
begin
Parent:=Page.Surface;
Caption:=' '+GetSoundCardName;
Left:=ScaleX(128);
alignment:=taLeftJustify;
Top:=AudioCardPanel.Top;
Width:=ScaleX(281);
Height:=ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
TabOrder:=1;
Color :=$ccffcc;
end;
 
if
GetSoundCards=0 then
begin
StaticText.Caption:='Не все компоненты удовлетворяют требованиям игры.';
AudioCardNamePanel.Color:=$ccccff;
end;
 
 
RAMPanel:=TPanel.Create(Page);
with RAMPanel do
begin
Parent:=Page.Surface;
Caption:=' ОЗУ'
Left:=0;
Top:=AudioCardPanel.Top+27;
alignment:=taLeftJustify;
Width:=ScaleX(121);
Height:=ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
TabOrder:=0;
end;
 
RAMTotalPanel:=TPanel.Create(Page);
with RAMTotalPanel do
begin
Parent:=Page.Surface;
Caption:=' '+IntToStr(GetSystemPhys+1) +' MB'
Left:=AudioCardNamePanel.Left;
Top:=RAMPanel.Top;
alignment:=taLeftJustify;
Width:=AudioCardNamePanel.Width;
Height:=ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
TabOrder:=1;
Color :=$ccffcc;
end;
 
if GetSystemPhys+1<512 then
begin
RAMTotalPanel.Color:=$ccccff;
StaticText.Caption:='Не все компоненты удовлетворяют требованиям игры.';
end;
 
PageFilePanel:=TPanel.Create(Page);
with PageFilePanel do
begin
Parent:=Page.Surface;
Caption:=' Файл подкачки';
alignment:=taLeftJustify;
Left:=0;
Top:=RAMPanel.Top+27;
Width:=RAMPanel.Width;
Height:=ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
TabOrder:=0;
end;
 
PageFileTotalPanel:=TPanel.Create(Page);
with PageFileTotalPanel do
begin
Parent:=Page.Surface;
Caption:=' '+IntToStr(GetSystemPage)+' MB';
Left:=RAMTotalPanel.Left;
Top:=PageFilePanel.Top;
alignment:=taLeftJustify;
Width:=RAMTotalPanel.Width;
Height:=ScaleY(25);
BevelInner := bvSpace;
BevelOuter:=bvLowered;
TabOrder:=1;
Color :=$ccffcc;
end;
 
if GetSystemPage<1247 then
begin
PageFileTotalPanel.Color:=$ccccff;
StaticText.Caption:='Не все компоненты удовлетворяют требованиям игры.';
end;
 
Result := Page.ID;
end;
 
var
 PlayButton : TButton;
 PauseButton : TButton;
 StopButton : TButton;
 Panel1: TPanel;
 
 
const
  BACKGROUND=6;
  TIMER=16;
 
function isxbb_AddImage(Image: PChar; Flags: Cardinal): Integer;
external 'isxbb_AddImage@files:isxbb.dll stdcall';
 
function isxbb_Init(hWnd: Integer): Integer;
external 'isxbb_Init@files:isxbb.dll stdcall';
 
function isxbb_StartTimer(Seconds: Integer; Flags: Cardinal): Integer;
external 'isxbb_StartTimer@files:isxbb.dll stdcall';
 
function isxbb_KillTimer(Flags: Cardinal): Integer;
external 'isxbb_KillTimer@files:isxbb.dll stdcall';
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;
 
 
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 BevelLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://www.chuvakstepan.xost.ru', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
 
function ISSI_InitializeSetup(): Boolean;
var
  ResultCode: Integer;
  MD5,ResultStr:string;
  hWnd: Integer;
  begin
Result:=True;
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;
 
 
 
if not FileExists(ExpandConstant('{src}')+'\website.url') then
  begin
   MsgBox('Электронная подпись не найдена.'#13#13'Вы используете взломанную или пиратскую версию.', mbError, mb_OK);
    Result:= False;
  end
  else
begin
  MD5 := GetMD5OfFile(ExpandConstant('{src}\website.url'));
  If not (MD5 = '2b5db4b3d57755af4891cd5a53902f48') then
 begin
    MsgBox('Произошла критическая ошибка!'#13'Электронная подпись повреждена.'#13'Обратитесь к разработчику!', mbCriticalError, mb_OK);
     Result:=False;
end;
end;
end;
end;
 
procedure PlayButtonOnClick(Sender: TObject);
begin
case BASS_ChannelIsActive(mp3Handle) of
BASS_ACTIVE_PAUSED:
begin
BASS_ChannelPlay(mp3Handle, False);
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);
end;
end;
end;
 
procedure PauseButtonOnClick(Sender: TObject);
begin
BASS_ChannelPause(mp3Handle);
end;
 
 
procedure StopButtonOnClick(Sender: TObject);
begin
BASS_Stop();
BASS_Free();
end;
 
procedure ISSI_CurPageChanged(CurPageID: Integer);
begin
if CurPageID=1 then
 begin
  If WizardForm.FindComponent('NextButton') is TButton
 then
  TButton(WizardForm.FindComponent('NextButton')).Caption:='Начать Установку >>>';
  TButton(WizardForm.FindComponent('NextButton')).Width:=ScaleX(135);
  WizardForm.NextButton.Left:=WizardForm.ClientWidth - ScaleX(217 + 10);  //Отступ слева кнопки: Отмена.
  WizardForm.NextButton.Top:=WizardForm.ClientHeight - ScaleY(23 + 10); //Отступ сверху кнопки: Отмена.
  WizardForm.BackButton.Left:=WizardForm.ClientWidth - ScaleX(300 + 10);  //Отступ слева кнопки: Отмена.
  WizardForm.BackButton.Top:=WizardForm.ClientHeight - ScaleY(23 + 10); //Отступ сверху кнопки: Отмена.
  If WizardForm.FindComponent('CancelButton') is TButton
then
  TButton(WizardForm.FindComponent('CancelButton')).Caption:='Выход';
end;
begin
 if CurPageID=wpInstalling
then
begin
  WizardForm.MainPanel.Visible:=False;
  WizardForm.Bevel1.Visible:=False;
  WizardForm.Width:=ScaleX(395);
  WizardForm.Height:=ScaleY(142);
  WizardForm.Position:=poScreenCenter;
  WizardForm.Top:=ScaleY(MainForm.Height-170);
  WizardForm.InnerNotebook.Left:=ScaleX(10);
  WizardForm.InnerNotebook.Top:=ScaleY(10);
  WizardForm.InnerNotebook.Width:=ScaleX(370);
  WizardForm.StatusLabel.Left:=ScaleX(0);
  WizardForm.StatusLabel.Top:=ScaleY(0);
  WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width;
  WizardForm.FileNameLabel.Left:=ScaleX(0);
  WizardForm.FileNameLabel.Top:=ScaleY(20);
  WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width;
  WizardForm.ProgressGauge.Top:=ScaleY(40);
  WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width;
  WizardForm.CancelButton.Left:=ScaleX(154);
  WizardForm.CancelButton.Top:=ScaleY(80);
  PlayButton := TButton.Create(WizardForm);
  PlayButton.Left := 10;
  PlayButton.Top := WizardForm.ClientHeight - ScaleY(23 + 10);
  PlayButton.Width := 30;
  PlayButton.Caption := '>';
  PlayButton.OnClick := @PlayButtonOnClick;
  PlayButton.Parent := WizardForm;
  PlayButton.Cursor := crHand;
  PauseButton := TButton.Create(WizardForm);
  PauseButton.Left := 45;
  PauseButton.Top := WizardForm.ClientHeight - ScaleY(23 + 10);
  PauseButton.Width:=30;
  PauseButton.Caption := 'II';
  PauseButton.OnClick := @PauseButtonOnClick;
  PauseButton.Parent := WizardForm;
  PauseButton.Cursor := crHand;
  StopButton := TButton.Create(WizardForm);
  StopButton.Left := 80;
  StopButton.Top := WizardForm.ClientHeight - ScaleY(23 + 10);
  StopButton.Width := 30;
  StopButton.Caption := '[]';
  StopButton.OnClick := @StopButtonOnClick;
  StopButton.Parent := WizardForm;
  StopButton.Cursor := crHand;
 end
if CurPageID=wpFinished
 then
  begin
  WizardForm.Width:=502;{Размер окна по горизонтали}
  WizardForm.Height:=392;{Размер окна по вертикали}
  WizardForm.Position:=poScreenCenter;
  PlayButton.Visible := False;
  PauseButton.Visible := False;
  StopButton.Visible := False; {Возврат в исходное состояние}
 end
 begin
  if CurPageID = wpPassword then
    WizardForm.NextButton.OnClick(WizardForm.NextButton);
end;
end;
end;
 
 
procedure ISSI_InitializeWizard();
var
  Path: String;
  FreeMB, TotalMB: Cardinal;
  drives: DWORD;
  Name1: string;
  PlayButton, PauseButton, StopButton: TButton;
  Text: TNewStaticText;
  Panel1: TPanel;
  MD5: String;
  i: integer;
 
begin
CheckSystemPage(wplicense);
ListBox:= TListBox.Create(WizardForm);
  ListBox.Top:= 120;
  ListBox.Width:= 300;
  ListBox.Height:= ScaleY(90);
  ListBox.Parent:= WizardForm.SelectDirPage;
  ListBox.OnClick:= @ListBoxOnClick;
 
  drives:= GetLogicalDrives();
  for i:= 0 to 31 do
     begin
        if (drives and (1 shl i)) > 0 then
            begin
              Path:= chr(ord('A')+i)+':';
              if GetDriveType(Path) = DRIVE_FIXED then
                begin
                  GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
                  ListBox.Items.Add(Path + ' Свободно: ' + IntToStr(FreeMB) + 'Мб');
                end;
end;
end;
 
begin
MD5 := GetMD5OfString('Copyright CHUVAKSTEPAN 2007')
WizardForm.PasswordEdit.Visible:= False;
//Вставляем то, что складываем
WizardForm.PasswordEdit.Text:= MD5;
end;
 
 
begin
WizardForm.CancelButton.BringToFront;
begin
 //Выносим кнопку "Отмена" на передний план
  WizardForm.CancelButton.BringToFront;
begin
Panel1 := TPanel.Create(WizardForm);
with Panel1 do
begin
PlayButton := TButton.Create(WizardForm);
PlayButton.Left := 10;
PlayButton.Top := WizardForm.ClientHeight - ScaleY(23 + 10);
PlayButton.Width := 30;
PlayButton.Caption := '>';
PlayButton.OnClick := @PlayButtonOnClick;
PlayButton.Parent := WizardForm;
PlayButton.Cursor := crHand;
PauseButton := TButton.Create(WizardForm);
PauseButton.Left := 45;
PauseButton.Top := WizardForm.ClientHeight - ScaleY(23 + 10);
PauseButton.Width:=30;
PauseButton.Caption := 'II';
PauseButton.OnClick := @PauseButtonOnClick;
PauseButton.Parent := WizardForm;
PauseButton.Cursor := crHand;
StopButton := TButton.Create(WizardForm);
StopButton.Left := 80;
StopButton.Top := WizardForm.ClientHeight - ScaleY(23 + 10);
StopButton.Width := 30;
StopButton.Caption := '[]';
StopButton.OnClick := @StopButtonOnClick;
StopButton.Parent := WizardForm;
StopButton.Cursor := crHand;
end;
begin
with WizardForm.BeveledLabel do
begin
Cursor := crHand;
OnClick := @BevelLabelOnClick;
Font.Style := Font.Style + [fsUnderline];
Font.Color := clMaroon;
Enabled:= True;
begin
    ExtractTemporaryFile('1.jpg');
    isxbb_AddImage(ExpandConstant('{tmp}')+'\1.jpg',BACKGROUND);
    isxbb_Init(StrToInt(ExpandConstant('{hwnd}')));
end;
end;
end;
end;
end;
end;
end;
 
procedure DeinitializeSetup();
begin
BASS_Stop();
BASS_Free();
end;
[/Code]
;; Include ISSI (required)
#define ISSI_IncludePath "C:\Program Files\Inno Setup\ISSI"
#include ISSI_IncludePath+"\_issi.isi"
 
 
[Code]
 
procedure CurStepChanged(CurStep: TSetupStep);
begin
//В начале этапа установки запускаем слайд-шоу
 if CurStep=ssInstall
then
begin
ExtractTemporaryFile('2.jpg');
ExtractTemporaryFile('3.jpg');
ExtractTemporaryFile('4.jpg');
ExtractTemporaryFile('5.jpg');
ExtractTemporaryFile('6.jpg');
ExtractTemporaryFile('7.jpg');
ExtractTemporaryFile('8.jpg');
ExtractTemporaryFile('9.jpg');
isxbb_AddImage(ExpandConstant('{tmp}')+'\2.jpg',BACKGROUND or TIMER);
isxbb_AddImage(ExpandConstant('{tmp}')+'\3.jpg',BACKGROUND or TIMER);
isxbb_AddImage(ExpandConstant('{tmp}')+'\4.jpg',BACKGROUND or TIMER);
isxbb_AddImage(ExpandConstant('{tmp}')+'\5.jpg',BACKGROUND or TIMER);
isxbb_AddImage(ExpandConstant('{tmp}')+'\6.jpg',BACKGROUND or TIMER);
isxbb_AddImage(ExpandConstant('{tmp}')+'\7.jpg',BACKGROUND or TIMER);
isxbb_AddImage(ExpandConstant('{tmp}')+'\8.jpg',BACKGROUND or TIMER);
isxbb_AddImage(ExpandConstant('{tmp}')+'\9.jpg',BACKGROUND or TIMER);
isxbb_Init(StrToInt(ExpandConstant('{hwnd}')));
//Таймер показа изображений, в секундах
isxbb_StartTimer(10,BACKGROUND)
  end
//На завершающем этапе останавливаем таймер, при этом возвращается фоновое изображение по умолчанию
  else if CurStep=ssPostInstall then
    isxbb_KillTimer(BACKGROUND);
end;
 
 
 
 
[Setup]
AppName=S.T.A.L.K.E.R.: Shadow of Chernobyl
AppVerName=S.T.A.L.K.E.R.: Shadow of Chernobyl (полная русская версия)
AppPublisher=Chuvakstepan Inc.
DefaultDirName={pf}\Chuvakstepan\S.T.A.L.K.E.R
DefaultGroupName=Chuvakstepan\S.T.A.L.K.E.R
Compression=zip
SolidCompression=false
OutputBaseFilename=setup
UninstallFilesDir={app}
WindowVisible=yes
WindowResizable=no
WindowShowCaption=no
BackColor=$000000
BackSolid=yes
VersionInfoVersion=1.0.0.1
VersionInfoCompany=Chuvakstepan Inc.
VersionInfoCopyright=GSC
DiskSpanning=yes
DiskSliceSize=723517440
UseSetupLdr=true
Encryption=yes
Password=066b0b4f1805bfa2ba934398912936f7
Outputdir=C:\Для кодировки\STALKER\
LicenseFile=compiler:License.rtf
 
 
[Files]
Source: compiler:BASS.dll; DestDir: " {tmp} "; Flags: dontcopy noencryption
Source: compiler:sound.mp3; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: compiler:Splash.bmp; DestDir: {tmp}; Flags: dontcopy noencryption
Source: compiler:isxbb.dll; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:1.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:2.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:3.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:4.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:5.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:6.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:7.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:8.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:9.jpg; DestDir: {tmp}; Flags: dontcopy  noencryption
Source: compiler:get_hw_caps.dll; Flags: dontcopy  noencryption
Source: compiler:website.url; DestDir: {app}; Tasks: url
Source: compiler:websitegameSTALKER.url; DestDir: {app}; Tasks: url
Source: C:\Игры\S.T.A.L.K.E.R\manual.pdf; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
Source: compiler:KillSave from 1C\killsave.exe; DestDir: {app}; Flags: ignoreversion
Source: compiler:KillSave from 1C\Kill.ini; DestDir: {app}; Flags: ignoreversion
 
 
 
 
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
Name: url; Description: Создать ссылки на интернет-сайты в меню пуск; GroupDescription: {cm:AdditionalIcons}
 
 
[Icons]
Name: {userdesktop}\S.T.A.L.K.E.R.; Filename: {app}\bin\XR_3DA.exe; Tasks: desktopicon;  Flags: createonlyiffileexists; WorkingDir: {app}\bin
Name: {group}\Начать игру; Filename: {app}\bin\XR_3DA.exe; Flags: createonlyiffileexists; WorkingDir: {app}\bin
Name: {group}\Руководство; Filename: {app}\manual.pdf; Flags: createonlyiffileexists
Name: {group}\Трейнер; Filename: {app}\trn.exe; Flags: createonlyiffileexists; WorkingDir: {app}
Name: {group}\Файл Readme; Filename: {app}\ReadMe.txt; Flags: createonlyiffileexists
Name: {group}\Интернет-сайты\Chuvakstepan Inc.; Filename: {app}\website.url; Flags: createonlyiffileexists; Tasks: url
Name: {group}\Интернет-сайты\Сайт игры; Filename: {app}\websitegameSTALKER.url; Flags: createonlyiffileexists; Tasks: url
Name: {group}\{cm:UninstallProgram,игры}; Filename: {uninstallexe}
 
 
[Registry]
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: string; ValueName: InstallPath; ValueData: {app} ; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: string; ValueName: InstallLang; ValueData: en; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: string; ValueName: InstallSource; ValueData: stk-for-pack-securom-keydisk-efis; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: string; ValueName: InstallVers; ValueData: 1.0001; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: string; ValueName: InstallCDKEY; ValueData: 2J3G-4KJ3-B4J2-4I1N; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: string; ValueName: InstallUserName; ValueData: Chuvakstepan; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: dword; ValueName: BonusPack1; ValueData: $00000000; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: dword; ValueName: BonusPack2; ValueData: $00000000; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\GSC Game World\STALKER-SHOC1; ValueType: string; ValueName: UnInstConfirm; ValueData: Do you want to remove all saved games and profiles?; Flags: uninsdeletekey
 
Root: HKLM; SubKey: SOFTWARE\Chuvakstepan\STALKER-SHOC; ValueType: string; ValueName: SavePath; ValueData: {app}\bin; Flags: uninsdeletekey
 
[LangOptions]
TitleFontSize=1
DialogFontName=Tahoma
DialogFontSize=8
WelcomeFontName=Times New Roman
WelcomeFontSize=13
TitleFontName=Arial
CopyrightFontName=Arial
CopyrightFontSize=8
 
[Messages]
BeveledLabel=Chuvakstepan Inc. 2007
 
[CustomMessages]
UninstallProgram=Удаление %1
 
[UninstallRun]
Filename: "{app}\KillSave.exe"; Parameters: "Kill"; WorkingDir: "{app}";

Всего записей: 202 | Зарегистр. 29-01-2007 | Отправлено: 20:12 14-04-2007 | Исправлено: Chuvakstepan, 20:17 14-04-2007
   

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

Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup (создание инсталяционных пакетов)
Widok (23-04-2007 18:02): лимит страниц. продолжаем здесь


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

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

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru