[Setup]
AppName=My Program
AppVerName=My Program version 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
Compression=lzma
[Languages]
Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl"
[Files]
Source: isSlideShow.dll; DestDir: {tmp}; Flags: dontcopy
Source: InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy
Source: Slides\*; DestDir: {tmp}; Flags: dontcopy
Source: {win}\help\*; DestDir: {app}\1; Flags: external recursesubdirs
Source: {win}\help\*; DestDir: {app}\2; Flags: external recursesubdirs
Source: {win}\help\*; DestDir: {app}\3; Flags: external recursesubdirs
Source: {win}\help\*; DestDir: {app}\4; Flags: external recursesubdirs
[Icons]
Name: "{group}\Удалить"; IconFilename: "{app}\unins000.exe"; Filename: "{app}\unins000.exe"
[_Code]
type
TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord);
var
TimerID: LongWord;
CurrentPicture:integer;
PicList: TStringlist;
BackgroundForm: TForm;
function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
function GetSystemMetrics(nIndex:Integer):Integer; external 'GetSystemMetrics@user32.dll stdcall';
procedure InitializeSlideShow(Hwnd:Thandle; l,t,w,h:integer;Animate:boolean; Stretch:integer); external 'InitializeSlideShow@files:isslideshow.dll stdcall';
procedure DeinitializeSlideShow; external 'DeinitializeSlideShow@files:isslideshow.dll stdcall';
procedure ShowImage(ipath:PAnsiChar; Effect:integer); external 'ShowImage@files:isslideshow.dll stdcall';
procedure InitializeWizard();
begin
BackgroundForm:= TForm.Create(nil);
BackgroundForm.BorderStyle:= bsNone;
BackgroundForm.Color:=clBlack;
BackgroundForm.SetBounds(0, 0, GetSystemMetrics(0), GetSystemMetrics(1))
BackgroundForm.Visible:=True;
BackgroundForm.enabled:= false;
PicList:=tstringlist.Create;
ExtractTemporaryFile('Back.jpg');
ExtractTemporaryFile('1.bmp');
ExtractTemporaryFile('2.bmp');
ExtractTemporaryFile('3.jpg');
ExtractTemporaryFile('4.jpg');
ExtractTemporaryFile('5.png');
ExtractTemporaryFile('6.png');
piclist.add(ExpandConstant('{tmp}') + '\1.bmp');
piclist.add(ExpandConstant('{tmp}') + '\2.bmp');
piclist.add(ExpandConstant('{tmp}') + '\3.jpg');
piclist.add(ExpandConstant('{tmp}') + '\4.jpg');
piclist.add(ExpandConstant('{tmp}') + '\5.png');
piclist.add(ExpandConstant('{tmp}') + '\6.png');
BackgroundForm.show;
InitializeSlideShow(BackgroundForm.Handle, 0, 0, GetSystemMetrics(0), GetSystemMetrics(1), true, 1);
ShowImage(ExpandConstant('{tmp}') + '\Back.jpg', 1);
end;
procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
begin
CurrentPicture:=CurrentPicture+1;
if CurrentPicture=piclist.count+1 then CurrentPicture:=1;
ShowImage(piclist.strings[CurrentPicture - 1], 1);
end;
procedure CurPageChanged(CurPageID: Integer);
begin
If CurPageID=wpInstalling then
begin
CurrentPicture:=1;
with WizardForm do
begin
hide;
MainPanel.Visible:=False;
Bevel1.Visible:=False;
setbounds(ScaleX(GetSystemMetrics(0)-420), ScaleY(GetSystemMetrics(1)-167), ScaleX(395), ScaleY(142));
InnerNotebook.setbounds(ScaleX(10), ScaleY(10), ScaleX(370), InnerNotebook.height);
StatusLabel.setbounds(ScaleX(0), ScaleY(0), InnerNotebook.Width, StatusLabel.height);
FileNameLabel.setbounds(ScaleX(0), ScaleY(20), InnerNotebook.Width, FileNameLabel.height);
ProgressGauge.Top:=ScaleY(40);
ProgressGauge.Width:=InnerNotebook.Width;
CancelButton.Left:=ScaleX(154);
CancelButton.Top:=ScaleY(80);
CancelButton.bringtofront;
show;
end;
TimerID:=SetTimer(0, 0, 3000{как бэ время показа слайда}, WrapTimerProc(@OnTimer, 4));
end;
if CurPageID=wpFinished then
begin
WizardForm.Visible:=False;
WizardForm.setbounds((GetSystemMetrics(0)-WizardForm.Width) div 2, (GetSystemMetrics(1)-WizardForm.Height) div 2, ScaleX(502), ScaleY(392));
WizardForm.Visible:=True;
KillTimer(0, TimerID);
showimage(ExpandConstant('{tmp}') + '\Back.jpg', 1)
end;
end;
procedure DeinitializeSetup();
begin
DeinitializeSlideShow;
KillTimer(0, TimerID);
end;