PDA

View Full Version : Zeroth time around the wizard loop?



Unregistered
05-22-2007, 05:42 AM
I am testing the use of the "prompt for definition" feature to use the same script to compile a number of very similar installers.

They don't all need all the wizard dialogues, and I've found that hiding the unwanted ones (according to the compilation) with HideWizardDialog can be done on the Zeroth time through the wizard loop (ie when %_SB_DIALOGID% = 0) before the 1st dialogue appears.

It seems to work, but can I just ask if this is an intended possibility, or should I be doing it somewhere else?

David Webber

linder
05-22-2007, 06:30 AM
David,

A better solution is the use of the new "Releases" feature. You can compile different software editions from the same script.

For example, create a new compiler variable (Compiler Variables Visualizer) in your project. Let's name it [INSTALL_TYPE] and set the value to, say, "Full".

Now create a new Release in the "Releases Visualizer" (e.g. name it Trial Version) and select the "Compiler Variables" Tab in the Release Properties dialog. Create the [INSTALL_TYPE] compiler variable and set the value to, say, "Trial".

You can now use the "#ifcompvar" compiler directive to control the compilation logic.

#ifcompvar [INSTALL_TYPE] Equals "Full" Then
! Add your full version specific stuff here
#end

#ifcompvar [INSTALL_TYPE] Equals "Trial" Then
! Add your trial stuff here
HideWizardDialog "#2"
HideWizardDialog "#4"
#end

To compile a Release, click the Compile "split" button (drop down arrow) and select the Release to compile. You can also compile Releases from the command line.

Does this help?

Friedrich

linder
05-22-2007, 06:33 AM
By the way, of course you can also do something like that (just an example)

#ifcompvar [INSTALL_TYPE] Equals "Full" Then
Define Wizard Dialog "#1" (Welcome)
Define Wizard Dialog "#2" (License Agreement)
Define Wizard Dialog "#3" (Select Install Folder) (%_SB_INSTALLDIR%)
Define Wizard Dialog "#4" (Ready to Install)

! The Wizard Loop displays the dialog screens that the user sees in the installation
Loop Wizard (Abort Dialog Active)
End
#end

#ifcompvar [INSTALL_TYPE] Equals "Trial" Then
Define Wizard Dialog "#1" (Welcome)
Define Wizard Dialog "#2" (License Agreement)

! The Wizard Loop displays the dialog screens that the user sees in the installation
Loop Wizard (Abort Dialog Active)
End
#end

Friedrich

Unregistered
05-22-2007, 08:22 AM
[QUOTE=linder;9218]By the way, of course you can also do something like that (just an example)...

Thanks! Looks like I have been reinventing the wheel :-)

I'll play with this.

Dave

linder
05-22-2007, 08:32 AM
Dave,

:)

The "Releases" feature is new (but works rock solid). We are using it in most Setup Consulting projects and found out that it really is a timesaver. Documentation for this feature is suboptimal - we are working on it.

Friedrich

Unregistered
05-22-2007, 10:07 AM
Dave,

:)

The "Releases" feature is new (but works rock solid). We are using it in most Setup Consulting projects and found out that it really is a timesaver. Documentation for this feature is suboptimal - we are working on it.

Friedrich

I like it very much! It has simplified my installation script considerably.

One small question though: am I right in thinking that I can't set a different [EXENAME] in each release?

[ So far I have been achieving this with the command for deleting an old file and copying the output file after compilation.]

Dave

linder
05-22-2007, 10:47 AM
Dave,

Thank you :)

BTW, you can set a different installation executable name in each release. Please open the Release Properties dialog and set a "Executable Name" for that release.

Does this help?

Friedrich

Unregistered
05-22-2007, 01:25 PM
Dave,

Thank you :)

BTW, you can set a different installation executable name in each release. Please open the Release Properties dialog and set a "Executable Name" for that release.

Does this help?

Friedrich

Thanks - doing it that way works a treat!

Dave