Qarma Цитата: Это было бы здорово
Оказывается можно) Только надо поправить)
Осталось еще лейблы заперентить. Тока непонятно, кто перент? И как флешу растянуть на WizardForm?
[more]
[Setup]
AppName=My Program
AppVerName=My Program version 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
Compression=zip
[Languages]
Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl"
[Files]
Source: compiler:examples\MyProg.exe; DestDir: "{app}"
Source: isFlash.dll; DestDir: {tmp}; Flags: dontcopy
Source: 1.swf; DestDir: {tmp}; Flags: dontcopy
[Icons]
Name: "{group}\Óäàëèòü"; IconFilename: "{app}\unins000.exe"; Filename: "{app}\unins000.exe"
[Code]
var
WelcomeLabel1,WelcomeLabel2,PageNameLabel,PageDescriptionLabel,SelectDirLabel,SelectDirBrowseLabel,
DiskSpaceLabel,StatusLabel,BeveledLabel: TLabel;
function GetSystemMetrics(nIndex:Integer):Integer; external 'GetSystemMetrics@user32.dll stdcall';
procedure initialize(hwnd:thandle; l,t,w,h:integer;BGColor:Tcolor;transparent:boolean); external 'initialize@files:isFlash.dll stdcall';
procedure ShowFlash(Fpath:pchar); external 'ShowFlash@files:isFlash.dll stdcall';
procedure destroy; external 'destroy@files:isFlash.dll stdcall';
Procedure HideAll();
begin
WizardForm.Bevel.Hide
WizardForm.Bevel1.Hide
WizardForm.MainPanel.Hide
WizardForm.BeveledLabel.Hide
WizardForm.OuterNotebook.Hide
WizardForm.InnerNotebook.Hide
WelcomeLabel1.Hide
WelcomeLabel2.Hide
SelectDirLabel.Hide
SelectDirBrowseLabel.Hide
WizardForm.DirEdit.Hide
WizardForm.DirBrowseButton.Hide
DiskSpaceLabel.Hide
StatusLabel.Hide
WizardForm.ProgressGauge.Hide
end;
Procedure InitializeSkin();
begin
WizardForm.ClientWidth:=497
WizardForm.ClientHeight:=361
WizardForm.BorderStyle := bsDialog;
WizardForm.Font.Color:=$ffffff
WizardForm.Center
WelcomeLabel1:=TLabel.Create(WizardForm);
WelcomeLabel1.Left:=ScaleX(150);
WelcomeLabel1.Top := ScaleY(15);
WelcomeLabel1.Width := ScaleX(320);
WelcomeLabel1.Height := ScaleY(75);
WelcomeLabel1.AutoSize := False;
WelcomeLabel1.WordWrap := True;
WelcomeLabel1.Font.Color := clwhite;
// WelcomeLabel1.Font.Style := [fsBold];
// WelcomeLabel1.Font.Name:='MS Sans Serif';
WelcomeLabel1.Font.Size := 14;
WelcomeLabel1.Transparent := True;
WelcomeLabel1.Parent := WizardForm;
WelcomeLabel2:=TLabel.Create(WizardForm);
WelcomeLabel2.Left := ScaleX(150);
WelcomeLabel2.Top := ScaleY(90);
WelcomeLabel2.Width := ScaleX(320);
WelcomeLabel2.Height := ScaleY(200);
WelcomeLabel2.AutoSize := False;
WelcomeLabel2.WordWrap := True;
WelcomeLabel2.Font.Color := clwhite;
WelcomeLabel2.Font.Size := 8;
WelcomeLabel2.Transparent := True;
WelcomeLabel2.Parent := WizardForm;
PageNameLabel := TLabel.Create(WizardForm);
PageNameLabel.Left := ScaleX(25);
PageNameLabel.Top := ScaleY(10);
PageNameLabel.Width := ScaleX(300);
PageNameLabel.Height := ScaleY(14);
PageNameLabel.AutoSize := False;
PageNameLabel.WordWrap := True;
PageNameLabel.Font.Color := clwhite;
PageNameLabel.Font.Style := [fsBold];
PageNameLabel.Transparent := True;
PageNameLabel.Parent := WizardForm;
PageDescriptionLabel := TLabel.Create(WizardForm);
PageDescriptionLabel.Left := ScaleX(40);
PageDescriptionLabel.Top := ScaleY(25);
PageDescriptionLabel.Width := ScaleX(475);
PageDescriptionLabel.Height := ScaleY(30);
PageDescriptionLabel.AutoSize := False;
PageDescriptionLabel.WordWrap := True;
PageDescriptionLabel.Font.Color := clwhite;
PageDescriptionLabel.Transparent := True;
PageDescriptionLabel.Parent := WizardForm;
BeveledLabel:=TLabel.Create(WizardForm)
BeveledLabel.Left:=30
BeveledLabel.Top:=340
BeveledLabel.Font.Color:=clwhite
BeveledLabel.Font.Style := [fsBold]
BeveledLabel.Transparent:=True
BeveledLabel.Parent:=WizardForm
WizardForm.BeveledLabel.Left:=80
// wpSelectDir
SelectDirLabel:=TLabel.Create(WizardForm)
SelectDirLabel.Left:=150
SelectDirLabel.Top:=80
SelectDirLabel.Width:=320
SelectDirLabel.Height:=28
SelectDirLabel.AutoSize:=False
SelectDirLabel.WordWrap:=True
SelectDirLabel.Font.Color := clwhite
SelectDirLabel.Font.Name:='Tahoma'
SelectDirLabel.Font.Size:=8
SelectDirLabel.Font.Style := [fsBold]
SelectDirLabel.Transparent:=True
SelectDirLabel.Parent:=WizardForm
SelectDirBrowseLabel:=TLabel.Create(WizardForm)
SelectDirBrowseLabel.Left:=150
SelectDirBrowseLabel.Top:=120
SelectDirBrowseLabel.Width:=320
SelectDirBrowseLabel.Height:=28
SelectDirBrowseLabel.AutoSize:=False
SelectDirBrowseLabel.WordWrap:=True
SelectDirBrowseLabel.Font.Color := clwhite
SelectDirBrowseLabel.Transparent:=True
SelectDirBrowseLabel.Parent:=WizardForm
WizardForm.DirEdit.Left:=150
WizardForm.DirEdit.Top:=205
WizardForm.DirEdit.Width:=240
WizardForm.DirEdit.Height:=24
WizardForm.DirEdit.Color:=$000000
WizardForm.DirEdit.Font.Color:=$ffffff
WizardForm.DirEdit.Parent:= WizardForm
WizardForm.DirBrowseButton.Left:=400
WizardForm.DirBrowseButton.Top:=202
WizardForm.DirBrowseButton.Width:=73
WizardForm.DirBrowseButton.Height:=27
WizardForm.DirBrowseButton.Parent:= WizardForm
DiskSpaceLabel:=TLabel.Create(WizardForm)
DiskSpaceLabel.Left:=150
DiskSpaceLabel.Top:=250
DiskSpaceLabel.Width:=320
DiskSpaceLabel.Height:=28
DiskSpaceLabel.AutoSize:=False
DiskSpaceLabel.WordWrap:=True
DiskSpaceLabel.Font.Color := clwhite
DiskSpaceLabel.Transparent:=True
DiskSpaceLabel.Parent:=WizardForm
// wpInstalling
StatusLabel:=TLabel.Create(WizardForm)
StatusLabel.Left:=205
StatusLabel.Top:=90
StatusLabel.Font.Color := clWindow
StatusLabel.Transparent:=True
StatusLabel.Caption:=WizardForm.Caption +'...'
//StatusLabel.Caption:=WizardForm.StatusLabel.Caption
StatusLabel.Parent:=WizardForm
WizardForm.ProgressGauge.Left:=50
WizardForm.ProgressGauge.Top:=200
WizardForm.ProgressGauge.Width:=400
WizardForm.ProgressGauge.Height:=20
WizardForm.ProgressGauge.Parent:= WizardForm
end;
Procedure ShowPageComponents(CurPageID: Integer);
begin
BeveledLabel.Caption:=WizardForm.BeveledLabel.Caption
WelcomeLabel1.Caption:=WizardForm.WelcomeLabel1.Caption
WelcomeLabel2.Caption:=WizardForm.WelcomeLabel2.Caption
PageNameLabel.Caption:=WizardForm.PageNameLabel.Caption
PageDescriptionLabel.Caption:=WizardForm.PageDescriptionLabel.Caption
SelectDirLabel.Caption:=WizardForm.SelectDirLabel.Caption
SelectDirBrowseLabel.Caption:=WizardForm.SelectDirBrowseLabel.Caption
DiskSpaceLabel.Caption:=WizardForm.DiskSpaceLabel.Caption
StatusLabel.Caption:=WizardForm.StatusLabel.Caption
Case CurPageID of
wpWelcome:
begin
WelcomeLabel1.Show
WelcomeLabel2.Show
end
wpSelectDir:
begin
SelectDirLabel.Show
SelectDirBrowseLabel.Show
WizardForm.DirEdit.Show
WizardForm.DirBrowseButton.Show
DiskSpaceLabel.Show
end
wpInstalling:
begin
StatusLabel.Show
WizardForm.ProgressGauge.Show
end
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
HideAll
ShowPageComponents(CurPageID)
end;
Procedure InitializeWizard();
begin
InitializeSkin
WizardForm.Position:=poScreenCenter;
WizardForm.CancelButton.BringToFront;
//MainForm.BORDERSTYLE:=bsNone
WizardForm.Left:=0
WizardForm.Top:=0
//WizardForm.Width:=497
//WizardForm.Height:=361
ExtractTemporaryFile('1.swf')
initialize(WizardForm.handle,WizardForm.Left,WizardForm.top,WizardForm.Width,WizardForm.Height,clblack,true);
ShowFlash(ExpandConstant('{tmp}') + '\1.swf');
end;
procedure DeinitializeSetup();
begin
destroy;
end;
[/more] может есть другой способ?
Супер, пока устанавливается что-то здоровое, можно во флеш игру рубится: [more]
[/more]