mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
bpo-32507: Change Windows install to include app-local UCRT (#5119)
This commit is contained in:
parent
ca0c5f2656
commit
d135f20ae8
31 changed files with 71 additions and 200 deletions
|
@ -281,10 +281,6 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
|
|||
case ID_INSTALL_BUTTON:
|
||||
SavePageSettings();
|
||||
|
||||
if (!WillElevate() && !QueryElevateForCrtInstall()) {
|
||||
break;
|
||||
}
|
||||
|
||||
hr = BalGetNumericVariable(L"InstallAllUsers", &installAllUsers);
|
||||
ExitOnFailure(hr, L"Failed to get install scope");
|
||||
|
||||
|
@ -332,10 +328,6 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
|
|||
ReleaseStr(targetDir);
|
||||
}
|
||||
|
||||
if (!WillElevate() && !QueryElevateForCrtInstall()) {
|
||||
break;
|
||||
}
|
||||
|
||||
OnPlan(_command.action);
|
||||
break;
|
||||
|
||||
|
@ -2642,30 +2634,6 @@ private:
|
|||
return result;
|
||||
}
|
||||
|
||||
BOOL QueryElevateForCrtInstall() {
|
||||
// Called to prompt the user that even though they think they won't need
|
||||
// to elevate, they actually will because of the CRT install.
|
||||
if (IsCrtInstalled()) {
|
||||
// CRT is already installed - no need to prompt
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LONGLONG elevated;
|
||||
HRESULT hr = BalGetNumericVariable(L"WixBundleElevated", &elevated);
|
||||
if (SUCCEEDED(hr) && elevated) {
|
||||
// Already elevated - no need to prompt
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LOC_STRING *locStr;
|
||||
hr = LocGetString(_wixLoc, L"#(loc.ElevateForCRTInstall)", &locStr);
|
||||
if (FAILED(hr)) {
|
||||
BalLogError(hr, "Failed to get ElevateForCRTInstall string");
|
||||
return FALSE;
|
||||
}
|
||||
return ::MessageBoxW(_hWnd, locStr->wzText, _theme->sczCaption, MB_YESNO) != IDNO;
|
||||
}
|
||||
|
||||
HRESULT EvaluateConditions() {
|
||||
HRESULT hr = S_OK;
|
||||
BOOL result = FALSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue