; Define :)
#define AppName "My Application"
#define AppVersion "1.5"
[Setup]
AppName={#AppName}
AppVersion={#AppVersion}
DefaultDirName={sd}\{#AppName}
[Files]
DestName:"WizardForm.BitmapImage1.bmp"; Source: "compiler:WizModernImage.bmp"; Flags: dontcopy solidbreak
[CustomMessages]
One=Вас приветствует Мастер установки {#AppName}
Two=Программа установит {#AppName} {#AppVersion} на ваш компьютер.%n%nРекомендуется закрыть все прочие приложения перед тем, как продолжить.%n%nНажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти из программы установки.
Btn_Next=Далее >
Btn_Back=< Назад
Btn_Cancel=Отмена
[Code]
//****************************************
//--=| Variables |=--
var
NewBevel: TBevel;
NewNotebook: TNewNotebook;
NewNotebookPage: TNewNotebookPage;
BitmapImage: TBitmapImage;
LabelOne, LabelTwo: TLabel;
Next, Back, Cancel: TButton;
//****************************************
//--=| No Msg of exit |=--
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:=False;
end;
//****************************************
//--=| Exit program |=--
procedure ClickCancelButton(Sender: TObject);
begin
WizardForm.Close;
end;
//****************************************
//--=| General Motors :) |=--
procedure InitializeWizard();
begin
//****************************************
//--=| Hide Standart Objects |=--
with WizardForm do begin
Position:=poScreenCenter;
OuterNotebook.Hide;
InnerNotebook.Hide;
Bevel.Hide;
NextButton.Width:=0;
BackButton.Width:=0;
CancelButton.Width:=0;
end;
//****************************************
//--=| Bevel |=--
NewBevel:=TBevel.Create(WizardForm);
with NewBevel do
begin
Parent:=WizardForm;
SetBounds(0, 313, WizardForm.Width, 2);
end;
//****************************************
//--=| Pages |=--
NewNotebook:=TNewNotebook.Create(WizardForm);
with NewNotebook do
begin
Parent:=WizardForm;
ActivePage:=NewNotebookPage;
SetBounds(0, 0, WizardForm.Width, 313);
end;
NewNotebookPage:=TNewNotebookPage.Create(WizardForm);
with NewNotebookPage do
begin
Notebook:=NewNotebook;
end;
//****************************************
//--=| BMP |=--
BitmapImage:=TBitmapImage.Create(WizardForm);
with BitmapImage do
begin
Parent:=NewNotebookPage;
SetBounds(0, 0, 164, 313);
ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');
Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));
end;
//****************************************
//--=| Labels |=--
LabelOne:=TLabel.Create(WizardForm);
with LabelOne do
begin
Parent:=NewNotebookPage;
SetBounds(176, 16, 301, 55);
AutoSize:=False;
WordWrap:=True;
Transparent:=False;
Font.Name:='Verdana';
Font.Style:=[fsBold];
Font.Height:=-12;
Font.Size:=12;
Caption:=CustomMessage('One');
end;
LabelTwo:=TLabel.Create(WizardForm);
with LabelTwo do
begin
Parent:=NewNotebookPage;
SetBounds(176, 71, 301, 239);
AutoSize:=False;
WordWrap:=True;
Transparent:=False;
Font.Name:='Tahoma';
Font.Style:=[];
Font.Height:=-11;
Font.Size:=8;
Caption:=CustomMessage('Two');
end;
//****************************************
//--=| Buttons |=--
Next:=TButton.Create(WizardForm);
with Next do
begin
Parent:=WizardForm;
SetBounds(317, 327, 80, 23);
Caption:=CustomMessage('Btn_Next');
TabOrder:=2;
end;
Back:=TButton.Create(WizardForm);
with Back do
begin
Parent:=WizardForm;
SetBounds(237, 327, 80, 23);
Caption:=CustomMessage('Btn_Back');
TabOrder:=1;
end;
Cancel:=TButton.Create(WizardForm);
with Cancel do
begin
Parent:=WizardForm;
SetBounds(407, 327, 80, 23);
Caption:=CustomMessage('Btn_Cancel');
OnClick:=@ClickCancelButton;
TabOrder:=3;
end;
//****************************************
//--=| Other |=--
NewNotebook.ActivePage:=NewNotebookPage;
end;