FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Inno Setup Help (https://fileforums.com/showthread.php?t=97650)

RamiroCruzo 14-02-2016 04:12

Inno Setup Help
 
Hola mi amigos....

I was making [basically trying] to make a new Inno Setup Script but am encountering the following problems:

1. HOw to add two slideshows on a same page...I've tried renaming the isslideshow dll into two dlls but the only problem is that only one runs while the other one is stagnant....

2. Also, where is tio Gozarck??? :D

rinaldo 14-02-2016 04:14

ImgSetVisibility(YourImg, false);
ImgSetVisibility(YourImg, true);

RamiroCruzo 14-02-2016 05:04

Quote:

Originally Posted by rinaldo (Post 447089)
ImgSetVisibility(YourImg, false);
ImgSetVisibility(YourImg, true);

I need to replace that form image in every wizard page not hide of show...Also, I've already tried it & it say internal error for more than 2 of the images....

rinaldo 14-02-2016 06:07

wizardform.caption:="";

RamiroCruzo 14-02-2016 09:05

Quote:

Originally Posted by rinaldo (Post 447094)
wizardform.caption:="";

Thanks mi hermano...But the rest questions :p

RamiroCruzo 15-02-2016 09:32

Amigos....Please take a look.....

Razor12911 17-02-2016 18:01

var
Img1, Img2: Longint;....

under initializewizard
Img1:=ImgLoad(WizardForm.Handle,ExpandConstant('{t mp}')+'\frame1.png',0,0,900,540,True,True);
Img2:=ImgLoad(WizardForm.Handle,ExpandConstant('{t mp}')+'\frame2.png',0,0,900,540,True,True);
....


under curpagechange
ImgSetVisibility(Img1, false);
ImgSetVisibility(Img2, false);
case CurPageID of
wpWelcome:
begin
ImgSetVisibility(Img1, true);
....
end;
wpSelectDir:
begin
ImgSetVisibility(Img2, true);
....
end;

RamiroCruzo 18-02-2016 00:12

Quote:

Originally Posted by Razor12911 (Post 447218)
var
Img1, Img2: Longint;....

under initializewizard
Img1:=ImgLoad(WizardForm.Handle,ExpandConstant('{t mp}')+'\frame1.png',0,0,900,540,True,True);
Img2:=ImgLoad(WizardForm.Handle,ExpandConstant('{t mp}')+'\frame2.png',0,0,900,540,True,True);
....


under curpagechange
ImgSetVisibility(Img1, false);
ImgSetVisibility(Img2, false);
case CurPageID of
wpWelcome:
begin
ImgSetVisibility(Img1, true);
....
end;
wpSelectDir:
begin
ImgSetVisibility(Img2, true);
....
end;

Thanks mi hermano...Now, only one problem remains....Like I've told you too..... Those slideshows on wpWelcome Page....

rinaldo 18-02-2016 00:22

Code:

#Define SlideShow
#Define Time = "3000"

#define GameName "Slides"
#define Publisher "Publisher"
#define GameExe "GameExe.exe"

[Setup]
AppName={#GameName}
AppVerName={#GameName}
AppPublisher={#Publisher}
DefaultDirName={pf}\{#GameName}
DefaultGroupName={#GameName}


[Languages]
Name: "default"; MessagesFile: "compiler:Default.isl"

[Icons]
Name: "{commondesktop}\{#GameName}"; Filename: "{app}\{#GameExe}";

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

[Files]
#ifdef SlideShow
Source: Slides\isSlideShow.dll; DestDir: {tmp}; Flags: dontcopy
Source: Slides\*.jpg; DestDir: {tmp}; Flags: dontcopy
#endif

[ Code]
#ifdef SlideShow
var
TimerID: LongWord;
CurrentPicture:integer;
PicList: TStringlist;
#endif

#ifdef SlideShow
Type
TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord);
#endif

#ifdef SlideShow
function WrapTimeCallback(Callback:TProc; NumParam:integer): longword; external 'WrapCallback@files:isslideshow.dll stdcall';
function GetSystemMetrics(nIndex:Integer):Integer; external '[email protected] 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; SpeedTransition: integer); external 'ShowImage@files:isslideshow.dll stdcall';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): longword; external '[email protected] stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external '[email protected] stdcall';
#endif

#ifdef SlideShow
procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
begin
CurrentPicture:=CurrentPicture+1;
if CurrentPicture=piclist.count+1 then CurrentPicture:=1;
ShowImage(piclist.strings[CurrentPicture - 1], 2, 1000);
end;
#endif

procedure InitializeWizard();
begin
  #ifdef SlideShow
    PicList:=tstringlist.Create;
    ExtractTemporaryFile('1.jpg');
    ExtractTemporaryFile('2.jpg');
    ExtractTemporaryFile('3.jpg');
    ExtractTemporaryFile('4.jpg');
    ExtractTemporaryFile('5.jpg');
    piclist.add(ExpandConstant('{tmp}') + '\1.jpg');
    piclist.add(ExpandConstant('{tmp}') + '\2.jpg');
    piclist.add(ExpandConstant('{tmp}') + '\3.jpg');
    piclist.add(ExpandConstant('{tmp}') + '\4.jpg');
    piclist.add(ExpandConstant('{tmp}') + '\5.jpg');
  #endif
end;


procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
wpWelcome:
begin
#ifdef SlideShow
InitializeSlideShow(WizardForm.Handle, 0, 0, WizardForm.ClientWidth, WizardForm.ClientHeight, true, 2);
CurrentPicture:=1;
ShowImage(piclist.strings[CurrentPicture-1], 1, 1000);
TimerID:=SetTimer(0, 0, {#Time}, WrapTimeCallback(@OnTimer, 4));
#endif

end;
wpFinished:
begin
#ifdef SlideShow
KillTimer(0, TimerID);
DeinitializeSlideShow;
#endif
end;
end;
end;

procedure DeinitializeSetup();
begin
#ifdef SlideShow
DeinitializeSlideShow;
KillTimer(0, TimerID);
#endif
end;

procedure CancelButtonClick(CurPageID: Integer;
var Cancel, Confirm: Boolean);
begin
Confirm:=False;
#ifdef SlideShow
DeinitializeSlideShow;
KillTimer(0, TimerID);
#endif
end;


RamiroCruzo 18-02-2016 01:19

Thanks Rinaldo hermano....But the ode you gave me is for a single slideshow...I'm trying to add two on the same page....:p

rinaldo 18-02-2016 01:50

use double panel

RamiroCruzo 18-02-2016 02:42

Quote:

Originally Posted by rinaldo (Post 447240)
use double panel

You talking about adding two of

Code:

InitializeSlideShow(WizardForm.Handle, 0, 356, scaleX(200), ScaleY(112), true, 2);
I did that....But one goes on while other just sits idle....:o


All times are GMT -7. The time now is 18:39.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com