mirror of
https://github.com/python/cpython.git
synced 2025-09-19 07:00:59 +00:00
Fixes UI labels and ability to add/remove features.
This commit is contained in:
parent
102f72cf1a
commit
c98290b91b
1 changed files with 21 additions and 10 deletions
|
@ -723,6 +723,11 @@ public: // IBootstrapperApplication
|
||||||
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Skipping package: %ls, after restart because it was applied before the restart.", wzPackageId);
|
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Skipping package: %ls, after restart because it was applied before the restart.", wzPackageId);
|
||||||
|
|
||||||
*pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
|
*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();
|
hr = LoadBootstrapperBAFunctions();
|
||||||
BalExitOnFailure(hr, "Failed to load bootstrapper functions.");
|
BalExitOnFailure(hr, "Failed to load bootstrapper functions.");
|
||||||
|
hr = UpdateUIStrings(_command.action);
|
||||||
|
BalExitOnFailure(hr, "Failed to load UI strings.");
|
||||||
|
|
||||||
GetBundleFileVersion();
|
GetBundleFileVersion();
|
||||||
// don't fail if we couldn't get the version info; best-effort only
|
// don't fail if we couldn't get the version info; best-effort only
|
||||||
|
|
||||||
LExit:
|
LExit:
|
||||||
ReleaseObject(pixdManifest);
|
ReleaseObject(pixdManifest);
|
||||||
ReleaseStr(sczModulePath);
|
ReleaseStr(sczModulePath);
|
||||||
|
@ -1835,18 +1841,10 @@ private:
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
HRESULT UpdateUIStrings(__in BOOTSTRAPPER_ACTION action) {
|
||||||
|
|
||||||
//
|
|
||||||
// OnPlan - plan the detected changes.
|
|
||||||
//
|
|
||||||
void OnPlan(__in BOOTSTRAPPER_ACTION action) {
|
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
LPCWSTR likeInstalling = nullptr;
|
LPCWSTR likeInstalling = nullptr;
|
||||||
LPCWSTR likeInstallation = nullptr;
|
LPCWSTR likeInstallation = nullptr;
|
||||||
|
|
||||||
_plannedAction = action;
|
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case BOOTSTRAPPER_ACTION_INSTALL:
|
case BOOTSTRAPPER_ACTION_INSTALL:
|
||||||
likeInstalling = L"Installing";
|
likeInstalling = L"Installing";
|
||||||
|
@ -1895,6 +1893,19 @@ private:
|
||||||
SUCCEEDED(hr) && locText ? locText->wzText : likeInstallation
|
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 we are going to apply a downgrade, bail.
|
||||||
if (_downgrading && BOOTSTRAPPER_ACTION_UNINSTALL < action) {
|
if (_downgrading && BOOTSTRAPPER_ACTION_UNINSTALL < action) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue