-
Notifications
You must be signed in to change notification settings - Fork 5
BootstrapperApp Class
The BootstrapperApplication
provides the entry point to our BA. Its Run
method is similar in concept to an application's Main
method.
We can use the thread that this method is executing in for our UI message loop. So, we want to get the UI built up and associated with this thread before starting the loop.
_model.UiFacade.Initialize(_model);
Initialize
creates a window and shows it if appropriate.
After the UI is initialized and displayed, the detect phase is started.
_model.Engine.Detect();
Detect can take a while, but runs in the background. So, while that is running, the next line starts a Windows message loop. Once the loop is running, it can start processing events the shell window raises.
The loop will continue to run until one of these conditions is met.
-
The user hits the Exit button in the UI or closes the shell window.
-
The install is running silently and any of the phases fails or the apply phase successfully completes.
When the loop stops, the finally
block ensures the WiX engine is shut down correctly.