PDA

View Full Version : Add button in CIU2


ShadowEagle
26-10-2015, 00:52
Hi,

how to add a button for switching between fullscreen (small installer + background images + video) and normal installer (no small installer + no background images + no video).

I know if there are no images or videos in background folder there will be no small installer, but a feature, where the user can choose on option using a checkbox before starting installation would be very nice.

Hope someone with good skills, can help me.

Greetz

rinaldo
26-10-2015, 01:16
Hi,

how to add a button for switching between fullscreen (small installer + background images + video) and normal installer (no small installer + no background images + no video).

I know if there are no images or videos in background folder there will be no small installer, but a feature, where the user can choose on option using a checkbox before starting installation would be very nice.

Hope someone with good skills, can help me.

Greetz

Replace True to False = no Video no Slideshow

function BGEnabled:Boolean;
begin
if (FileExistsI(ExpandConstant('{tmp}\SmallInstaller. png'))) and (FileExistsI(ExpandConstant('{tmp}\1.jpg')) or (FileExists(ExpandConstant('{tmp}\FlashBG.swf'))) and IsFlashInstalled) then
Result := True //to False
else
Result := False;
end;

ShadowEagle
26-10-2015, 01:35
Replace True to False = no Video no Slideshow

function BGEnabled:Boolean;
begin
if (FileExistsI(ExpandConstant('{tmp}\SmallInstaller. png'))) and (FileExistsI(ExpandConstant('{tmp}\1.jpg')) or (FileExists(ExpandConstant('{tmp}\FlashBG.swf'))) and IsFlashInstalled) then
Result := False
else
Result := False;
end;

Thanks for your fast answer. So if i`m right, the feature is already there, but we need a checkbox for the user to change it for himself, right?

rinaldo
26-10-2015, 16:51
Thanks for your fast answer. So if i`m right, the feature is already there, but we need a checkbox for the user to change it for himself, right?

o no :eek: mod all language

use ini.. example:


InstallerScript.iss
function BGEnabled:Boolean;
begin
if (FileExistsI(ExpandConstant('{tmp}\SmallInstaller. png'))) and (FileExistsI(ExpandConstant('{tmp}\1.jpg')) or (FileExists(ExpandConstant('{tmp}\FlashBG.swf'))) and IsFlashInstalled) then
//Result := True
Result:=(GetValBool('InstallOptions', 'BGE', True))
else
Result := False;
end;

Setup.ini
[InstallOptions]
ApplicationName=The LEGO Movie - Videogame
Publisher=Warner Bros. Interactive Entertainment
GameSize=8570
//ProductCode={3FEA6CD1-EA13-4CE7-A74E-A74A4A0A7B5C}
PrecompVer=inside
Lang=en,es,fr,it,da,nl,pl,prbr,ru
SetupVersion=1.0
GameVersion=1.0
BGE=False

BGE=False > Disable BGE
BGE= > Default

ShadowEagle
02-11-2015, 02:59
Ok, but how to add it into the installer, i mean the user should be able to activate/deactivate a checkbox "Show Trailer and Slideshow".

Thanks in advance.

Razor12911
02-11-2015, 13:10
It's possible but you have to work your a$$ off.

ShadowEagle
02-11-2015, 13:18
I would love to to that, but i can`t speak "pascal" ;) So i need help :)

Razor12911
02-11-2015, 13:28
I did this feature in asc. Just look at this script.
http://fileforums.com/showpost.php?p=442441&postcount=1401
You can interchange between video, slideshow, music or none of them in one go.

ShadowEagle
03-11-2015, 13:11
Possible to give me a hint where to search? ;)

Razor12911
04-11-2015, 08:39
Infostate function. Line 5871. This allows you to see interchange between music and slideshow, and video or none.
First condition is if you have video, slides and music. Video will play, thereafter after clicking video off, slideshow will commance along with video play back, clicking the same button disables music, then another click plays video again.
Second condition if you have video and no slides or the other way round, full screen video will play on loop, then once you click video off button, full screen is disabled, you will only have small installer.
Meaning with this function, you don't have to add another button because the same button performs all these functions.

ShadowEagle
04-11-2015, 08:46
Infostate function. Line 5871. This allows you to see interchange between music and slideshow, and video or none.
First condition is if you have video, slides and music. Video will play, thereafter after clicking video off, slideshow will commance along with video play back, clicking the same button disables music, then another click plays video again.
Second condition if you have video and no slides or the other way round, full screen video will play on loop, then once you click video off button, full screen is disabled, you will only have small installer.
Meaning with this function, you don't have to add another button because the same button performs all these functions.

So there is no condition to switch between "video on", "music on", "music off", "video+slideshow" off?

Razor12911
04-11-2015, 08:56
There is, the two conditions explain what will happen if you have video, slides, music or whatever. Condition two has slide off/video off. You must not have both else you will still have full screen. If you have slide and music, full screen will disappear.

rinaldo
05-11-2015, 01:25
to use these functions, you must modify some of this script that, in a lot of code that uses expressions to control functions, you need the checkbox or buttons etc..to control functions such as boolean expressions