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/1028/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1029/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1030/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1031/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1032/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1035/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1036/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1038/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1040/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1041/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1042/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1043/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1044/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1045/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1046/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1049/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1051/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1053/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1055/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/1060/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/2052/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/2070/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/3082/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/dncpreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/Resources/mbapreq.wxl1
-rw-r--r--src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp320
-rw-r--r--src/ext/Bal/wixstdba/inc/preqba.h16
-rw-r--r--src/ext/Bal/wixstdba/precomp.h66
-rw-r--r--src/ext/Bal/wixstdba/wixstdba.cpp54
-rw-r--r--src/ext/Bal/wixstdba/wixstdba.def6
-rw-r--r--src/ext/Bal/wixstdba/wixstdba.vcxproj1
31 files changed, 199 insertions, 289 deletions
diff --git a/src/ext/Bal/wixstdba/Resources/1028/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1028/mbapreq.wxl
index 19e79bac..f574bb9b 100644
--- a/src/ext/Bal/wixstdba/Resources/1028/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1028/mbapreq.wxl
@@ -29,5 +29,6 @@
29 <String Id="FailureRestartButton">重新啟動(&amp;R)</String> 29 <String Id="FailureRestartButton">重新啟動(&amp;R)</String>
30 <String Id="FailureCloseButton">關閉(&amp;C)</String> 30 <String Id="FailureCloseButton">關閉(&amp;C)</String>
31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
32 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
32 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 33 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
33</WixLocalization> 34</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1029/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1029/mbapreq.wxl
index e6e6f469..11d9f85a 100644
--- a/src/ext/Bal/wixstdba/Resources/1029/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1029/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Restartovat</String> 32 <String Id="FailureRestartButton">&amp;Restartovat</String>
33 <String Id="FailureCloseButton">&amp;Zavřít</String> 33 <String Id="FailureCloseButton">&amp;Zavřít</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1030/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1030/mbapreq.wxl
index 98518edc..50412e12 100644
--- a/src/ext/Bal/wixstdba/Resources/1030/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1030/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Genstart</String> 32 <String Id="FailureRestartButton">&amp;Genstart</String>
33 <String Id="FailureCloseButton">&amp;Luk</String> 33 <String Id="FailureCloseButton">&amp;Luk</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1031/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1031/mbapreq.wxl
index e60b0c9a..4df66298 100644
--- a/src/ext/Bal/wixstdba/Resources/1031/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1031/mbapreq.wxl
@@ -35,5 +35,6 @@
35 <String Id="FailureRestartButton">&amp;Neu starten</String> 35 <String Id="FailureRestartButton">&amp;Neu starten</String>
36 <String Id="FailureCloseButton">&amp;Schließen</String> 36 <String Id="FailureCloseButton">&amp;Schließen</String>
37 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 37 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
38 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
38 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 39 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
39</WixLocalization> 40</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1032/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1032/mbapreq.wxl
index ea5dc130..05ac553f 100644
--- a/src/ext/Bal/wixstdba/Resources/1032/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1032/mbapreq.wxl
@@ -34,5 +34,6 @@
34 <String Id="FailureRestartButton">&amp;Επανεκκίνηση</String> 34 <String Id="FailureRestartButton">&amp;Επανεκκίνηση</String>
35 <String Id="FailureCloseButton">&amp;Κλείσιμο</String> 35 <String Id="FailureCloseButton">&amp;Κλείσιμο</String>
36 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 36 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
37 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
37 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 38 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
38</WixLocalization> 39</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1035/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1035/mbapreq.wxl
index 803cacf5..2b7c0519 100644
--- a/src/ext/Bal/wixstdba/Resources/1035/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1035/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Käynnistä uudelleen</String> 32 <String Id="FailureRestartButton">&amp;Käynnistä uudelleen</String>
33 <String Id="FailureCloseButton">&amp;Sulje</String> 33 <String Id="FailureCloseButton">&amp;Sulje</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1036/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1036/mbapreq.wxl
index fb927f2b..3ae1cbd9 100644
--- a/src/ext/Bal/wixstdba/Resources/1036/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1036/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Redémarrer</String> 32 <String Id="FailureRestartButton">&amp;Redémarrer</String>
33 <String Id="FailureCloseButton">&amp;Fermer</String> 33 <String Id="FailureCloseButton">&amp;Fermer</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1038/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1038/mbapreq.wxl
index 78c008b2..f491d6f2 100644
--- a/src/ext/Bal/wixstdba/Resources/1038/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1038/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Újraindítás</String> 32 <String Id="FailureRestartButton">&amp;Újraindítás</String>
33 <String Id="FailureCloseButton">&amp;Bezárás</String> 33 <String Id="FailureCloseButton">&amp;Bezárás</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1040/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1040/mbapreq.wxl
index b7966340..50bc73e8 100644
--- a/src/ext/Bal/wixstdba/Resources/1040/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1040/mbapreq.wxl
@@ -33,5 +33,6 @@
33 <String Id="FailureRestartButton">&amp;Riavvia</String> 33 <String Id="FailureRestartButton">&amp;Riavvia</String>
34 <String Id="FailureCloseButton">&amp;Chiudi</String> 34 <String Id="FailureCloseButton">&amp;Chiudi</String>
35 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 35 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
36 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 37 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
37</WixLocalization> 38</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1041/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1041/mbapreq.wxl
index 9b7aa323..106c704a 100644
--- a/src/ext/Bal/wixstdba/Resources/1041/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1041/mbapreq.wxl
@@ -29,5 +29,6 @@
29 <String Id="FailureRestartButton">再起動(&amp;R)</String> 29 <String Id="FailureRestartButton">再起動(&amp;R)</String>
30 <String Id="FailureCloseButton">閉じる(&amp;C)</String> 30 <String Id="FailureCloseButton">閉じる(&amp;C)</String>
31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
32 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
32 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 33 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
33</WixLocalization> 34</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1042/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1042/mbapreq.wxl
index 445d445b..24655588 100644
--- a/src/ext/Bal/wixstdba/Resources/1042/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1042/mbapreq.wxl
@@ -29,5 +29,6 @@
29 <String Id="FailureRestartButton">다시 시작(&amp;R)</String> 29 <String Id="FailureRestartButton">다시 시작(&amp;R)</String>
30 <String Id="FailureCloseButton">닫기(&amp;C)</String> 30 <String Id="FailureCloseButton">닫기(&amp;C)</String>
31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
32 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
32 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 33 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
33</WixLocalization> 34</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1043/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1043/mbapreq.wxl
index 60ba996e..d2e572fc 100644
--- a/src/ext/Bal/wixstdba/Resources/1043/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1043/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Opnieuw opstarten</String> 32 <String Id="FailureRestartButton">&amp;Opnieuw opstarten</String>
33 <String Id="FailureCloseButton">&amp;Sluiten</String> 33 <String Id="FailureCloseButton">&amp;Sluiten</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1044/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1044/mbapreq.wxl
index e0718b8d..cb6036ee 100644
--- a/src/ext/Bal/wixstdba/Resources/1044/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1044/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Start på nytt</String> 32 <String Id="FailureRestartButton">&amp;Start på nytt</String>
33 <String Id="FailureCloseButton">&amp;Lukk</String> 33 <String Id="FailureCloseButton">&amp;Lukk</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1045/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1045/mbapreq.wxl
index 8b4eb758..41832b13 100644
--- a/src/ext/Bal/wixstdba/Resources/1045/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1045/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Uruchom ponownie</String> 32 <String Id="FailureRestartButton">&amp;Uruchom ponownie</String>
33 <String Id="FailureCloseButton">&amp;Zamknij</String> 33 <String Id="FailureCloseButton">&amp;Zamknij</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1046/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1046/mbapreq.wxl
index 0155eb39..08968f93 100644
--- a/src/ext/Bal/wixstdba/Resources/1046/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1046/mbapreq.wxl
@@ -31,5 +31,6 @@
31 <String Id="FailureRestartButton">&amp;Reiniciar</String> 31 <String Id="FailureRestartButton">&amp;Reiniciar</String>
32 <String Id="FailureCloseButton">&amp;Fechar</String> 32 <String Id="FailureCloseButton">&amp;Fechar</String>
33 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 33 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
34 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
34 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
35</WixLocalization> 36</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1049/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1049/mbapreq.wxl
index 87350745..271d5563 100644
--- a/src/ext/Bal/wixstdba/Resources/1049/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1049/mbapreq.wxl
@@ -31,5 +31,6 @@
31 <String Id="FailureRestartButton">&amp;Перезагрузить</String> 31 <String Id="FailureRestartButton">&amp;Перезагрузить</String>
32 <String Id="FailureCloseButton">&amp;Закрыть</String> 32 <String Id="FailureCloseButton">&amp;Закрыть</String>
33 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 33 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
34 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
34 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
35</WixLocalization> 36</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1051/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1051/mbapreq.wxl
index 7645a37f..ce6f6eda 100644
--- a/src/ext/Bal/wixstdba/Resources/1051/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1051/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Reštartovať</String> 32 <String Id="FailureRestartButton">&amp;Reštartovať</String>
33 <String Id="FailureCloseButton">&amp;Zavrieť</String> 33 <String Id="FailureCloseButton">&amp;Zavrieť</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1053/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1053/mbapreq.wxl
index b00205d8..2d0581b1 100644
--- a/src/ext/Bal/wixstdba/Resources/1053/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1053/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Starta om</String> 32 <String Id="FailureRestartButton">&amp;Starta om</String>
33 <String Id="FailureCloseButton">&amp;Stäng</String> 33 <String Id="FailureCloseButton">&amp;Stäng</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1055/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1055/mbapreq.wxl
index 00c3c187..c48a44da 100644
--- a/src/ext/Bal/wixstdba/Resources/1055/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1055/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Yeniden Başlat</String> 32 <String Id="FailureRestartButton">&amp;Yeniden Başlat</String>
33 <String Id="FailureCloseButton">&amp;Kapat</String> 33 <String Id="FailureCloseButton">&amp;Kapat</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/1060/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/1060/mbapreq.wxl
index 72d48267..0398a7f1 100644
--- a/src/ext/Bal/wixstdba/Resources/1060/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/1060/mbapreq.wxl
@@ -32,5 +32,6 @@
32 <String Id="FailureRestartButton">&amp;Ponovni zagon</String> 32 <String Id="FailureRestartButton">&amp;Ponovni zagon</String>
33 <String Id="FailureCloseButton">&amp;Zapri</String> 33 <String Id="FailureCloseButton">&amp;Zapri</String>
34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 34 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
35 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
36</WixLocalization> 37</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/2052/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/2052/mbapreq.wxl
index 365ee7e6..09f09cb3 100644
--- a/src/ext/Bal/wixstdba/Resources/2052/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/2052/mbapreq.wxl
@@ -29,5 +29,6 @@
29 <String Id="FailureRestartButton">重启(&amp;R)</String> 29 <String Id="FailureRestartButton">重启(&amp;R)</String>
30 <String Id="FailureCloseButton">关闭(&amp;C)</String> 30 <String Id="FailureCloseButton">关闭(&amp;C)</String>
31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
32 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
32 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 33 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
33</WixLocalization> 34</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/2070/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/2070/mbapreq.wxl
index 442a5571..f22822d8 100644
--- a/src/ext/Bal/wixstdba/Resources/2070/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/2070/mbapreq.wxl
@@ -31,5 +31,6 @@
31 <String Id="FailureRestartButton">&amp;Reiniciar</String> 31 <String Id="FailureRestartButton">&amp;Reiniciar</String>
32 <String Id="FailureCloseButton">&amp;Fechar</String> 32 <String Id="FailureCloseButton">&amp;Fechar</String>
33 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 33 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
34 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
34 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 35 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
35</WixLocalization> 36</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/3082/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/3082/mbapreq.wxl
index 37c0dc05..edbf01c4 100644
--- a/src/ext/Bal/wixstdba/Resources/3082/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/3082/mbapreq.wxl
@@ -33,5 +33,6 @@
33 <String Id="FailureRestartButton">&amp;Reiniciar</String> 33 <String Id="FailureRestartButton">&amp;Reiniciar</String>
34 <String Id="FailureCloseButton">&amp;Cerrar</String> 34 <String Id="FailureCloseButton">&amp;Cerrar</String>
35 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 35 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
36 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
36 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 37 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
37</WixLocalization> 38</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/dncpreq.wxl b/src/ext/Bal/wixstdba/Resources/dncpreq.wxl
index a53b1c83..22fcd3dc 100644
--- a/src/ext/Bal/wixstdba/Resources/dncpreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/dncpreq.wxl
@@ -29,5 +29,6 @@
29 <String Id="FailureRestartButton">&amp;Restart</String> 29 <String Id="FailureRestartButton">&amp;Restart</String>
30 <String Id="FailureCloseButton">&amp;Close</String> 30 <String Id="FailureCloseButton">&amp;Close</String>
31 <String Id="SCDRUNTIMEFAILUREErrorMessage">[WixBundleName] cannot run on this machine. Install the latest updates and/or the latest OS to run in a supported environment.</String> 31 <String Id="SCDRUNTIMEFAILUREErrorMessage">[WixBundleName] cannot run on this machine. Install the latest updates and/or the latest OS to run in a supported environment.</String>
32 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Core runtime even though all of the prerequisites are installed.</String>
32 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 33 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
33</WixLocalization> 34</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/Resources/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/mbapreq.wxl
index 5d410888..77859d31 100644
--- a/src/ext/Bal/wixstdba/Resources/mbapreq.wxl
+++ b/src/ext/Bal/wixstdba/Resources/mbapreq.wxl
@@ -29,5 +29,6 @@
29 <String Id="FailureRestartButton">&amp;Restart</String> 29 <String Id="FailureRestartButton">&amp;Restart</String>
30 <String Id="FailureCloseButton">&amp;Close</String> 30 <String Id="FailureCloseButton">&amp;Close</String>
31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String> 31 <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
32 <String Id="PREREQBAINFINITELOOPErrorMessage">[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed.</String>
32 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> 33 <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
33</WixLocalization> 34</WixLocalization>
diff --git a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp
index dd00a563..3774f49c 100644
--- a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp
+++ b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp
@@ -123,14 +123,6 @@ enum WIXSTDBA_CONTROL
123 LAST_WIXSTDBA_CONTROL, 123 LAST_WIXSTDBA_CONTROL,
124}; 124};
125 125
126typedef struct _WIXSTDBA_PACKAGE_INFO
127{
128 LPWSTR sczPackageId;
129 BOOL fWasAlreadyInstalled;
130 BOOL fPlannedToBeInstalled;
131 BOOL fSuccessfullyInstalled;
132} WIXSTDBA_PACKAGE_INFO;
133
134 126
135static HRESULT DAPI EvaluateVariableConditionCallback( 127static HRESULT DAPI EvaluateVariableConditionCallback(
136 __in_z LPCWSTR wzCondition, 128 __in_z LPCWSTR wzCondition,
@@ -229,10 +221,7 @@ public: // IBootstrapperApplication
229 { 221 {
230 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were successfully installed. The bootstrapper application will be reloaded."); 222 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were successfully installed. The bootstrapper application will be reloaded.");
231 *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER; 223 *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER;
232 } 224 m_pPrereqData->fCompleted = TRUE;
233 else if (m_fPrereqAlreadyInstalled)
234 {
235 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop.");
236 } 225 }
237 else if (m_fPrereq) 226 else if (m_fPrereq)
238 { 227 {
@@ -311,38 +300,14 @@ public: // IBootstrapperApplication
311 300
312 if (!fMissingFromCache) 301 if (!fMissingFromCache)
313 { 302 {
314 if (SUCCEEDED(BalInfoAddRelatedBundleAsPackage(&m_Bundle.packages, wzBundleId, relationType, fPerMachine, &pPackage))) 303 BalInfoAddRelatedBundleAsPackage(&m_Bundle.packages, wzBundleId, relationType, fPerMachine, &pPackage);
315 { 304 // Best effort
316 InitializePackageInfoForPackage(pPackage);
317 }
318 } 305 }
319 306
320 return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, pfCancel); 307 return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, pfCancel);
321 } 308 }
322 309
323 310
324 virtual STDMETHODIMP OnDetectPackageComplete(
325 __in LPCWSTR wzPackageId,
326 __in HRESULT /*hrStatus*/,
327 __in BOOTSTRAPPER_PACKAGE_STATE state,
328 __in BOOL /*fCached*/
329 )
330 {
331 WIXSTDBA_PACKAGE_INFO* pPackageInfo = NULL;
332 BAL_INFO_PACKAGE* pPackage = NULL;
333
334 if (BOOTSTRAPPER_PACKAGE_STATE_PRESENT == state &&
335 SUCCEEDED(GetPackageInfo(wzPackageId, &pPackageInfo, &pPackage)) &&
336 pPackageInfo)
337 {
338 // If the package is already installed, remember that.
339 pPackageInfo->fWasAlreadyInstalled = TRUE;
340 }
341
342 return S_OK;
343 }
344
345
346 virtual STDMETHODIMP OnDetectComplete( 311 virtual STDMETHODIMP OnDetectComplete(
347 __in HRESULT hrStatus, 312 __in HRESULT hrStatus,
348 __in BOOL /*fEligibleForCleanup*/ 313 __in BOOL /*fEligibleForCleanup*/
@@ -366,29 +331,10 @@ public: // IBootstrapperApplication
366 if (fEvaluateConditions) 331 if (fEvaluateConditions)
367 { 332 {
368 hrStatus = EvaluateConditions(); 333 hrStatus = EvaluateConditions();
369 }
370 334
371 if (FAILED(hrStatus)) 335 if (FAILED(hrStatus))
372 {
373 fSkipToPlan = FALSE;
374 }
375 else
376 {
377 if (m_fPrereq)
378 { 336 {
379 m_fPrereqAlreadyInstalled = TRUE; 337 fSkipToPlan = FALSE;
380
381 // At this point we have to assume that all prerequisite packages need to be installed, so set to false if any of them aren't installed.
382 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i)
383 {
384 BAL_INFO_PACKAGE* pPackage = &m_Bundle.packages.rgPackages[i];
385 WIXSTDBA_PACKAGE_INFO* pPackageInfo = reinterpret_cast<WIXSTDBA_PACKAGE_INFO*>(pPackage->pvCustomData);
386 if (pPackage->fPrereqPackage && pPackageInfo && !pPackageInfo->fWasAlreadyInstalled)
387 {
388 m_fPrereqAlreadyInstalled = FALSE;
389 break;
390 }
391 }
392 } 338 }
393 } 339 }
394 340
@@ -403,20 +349,20 @@ public: // IBootstrapperApplication
403 } 349 }
404 350
405 351
406 virtual STDMETHODIMP OnPlanRelatedBundle( 352 virtual STDMETHODIMP OnPlanRelatedBundleType(
407 __in_z LPCWSTR wzBundleId, 353 __in_z LPCWSTR wzBundleId,
408 __in BOOTSTRAPPER_REQUEST_STATE recommendedState, 354 __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType,
409 __inout_z BOOTSTRAPPER_REQUEST_STATE* pRequestedState, 355 __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType,
410 __inout BOOL* pfCancel 356 __inout BOOL* pfCancel
411 ) 357 )
412 { 358 {
413 // If we're only installing prerequisites, do not touch related bundles. 359 // If we're only installing prerequisites, do not touch related bundles.
414 if (m_fPrereq) 360 if (m_fPrereq)
415 { 361 {
416 *pRequestedState = BOOTSTRAPPER_REQUEST_STATE_NONE; 362 *pRequestedType = BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_NONE;
417 } 363 }
418 364
419 return CBalBaseBootstrapperApplication::OnPlanRelatedBundle(wzBundleId, recommendedState, pRequestedState, pfCancel); 365 return CBalBaseBootstrapperApplication::OnPlanRelatedBundleType(wzBundleId, recommendedType, pRequestedType, pfCancel);
420 } 366 }
421 367
422 368
@@ -434,7 +380,6 @@ public: // IBootstrapperApplication
434 ) 380 )
435 { 381 {
436 HRESULT hr = S_OK; 382 HRESULT hr = S_OK;
437 WIXSTDBA_PACKAGE_INFO* pPackageInfo = NULL;
438 BAL_INFO_PACKAGE* pPackage = NULL; 383 BAL_INFO_PACKAGE* pPackage = NULL;
439 384
440 // If we're planning to install prerequisites, install them. The prerequisites need to be installed 385 // If we're planning to install prerequisites, install them. The prerequisites need to be installed
@@ -443,10 +388,11 @@ public: // IBootstrapperApplication
443 { 388 {
444 // Only install prerequisite packages, and check the InstallCondition on them. 389 // Only install prerequisite packages, and check the InstallCondition on them.
445 BOOL fInstall = FALSE; 390 BOOL fInstall = FALSE;
446 hr = GetPackageInfo(wzPackageId, &pPackageInfo, &pPackage); 391
447 if (SUCCEEDED(hr) && pPackage->fPrereqPackage && pPackageInfo) 392 hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
393 if (SUCCEEDED(hr) && pPackage->fPrereqPackage)
448 { 394 {
449 pPackageInfo->fPlannedToBeInstalled = fInstall = BOOTSTRAPPER_PACKAGE_CONDITION_FALSE != installCondition; 395 fInstall = BOOTSTRAPPER_PACKAGE_CONDITION_FALSE != installCondition;
450 } 396 }
451 397
452 if (fInstall) 398 if (fInstall)
@@ -503,7 +449,6 @@ public: // IBootstrapperApplication
503 ) 449 )
504 { 450 {
505 HRESULT hr = S_OK; 451 HRESULT hr = S_OK;
506 WIXSTDBA_PACKAGE_INFO* pPackageInfo = NULL;
507 BAL_INFO_PACKAGE* pPackage = NULL; 452 BAL_INFO_PACKAGE* pPackage = NULL;
508 BOOL fShowInternalUI = FALSE; 453 BOOL fShowInternalUI = FALSE;
509 INSTALLUILEVEL uiLevel = INSTALLUILEVEL_NOCHANGE; 454 INSTALLUILEVEL uiLevel = INSTALLUILEVEL_NOCHANGE;
@@ -521,7 +466,7 @@ public: // IBootstrapperApplication
521 466
522 if (INSTALLUILEVEL_NOCHANGE != uiLevel) 467 if (INSTALLUILEVEL_NOCHANGE != uiLevel)
523 { 468 {
524 hr = GetPackageInfo(wzPackageId, &pPackageInfo, &pPackage); 469 hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
525 if (SUCCEEDED(hr) && pPackage->sczDisplayInternalUICondition) 470 if (SUCCEEDED(hr) && pPackage->sczDisplayInternalUICondition)
526 { 471 {
527 hr = BalEvaluateCondition(pPackage->sczDisplayInternalUICondition, &fShowInternalUI); 472 hr = BalEvaluateCondition(pPackage->sczDisplayInternalUICondition, &fShowInternalUI);
@@ -545,23 +490,6 @@ public: // IBootstrapperApplication
545 { 490 {
546 HRESULT hr = S_OK; 491 HRESULT hr = S_OK;
547 492
548 if (m_fPrereq)
549 {
550 m_fPrereqAlreadyInstalled = TRUE;
551
552 // Now that we've planned the packages, we can focus on the prerequisite packages that are supposed to be installed.
553 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i)
554 {
555 BAL_INFO_PACKAGE* pPackage = &m_Bundle.packages.rgPackages[i];
556 WIXSTDBA_PACKAGE_INFO* pPackageInfo = reinterpret_cast<WIXSTDBA_PACKAGE_INFO*>(pPackage->pvCustomData);
557 if (pPackage->fPrereqPackage && pPackageInfo && !pPackageInfo->fWasAlreadyInstalled && pPackageInfo->fPlannedToBeInstalled)
558 {
559 m_fPrereqAlreadyInstalled = FALSE;
560 break;
561 }
562 }
563 }
564
565 SetState(WIXSTDBA_STATE_PLANNED, hrStatus); 493 SetState(WIXSTDBA_STATE_PLANNED, hrStatus);
566 494
567 if (SUCCEEDED(hrStatus)) 495 if (SUCCEEDED(hrStatus))
@@ -1033,13 +961,10 @@ public: // IBootstrapperApplication
1033 961
1034 hr = __super::OnExecutePackageComplete(wzPackageId, hrStatus, restart, recommendation, pAction); 962 hr = __super::OnExecutePackageComplete(wzPackageId, hrStatus, restart, recommendation, pAction);
1035 963
1036 WIXSTDBA_PACKAGE_INFO* pPackageInfo = NULL; 964 BAL_INFO_PACKAGE* pPackage = NULL;
1037 BAL_INFO_PACKAGE* pPackage; 965 HRESULT hrPrereq = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
1038 HRESULT hrPrereq = GetPackageInfo(wzPackageId, &pPackageInfo, &pPackage); 966 if (SUCCEEDED(hrPrereq))
1039 if (SUCCEEDED(hrPrereq) && pPackageInfo)
1040 { 967 {
1041 pPackageInfo->fSuccessfullyInstalled = SUCCEEDED(hrStatus);
1042
1043 // If the prerequisite required a restart (any restart) then do an immediate 968 // If the prerequisite required a restart (any restart) then do an immediate
1044 // restart to ensure that the bundle will get launched again post reboot. 969 // restart to ensure that the bundle will get launched again post reboot.
1045 if (m_fPrereq && pPackage->fPrereqPackage && BOOTSTRAPPER_APPLY_RESTART_NONE != restart) 970 if (m_fPrereq && pPackage->fPrereqPackage && BOOTSTRAPPER_APPLY_RESTART_NONE != restart)
@@ -1157,28 +1082,7 @@ public: // IBootstrapperApplication
1157 1082
1158 if (m_fPrereq) 1083 if (m_fPrereq)
1159 { 1084 {
1160 m_fPrereqInstalled = TRUE; 1085 m_fPrereqInstalled = SUCCEEDED(hrStatus);
1161 BOOL fInstalledAPackage = FALSE;
1162
1163 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i)
1164 {
1165 BAL_INFO_PACKAGE* pPackage = &m_Bundle.packages.rgPackages[i];
1166 WIXSTDBA_PACKAGE_INFO* pPackageInfo = reinterpret_cast<WIXSTDBA_PACKAGE_INFO*>(pPackage->pvCustomData);
1167 if (pPackage->fPrereqPackage && pPackageInfo && pPackageInfo->fPlannedToBeInstalled && !pPackageInfo->fWasAlreadyInstalled)
1168 {
1169 if (pPackageInfo->fSuccessfullyInstalled)
1170 {
1171 fInstalledAPackage = TRUE;
1172 }
1173 else
1174 {
1175 m_fPrereqInstalled = FALSE;
1176 break;
1177 }
1178 }
1179 }
1180
1181 m_fPrereqInstalled = m_fPrereqInstalled && fInstalledAPackage;
1182 } 1086 }
1183 1087
1184 // If we are showing UI, wait a beat before moving to the final screen. 1088 // If we are showing UI, wait a beat before moving to the final screen.
@@ -1223,10 +1127,10 @@ public: // IBootstrapperApplication
1223 { 1127 {
1224 BAL_INFO_PACKAGE* pPackage = NULL; 1128 BAL_INFO_PACKAGE* pPackage = NULL;
1225 1129
1226 if (SUCCEEDED(hrStatus) && wzNewPackageId && 1130 if (SUCCEEDED(hrStatus) && wzNewPackageId)
1227 SUCCEEDED(BalInfoAddUpdateBundleAsPackage(&m_Bundle.packages, wzNewPackageId, wzPreviousPackageId, &pPackage)))
1228 { 1131 {
1229 InitializePackageInfoForPackage(pPackage); 1132 BalInfoAddUpdateBundleAsPackage(&m_Bundle.packages, wzNewPackageId, wzPreviousPackageId, &pPackage);
1133 // Best effort
1230 } 1134 }
1231 1135
1232 return S_OK; 1136 return S_OK;
@@ -2201,6 +2105,36 @@ public: //CBalBaseBootstrapperApplication
2201 return hr; 2105 return hr;
2202 } 2106 }
2203 2107
2108 void Uninitialize(
2109 __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs,
2110 __in BOOTSTRAPPER_DESTROY_RESULTS* /*pResults*/
2111 )
2112 {
2113 if (m_hBAFModule)
2114 {
2115 BA_FUNCTIONS_DESTROY_ARGS args = { };
2116 BA_FUNCTIONS_DESTROY_RESULTS results = { };
2117
2118 args.cbSize = sizeof(BA_FUNCTIONS_DESTROY_ARGS);
2119 args.fReload = pArgs->fReload;
2120
2121 results.cbSize = sizeof(BA_FUNCTIONS_DESTROY_RESULTS);
2122
2123 PFN_BA_FUNCTIONS_DESTROY pfnBAFunctionsDestroy = reinterpret_cast<PFN_BA_FUNCTIONS_DESTROY>(::GetProcAddress(m_hBAFModule, "BAFunctionsDestroy"));
2124 if (pfnBAFunctionsDestroy)
2125 {
2126 pfnBAFunctionsDestroy(&args, &results);
2127 }
2128
2129 if (!results.fDisableUnloading)
2130 {
2131 ::FreeLibrary(m_hBAFModule);
2132 m_hBAFModule = NULL;
2133 }
2134 }
2135 }
2136
2137
2204private: 2138private:
2205 // 2139 //
2206 // UiThreadProc - entrypoint for UI thread. 2140 // UiThreadProc - entrypoint for UI thread.
@@ -2214,6 +2148,7 @@ private:
2214 BOOL fComInitialized = FALSE; 2148 BOOL fComInitialized = FALSE;
2215 BOOL fRet = FALSE; 2149 BOOL fRet = FALSE;
2216 MSG msg = { }; 2150 MSG msg = { };
2151 DWORD dwQuit = 0;
2217 2152
2218 // Initialize COM and theme. 2153 // Initialize COM and theme.
2219 hr = ::CoInitialize(NULL); 2154 hr = ::CoInitialize(NULL);
@@ -2274,8 +2209,6 @@ private:
2274 pThis->DestroyMainWindow(); 2209 pThis->DestroyMainWindow();
2275 pThis->UninitializeTaskbarButton(); 2210 pThis->UninitializeTaskbarButton();
2276 2211
2277 // initiate engine shutdown
2278 DWORD dwQuit = HRESULT_CODE(hr);
2279 if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->m_restartResult) 2212 if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->m_restartResult)
2280 { 2213 {
2281 dwQuit = ERROR_SUCCESS_REBOOT_INITIATED; 2214 dwQuit = ERROR_SUCCESS_REBOOT_INITIATED;
@@ -2284,6 +2217,17 @@ private:
2284 { 2217 {
2285 dwQuit = ERROR_SUCCESS_REBOOT_REQUIRED; 2218 dwQuit = ERROR_SUCCESS_REBOOT_REQUIRED;
2286 } 2219 }
2220 else if (SEVERITY_ERROR == HRESULT_SEVERITY(hr) && FACILITY_WIN32 == HRESULT_FACILITY(hr))
2221 {
2222 // Convert Win32 HRESULTs back to the error code.
2223 dwQuit = HRESULT_CODE(hr);
2224 }
2225 else
2226 {
2227 dwQuit = hr;
2228 }
2229
2230 // initiate engine shutdown
2287 pThis->m_pEngine->Quit(dwQuit); 2231 pThis->m_pEngine->Quit(dwQuit);
2288 2232
2289 ReleaseTheme(pThis->m_pTheme); 2233 ReleaseTheme(pThis->m_pTheme);
@@ -2335,9 +2279,6 @@ private:
2335 GetBundleFileVersion(); 2279 GetBundleFileVersion();
2336 // don't fail if we couldn't get the version info; best-effort only 2280 // don't fail if we couldn't get the version info; best-effort only
2337 2281
2338 hr = InitializePackageInfo();
2339 BalExitOnFailure(hr, "Failed to initialize wixstdba package information.");
2340
2341 if (m_fPrereq) 2282 if (m_fPrereq)
2342 { 2283 {
2343 hr = InitializePrerequisiteInformation(); 2284 hr = InitializePrerequisiteInformation();
@@ -2521,38 +2462,6 @@ private:
2521 } 2462 }
2522 2463
2523 2464
2524 HRESULT InitializePackageInfo()
2525 {
2526 HRESULT hr = S_OK;
2527 BAL_INFO_PACKAGE* pPackage = NULL;
2528
2529 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i)
2530 {
2531 pPackage = &m_Bundle.packages.rgPackages[i];
2532
2533 hr = InitializePackageInfoForPackage(pPackage);
2534 BalExitOnFailure(hr, "Failed to initialize wixstdba package info for package: %ls.", pPackage->sczId);
2535 }
2536
2537 LExit:
2538 return hr;
2539 }
2540
2541
2542 HRESULT InitializePackageInfoForPackage(
2543 __in BAL_INFO_PACKAGE* pPackage
2544 )
2545 {
2546 HRESULT hr = S_OK;
2547
2548 pPackage->pvCustomData = MemAlloc(sizeof(WIXSTDBA_PACKAGE_INFO), TRUE);
2549 BalExitOnNull(pPackage->pvCustomData, hr, E_OUTOFMEMORY, "Failed to allocate memory for wixstdba package info.");
2550
2551 LExit:
2552 return hr;
2553 }
2554
2555
2556 HRESULT InitializePrerequisiteInformation() 2465 HRESULT InitializePrerequisiteInformation()
2557 { 2466 {
2558 HRESULT hr = S_OK; 2467 HRESULT hr = S_OK;
@@ -2673,35 +2582,6 @@ private:
2673 return hr; 2582 return hr;
2674 } 2583 }
2675 2584
2676 HRESULT GetPackageInfo(
2677 __in_z LPCWSTR wzPackageId,
2678 __out WIXSTDBA_PACKAGE_INFO** ppPackageInfo,
2679 __out BAL_INFO_PACKAGE** ppPackage
2680 )
2681 {
2682 HRESULT hr = E_NOTFOUND;
2683 WIXSTDBA_PACKAGE_INFO* pPackageInfo = NULL;
2684 BAL_INFO_PACKAGE* pPackage = NULL;
2685
2686 Assert(wzPackageId && *wzPackageId);
2687 Assert(ppPackage);
2688 Assert(ppPackageInfo);
2689
2690 hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
2691 if (E_NOTFOUND != hr)
2692 {
2693 ExitOnFailure(hr, "Failed trying to find the requested package.");
2694
2695 pPackageInfo = reinterpret_cast<WIXSTDBA_PACKAGE_INFO*>(pPackage->pvCustomData);
2696 }
2697
2698 *ppPackageInfo = pPackageInfo;
2699 *ppPackage = pPackage;
2700
2701 LExit:
2702 return hr;
2703 }
2704
2705 2585
2706 // 2586 //
2707 // Get the file version of the bootstrapper and record in bootstrapper log file 2587 // Get the file version of the bootstrapper and record in bootstrapper log file
@@ -3408,6 +3288,23 @@ private:
3408 } 3288 }
3409 } 3289 }
3410 } 3290 }
3291 else if (E_PREREQBA_INFINITE_LOOP == m_hrFinal)
3292 {
3293 HRESULT hr = StrAllocString(&sczUnformattedText, L"#(loc.PREREQBAINFINITELOOPErrorMessage)", 0);
3294 if (FAILED(hr))
3295 {
3296 BalLogError(hr, "Failed to initialize PREREQBAINFINITELOOPErrorMessage loc identifier.");
3297 }
3298 else
3299 {
3300 hr = LocLocalizeString(m_pWixLoc, &sczUnformattedText);
3301 if (FAILED(hr))
3302 {
3303 BalLogError(hr, "Failed to localize PREREQBAINFINITELOOPErrorMessage: %ls", sczUnformattedText);
3304 ReleaseNullStr(sczUnformattedText);
3305 }
3306 }
3307 }
3411 else // try to get the error message from the error code. 3308 else // try to get the error message from the error code.
3412 { 3309 {
3413 StrAllocFromError(&sczUnformattedText, m_hrFinal, NULL); 3310 StrAllocFromError(&sczUnformattedText, m_hrFinal, NULL);
@@ -3424,14 +3321,9 @@ private:
3424 StrAllocString(&sczText, sczUnformattedText, 0); 3321 StrAllocString(&sczText, sczUnformattedText, 0);
3425 } 3322 }
3426 } 3323 }
3427 else if (E_MBAHOST_NET452_ON_WIN7RTM == m_hrFinal) 3324 else if (E_MBAHOST_NET452_ON_WIN7RTM == m_hrFinal ||
3428 { 3325 E_DNCHOST_SCD_RUNTIME_FAILURE == m_hrFinal ||
3429 if (sczUnformattedText) 3326 E_PREREQBA_INFINITE_LOOP == m_hrFinal)
3430 {
3431 BalFormatString(sczUnformattedText, &sczText);
3432 }
3433 }
3434 else if (E_DNCHOST_SCD_RUNTIME_FAILURE == m_hrFinal)
3435 { 3327 {
3436 if (sczUnformattedText) 3328 if (sczUnformattedText)
3437 { 3329 {
@@ -4180,8 +4072,7 @@ public:
4180 // 4072 //
4181 CWixStandardBootstrapperApplication( 4073 CWixStandardBootstrapperApplication(
4182 __in HMODULE hModule, 4074 __in HMODULE hModule,
4183 __in BOOL fPrereq, 4075 __in_opt PREQBA_DATA* pPrereqData,
4184 __in HRESULT hrHostInitialization,
4185 __in IBootstrapperEngine* pEngine 4076 __in IBootstrapperEngine* pEngine
4186 ) : CBalBaseBootstrapperApplication(pEngine, 3, 3000) 4077 ) : CBalBaseBootstrapperApplication(pEngine, 3, 3000)
4187 { 4078 {
@@ -4210,7 +4101,7 @@ public:
4210 m_hWnd = NULL; 4101 m_hWnd = NULL;
4211 4102
4212 m_state = WIXSTDBA_STATE_INITIALIZING; 4103 m_state = WIXSTDBA_STATE_INITIALIZING;
4213 m_hrFinal = hrHostInitialization; 4104 m_hrFinal = pPrereqData ? pPrereqData->hrHostInitialization : S_OK;
4214 4105
4215 m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE; 4106 m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE;
4216 m_fRestartRequired = FALSE; 4107 m_fRestartRequired = FALSE;
@@ -4231,9 +4122,9 @@ public:
4231 m_fShowingInternalUiThisPackage = FALSE; 4122 m_fShowingInternalUiThisPackage = FALSE;
4232 m_fTriedToLaunchElevated = FALSE; 4123 m_fTriedToLaunchElevated = FALSE;
4233 4124
4234 m_fPrereq = fPrereq; 4125 m_pPrereqData = pPrereqData;
4126 m_fPrereq = NULL != pPrereqData;
4235 m_fPrereqInstalled = FALSE; 4127 m_fPrereqInstalled = FALSE;
4236 m_fPrereqAlreadyInstalled = FALSE;
4237 4128
4238 pEngine->AddRef(); 4129 pEngine->AddRef();
4239 m_pEngine = pEngine; 4130 m_pEngine = pEngine;
@@ -4418,11 +4309,6 @@ public:
4418 AssertSz(!m_pTaskbarList, "Taskbar should have been released before destructor."); 4309 AssertSz(!m_pTaskbarList, "Taskbar should have been released before destructor.");
4419 AssertSz(!m_pTheme, "Theme should have been released before destructor."); 4310 AssertSz(!m_pTheme, "Theme should have been released before destructor.");
4420 4311
4421 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i)
4422 {
4423 ReleaseMem(m_Bundle.packages.rgPackages[i].pvCustomData);
4424 }
4425
4426 ::DeleteCriticalSection(&m_csShowingInternalUiThisPackage); 4312 ::DeleteCriticalSection(&m_csShowingInternalUiThisPackage);
4427 ReleaseStr(m_sczFailedMessage); 4313 ReleaseStr(m_sczFailedMessage);
4428 ReleaseStr(m_sczConfirmCloseMessage); 4314 ReleaseStr(m_sczConfirmCloseMessage);
@@ -4436,18 +4322,6 @@ public:
4436 ReleaseStr(m_sczBundleVersion); 4322 ReleaseStr(m_sczBundleVersion);
4437 ReleaseStr(m_sczAfterForcedRestartPackage); 4323 ReleaseStr(m_sczAfterForcedRestartPackage);
4438 ReleaseNullObject(m_pEngine); 4324 ReleaseNullObject(m_pEngine);
4439
4440 if (m_hBAFModule)
4441 {
4442 PFN_BA_FUNCTIONS_DESTROY pfnBAFunctionsDestroy = reinterpret_cast<PFN_BA_FUNCTIONS_DESTROY>(::GetProcAddress(m_hBAFModule, "BAFunctionsDestroy"));
4443 if (pfnBAFunctionsDestroy)
4444 {
4445 pfnBAFunctionsDestroy();
4446 }
4447
4448 ::FreeLibrary(m_hBAFModule);
4449 m_hBAFModule = NULL;
4450 }
4451 } 4325 }
4452 4326
4453private: 4327private:
@@ -4529,9 +4403,9 @@ private:
4529 BOOL m_fSupportCacheOnly; 4403 BOOL m_fSupportCacheOnly;
4530 BOOL m_fRequestedCacheOnly; 4404 BOOL m_fRequestedCacheOnly;
4531 4405
4406 PREQBA_DATA* m_pPrereqData;
4532 BOOL m_fPrereq; 4407 BOOL m_fPrereq;
4533 BOOL m_fPrereqInstalled; 4408 BOOL m_fPrereqInstalled;
4534 BOOL m_fPrereqAlreadyInstalled;
4535 4409
4536 ITaskbarList3* m_pTaskbarList; 4410 ITaskbarList3* m_pTaskbarList;
4537 UINT m_uTaskbarButtonCreatedMessage; 4411 UINT m_uTaskbarButtonCreatedMessage;
@@ -4551,8 +4425,7 @@ private:
4551// 4425//
4552HRESULT CreateBootstrapperApplication( 4426HRESULT CreateBootstrapperApplication(
4553 __in HMODULE hModule, 4427 __in HMODULE hModule,
4554 __in BOOL fPrereq, 4428 __in_opt PREQBA_DATA* pPrereqData,
4555 __in HRESULT hrHostInitialization,
4556 __in IBootstrapperEngine* pEngine, 4429 __in IBootstrapperEngine* pEngine,
4557 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, 4430 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
4558 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, 4431 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults,
@@ -4567,7 +4440,7 @@ HRESULT CreateBootstrapperApplication(
4567 BalExitOnFailure(hr = E_INVALIDARG, "Engine requested Unknown display type."); 4440 BalExitOnFailure(hr = E_INVALIDARG, "Engine requested Unknown display type.");
4568 } 4441 }
4569 4442
4570 pApplication = new CWixStandardBootstrapperApplication(hModule, fPrereq, hrHostInitialization, pEngine); 4443 pApplication = new CWixStandardBootstrapperApplication(hModule, pPrereqData, pEngine);
4571 BalExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new standard bootstrapper application object."); 4444 BalExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new standard bootstrapper application object.");
4572 4445
4573 hr = pApplication->Initialize(pArgs); 4446 hr = pApplication->Initialize(pArgs);
@@ -4584,6 +4457,17 @@ LExit:
4584} 4457}
4585 4458
4586 4459
4460void DestroyBootstrapperApplication(
4461 __in IBootstrapperApplication* pApplication,
4462 __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs,
4463 __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults
4464 )
4465{
4466 CWixStandardBootstrapperApplication* pBA = (CWixStandardBootstrapperApplication*)pApplication;
4467 pBA->Uninitialize(pArgs, pResults);
4468}
4469
4470
4587static HRESULT DAPI EvaluateVariableConditionCallback( 4471static HRESULT DAPI EvaluateVariableConditionCallback(
4588 __in_z LPCWSTR wzCondition, 4472 __in_z LPCWSTR wzCondition,
4589 __out BOOL* pf, 4473 __out BOOL* pf,
diff --git a/src/ext/Bal/wixstdba/inc/preqba.h b/src/ext/Bal/wixstdba/inc/preqba.h
new file mode 100644
index 00000000..93a547ed
--- /dev/null
+++ b/src/ext/Bal/wixstdba/inc/preqba.h
@@ -0,0 +1,16 @@
1#pragma once
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
5struct PREQBA_DATA
6{
7 HRESULT hrHostInitialization;
8 BOOL fCompleted;
9};
10
11extern "C" typedef HRESULT(WINAPI* PFN_PREQ_BOOTSTRAPPER_APPLICATION_CREATE)(
12 __in PREQBA_DATA* pPreqData,
13 __in IBootstrapperEngine* pEngine,
14 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
15 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
16 );
diff --git a/src/ext/Bal/wixstdba/precomp.h b/src/ext/Bal/wixstdba/precomp.h
index ba56ae6d..290c125b 100644
--- a/src/ext/Bal/wixstdba/precomp.h
+++ b/src/ext/Bal/wixstdba/precomp.h
@@ -17,43 +17,49 @@
17#include <strsafe.h> 17#include <strsafe.h>
18#include <stddef.h> 18#include <stddef.h>
19 19
20#include "dutil.h" 20#include <dutil.h>
21#include "apputil.h" 21#include <apputil.h>
22#include "memutil.h" 22#include <memutil.h>
23#include "dictutil.h" 23#include <dictutil.h>
24#include "dirutil.h" 24#include <dirutil.h>
25#include "fileutil.h" 25#include <fileutil.h>
26#include "locutil.h" 26#include <locutil.h>
27#include "logutil.h" 27#include <logutil.h>
28#include "pathutil.h" 28#include <pathutil.h>
29#include "resrutil.h" 29#include <resrutil.h>
30#include "shelutil.h" 30#include <shelutil.h>
31#include "strutil.h" 31#include <strutil.h>
32#include "wndutil.h" 32#include <wndutil.h>
33#include "thmutil.h" 33#include <thmutil.h>
34#include "verutil.h" 34#include <verutil.h>
35#include "uriutil.h" 35#include <uriutil.h>
36#include "xmlutil.h" 36#include <xmlutil.h>
37
38#include "BootstrapperEngine.h"
39#include "BootstrapperApplication.h"
40#include "IBootstrapperEngine.h"
41#include "IBootstrapperApplication.h"
42
43#include "balutil.h"
44#include "balinfo.h"
45#include "balcondition.h"
46
47#include "BAFunctions.h"
48 37
38#include <BootstrapperEngine.h>
39#include <BootstrapperApplication.h>
40#include <IBootstrapperEngine.h>
41#include <IBootstrapperApplication.h>
42
43#include <balutil.h>
44#include <balinfo.h>
45#include <balcondition.h>
46
47#include <BAFunctions.h>
48
49#include "inc\preqba.h"
49#include "wixstdba.messages.h" 50#include "wixstdba.messages.h"
50 51
51HRESULT CreateBootstrapperApplication( 52HRESULT CreateBootstrapperApplication(
52 __in HMODULE hModule, 53 __in HMODULE hModule,
53 __in BOOL fPrereq, 54 __in_opt PREQBA_DATA* pPrereqData,
54 __in HRESULT hrHostInitialization,
55 __in IBootstrapperEngine* pEngine, 55 __in IBootstrapperEngine* pEngine,
56 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, 56 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
57 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, 57 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults,
58 __out IBootstrapperApplication** ppApplication 58 __out IBootstrapperApplication** ppApplication
59 ); 59 );
60
61void DestroyBootstrapperApplication(
62 __in IBootstrapperApplication* pApplication,
63 __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs,
64 __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults
65 );
diff --git a/src/ext/Bal/wixstdba/wixstdba.cpp b/src/ext/Bal/wixstdba/wixstdba.cpp
index a96f1738..47f3f677 100644
--- a/src/ext/Bal/wixstdba/wixstdba.cpp
+++ b/src/ext/Bal/wixstdba/wixstdba.cpp
@@ -50,7 +50,7 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
50 hr = BalInitializeFromCreateArgs(pArgs, &pEngine); 50 hr = BalInitializeFromCreateArgs(pArgs, &pEngine);
51 ExitOnFailure(hr, "Failed to initialize Bal."); 51 ExitOnFailure(hr, "Failed to initialize Bal.");
52 52
53 hr = CreateBootstrapperApplication(vhInstance, FALSE, S_OK, pEngine, pArgs, pResults, &vpApplication); 53 hr = CreateBootstrapperApplication(vhInstance, NULL, pEngine, pArgs, pResults, &vpApplication);
54 BalExitOnFailure(hr, "Failed to create bootstrapper application interface."); 54 BalExitOnFailure(hr, "Failed to create bootstrapper application interface.");
55 55
56LExit: 56LExit:
@@ -60,45 +60,24 @@ LExit:
60} 60}
61 61
62 62
63extern "C" void WINAPI BootstrapperApplicationDestroy() 63extern "C" void WINAPI BootstrapperApplicationDestroy(
64{ 64 __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs,
65 ReleaseNullObject(vpApplication); 65 __in BOOTSTRAPPER_DESTROY_RESULTS* pResults
66 BalUninitialize();
67 DutilUninitialize();
68}
69
70
71extern "C" HRESULT WINAPI DncPrereqBootstrapperApplicationCreate(
72 __in HRESULT hrHostInitialization,
73 __in IBootstrapperEngine* pEngine,
74 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
75 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
76 ) 66 )
77{ 67{
78 HRESULT hr = S_OK; 68 if (vpApplication)
79 69 {
80 DutilInitialize(&WixstdbaTraceError); 70 DestroyBootstrapperApplication(vpApplication, pArgs, pResults);
81 71 }
82 BalInitialize(pEngine);
83
84 hr = CreateBootstrapperApplication(vhInstance, TRUE, hrHostInitialization, pEngine, pArgs, pResults, &vpApplication);
85 BalExitOnFailure(hr, "Failed to create .NET Core prerequisite bootstrapper application interface.");
86
87LExit:
88 return hr;
89}
90
91 72
92extern "C" void WINAPI DncPrereqBootstrapperApplicationDestroy()
93{
94 ReleaseNullObject(vpApplication); 73 ReleaseNullObject(vpApplication);
95 BalUninitialize(); 74 BalUninitialize();
96 DutilUninitialize(); 75 DutilUninitialize();
97} 76}
98 77
99 78
100extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate( 79extern "C" HRESULT WINAPI PrereqBootstrapperApplicationCreate(
101 __in HRESULT hrHostInitialization, 80 __in_opt PREQBA_DATA* pPrereqData,
102 __in IBootstrapperEngine* pEngine, 81 __in IBootstrapperEngine* pEngine,
103 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, 82 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
104 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults 83 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
@@ -110,19 +89,20 @@ extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate(
110 89
111 BalInitialize(pEngine); 90 BalInitialize(pEngine);
112 91
113 hr = CreateBootstrapperApplication(vhInstance, TRUE, hrHostInitialization, pEngine, pArgs, pResults, &vpApplication); 92 hr = CreateBootstrapperApplication(vhInstance, pPrereqData, pEngine, pArgs, pResults, &vpApplication);
114 BalExitOnFailure(hr, "Failed to create managed prerequisite bootstrapper application interface."); 93 BalExitOnFailure(hr, "Failed to create prerequisite bootstrapper application interface.");
115 94
116LExit: 95LExit:
117 return hr; 96 return hr;
118} 97}
119 98
120 99
121extern "C" void WINAPI MbaPrereqBootstrapperApplicationDestroy() 100extern "C" void WINAPI PrereqBootstrapperApplicationDestroy(
101 __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs,
102 __in BOOTSTRAPPER_DESTROY_RESULTS* pResults
103 )
122{ 104{
123 ReleaseNullObject(vpApplication); 105 BootstrapperApplicationDestroy(pArgs, pResults);
124 BalUninitialize();
125 DutilUninitialize();
126} 106}
127 107
128static void CALLBACK WixstdbaTraceError( 108static void CALLBACK WixstdbaTraceError(
diff --git a/src/ext/Bal/wixstdba/wixstdba.def b/src/ext/Bal/wixstdba/wixstdba.def
index ba9980d3..e377196b 100644
--- a/src/ext/Bal/wixstdba/wixstdba.def
+++ b/src/ext/Bal/wixstdba/wixstdba.def
@@ -4,7 +4,5 @@
4EXPORTS 4EXPORTS
5 BootstrapperApplicationCreate 5 BootstrapperApplicationCreate
6 BootstrapperApplicationDestroy 6 BootstrapperApplicationDestroy
7 DncPrereqBootstrapperApplicationCreate 7 PrereqBootstrapperApplicationCreate
8 DncPrereqBootstrapperApplicationDestroy 8 PrereqBootstrapperApplicationDestroy
9 MbaPrereqBootstrapperApplicationCreate
10 MbaPrereqBootstrapperApplicationDestroy
diff --git a/src/ext/Bal/wixstdba/wixstdba.vcxproj b/src/ext/Bal/wixstdba/wixstdba.vcxproj
index a43cc345..9273c1ed 100644
--- a/src/ext/Bal/wixstdba/wixstdba.vcxproj
+++ b/src/ext/Bal/wixstdba/wixstdba.vcxproj
@@ -52,6 +52,7 @@
52 <ClCompile Include="wixstdba.cpp" /> 52 <ClCompile Include="wixstdba.cpp" />
53 </ItemGroup> 53 </ItemGroup>
54 <ItemGroup> 54 <ItemGroup>
55 <ClInclude Include="inc\preqba.h" />
55 <ClInclude Include="precomp.h" /> 56 <ClInclude Include="precomp.h" />
56 <ClInclude Include="resource.h" /> 57 <ClInclude Include="resource.h" />
57 </ItemGroup> 58 </ItemGroup>