summaryrefslogtreecommitdiff
path: root/src/ext/Bal/wixstdba
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Bal/wixstdba')
-rw-r--r--src/ext/Bal/wixstdba/Resources/iuipreq.thm67
-rw-r--r--src/ext/Bal/wixstdba/Resources/iuipreq.wxl34
-rw-r--r--src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp41
-rw-r--r--src/ext/Bal/wixstdba/inc/preqba.h4
4 files changed, 131 insertions, 15 deletions
diff --git a/src/ext/Bal/wixstdba/Resources/iuipreq.thm b/src/ext/Bal/wixstdba/Resources/iuipreq.thm
new file mode 100644
index 00000000..5429b3d2
--- /dev/null
+++ b/src/ext/Bal/wixstdba/Resources/iuipreq.thm
@@ -0,0 +1,67 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
3 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
4 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
5 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
6 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
8 <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
9 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="mbapreq.png" Visible="yes"/>
10 <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes">
11 <Text>#(loc.Title)</Text>
12 <Text Condition="WixBundleAction = 2 OR WixBundleCommandLineAction = 1">#(loc.NonPrereqTitle)</Text>
13 </Label>
14
15 <Page Name="Help">
16 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17 <Label X="11" Y="153" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19 <Text>#(loc.HelpCloseButton)</Text>
20 <CloseWindowAction />
21 </Button>
22 </Page>
23 <Page Name="Install">
24 <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="34" TabStop="yes" FontId="3">#(loc.InstallLicenseTerms)</Hypertext>
25 <Button Name="InstallButton" X="-91" Y="-11" Width="130" Height="23" TabStop="yes" FontId="0">#(loc.InstallAcceptAndInstallButton)</Button>
26 <Button Name="InstallDeclineButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
27 <Text>#(loc.InstallDeclineButton)</Text>
28 <CloseWindowAction />
29 </Button>
30 </Page>
31 <Page Name="Progress">
32 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
33 <Label X="11" Y="153" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
34 <Label Name="OverallProgressPackageText" X="85" Y="153" Width="-11" Height="17" FontId="3" DisablePrefix="yes">[ProgressPackageName]</Label>
35 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="175" Width="-11" Height="15" />
36 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
37 </Page>
38 <Page Name="Success">
39 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
40 <Text>#(loc.SuccessHeader)</Text>
41 <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
42 </Label>
43 <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
44 <Text>#(loc.SuccessRestartText)</Text>
45 </Label>
46 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
47 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
48 <Text>#(loc.SuccessCloseButton)</Text>
49 <CloseWindowAction />
50 </Button>
51 </Page>
52 <Page Name="Failure">
53 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
54 <Text>#(loc.FailureHeader)</Text>
55 <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
56 </Label>
57 <Hypertext Name="FailureLogFileLink" X="11" Y="153" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureLogLinkText)</Hypertext>
58 <Hypertext Name="FailureMessageText" X="22" Y="190" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes"/>
59 <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
60 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
61 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
62 <Text>#(loc.FailureCloseButton)</Text>
63 <CloseWindowAction />
64 </Button>
65 </Page>
66 </Window>
67</Theme>
diff --git a/src/ext/Bal/wixstdba/Resources/iuipreq.wxl b/src/ext/Bal/wixstdba/Resources/iuipreq.wxl
new file mode 100644
index 00000000..4afcd10f
--- /dev/null
+++ b/src/ext/Bal/wixstdba/Resources/iuipreq.wxl
@@ -0,0 +1,34 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
6 <String Id="Caption">[WixBundleName] Prerequisite Setup</String>
7 <String Id="Title">Prerequisite required for [WixBundleName] setup</String>
8 <String Id="NonPrereqTitle">[WixBundleName] setup</String>
9 <String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
10 <String Id="HelpHeader">Setup Help</String>
11 <String Id="HelpText">/passive | /quiet - displays minimal UI with no prompts or displays no UI and
12 no prompts. By default UI and all prompts are displayed.
13
14/log log.txt - logs to a specific file. By default a log file is created in %TEMP%.</String>
15 <String Id="HelpCloseButton">&amp;Close</String>
16 <String Id="InstallLicenseTerms">Click the "Accept and Install" button to accept the prerequisite &lt;a href="#"&gt;license terms&lt;/a&gt;.</String>
17 <String Id="InstallAcceptAndInstallButton">&amp;Accept and Install</String>
18 <String Id="InstallDeclineButton">&amp;Decline</String>
19 <String Id="ProgressHeader">Setup Progress</String>
20 <String Id="ProgressLabel">Processing:</String>
21 <String Id="ProgressCancelButton">&amp;Cancel</String>
22 <String Id="SuccessHeader">Prerequisite Setup Successful</String>
23 <String Id="SuccessLayoutHeader">Layout Successfully Completed</String>
24 <String Id="SuccessRestartText">You must restart your computer before [WixBundleName] setup can continue.</String>
25 <String Id="SuccessRestartButton">&amp;Restart</String>
26 <String Id="SuccessCloseButton">&amp;Close</String>
27 <String Id="FailureHeader">Setup Failed</String>
28 <String Id="FailureLayoutHeader">Layout Failed</String>
29 <String Id="FailureLogLinkText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href="#"&gt;log file&lt;/a&gt;.</String>
30 <String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
31 <String Id="FailureRestartButton">&amp;Restart</String>
32 <String Id="FailureCloseButton">&amp;Close</String>
33 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
34</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp
index 9aa58a28..1af1abeb 100644
--- a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp
+++ b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp
@@ -248,10 +248,20 @@ public: // IBootstrapperApplication
248 248
249 if (m_fPrereq) 249 if (m_fPrereq)
250 { 250 {
251 // Pre-req BA should only show help or do an install (to launch the Managed BA which can then do the right action). 251 if (m_pPrereqData->fPerformLayout && BOOTSTRAPPER_ACTION_LAYOUT == m_command.action)
252 if (BOOTSTRAPPER_ACTION_HELP != m_command.action)
253 { 252 {
254 m_command.action = BOOTSTRAPPER_ACTION_INSTALL; 253 // The parent BA has requested that this BA be in charge of layout.
254 m_fPrereq = FALSE;
255 }
256 else
257 {
258 m_fPreplanPrereqs = m_pPrereqData->fAlwaysInstallPrereqs;
259
260 // Pre-req BA should only show help or do an install (to launch the parent BA which can then do the right action).
261 if (BOOTSTRAPPER_ACTION_HELP != m_command.action)
262 {
263 m_command.action = BOOTSTRAPPER_ACTION_INSTALL;
264 }
255 } 265 }
256 } 266 }
257 else // maybe modify the action state if the bundle is or is not already installed. 267 else // maybe modify the action state if the bundle is or is not already installed.
@@ -527,11 +537,11 @@ public: // IBootstrapperApplication
527 ) 537 )
528 { 538 {
529 HRESULT hr = S_OK; 539 HRESULT hr = S_OK;
530 BOOL fPlannedPrereqs = WIXSTDBA_STATE_PLANNING_PREREQS == m_state; 540 BOOL fPreplannedPrereqs = WIXSTDBA_STATE_PLANNING_PREREQS == m_state;
531 WIXSTDBA_STATE completedState = WIXSTDBA_STATE_PLANNED; 541 WIXSTDBA_STATE completedState = WIXSTDBA_STATE_PLANNED;
532 BOOL fApply = TRUE; 542 BOOL fApply = TRUE;
533 543
534 if (fPlannedPrereqs) 544 if (fPreplannedPrereqs)
535 { 545 {
536 if (SUCCEEDED(hrStatus) && !m_fPrereqPackagePlanned) 546 if (SUCCEEDED(hrStatus) && !m_fPrereqPackagePlanned)
537 { 547 {
@@ -547,7 +557,7 @@ public: // IBootstrapperApplication
547 // Need to force the state change since normally moving backwards is prevented. 557 // Need to force the state change since normally moving backwards is prevented.
548 ::PostMessageW(m_hWnd, WM_WIXSTDBA_CHANGE_STATE, 0, WIXSTDBA_STATE_HELP); 558 ::PostMessageW(m_hWnd, WM_WIXSTDBA_CHANGE_STATE, 0, WIXSTDBA_STATE_HELP);
549 559
550 ::PostMessageW(m_hWnd, WM_WIXSTDBA_SHOW_HELP, 0, 0); 560 ::PostMessageW(m_hWnd, WM_WIXSTDBA_SHOW_HELP, 0, 0);
551 561
552 ExitFunction(); 562 ExitFunction();
553 } 563 }
@@ -562,7 +572,7 @@ public: // IBootstrapperApplication
562 ExitFunction(); 572 ExitFunction();
563 } 573 }
564 574
565 if (fPlannedPrereqs) 575 if (fPreplannedPrereqs)
566 { 576 {
567 // If the UI should be visible, display it now and hide the splash screen 577 // If the UI should be visible, display it now and hide the splash screen
568 if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) 578 if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display)
@@ -1056,13 +1066,14 @@ public: // IBootstrapperApplication
1056 1066
1057 hr = __super::OnExecutePackageComplete(wzPackageId, hrStatus, restart, recommendation, pAction); 1067 hr = __super::OnExecutePackageComplete(wzPackageId, hrStatus, restart, recommendation, pAction);
1058 1068
1059 BAL_INFO_PACKAGE* pPackage = NULL; 1069 if (m_fPrereq && BOOTSTRAPPER_APPLY_RESTART_NONE != restart)
1060 HRESULT hrPrereq = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
1061 if (SUCCEEDED(hrPrereq))
1062 { 1070 {
1071 BAL_INFO_PACKAGE* pPackage = NULL;
1072 HRESULT hrPrereq = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
1073
1063 // If the prerequisite required a restart (any restart) then do an immediate 1074 // If the prerequisite required a restart (any restart) then do an immediate
1064 // restart to ensure that the bundle will get launched again post reboot. 1075 // restart to ensure that the bundle will get launched again post reboot.
1065 if (m_fPrereq && pPackage->fPrereqPackage && BOOTSTRAPPER_APPLY_RESTART_NONE != restart) 1076 if (SUCCEEDED(hrPrereq) && pPackage->fPrereqPackage)
1066 { 1077 {
1067 *pAction = BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RESTART; 1078 *pAction = BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RESTART;
1068 } 1079 }
@@ -2283,7 +2294,7 @@ private:
2283 // Okay, we're ready for packages now. 2294 // Okay, we're ready for packages now.
2284 pThis->SetState(WIXSTDBA_STATE_INITIALIZED, hr); 2295 pThis->SetState(WIXSTDBA_STATE_INITIALIZED, hr);
2285 2296
2286 if (!pThis->m_fPreplanPrereqs && BOOTSTRAPPER_ACTION_HELP == pThis->m_command.action) 2297 if (pThis->m_fPerformHelp && BOOTSTRAPPER_ACTION_HELP == pThis->m_command.action)
2287 { 2298 {
2288 firstAction = WM_WIXSTDBA_SHOW_HELP; 2299 firstAction = WM_WIXSTDBA_SHOW_HELP;
2289 } 2300 }
@@ -4246,7 +4257,7 @@ public:
4246 m_hWnd = NULL; 4257 m_hWnd = NULL;
4247 4258
4248 m_state = WIXSTDBA_STATE_INITIALIZING; 4259 m_state = WIXSTDBA_STATE_INITIALIZING;
4249 m_hrFinal = pPrereqData ? pPrereqData->hrHostInitialization : S_OK; 4260 m_hrFinal = pPrereqData ? pPrereqData->hrFatalError : S_OK;
4250 4261
4251 m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE; 4262 m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE;
4252 m_fRestartRequired = FALSE; 4263 m_fRestartRequired = FALSE;
@@ -4269,7 +4280,8 @@ public:
4269 4280
4270 m_pPrereqData = pPrereqData; 4281 m_pPrereqData = pPrereqData;
4271 m_fPrereq = NULL != pPrereqData; 4282 m_fPrereq = NULL != pPrereqData;
4272 m_fPreplanPrereqs = m_fPrereq && m_pPrereqData->fAlwaysInstallPrereqs; 4283 m_fPreplanPrereqs = FALSE;
4284 m_fPerformHelp = !m_fPrereq || m_pPrereqData->fPerformHelp;
4273 m_fPrereqPackagePlanned = FALSE; 4285 m_fPrereqPackagePlanned = FALSE;
4274 m_fPrereqInstalled = FALSE; 4286 m_fPrereqInstalled = FALSE;
4275 m_fPrereqSkipped = FALSE; 4287 m_fPrereqSkipped = FALSE;
@@ -4554,6 +4566,7 @@ private:
4554 PREQBA_DATA* m_pPrereqData; 4566 PREQBA_DATA* m_pPrereqData;
4555 BOOL m_fPrereq; 4567 BOOL m_fPrereq;
4556 BOOL m_fPreplanPrereqs; 4568 BOOL m_fPreplanPrereqs;
4569 BOOL m_fPerformHelp;
4557 BOOL m_fPrereqPackagePlanned; 4570 BOOL m_fPrereqPackagePlanned;
4558 BOOL m_fPrereqInstalled; 4571 BOOL m_fPrereqInstalled;
4559 BOOL m_fPrereqSkipped; 4572 BOOL m_fPrereqSkipped;
diff --git a/src/ext/Bal/wixstdba/inc/preqba.h b/src/ext/Bal/wixstdba/inc/preqba.h
index ed339730..25fa7105 100644
--- a/src/ext/Bal/wixstdba/inc/preqba.h
+++ b/src/ext/Bal/wixstdba/inc/preqba.h
@@ -4,8 +4,10 @@
4 4
5struct PREQBA_DATA 5struct PREQBA_DATA
6{ 6{
7 HRESULT hrHostInitialization; 7 HRESULT hrFatalError;
8 BOOL fAlwaysInstallPrereqs; 8 BOOL fAlwaysInstallPrereqs;
9 BOOL fPerformHelp;
10 BOOL fPerformLayout;
9 BOOL fCompleted; 11 BOOL fCompleted;
10}; 12};
11 13