Проблема Не могу разобраться со слайдами

frontlines45

Новичок
Приветствую многоуважаемые. Такая проблемка: в скрипте вставил коды, для воспроизведения слайдов при установки игры, но, что то не так идет
 

Вложения

  • Снимок экрана (83).png
    Снимок экрана (83).png
    585 KB · Просмотры: 8
Код:
#ifdef ANSI
  #define A "W"
#else
  #define A "A"
#endif

#define Font "OpenSans-Regular.ttf"
#define FontName "Open Sans"

#define Font2 "OpenSans-Semibold.ttf"
#define FontName2 "Open Sans Semibold"

#define NeedInstallSize 608
#define NeedMem 512

// '#39' = '  // '#45' = - //

#define AppName       "Hitman2'#39'Silent '#45' Assassin 2"
#define AppName2      "Hitman 2 Silent Assassin"
#define MyAppExe      "hitman2.exe"
#define MyAppIcon     "hitman2.exe"

;#define Password      ""            ;пароль на архив
#define MyInfoVer     "1.01"         ;версия инсталлятора
#define AppVer        "1.1.1.271"     ;версия игры
#define ApRePack      "RePack by The Crow"     ;релиз

#define SecondProgressBar

;#define records

#define Slides

#define facompress

;#define Redist

[Setup]
AppName={#AppName2}
AppVersion={#AppVer}

VersionInfoDescription=Installer {#AppName2}
VersionInfoProductName=RePack {#AppName2}
AppCopyright={#ApRePack}
VersionInfoVersion={#MyInfoVer}

DefaultDirName={pf}\{#AppName2}
DefaultGroupName={#AppName2}

SetupIconFile=InstallFiles\inicon.ico
UninstallIconFile=InstallFiles\unicon.ico

RawDataResource=font:InstallFiles\{#Font} | font2:InstallFiles\{#Font2}

InternalCompressLevel=ultra64
Compression=lzma2/ultra64
SolidCompression=true

//DiskSpanning=yes
//DiskSliceSize=52000000

DisableReadyPage=true
DisableProgramGroupPage=true
ShowComponentSizes=false

[UninstallDelete]
Type: filesandordirs; Name: {app}

[Files]
Source: InstallFiles\*; DestDir: {tmp}; Flags: dontcopy noencryption
#ifdef Redist
Source: Redist\*; DestDir: "{tmp}\Redist"; MinVersion: 0.0,5.0; Flags: ignoreversion
#endif
Source: Include\Russian.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy

#ifdef Slides
Source: InstallFiles\Slides\isSlideShow.dll; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\01.jpg; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\02.jpg; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\03.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\04.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\05.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\06.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\07.jpg; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\08.jpg; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\09.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\10.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\11.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\12.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\13.jpg; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\14.jpg; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\15.jpg;  DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\Slides\InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef records
Source: Include\records.inf; DestDir: {tmp}; Flags: dontcopy
#endif

[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"

#include "Modules\CustomMessages.iss"

[Icons]
Name: "{group}\{#AppName2}"; Filename: "{app}\{#MyAppExe}"; IconFilename: {app}\{#MyAppIcon}; Check: groupicon and CheckError
Name: "{group}\Удалить {#AppName2}"; Filename: {uninstallexe}; Check: groupicon and CheckError
Name: "{userdesktop}\{#AppName2}"; Filename: "{app}\{#MyAppExe}"; IconFilename: {app}\{#MyAppIcon}; Check: desktopicon and CheckError
Name: "{userappdata}\RePack by The Crow\{#AppName2}"; Filename: "{app}\{#MyAppExe}"; IconFilename: {app}\{#MyAppIcon}; Check: quicklaunchicon and CheckError

#ifdef Redist
[Run]                         
Filename: {tmp}\Output\\Redist\dxwebsetup.exe; Parameters: /q; WorkingDir: {tmp}\Redist\; Check: DirectXCheck and CheckError
Filename: {tmp}\Output\\Redist\VC_redist.x86.exe; Parameters: /S /I; WorkingDir: {tmp}\Redist\; Check: not IsWin64 and VCRedistCheck and CheckError
Filename: {tmp}\Output\\Redist\VC_redist.x64.exe; Parameters: /S /I; WorkingDir: {tmp}\Redist\; Check: IsWin64 and VCRedistCheck and CheckError
#endif

[Code]
var
  WelcomeLabel,WelcomeLabel1,WelcomeLabel2,Dirlabel,Grouplabel,Iconslabel,Compslabel,Statuslabel,Label1: TLabel;
  Bevel2,BevelPanel1,BevelPanel2: TBevel;
  Frame,Panel1,Panel2,Panel3: TPanel;
  Desktop,StartMenu,QuickLaunch,DirectX,VCRedist: TCheckBox;
  bmpfile,BmpFile1:TBitmapImage;
  BigOk, BigFail, BigWarn, BigInst: Longint;



#include "Modules\botva2.iss"
#include "Modules\TFont.iss"
#include "Modules\WinTB.iss"
#include "Modules\Uninstall.iss"

const
  A1='А';
  Z1='Я';
  A2='а';
  Z2='я';
  X1='ё';
  X2='Ё';

function NextButtonClick(CurPageID: Integer): Boolean;
var
  i: integer;
  c: char;
begin
   Result := True;
   if CurPageID = wpSelectDir then begin
      for i:=1 to length(WizardForm.DirEdit.text) do begin
         c:=WizardForm.DirEdit.text[i];
         if (c>=A1)and(c<=Z1) or (c>=A2)and(c<=Z2) or (c=X1) or (c=X2) then begin
            MsgBox( 'В пути установки присутствуют русские буквы, что недопустимо'#13#13'Пожалуйста, повторите ввод.', mbError, mb_Ok);
            Result := False ;
            exit;
         end;
      end;
   end;
end;

function InitializeSetup(): Boolean;
begin
  if not FileExists(ExpandConstant('{tmp}\b2p.dll')) then ExtractTemporaryFile('b2p.dll');
  if not FileExists(ExpandConstant('{tmp}\WinTB.dll')) then ExtractTemporaryFile('WinTB.dll');
  if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
  if not FileExists(ExpandConstant('{tmp}\CallbackCtrl.dll')) then ExtractTemporaryFile('CallbackCtrl.dll');
  Result := True;
end;

#ifdef Slides
function WrapTimerProc(callback:Expected; 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';
#endif
procedure LabelOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  ReleaseCapture;
  SendMessage(WizardForm.Handle,$0112,$F012,0)
end;

procedure WizardFormInit;
begin
  ExtractTemporaryFile('no.bmp');
  ExtractTemporaryFile('ok.bmp');
  ExtractTemporaryFile('BG.png');
  ExtractTemporaryFile('BigOk.png');
  ExtractTemporaryFile('BigFail.png');
  ExtractTemporaryFile('BigWarn.png');
  ExtractTemporaryFile('BigInst.png');

  ExtractTemporaryFile('CallbackCtrl.dll');
  ExtractTemporaryFile('botva2.dll');

  with WizardForm do begin
    ClientWidth:=ScaleX(660);
    ClientHeight:=ScaleY(405);
    AutoScroll := False;
    Position := poScreenCenter;
    Color := 13948116;
    InnerNotebook.Hide;
    OuterNotebook.Hide;
    Bevel.Hide;
    Caption := '{#AppName}';
    Application.Title := '{#AppName}';
  end;
  //
  Frame := TPanel.Create(WizardForm);
  with Frame do
  begin
    Parent := WizardForm;
    Left := ScaleX(0);
    Top := ScaleY(0);
    Width := ScaleX(660);
    Height := ScaleY(354);
    Color := 13948116;
    BevelOuter := bvNone;
  end;
  //////////////////////////////////////////////////////
  Bevel2 := TBevel.Create(WizardForm);
  with Bevel2 do
  begin
    Parent := WizardForm;
    Left := ScaleX(30);
    Top := WizardForm.Height-ScaleX(80);
    Width := ScaleX(600);
    Height := ScaleY(2);
  end;

  ImgLoad(Frame.Handle,ExpandConstant('{tmp}\BG.png'),0,0,ScaleX(660),ScaleY(354),True,True);

  BigOk:=ImgLoad(Frame.Handle,ExpandConstant('{tmp}\BigOk.png'),ScaleX(301),ScaleY(50),ScaleX(58),ScaleY(58),True,True);
  BigFail:=ImgLoad(Frame.Handle,ExpandConstant('{tmp}\BigFail.png'),ScaleX(301),ScaleY(50),ScaleX(58),ScaleY(58),True,True);
  BigWarn:=ImgLoad(Frame.Handle,ExpandConstant('{tmp}\BigWarn.png'),ScaleX(301),ScaleY(50),ScaleX(58),ScaleY(58),True,True);
  BigInst:=ImgLoad(Frame.Handle,ExpandConstant('{tmp}\BigInst.png'),ScaleX(301),ScaleY(50),ScaleX(58),ScaleY(58),True,True);

  Label1 := TLabel.Create(WizardForm);
  with Label1 do
  begin
    Parent := WizardForm;
    Caption := '{#ApRePack}';
    Left := ScaleX(85);
    Top := ScaleY(370);
    Width := ScaleX(178);
    Height := ScaleY(25);
    AutoSize:= false;
    Font.Name := '{#FontName}';
    Transparent:= true;
    WordWrap:= true;
    AutoSize:= false;
    Font.Size:=10;
    Font.Color := clBtnShadow;
    Font.Style := [fsBold];
  end;
end;

////////////////////////////////////
#include "Modules\NSize.iss"
////////////////////////////////////

function desktopicon: Boolean;
begin
  Result:=Desktop.Checked;
end;

function groupicon: Boolean;
begin
  Result:= StartMenu.Checked;
end;

procedure StartMenuOnClick(Sender: TObject);
begin
  WizardForm.GroupEdit.Enabled:= StartMenu.Checked;
  WizardForm.GroupBrowseButton.Enabled:= StartMenu.Checked;
end;

function quicklaunchicon: Boolean;
begin
  Result:=QuickLaunch.Checked;
end;
////////////////////////////////////
function DirectXCheck: Boolean;
begin
  StatusLabel.Caption:=ExpandConstant('{cm:Doppo1}');
  Result:=DirectX.Checked;
end;

function VCRedistCheck: Boolean;
begin
  StatusLabel.Caption:=ExpandConstant('{cm:Doppo2}');
  Result:=VCRedist.Checked;
end;
////////////////////////////////////
#include "Modules\ISDone.iss"
////////////////////////////////////
procedure RedesignWizardForm;
begin
  with WizardForm.CancelButton do
  begin
    Parent := WizardForm;
    Left := ScaleX(500);
    Top := ScaleY(368);
    Width:= ScaleX(75);
    Height:= ScaleY(23);
  end;

  with WizardForm.NextButton do
  begin
    Parent := WizardForm;
    Left := ScaleX(400);
    Top := ScaleY(368);
    Width:= ScaleX(75);
    Height:= ScaleY(23);
  end;

  with WizardForm.BackButton do
  begin
    Parent := WizardForm;
    Left := ScaleX(300);
    Top := ScaleY(368);
    Width:= ScaleX(75);
    Height:= ScaleY(23);
  end;

  //////////////////////////////////////////////////////
  WelcomeLabel:= TLabel.Create(WizardForm);
  with WelcomeLabel do
  begin
    AutoSize:= false;
    Parent := Frame;
    Alignment := taCenter;
    Font.Size:=14;
    Top := ScaleY(95);
    Left := ScaleX(30);
    Width := ScaleX(600);
    Height := ScaleX(100);
    Caption :=ExpandConstant('{cm:WelcomeLabel}');
    Font.Name := '{#FontName}';
    Transparent:= True;
  end;

  WelcomeLabel1:= TLabel.Create(WizardForm);
  with WelcomeLabel1 do
  begin
    AutoSize:= false;
    Parent := Frame;
    Alignment := taCenter;
    Font.Size:=16;
    Top :=WelcomeLabel.Top+ScaleY(30);
    Left := ScaleX(30);
    Width := ScaleX(600);
    Height := ScaleX(100);
    Caption := '{#AppName}';
    Font.Name := '{#FontName2}';
    Transparent:= True;
  end;

  WelcomeLabel2:= TLabel.Create(WizardForm);
  with WelcomeLabel2 do
  begin
    Parent := Frame;
    AutoSize:= false;
    Font.Name := '{#FontName}';
    Alignment := taCenter;
    Transparent:= true;
    WordWrap:= true;
    Top :=WelcomeLabel1.Top+ScaleY(100);
    Left := ScaleX(30);
    Width := ScaleX(600);
    Height := ScaleX(200);
    Caption :=ExpandConstant('{cm:WelcomeLabel2}');
  end;
  //////////////////////////////////////////////////////
  Panel1 := TPanel.Create(WizardForm);
  with Panel1 do
  begin
    Parent := Frame;
    Left := ScaleX(10);
    Top := ScaleY(92);
    Width := ScaleX(642);
    Height := ScaleY(136);
    BevelInner := bvSpace;
    BevelOuter := bvLowered;
    ParentBackground := False;
    Color := 13948116;
  end;

  BevelPanel1 := TBevel.Create(WizardForm);
  with BevelPanel1 do
  begin
    Parent := Panel1;
    Left := ScaleX(492);
    Top := ScaleX(1);
    Width := ScaleX(2);
    Height := Panel1.Height-ScaleY(2);
  end;
  //////////////////////////////////////////////////////
  Panel2 := TPanel.Create(WizardForm);
  with Panel2 do
  begin
    Parent := Frame;
    Left := ScaleX(10);
    Top := Panel1.Top+Panel1.Height+ScaleY(15);
    Width := ScaleX(642);
    Height := ScaleY(96);
    BevelInner := bvSpace;
    BevelOuter := bvLowered;
    ParentBackground := False;
    Color := 13948116;
  end;

  BevelPanel2 := TBevel.Create(WizardForm);
  with BevelPanel2 do
  begin
    Parent := Panel2;
    Left := ScaleX(321);
    Top := ScaleX(1);
    Width := ScaleX(2);
    Height := Panel2.Height-ScaleY(2);
  end;
  //////////////////////////////////////////////////////

  Dirlabel:= TLabel.Create(WizardForm);
  with Dirlabel do
  begin
    Parent := Panel1;
    Left := ScaleY(8);
    Top := ScaleX(13);
    Font.Name := '{#FontName2}';
    Caption :=ExpandConstant('{cm:Dirlabel}');
    Transparent:= True;
  end;
          
  with WizardForm.DirEdit do
  begin
    Parent := Panel1;
    Top := ScaleY(40);
    Left := ScaleX(20);
    Width := ScaleX(360);
    Font.Name := '{#FontName2}';
    Font.Color := clGreen;
  end;

  with WizardForm.DirBrowseButton do
  begin
    Parent := Panel1;
    Top := WizardForm.DirEdit.Top+ScaleY(-1);
    Left := WizardForm.DirEdit.Width+WizardForm.DirEdit.Left+ScaleX(20);
  end;

  Grouplabel:= TLabel.Create(WizardForm);
  with Grouplabel do
  begin
    Parent := Panel1;
    Left := ScaleY(8);
    Top := WizardForm.DirEdit.Top+WizardForm.DirEdit.Height+ScaleY(12);
    Font.Name := '{#FontName2}';
    Caption :=ExpandConstant('{cm:Grouplabel}');
    Transparent:= True;
  end;

  with WizardForm.GroupEdit do
  begin
    Parent := Panel1;
    Top := WizardForm.DirEdit.Top+ScaleY(60);
    Left := ScaleX(20);
    Width := ScaleX(360);
    Font.Name := '{#FontName2}';
    Font.Color := clGreen;
  end;

  with WizardForm.GroupBrowseButton do
  begin
    Parent := Panel1;
    Top := WizardForm.GroupEdit.Top+ScaleY(-1);
    Left := WizardForm.GroupEdit.Width+WizardForm.GroupEdit.Left+ScaleX(20);
  end;
  //////////////////////////////////////////////////////

  TotalSpaceLabel:= TLabel.Create(WizardForm);
  with TotalSpaceLabel do
  begin
    AutoSize:= False;
    Parent := Panel1;
    Left := ScaleX(500);
    Top := ScaleX(13);
    Width := ScaleX(150);
    Height := Panel2.Height-ScaleY(2);
    Font.Name := '{#FontName2}';
    Transparent:= True;
  end;

  FreeSpaceLabel1:= TLabel.Create(WizardForm);
  with FreeSpaceLabel1 do
  begin
    AutoSize:= False;
    Parent := Panel1;
    Left := TotalSpaceLabel.Left;
    Top := TotalSpaceLabel.Top+ScaleX(43);
    Width := ScaleX(150);
    Height := Panel2.Height-ScaleY(2);
    Font.Name := '{#FontName2}';
    Transparent:= True;
    Caption:= ExpandConstant('{cm:Spacelabel1}');
  end;

  FreeSpaceLabel2:= TLabel.Create(WizardForm);
  with FreeSpaceLabel2 do
  begin
    AutoSize:= False;
    Parent := Panel1;
    Left := TotalSpaceLabel.Left+ScaleX(15);
    Top := TotalSpaceLabel.Top+ScaleX(59);
    Width := ScaleX(150);
    Height := Panel2.Height-ScaleY(2);
    Font.Name := '{#FontName2}';
    Transparent:= True;
  end;

  InstallSpacelabel:= TLabel.Create(WizardForm);
  with InstallSpacelabel do
  begin
    AutoSize:= False;
    Parent := Panel1;
    Left := TotalSpaceLabel.Left;
    Top := FreeSpaceLabel1.Top+ScaleX(45);
    Width := ScaleX(150);
    Height := Panel2.Height-ScaleY(2);
    Font.Name := '{#FontName2}';
    Transparent:= True;
  end;

  BmpFile:= TBitmapImage.Create(WizardForm);
  BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\ok.bmp'));
  BmpFile.SetBounds(ScaleX(500), FreeSpaceLabel2.Top+ScaleY(2), ScaleX(12), ScaleY(12));
  BmpFile.Stretch:= true
  BmpFile.Parent:= Panel1;

  BmpFile1:= TBitmapImage.Create(WizardForm);
  BmpFile1.Bitmap.LoadFromFile(ExpandConstant('{tmp}\no.bmp'));
  BmpFile1.SetBounds(ScaleX(500), FreeSpaceLabel2.Top+ScaleY(2), ScaleX(12), ScaleY(12));
  BmpFile1.Stretch:= true
  BmpFile1.Parent:= Panel1;

  WizardForm.DirEdit.OnChange:=@DirEditOnChange;
  //////////////////////////////////////////////////////
  Iconslabel:= TLabel.Create(WizardForm);
  with Iconslabel do
  begin
    AutoSize:= False;
    Parent := Panel2;
    Left := ScaleY(8);
    Top := ScaleX(13);
    Width := ScaleX(150);
    Height := ScaleY(20);
    Font.Name := '{#FontName2}';
    Caption :=ExpandConstant('{cm:Iconslabel}');
    Transparent:= True;
  end;

    Desktop:=TCheckBox.Create(WizardForm);
    with Desktop do begin
      Parent:=Panel2;
      Caption :=ExpandConstant('{cm:Desktop}');
      Left:=ScaleX(13);
      Top:=Iconslabel.Top+Iconslabel.Height;
      Width:=ScaleX(300);
      Height:=ScaleY(15);
      Checked:=True;
    end;

    StartMenu:=TCheckBox.Create(WizardForm);
    with StartMenu do begin
      Parent:=Panel2;
      Caption :=ExpandConstant('{cm:StartMenu}');
      Left:=Desktop.Left;
      Top:=Desktop.Top+Desktop.Height+ScaleY(5);
      Width:=ScaleX(300);
      Height:=ScaleY(15);
      Checked:=True;
      OnClick:= @StartMenuOnClick;
    end;

    QuickLaunch:=TCheckBox.Create(WizardForm);
    with QuickLaunch do begin
      Parent:=Panel2;
      Caption :=ExpandConstant('{cm:QuickLaunch}');
      Left:=Desktop.Left;
      Top:=StartMenu.Top+StartMenu.Height+ScaleY(5);
      Width:=ScaleX(300);
      Height:=ScaleY(15);
      Checked:=True;
    end;
  //////////////////////////////////////////////////////
  Compslabel:= TLabel.Create(WizardForm);
  with Compslabel do
  begin
    AutoSize:= False;
    Parent := Panel2;
    Left := BevelPanel2.Left+ScaleY(8);
    Top := ScaleX(13);
    Width := ScaleX(150);
    Height := ScaleY(20);
    Font.Name := '{#FontName2}';
    Caption :=ExpandConstant('{cm:Compslabel}');
    Transparent:= True;
  end;

    DirectX:=TCheckBox.Create(WizardForm);
    with DirectX do begin
      Parent:=Panel2;
    Caption :=ExpandConstant('{cm:DirectX}');
      Left := BevelPanel2.Left+ScaleY(13);
      Top:=Compslabel.Top+Compslabel.Height;
      Width:=ScaleX(300);
      Height:=ScaleY(15);
      TabOrder:=0;
      Checked:=false;
    end;

    VCRedist:=TCheckBox.Create(WizardForm);
    with VCRedist do begin
      Parent:=Panel2;
    Caption :=ExpandConstant('{cm:VCRedist}');
      Left := BevelPanel2.Left+ScaleY(13);
      Top:=DirectX.Top+DirectX.Height+ScaleY(5);
      Width:=ScaleX(300);
      Height:=ScaleY(15);
      TabOrder:=0;
      Checked:=false;
    end;
  //////////////////////////////////////////////////////
  Panel3 := TPanel.Create(WizardForm);
  with Panel3 do
  begin
    Parent := Frame;
    Left := ScaleX(10);
    Top := ScaleY(159);
    Width := ScaleX(642);
    Height := ScaleY(180);
    BevelInner := bvSpace;
    BevelOuter := bvLowered;
    ParentBackground := False;
    Color := 13948116;
  end;

  Statuslabel:= TLabel.Create(WizardForm);
  with Statuslabel do
  begin
    AutoSize:= False;
    Parent := Panel3;
    Left :=ScaleX(40);
    Top := ScaleX(13);
    Width := ScaleX(250);
    Height := ScaleY(200);
    Font.Name := '{#FontName2}';
    Transparent:= True;
  end;
end;

procedure WFDeInit;
begin
  gdipShutDown;
end;

procedure InitializeWizard();
begin
  InitializeWFont;
  WizardFormInit;
  RedesignWizardForm;
  Win7TaskBar20();
end;

procedure HideComponents;
begin
  ImgSetVisibility(BigOk,False);
  ImgSetVisibility(BigWarn,False);
  ImgSetVisibility(BigFail,False);
  ImgSetVisibility(BigInst,False);
  WelcomeLabel.Hide;
  WelcomeLabel1.Hide;
  WelcomeLabel2.Hide;
  Panel1.Hide;
  Panel2.Hide;
  Panel3.Hide;
  Statuslabel.Hide;
end;

Procedure CurPageChanged(CurPageID: Integer);
 Begin
  HideComponents;
case CurPageID of

 wpWelcome:
  begin
  WelcomeLabel.Show;
  WelcomeLabel1.Show;
  WelcomeLabel2.Show;
  end;

 wpSelectDir:
  begin
  Panel1.Show;
  Panel2.Show;
  TotalSpaceLabel.Show;
  If WizardForm.FindComponent('NextButton') is TButton then
  TButton(WizardForm.FindComponent('NextButton')). Caption:=ExpandConstant('{cm:NextButton}');
  DirEditOnChange(nil)
  end;

 wpInstalling:
  begin
  WelcomeLabel1.Show;
  WelcomeLabel1.Caption:=ExpandConstant('{cm:WelcomeLabel3}');
  ImgSetVisibility(BigInst,True);
  Panel3.Show;
  end;


 wpFinished:
  begin
  WelcomeLabel1.Show;
  WelcomeLabel1.Caption:='{#AppName}';
  WelcomeLabel2.Show;
  WelcomeLabel2.Caption:=ExpandConstant('{cm:WelcomeLabel4}');
  ImgSetVisibility(BigOk,True);
  end;
  end;
  if (CurPageID = wpFinished) and ISDoneError then
  begin
  WelcomeLabel1.Show;
  WelcomeLabel1.Caption:='{#AppName}';
  WelcomeLabel2.Show;
  WelcomeLabel2.Caption:=ExpandConstant('{cm:WelcomeLabel5}');
  ImgSetVisibility(BigOk,False);
  ImgSetVisibility(BigFail,True);
  WizardForm.Caption:= ExpandConstant('{cm:Error}');
  end;

  ImgApplyChanges(Frame.Handle);
 end;
 
 procedure InitializeWizard;
 begin
 CreateWizardImage;
 CreateWizard;
 ButtonsTextures;
 NeedSpace;
 
 #ifdef Slides
begin
  PicList:=tstringlist.Create;
  ExtractTemporaryFile('01.jpg');
  ExtractTemporaryFile('02.jpg');
  ExtractTemporaryFile('03.jpg');
  ExtractTemporaryFile('04.jpg');
  ExtractTemporaryFile('05.jpg');
  ExtractTemporaryFile('06.jpg');
  ExtractTemporaryFile('07.jpg');
  ExtractTemporaryFile('08.jpg');
  ExtractTemporaryFile('09.jpg');
  ExtractTemporaryFile('10.jpg');
  ExtractTemporaryFile('11.jpg');
  ExtractTemporaryFile('12.jpg');
  ExtractTemporaryFile('13.jpg');
  ExtractTemporaryFile('14.jpg');
  ExtractTemporaryFile('15.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\01.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\02.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\03.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\04.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\05.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\06.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\07.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\08.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\09.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\10.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\11.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\12.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\13.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\14.jpg');
  piclist.add(ExpandConstant('{tmp}') + '\15.jpg');
  end;
#endif
end;
#ifdef Slides
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;

#ifdef Slides

   InitializeSlideShow(WizardForm.Handle, 352, 78, scaleX(344), ScaleY(164), true, 2);
   CurrentPicture:=1;
   ShowImage(piclist.strings[CurrentPicture-1], 1);
   TimerID:=SetTimer(0, 0, 5000, WrapTimerProc(@OnTimer, 4));
   WizardForm.ProgressGauge.parent:=WizardForm;
   WizardForm.ProgressGauge.setbounds(ScaleX(10), ScaleY(300), ScaleX(385), WizardForm.ProgressGauge.height);
   WizardForm.CancelButton.Left:=ScaleX(405);
   WizardForm.CancelButton.Top:=ScaleY(325);
  #endif
end;

procedure DeinitializeSetup;
begin
  gdipShutDown;
  if IsCustomFontInstalled then
  if RemoveFontResource(PAnsiChar(ExpandConstant('{tmp}')+'\{#Font}')) then SendMessage(HWND_BROADCAST,$1D,0,0);
  #ifdef Slides
begin
 DeinitializeSlideShow;
 KillTimer(0, TimerID);
end;
#endif
end;

 WFDeInit;
  RemoveFontResource(ExpandConstant('{tmp}\{#Font}'), FR_PRIVATE, 0);
  RemoveFontResource(ExpandConstant('{tmp}\{#Font2}'), FR_PRIVATE, 0);
  WizardForm.Free;
  gdipShutdown
end;

#endif Expected
 
frontlines45, нужно проверить WrapTimerProc, нужно объявить правильно, вроде того:
Код:
type
  TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);

function WrapTimerProc(CallBack: TProc; Paramcount: Integer): LongWord; external 'wrapcallback@files:innocallback.dll stdcall';
 
frontlines45, нужно проверить WrapTimerProc, нужно объявить правильно, вроде того:
Код:
type
  TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);

function WrapTimerProc(CallBack: TProc; Paramcount: Integer): LongWord; external 'wrapcallback@files:innocallback.dll stdcall';
А куда в скрипте это вставить?
 
frontlines45, выполнение кода идет - сверху в низ, обычно объявляют в начале. Короче, тип TProc должен быть раньше WrapTimerProc, а создаваться тайме\callback после.
 
frontlines45, выполнение кода идет - сверху в низ, обычно объявляют в начале. Короче, тип TProc должен быть раньше WrapTimerProc, а создаваться тайме\callback после.
типа так
Код:
#ifdef Slides
type
procedure=TProc(HandleW, msg, idEvent, TimeSys: LongWord);
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';
 
frontlines45, выполнение кода идет - сверху в низ, обычно объявляют в начале. Короче, тип TProc должен быть раньше WrapTimerProc, а создаваться тайме\callback после.
Если коротко, как добавить в этот скрипт чтобы во время установки показывало слайды картинок?
 
Назад
Сверху