Цитата yamaha:
Подскажите как сделать слайд шоу? »
|
Либо так:
читать дальше »
[Setup]
WindowVisible=yes
WindowResizable=no
WindowShowCaption=no
[Files]
Source: C:\isxbb.dll; DestDir: {tmp}; Flags: dontcopy
Source: C:\1.jpg; DestDir: {tmp}; Flags: dontcopy
//////////файлы для слайд-шоу//////////
Source: C:\2.jpg; DestDir: {tmp}; Flags: dontcopy
Source: C:\3.jpg; DestDir: {tmp}; Flags: dontcopy
Source: C:\4.jpg; DestDir: {tmp}; Flags: dontcopy
[code]
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';
procedure InitializeWizard();
begin
ExtractTemporaryFile('1.jpg');
isxbb_AddImage(ExpandConstant('{tmp}')+'\1.jpg',BACKGROUND);
isxbb_Init(StrToInt(ExpandConstant('{hwnd}')));
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
///////В начале этапа установки запускаем слайд-шоу
if CurStep=ssInstall
then
begin
ExtractTemporaryFile('2.jpg');
ExtractTemporaryFile('3.jpg');
ExtractTemporaryFile('4.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_Init(StrToInt(ExpandConstant('{hwnd}')));
///////Таймер показа изображений, в секундах
isxbb_StartTimer(3,BACKGROUND)
end;
///////На завершающем этапе останавливаем таймер, при этом возвращается фоновое изображение по умолчанию
else if CurStep=ssPostInstall then
isxbb_KillTimer(BACKGROUND);
end;
Либо так:
читать дальше »
[Setup]
WindowVisible=no
[Files]
Source: " D:\GAME\* "; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
///////Oпределяем файлы, перед установкой которых будет выполнена процедура смены изображения
Source: "D:\GAME\MOVIES\Intro.bik"; DestDir: "{app}\MOVIES"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: bbrd1;
Source: "D:\GAME\SOUNDS\Effects.pak"; DestDir: "{app}\SOUNDS"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: bbrd2;
Source: "D:\GAME\Core.dll"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: bbrd3;
Source: "D:\GAME\TEXTURES\Models.pak"; DestDir: "{app}\TEXTURES"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: bbrd4;
///////Указываем основное фоновое и дополнительные изображения, показ которых будет выполнен через процедуры.
Source: C:\Background.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\bbrd1.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\bbrd2.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\bbrd3.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\bbrd4.bmp; DestDir: {tmp}; Flags: dontcopy
[code]
function GetSystemMetrics(nIndex:Integer):Integer;
external 'GetSystemMetrics@user32.dll stdcall';
var
BackgroundBitmapImage: TBitmapImage;
s:string;
width, height: Integer;
///////Процедура для показа основного фонового изображения
procedure wizimage;
begin
WizardForm.Position:=poScreenCenter;
MainForm.BORDERSTYLE:=bsNone;
width:=GetSystemMetrics(0);
height:=GetSystemMetrics(1);
MainForm.Width:=width;
MainForm.Height:=height;
width:=MainForm.ClientWidth;
height:=MainForm.ClientHeight;
MainForm.Left := 0;
MainForm.Top := 0;
s:=ExpandConstant('{tmp}')+'\Background.bmp';
BackgroundBitmapImage := TBitmapImage.Create(MainForm);
BackgroundBitmapImage.Bitmap.LoadFromFile(s);
BackgroundBitmapImage.Align := alClient;
BackgroundBitmapImage.Parent := MainForm;
BackgroundBitmapImage.Stretch:=True;
MainForm.Visible:=True;
end;
procedure InitializeWizard();
begin
ExtractTemporaryFile('Background.bmp');
///////Выполнение процедуры показа фонового изображения
wizimage;
end;
///////Размеры и параметры дополнительных изображений
procedure ImgSetting;
begin
MainForm.BORDERSTYLE:=bsNone;
MainForm.Width:=width;
MainForm.Height:=height;
width:=MainForm.ClientWidth;
height:=MainForm.ClientHeight;
MainForm.Left := 0;
MainForm.Top := 0;
BackgroundBitmapImage := TBitmapImage.Create(MainForm);
BackgroundBitmapImage.Bitmap.LoadFromFile(s);
BackgroundBitmapImage.Align := alClient;
BackgroundBitmapImage.AutoSize := False;
BackgroundBitmapImage.Parent := MainForm;
BackgroundBitmapImage.Stretch:= False;
MainForm.Visible:=True;
end;
///////Процедуры показа изображений
procedure bbrd1;
begin
ExtractTemporaryFile('bbrd1.bmp');
s:=ExpandConstant('{tmp}')+'\bbrd1.bmp';
///////Вставляем вышеуказанную процедуру
ImgSetting;
end;
procedure bbrd2;
begin
ExtractTemporaryFile('bbrd2.bmp');
s:=ExpandConstant('{tmp}')+'\bbrd2.bmp';
ImgSetting;
end;
procedure bbrd3;
begin
ExtractTemporaryFile('bbrd3.bmp');
s:=ExpandConstant('{tmp}')+'\bbrd3.bmp';
ImgSetting;
end;
procedure bbrd4;
begin
ExtractTemporaryFile('bbrd4.bmp');
s:=ExpandConstant('{tmp}')+'\bbrd4.bmp';
ImgSetting;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpInstalling
then
begin
WizardForm.CancelButton.BringToFront;
WizardForm.MainPanel.Visible:=False;
WizardForm.Bevel1.Visible:=False;
WizardForm.Width:=ScaleX(395);
WizardForm.Height:=ScaleY(142);
WizardForm.Left:=ScaleX(MainForm.Width-420);
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);
end
if CurPageID=wpFinished
then
begin
WizardForm.Width:=502;
WizardForm.Height:=392;
WizardForm.Position:=poScreenCenter;
///////Вставляем процедуру для показа первоначально фонового изображения
wizimage;
end
end;
P.S.: советую скачать
Коллекцию скриптов (в шапке этой темы).