Забанен
Сообщения: 216
Благодарности: 62
|
Профиль
| Цитировать
Цитата detiedyatosla:
нужно растянуть инсталятор»
|
Значит плохо видел. alert30, тебе дал пищу для ума, и между прочим, тут были примеры как сделать, растянуть форму, перетащить кнопки и писалось не один раз, и если бы ты хоть чуть чуть напрягся, а не ленился, то ты бы сделал бы себе подобное этому:
читать дальше »
Код:
[Setup]
AppName=My Program
AppVersion=1.5
;AppVerName=My Program 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputDir=.
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Icons]
Name: "{group}\{cm:UninstallProgram,My Program}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{cm:UninstallProgram,My Program}"; Filename: "{uninstallexe}"; Tasks: desktopicon
[ Code]
procedure TasksListClick(Sender: TObject); forward;
procedure RedesignWizardForm;
begin
with WizardForm do
begin
AutoScroll := False;
ClientHeight := ScaleY(576);
ClientWidth := ScaleX(799);
end;
with WizardForm.Bevel do
begin
Top := ScaleY(535);
Width := ScaleX(799);
end;
with WizardForm.CancelButton do
begin
Left := ScaleX(708);
Top := ScaleY(543);
end;
with WizardForm.NextButton do
begin
Left := ScaleX(623);
Top := ScaleY(543);
end;
with WizardForm.BackButton do
begin
Left := ScaleX(543);
Top := ScaleY(543);
end;
with WizardForm.OuterNotebook do
begin
Width := ScaleX(799);
Height := ScaleY(535);
end;
with WizardForm.WizardBitmapImage do
begin
Width := ScaleX(798);
Height := ScaleY(538);
end;
with WizardForm.WelcomeLabel2 do
begin
Top := ScaleY(215);
Width := ScaleX(589);
Height := ScaleY(79);
end;
with WizardForm.WelcomeLabel1 do
begin
Top := ScaleY(160);
Width := ScaleX(589);
Height := ScaleY(31);
end;
with WizardForm.Bevel1 do
begin
Width := ScaleX(801);
end;
with WizardForm.InnerNotebook do
begin
Width := ScaleX(713);
Height := ScaleY(437);
end;
with WizardForm.LicenseNotAcceptedRadio do
begin
Left := ScaleX(8);
Top := ScaleY(416);
end;
with WizardForm.LicenseAcceptedRadio do
begin
Left := ScaleX(8);
Top := ScaleY(396);
end;
with WizardForm.LicenseMemo do
begin
Width := ScaleX(713);
Height := ScaleY(348);
end;
with WizardForm.PasswordEdit do
begin
Left := ScaleX(144);
Top := ScaleY(413);
Width := ScaleX(553);
end;
with WizardForm.PasswordEditLabel do
begin
Top := ScaleY(417);
Width := ScaleX(137);
end;
with WizardForm.InfoBeforeMemo do
begin
Top := ScaleY(16);
Width := ScaleX(713);
Height := ScaleY(421);
end;
with WizardForm.UserInfoSerialEdit do
begin
Left := ScaleX(16);
Top := ScaleY(232);
end;
with WizardForm.UserInfoSerialLabel do
begin
Left := ScaleX(16);
Top := ScaleY(216);
end;
with WizardForm.UserInfoOrgEdit do
begin
Left := ScaleX(16);
Top := ScaleY(180);
end;
with WizardForm.UserInfoOrgLabel do
begin
Left := ScaleX(16);
Top := ScaleY(164);
end;
with WizardForm.UserInfoNameEdit do
begin
Left := ScaleX(16);
Top := ScaleY(128);
end;
with WizardForm.UserInfoNameLabel do
begin
Left := ScaleX(16);
Top := ScaleY(112);
end;
with WizardForm.DiskSpaceLabel do
begin
Left := ScaleX(8);
Top := ScaleY(408);
end;
with WizardForm.DirBrowseButton do
begin
Left := ScaleX(630);
Top := ScaleY(378);
end;
with WizardForm.DirEdit do
begin
Left := ScaleX(8);
Top := ScaleY(380);
Width := ScaleX(620);
end;
with WizardForm.SelectDirBrowseLabel do
begin
Left := ScaleX(8);
Top := ScaleY(348);
Width := ScaleX(689);
end;
with WizardForm.ComponentsDiskSpaceLabel do
begin
Left := ScaleX(8);
Top := ScaleY(416);
end;
with WizardForm.ComponentsList do
begin
Width := ScaleX(713);
Height := ScaleY(352);
end;
with WizardForm.TypesCombo do
begin
Width := ScaleX(713);
end;
with WizardForm.NoIconsCheck do
begin
Left := ScaleX(8);
Top := ScaleY(407);
end;
with WizardForm.GroupBrowseButton do
begin
Left := ScaleX(630);
Top := ScaleY(378);
end;
with WizardForm.GroupEdit do
begin
Left := ScaleX(8);
Top := ScaleY(380);
Width := ScaleX(620);
end;
with WizardForm.SelectStartMenuFolderBrowseLabel do
begin
Left := ScaleX(8);
Top := ScaleY(348);
end;
with WizardForm.TasksList do
begin
Width := ScaleX(713);
Height := ScaleY(400);
OnClick := @TasksListClick;
end;
with WizardForm.ReadyMemo do
begin
Width := ScaleX(713);
Height := ScaleY(413);
end;
with WizardForm.FilenameLabel do
begin
Left := ScaleX(200);
Top := ScaleY(392);
Width := ScaleX(497);
end;
with WizardForm.StatusLabel do
begin
Left := ScaleX(8);
Top := ScaleY(392);
Width := ScaleX(169);
end;
with WizardForm.ProgressGauge do
begin
Left := ScaleX(8);
Top := ScaleY(410);
Width := ScaleX(697);
end;
with WizardForm.InfoAfterMemo do
begin
Width := ScaleX(713);
Height := ScaleY(413);
end;
with WizardForm.MainPanel do
begin
Width := ScaleX(801);
end;
with WizardForm.WizardSmallBitmapImage do
begin
Left := ScaleX(744);
Top := ScaleY(0);
end;
with WizardForm.PageDescriptionLabel do
begin
Width := ScaleX(701);
end;
with WizardForm.WizardBitmapImage2 do
begin
Width := ScaleX(798);
Height := ScaleY(538);
end;
with WizardForm.RunList do
begin
Top := ScaleY(414);
Width := ScaleX(613);
Height := ScaleY(60);
end;
with WizardForm.NoRadio do
begin
Top := ScaleY(444);
end;
with WizardForm.YesRadio do
begin
Top := ScaleY(422);
end;
with WizardForm.FinishedLabel do
begin
Left := ScaleX(168);
Top := ScaleY(319);
Width := ScaleX(621);
end;
with WizardForm.FinishedHeadingLabel do
begin
Left := ScaleX(168);
Top := ScaleY(272);
Width := ScaleX(621);
Height := ScaleY(39);
end;
end;
procedure TasksListClick(Sender: TObject);
begin
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
end;
Цитата detiedyatosla:
и в него вставить картинку на все страницы »
|
Вот пример из справки:
читать дальше »
Код:
[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Name]
Name: rus; MessagesFile: compiler:Languages\Russian.isl
[Files]
Source: compiler:Examples\MyProg.exe; DestDir: {app}; Flags : ignoreversion
[Run]
FileName: {app}\MyProg.exe; Description: Запустить My Program?; Flags: postinstall nowait skipifsilent
[Icons]
Name: "{group}\{cm:UninstallProgram,My Program}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{cm:UninstallProgram,My Program}"; Filename: "{uninstallexe}"; Tasks: desktopicon
[ Code]
var
pnl: TPanel;
///////////////////////WelcomePage//////////////////////////////////////
procedure WelcomePage;
begin
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm. WelcomeLabel1.AutoSize;
SetBounds(WizardForm.WelcomeLabel1.Left,WizardForm.WelcomeLabel1.Top,
WizardForm.WelcomeLabel1.Width,WizardForm.WelcomeLabel1.Height);
WordWrap:= WizardForm.WelcomeLabel1.WordWrap;
Caption:= WizardForm.WelcomeLabel1.Caption;
with Font do
begin
Color:= WizardForm.WelcomeLabel1.Font.Color;
Style:= WizardForm.WelcomeLabel1.Font.Style;
Name:= WizardForm.WelcomeLabel1.Font.Name;
Size:= WizardForm.WelcomeLabel1.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.WelcomeLabel2.AutoSize;
SetBounds(WizardForm.WelcomeLabel2.Left,WizardForm.WelcomeLabel2.Top,
WizardForm.WelcomeLabel2.Width,WizardForm.WelcomeLabel2.Height);
WordWrap:= WizardForm.WelcomeLabel2.WordWrap;
Caption:= WizardForm.WelcomeLabel2.Caption;
with Font do
begin
Color:= WizardForm.WelcomeLabel2.Font.Color;
Style:= WizardForm.WelcomeLabel2.Font.Style;
Name:= WizardForm.WelcomeLabel2.Font.Name;
Size:= WizardForm.WelcomeLabel2.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
///////////////////////SelectDirPage//////////////////////////////////////
procedure SelectDirPage;
begin
with WizardForm do
begin
with DirEdit do
begin
Left:= 40;
Top:= 137;
Parent:= pnl;
end;
with DirBrowseButton do
begin
Left:= WizardForm.DirEdit.Left + WizardForm.DirEdit.Width + 10;
Top:= WizardForm.DirEdit.Top - 1;
Parent:= pnl;
end;
with SelectDirBitmapImage do
begin
Left:= WizardForm.DirEdit.Left;
Top:= WizardForm.DirEdit.Top - 62;
Stretch:= True;
Parent:= pnl;
end;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.SelectDirBrowseLabel.AutoSize;
SetBounds(WizardForm.DirEdit.Left,WizardForm.DirEdit.Top - 30,
WizardForm.SelectDirBrowseLabel.Width, WizardForm.SelectDirBrowseLabel.Height);
WordWrap:= WizardForm.SelectDirBrowseLabel.WordWrap;
Caption:= WizardForm.SelectDirBrowseLabel.Caption;
with Font do
begin
Color:= WizardForm.SelectDirBrowseLabel.Font.Color;
Style:= WizardForm.SelectDirBrowseLabel.Font.Style;
Name:= WizardForm. SelectDirBrowseLabel.Font.Name;
Size:= WizardForm.SelectDirBrowseLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.SelectDirLabel.AutoSize;
SetBounds(WizardForm.SelectDirBitmapImage.Left + 50,WizardForm.SelectDirBitmapImage.Top + 10,
WizardForm.SelectDirLabel.Width,WizardForm.SelectDirLabel.Height);
WordWrap:= WizardForm.SelectDirLabel.WordWrap;
Caption:= WizardForm.SelectDirLabel.Caption;
with Font do
begin
Color:= WizardForm.SelectDirLabel.Font.Color;
Style:= WizardForm.SelectDirLabel.Font.Style;
Name:= WizardForm.SelectDirLabel.Font.Name;
Size:= WizardForm.SelectDirLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.DiskSpaceLabel.AutoSize;
SetBounds(WizardForm.DirEdit.Left,WizardForm.Bevel.Top - 25,
WizardForm.DiskSpaceLabel.Width,WizardForm.DiskSpaceLabel.Height);
WordWrap:= WizardForm.DiskSpaceLabel.WordWrap;
Caption:= WizardForm.DiskSpaceLabel.Caption;
with Font do
begin
Color:= WizardForm.DiskSpaceLabel.Font.Color;
Style:= WizardForm.DiskSpaceLabel.Font.Style;
Name:= WizardForm.DiskSpaceLabel.Font.Name;
Size:= WizardForm.DiskSpaceLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
///////////////////////ReadyPage/////////////////////////////////
procedure ReadyPage;
var
ready_str: string;
begin
ready_str:= WizardForm.ReadyMemo.Text;
with TLabel.Create(pnl) do
begin
SetBounds(45,115,WizardForm.ReadyMemo.Width, WizardForm.ReadyMemo.Height);
Caption:= ready_str;
with Font do
begin
Color:= WizardForm.ReadyLabel.Font.Color;
Style:= WizardForm.ReadyLabel.Font.Style;
Name:= WizardForm.ReadyLabel.Font.Name;
Size:= WizardForm.ReadyLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TBevel.Create(WizardForm) do
begin
SetBounds(40,110, WizardForm.ReadyMemo.Width, WizardForm.ReadyMemo.Height);
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.ReadyLabel.AutoSize;
SetBounds(40,70, WizardForm.ReadyLabel.Width, WizardForm.ReadyLabel.Height);
WordWrap:= WizardForm.ReadyLabel.WordWrap;
Caption:= WizardForm.ReadyLabel.Caption;
with Font do
begin
Color:= WizardForm.ReadyLabel.Font.Color;
Style:= WizardForm.ReadyLabel.Font.Style;
Name:= WizardForm.ReadyLabel.Font.Name;
Size:= WizardForm.ReadyLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
///////////////////////InstallingPage////////////////////////////
procedure InstallingPage;
begin
with WizardForm.ProgressGauge do
begin
Left:= 40;
Top:= 115;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.FileNameLabel.AutoSize;
SetBounds(WizardForm.ProgressGauge.Left,WizardForm.ProgressGauge.Top-20,
WizardForm.FileNameLabel.Width,WizardForm.FileNameLabel.Height);
WordWrap:= WizardForm.FileNameLabel.WordWrap;
Caption:= WizardForm.FileNameLabel.Caption;
with Font do
begin
Color:= WizardForm.FileNameLabel.Font.Color;
Style:= WizardForm.FileNameLabel.Font.Style;
Name:= WizardForm.FileNameLabel.Font.Name;
Size:= WizardForm.FileNameLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.StatusLabel.AutoSize;
SetBounds(WizardForm.StatusLabel.Left,WizardForm.StatusLabel.Top,
WizardForm.StatusLabel.Width,WizardForm.StatusLabel.Height);
WordWrap:= WizardForm.StatusLabel.WordWrap;
Caption:= WizardForm.StatusLabel.Caption;
with Font do
begin
Color:= WizardForm.StatusLabel.Font.Color;
Style:= WizardForm.StatusLabel.Font.Style;
Name:= WizardForm.StatusLabel.Font.Name;
Size:= WizardForm.StatusLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
///////////////////////FinishedPage//////////////////////////////
var
CheckBox: array of TNewCheckBox;
procedure CheckBoxClick( Sender: TObject);
begin
if TNewCheckBox(Sender).Checked then
WizardForm.RunList.Checked[TNewCheckBox(Sender).Tag]:= True
else WizardForm.RunList.Checked[TNewCheckBox(Sender).Tag]:= False;
end;
procedure LabelClick(Sender:TObject);
begin
if CheckBox[TLabel(Sender).Tag].Checked then
begin
WizardForm.RunList.Checked[TLabel(Sender).Tag]:= False;
CheckBox[TLabel( Sender).Tag].Checked:= False;
end
else
begin
WizardForm.RunList.Checked[TLabel( Sender).Tag]:= True;
CheckBox[TLabel(Sender).Tag].Checked:= True;
end;
end;
procedure HideRunList(Control: TWinControl);
var
i, t: Integer;
str: string;
begin
if WizardForm.RunList.Items.Count > 0 then
begin
WizardForm.RunList.Hide;
SetArrayLength(CheckBox, SizeOf(WizardForm.RunList.Items.Count));
for i:= 0 to WizardForm.RunList.Items.Count-1 do
begin
CheckBox[i]:= TNewCheckBox.Create(Control);
with CheckBox[i] do
begin
SetBounds(ScaleX(WizardForm.RunList.Left+2),ScaleY(WizardForm.RunList.Top+2+t),14,14);
Tag:= i;
Checked:= WizardForm.RunList.Checked[i];
Caption:= WizardForm.RunList.Items.Strings[i];
OnClick:= @CheckBoxClick;
Color:= clWhite;
Parent:= Control;
end;
str:= WizardForm.RunList.Items.Strings[i];
with TLabel.Create(WizardForm) do
begin
SetBounds(ScaleX(WizardForm.RunList.Left+20),ScaleY(WizardForm.RunList.Top+2+t),
WizardForm.RunList.Width,14);
Caption:= str;
Tag:= i;
OnClick:= @LabelClick;
Transparent:= True;
Parent:= Control;
end;
t:= t + 20;
end;
end;
end;
procedure FinishedPage;
begin
HideRunList(pnl);
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.FinishedHeadingLabel.AutoSize;
SetBounds(WizardForm.FinishedHeadingLabel.Left,WizardForm.FinishedHeadingLabel.Top,
WizardForm.FinishedHeadingLabel.Width,WizardForm.FinishedHeadingLabel.Height);
WordWrap:= WizardForm.FinishedHeadingLabel.WordWrap;
Caption:= WizardForm.FinishedHeadingLabel.Caption;
with Font do
begin
Color:= WizardForm.FinishedHeadingLabel.Font.Color;
Style:= WizardForm.FinishedHeadingLabel.Font.Style;
Name:= WizardForm.FinishedHeadingLabel.Font.Name;
Size:= WizardForm.FinishedHeadingLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.FinishedLabel.AutoSize;
SetBounds(WizardForm.FinishedLabel.Left,WizardForm.FinishedLabel.Top,
WizardForm.FinishedLabel.Width,WizardForm.FinishedLabel.Height);
WordWrap:= WizardForm.FinishedLabel.WordWrap;
Caption:= WizardForm.FinishedLabel.Caption;
with Font do
begin
Color:= WizardForm.FinishedLabel.Font.Color;
Style:= WizardForm.FinishedLabel.Font.Style;
Name:= WizardForm.FinishedLabel.Font.Name;
Size:= WizardForm.FinishedLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
procedure CurPageChanged(CurPageID: Integer);
begin
pnl:= TPanel.Create(WizardForm);
with pnl do
begin
Align:= alClient;
Parent:= WizardForm;
end;
with WizardForm do
begin
with WizardBitmapImage do
begin
Align:= alClient;
Stretch:= True;
Parent:= pnl;
end;
NextButton.Parent:= pnl;
CancelButton.Parent:= pnl;
BackButton.Parent:= pnl ;
Bevel.Parent:= pnl;
pnl.Repaint;
end;
if (CurPageID > wpWelcome) and (CurPageID < wpFinished) then
begin
WizardForm.Bevel1.Parent:= pnl;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.PageNameLabel.AutoSize;
SetBounds(WizardForm.PageNameLabel.Left,WizardForm.PageNameLabel.Top,
WizardForm.PageNameLabel.Width,WizardForm.PageNameLabel.Height);
Caption:= WizardForm.PageNameLabel.Caption;
with Font do
begin
Color:= WizardForm.PageNameLabel.Font.Color;
Style:= WizardForm.PageNameLabel.Font.Style;
Name:= WizardForm.PageNameLabel.Font.Name;
Size:= WizardForm.PageNameLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.PageNameLabel.AutoSize;
SetBounds(WizardForm.PageNameLabel.Left,WizardForm.PageNameLabel.Top,
WizardForm.PageNameLabel.Width,WizardForm.PageNameLabel.Height);
Caption:= WizardForm.PageNameLabel.Caption;
with Font do
begin
Color:= WizardForm.PageNameLabel.Font.Color;
Style:= WizardForm.PageNameLabel.Font.Style;
Name:= WizardForm.PageNameLabel.Font.Name;
Size:= WizardForm.PageNameLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
if CurPageID = wpWelcome then WelcomePage;
if CurPageID = wpSelectDir then SelectDirPage;
if CurPageID = wpReady then ReadyPage;
if CurPageID = wpInstalling then InstallingPage;
if CurPageID = wpFinished then FinishedPage;
end;
detiedyatosla, В то время Лександер уже давно любезно предоставил мануал по совмещению скриптов, т.е я думаю тебе этого бы хватило, чтоб хотя бы чуть чуть разобраться.
|