summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-03-25 06:20:57 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-03-25 06:20:57 (GMT)
commitc98290b91bb01b10d7800a1f8b65a991c6815e8f (patch)
tree516480d59346445b6076ef496da0a9744f7a8475 /Tools
parent102f72cf1a414f507951cf4988d51cffb8f4e2b4 (diff)
downloadcpython-c98290b91bb01b10d7800a1f8b65a991c6815e8f.zip
cpython-c98290b91bb01b10d7800a1f8b65a991c6815e8f.tar.gz
cpython-c98290b91bb01b10d7800a1f8b65a991c6815e8f.tar.bz2
Fixes UI labels and ability to add/remove features.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
index c4b5253..87ec6f2 100644
--- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -723,6 +723,11 @@ public: // IBootstrapperApplication
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Skipping package: %ls, after restart because it was applied before the restart.", wzPackageId);
*pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
+ } else if ((_plannedAction == BOOTSTRAPPER_ACTION_INSTALL || _plannedAction == BOOTSTRAPPER_ACTION_MODIFY) &&
+ SUCCEEDED(BalInfoFindPackageById(&_bundle.packages, wzPackageId, &pPackage))) {
+ BOOL f = FALSE;
+ if (SUCCEEDED(_engine->EvaluateCondition(pPackage->sczInstallCondition, &f)) && f) {
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
}
}
@@ -1233,10 +1238,11 @@ private:
hr = LoadBootstrapperBAFunctions();
BalExitOnFailure(hr, "Failed to load bootstrapper functions.");
+ hr = UpdateUIStrings(_command.action);
+ BalExitOnFailure(hr, "Failed to load UI strings.");
GetBundleFileVersion();
// don't fail if we couldn't get the version info; best-effort only
-
LExit:
ReleaseObject(pixdManifest);
ReleaseStr(sczModulePath);
@@ -1835,18 +1841,10 @@ private:
return;
}
-
-
- //
- // OnPlan - plan the detected changes.
- //
- void OnPlan(__in BOOTSTRAPPER_ACTION action) {
+ HRESULT UpdateUIStrings(__in BOOTSTRAPPER_ACTION action) {
HRESULT hr = S_OK;
LPCWSTR likeInstalling = nullptr;
LPCWSTR likeInstallation = nullptr;
-
- _plannedAction = action;
-
switch (action) {
case BOOTSTRAPPER_ACTION_INSTALL:
likeInstalling = L"Installing";
@@ -1895,6 +1893,19 @@ private:
SUCCEEDED(hr) && locText ? locText->wzText : likeInstallation
);
}
+ return hr;
+ }
+
+ //
+ // OnPlan - plan the detected changes.
+ //
+ void OnPlan(__in BOOTSTRAPPER_ACTION action) {
+ HRESULT hr = S_OK;
+
+ _plannedAction = action;
+
+ hr = UpdateUIStrings(action);
+ BalExitOnFailure(hr, "Failed to update strings");
// If we are going to apply a downgrade, bail.
if (_downgrading && BOOTSTRAPPER_ACTION_UNINSTALL < action) {