Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для Dodakaedr

Ветеран


Сообщения: 863
Благодарности: 262

Профиль | Отправить PM | Цитировать


Цитата Kashtan007:
Ставил изображения через Редактор форм в расширенном Инно. Добавлял BitmapImage.
Возможно ли как-то сделать на этих страницах разные шапки. Если да, то как? Заранее спасибо! »
Приблизительно так:
читать дальше »
Код: Выделить весь код
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Languages]
Name: "RU"; MessagesFile: "compiler:Languages\Russian.isl"


[Files]

DestName: "WizardForm.BitmapImage1.bmp"; Source: "1.bmp"; Flags: dontcopy solidbreak
DestName: "WizardForm.BitmapImage2.bmp"; Source: "2.bmp"; Flags: dontcopy solidbreak
DestName: "WizardForm.BitmapImage3.bmp"; Source: "3.bmp"; Flags: dontcopy solidbreak
DestName: "WizardForm.BitmapImage4.bmp"; Source: "4.bmp"; Flags: dontcopy solidbreak


Source: "compiler:Languages\Russian.isl"; DestDir: "{app}"; DestName: "TextRussian.isl"; Check: IsComponent(1)
Source: "compiler:Default.isl"; DestDir: "{app}"; DestName: "TextEnglish.isl"; Check: IsComponent(2)
Source: "compiler:Languages\Russian.isl"; DestDir: "{app}"; DestName: "VoiceRussian.isl"; Check: IsComponent(4)
Source: "compiler:Default.isl"; DestDir: "{app}"; DestName: "VoiceEnglish.isl"; Check: IsComponent(5)

[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
Name: text; Description: Дополнительное по; Types: full;
Name: text\DirectX; Description: DirectX 9;
Name: text\Visual; Description: Microsoft Visual C++;

[CustomMessages]
RU.CompSubtitlesLng=Язык субтитров
RU.CompVoiceLng=Язык озвучки
RU.CompRussian=Русский
RU.CompEnglish=Английский


[ code]
var
Flag: Boolean;
SettingButton: TButton;
ComponentsPage: TWizardPage;
ComponentsList: TNewCheckListBox;
BitmapImage1, BitmapImage2, BitmapImage3, BitmapImage4: TBitmapImage;

procedure HideShowOnClick(Sender: TObject);
begin
if Flag = False then begin
WizardForm.ClientWidth:= ScaleX(497);
WizardForm.ClientHeight:= ScaleY(360);
Flag:= True;
SettingButton.Caption:= '[]';
end else begin
WizardForm.ClientWidth:= ScaleX(497);
WizardForm.ClientHeight:= ScaleY(500);
Flag:= False;
SettingButton.Caption:= '[]';
end;
end;

function IsComponent(CompIndex: Integer): Boolean;
var
  i: Integer;
begin
  Result := False;
  for i := 0 to ComponentsList.ItemCount - 1 do
  begin
    if CompIndex <= (ComponentsList.ItemCount - 1) then
      Result := ComponentsList.Checked[CompIndex];
  end;
end;

procedure InitializeWizard();
begin
WizardForm.WizardSmallBitmapImage.Hide;
SettingButton:= TButton.Create(WizardForm);
SettingButton.SetBounds(ScaleX(10),ScaleY(325), ScaleX(30), ScaleY(30))
SettingButton.Caption:= '[]';
SettingButton.OnClick:= @HideShowOnClick;
SettingButton.Parent:= WizardForm;
Flag:=True;

ComponentsList := TNewCheckListBox.Create(WizardForm);
  with ComponentsList do
  begin
    Parent := WizardForm;
    SetBounds(ScaleX(40), ScaleY(370), ScaleX(417), ScaleY(100));
    AddCheckBox(CustomMessage('CompSubtitlesLng'), '', 0, True, False, False, True, nil);
      AddRadioButton(CustomMessage('CompRussian'), '', 1, True, True, nil);
      AddRadioButton(CustomMessage('CompEnglish'), '', 1, False, True, nil);
    AddCheckBox(CustomMessage('CompVoiceLng'), '', 0, True, False, False, True, nil);
      AddRadioButton(CustomMessage('CompRussian'), '', 1, True, True, nil);
      AddRadioButton(CustomMessage('CompEnglish'), '', 1, False, True, nil);
  end;
  BitmapImage1 := TBitmapImage.Create(WizardForm);
  with BitmapImage1 do
  begin
    Parent := WizardForm.MainPanel;
    Left := ScaleX(440);
    Top := ScaleY(1);
    Width := ScaleX(55);
    Height := ScaleY(55);
    ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));
  end;


  BitmapImage2 := TBitmapImage.Create(WizardForm);
  with BitmapImage2 do
  begin
    Parent := WizardForm.MainPanel;
    Left := ScaleX(440);
    Top := ScaleY(1);
    Width := ScaleX(55);
    Height := ScaleY(55);
    ExtractTemporaryFile('WizardForm.BitmapImage2.bmp');
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage2.bmp'));
  end;


  BitmapImage3 := TBitmapImage.Create(WizardForm);
  with BitmapImage3 do
  begin
    Parent := WizardForm.MainPanel;
    Left := ScaleX(440);
    Top := ScaleY(1);
    Width := ScaleX(55);
    Height := ScaleY(55);
    ExtractTemporaryFile('WizardForm.BitmapImage3.bmp');
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage3.bmp'));
  end;


  BitmapImage4 := TBitmapImage.Create(WizardForm);
  with BitmapImage4 do
  begin
    Parent := WizardForm.MainPanel;
    Left := ScaleX(440);
    Top := ScaleY(1);
    Width := ScaleX(55);
    Height := ScaleY(55);
    ExtractTemporaryFile('WizardForm.BitmapImage4.bmp');
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage4.bmp'));
  end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
 case CurPageID of
 wpSelectDir:
begin
  BitmapImage1.Show;
  BitmapImage2.Hide;
  BitmapImage3.Hide;
  BitmapImage4.Hide;
end;
wpSelectComponents:
begin
  BitmapImage2.Show;
  BitmapImage1.Hide;
  BitmapImage3.Hide;
  BitmapImage4.Hide;
end;
wpReady:
begin
  BitmapImage3.Show;
  BitmapImage2.Hide;
  BitmapImage1.Hide;
  BitmapImage4.Hide;
end;
wpInstalling:
begin
  BitmapImage4.Show;
  BitmapImage2.Hide;
  BitmapImage3.Hide;
  BitmapImage1.Hide;
end;
end;
end;

-------
Inno Setup 5 Ultra Unicode

Это сообщение посчитали полезным следующие участники:

Отправлено: 20:59, 15-05-2014 | #665