PDA

View Full Version : Event handlers map



Diadem
02-01-2005, 07:08 AM
Hi, I have printed out the "Global Event Handlers" help page and sub page but I still feel I am missing something. I was hoping to find some kind of diagram that would make the event driven model clearer to me.

I am trying to update an InstallShield 5.5 project script to InstallShield 10.5. It uses the program -> endprogram linear style. I have imported it to InstallShield 10.5 and it works but I am a bit perplexed what the event driven version would look like. I read the help, It looks like a case of replacing the "program" with "OnFirstUIBefore()" and similarly treating the "endprogram"?.... At the moment I am finding the documentation a bit murky on the implementation side.

I found this posting in the archive but could not find the mentioned help:


Open the online Help Library's Contents tab and navigate to the topic
"Getting Results: Setup Scripts: Tell Me About...Functions called
automatically during an event-based setup."

Diadem
02-01-2005, 10:08 AM
Some extra information, the format of the existing script is:

...
Do some preinstall stuff like shutting down apps etc
...

if (ShowDialogs()<0) goto end_install;
if (ProcessBeforeDataMove()<0) goto end_install;
if (MoveFileData()<0) goto end_install;
if (ProcessAfterDataMove()<0) goto end_install;
if (SetupRegistry()<0) goto end_install;

...
Do some more postinstall stuff like adding user groups
...


So I can move the ProcessBefore and ProcessAfter, MoveFileData... into the respective events...

Are there any sample files available I can check against that are more complex than the blank setup you get with the initial wizard?

Diadem
02-01-2005, 11:00 AM
OK now, I've split the main thread of execution up into:


function OnFirstUIBefore()
begin
...stuff here...
end;

function OnMoving()
begin
...stuff here...
end;

function OnFirstUIAfter()
begin
...stuff here...
end;