Skip to content

Commit b97f68e

Browse files
committed
Revert "bpo-41412 and bpo-40948: Windows installer updates (pythonGH-21656)"
This reverts commit 95cc37f.
1 parent a314395 commit b97f68e

File tree

3 files changed

+66
-19
lines changed

3 files changed

+66
-19
lines changed

Tools/msi/bundle/Default.wxl

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Select Customize to review current options.</String>
8989
<String Id="ShortInstallLauncherAllUsersLabel">Install &amp;launcher for all users (recommended)</String>
9090
<String Id="PrecompileLabel">&amp;Precompile standard library</String>
9191
<String Id="Include_symbolsLabel">Download debugging &amp;symbols</String>
92-
<String Id="Include_debugLabel">Download debu&amp;g binaries (requires VS 2017 or later)</String>
92+
<String Id="Include_debugLabel">Download debu&amp;g binaries (requires VS 2015 or later)</String>
9393

9494
<String Id="ProgressHeader">[ActionLikeInstallation] Progress</String>
9595
<String Id="ProgressLabel">[ActionLikeInstalling]:</String>
@@ -105,7 +105,7 @@ Select Customize to review current options.</String>
105105
<String Id="SuccessLaunchButton">&amp;Launch</String>
106106
<String Id="SuccessRestartText">You may need to restart your computer to finish updating files.</String>
107107
<String Id="SuccessRestartButton">&amp;Restart</String>
108-
<String Id="SuccessInstallMessage">New to Python? Start with the &lt;a href="https://docs.python.org/[ShortVersion]/tutorial/index.html"&gt;online tutorial&lt;/a&gt; and &lt;a href="https://docs.python.org/[ShortVersion]/index.html"&gt;documentation&lt;/a&gt;. At your terminal, type "py" to launch Python, or search for Python in your Start menu.
108+
<String Id="SuccessInstallMessage">Special thanks to Mark Hammond, without whose years of freely shared Windows expertise, Python for Windows would still be Python for DOS.
109109

110110
See &lt;a href="https://docs.python.org/[ShortVersion]/whatsnew/[ShortVersion].html"&gt;what's new&lt;/a&gt; in this release, or find more info about &lt;a href="https://docs.python.org/[ShortVersion]/using/windows.html"&gt;using Python on Windows&lt;/a&gt;.</String>
111111
<String Id="SuccessModifyMessage">Thank you for using [WixBundleName].</String>
@@ -121,9 +121,26 @@ Feel free to email &lt;a href="mailto:[email protected]"&gt;python-list@pyt
121121
<String Id="FailureRestartButton">&amp;Restart</String>
122122
<String Id="FailureExistingInstall">Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName].</String>
123123

124-
<String Id="FailureOldOS">At least Windows 8.1 or Windows Server 2012 are required to install [WixBundleName]
124+
<String Id="FailureWin7MissingSP1">Windows 7 Service Pack 1 and all applicable updates are required to install [WixBundleName].
125+
126+
Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%207%20service%20pack%201"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
127+
<String Id="FailureVistaMissingSP2">Windows Vista Service Pack 2 and all applicable updates are required to install [WixBundleName].
128+
129+
Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%20vista%20service%20pack%202"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
130+
<String Id="FailureXPOrEarlier">Windows Vista or later is required to install and use [WixBundleName].
131+
132+
Visit &lt;a href="https://www.python.org/"&gt;python.org&lt;/a&gt; to download Python 3.4.</String>
133+
134+
<String Id="FailureWS2K8R2MissingSP1">Windows Server 2008 R2 Service Pack 1 and all applicable updates are required to install [WixBundleName].
135+
136+
Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%20server%202008%20r2%20service%20pack%201"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
137+
<String Id="FailureWS2K8MissingSP2">Windows Server 2008 Service Pack 2 and all applicable updates are required to install [WixBundleName].
138+
139+
Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%20server%202008%20service%20pack%202"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
140+
<String Id="FailureWS2K3OrEarlier">Windows Server 2008 SP2 or later is required to install and use [WixBundleName].
141+
142+
Visit &lt;a href="https://www.python.org/"&gt;python.org&lt;/a&gt; to download Python 3.4.</String>
125143

126-
Visit &lt;a href="https://www.python.org/"&gt;python.org&lt;/a&gt; to download an earlier version of Python.</String>
127144
<String Id="SuccessMaxPathButton">Disable path length limit</String>
128145
<String Id="SuccessMaxPathButtonNote">Changes your machine configuration to allow programs, including Python, to bypass the 260 character "MAX_PATH" limitation.</String>
129146
</WixLocalization>

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3011,35 +3011,65 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
30113011
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2012 or later");
30123012
return;
30133013
} else if (IsWindowsVersionOrGreater(6, 1, 1)) {
3014-
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Detected Windows Server 2008 R2");
3014+
HMODULE hKernel32 = GetModuleHandleW(L"kernel32");
3015+
if (hKernel32 && !GetProcAddress(hKernel32, "AddDllDirectory")) {
3016+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2 without KB2533623");
3017+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "KB2533623 update is required to continue.");
3018+
/* The "MissingSP1" error also specifies updates are required */
3019+
LocGetString(_wixLoc, L"#(loc.FailureWS2K8R2MissingSP1)", &pLocString);
3020+
} else {
3021+
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2008 R2 or later");
3022+
return;
3023+
}
30153024
} else if (IsWindowsVersionOrGreater(6, 1, 0)) {
30163025
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
3026+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");
3027+
LocGetString(_wixLoc, L"#(loc.FailureWS2K8R2MissingSP1)", &pLocString);
3028+
} else if (IsWindowsVersionOrGreater(6, 0, 2)) {
3029+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Server 2008 SP2 or later");
3030+
return;
30173031
} else if (IsWindowsVersionOrGreater(6, 0, 0)) {
30183032
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008");
3033+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation");
3034+
LocGetString(_wixLoc, L"#(loc.FailureWS2K8MissingSP2)", &pLocString);
30193035
} else {
30203036
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2003 or earlier");
3037+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Server 2008 SP2 or later is required to continue installation");
3038+
LocGetString(_wixLoc, L"#(loc.FailureWS2K3OrEarlier)", &pLocString);
30213039
}
3022-
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Server 2012 or later is required to continue installation");
30233040
} else {
3024-
if (IsWindows10OrGreater()) {
3025-
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 10 or later");
3026-
return;
3027-
} else if (IsWindows8Point1OrGreater()) {
3028-
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 8.1");
3041+
if (IsWindows8OrGreater()) {
3042+
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 8 or later");
30293043
return;
3030-
} else if (IsWindows8OrGreater()) {
3031-
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 8");
3044+
} else if (IsWindows7SP1OrGreater()) {
3045+
HMODULE hKernel32 = GetModuleHandleW(L"kernel32");
3046+
if (hKernel32 && !GetProcAddress(hKernel32, "AddDllDirectory")) {
3047+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 SP1 without KB2533623");
3048+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "KB2533623 update is required to continue.");
3049+
/* The "MissingSP1" error also specifies updates are required */
3050+
LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString);
3051+
} else {
3052+
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 7 SP1 or later");
3053+
return;
3054+
}
30323055
} else if (IsWindows7OrGreater()) {
3033-
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7");
3056+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM");
3057+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");
3058+
LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString);
3059+
} else if (IsWindowsVistaSP2OrGreater()) {
3060+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Vista SP2");
3061+
return;
30343062
} else if (IsWindowsVistaOrGreater()) {
3035-
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista");
3063+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista RTM or SP1");
3064+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation");
3065+
LocGetString(_wixLoc, L"#(loc.FailureVistaMissingSP2)", &pLocString);
30363066
} else {
30373067
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows XP or earlier");
3068+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Vista SP2 or later is required to continue installation");
3069+
LocGetString(_wixLoc, L"#(loc.FailureXPOrEarlier)", &pLocString);
30383070
}
3039-
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows 8.1 or later is required to continue installation");
30403071
}
30413072

3042-
LocGetString(_wixLoc, L"#(loc.FailureOldOS)", &pLocString);
30433073
if (pLocString && pLocString->wzText) {
30443074
BalFormatString(pLocString->wzText, &_failedMessage);
30453075
}

Tools/msi/bundle/packagegroups/crt.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<PackageGroup Id="crt">
55
<MsiPackage Id="ucrt_AllUsers"
66
SourceFile="ucrt.msi"
7-
Compressed="no"
7+
Compressed="$(var.CompressMSI)"
88
DownloadUrl="$(var.DownloadUrl)"
99
ForcePerMachine="yes"
1010
InstallCondition="InstallAllUsers and not CRTInstalled and (Include_core or Include_exe or Include_pip) and not LauncherOnly">
1111
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
1212
</MsiPackage>
1313
<MsiPackage Id="ucrt_JustForMe"
1414
SourceFile="ucrt.msi"
15-
Compressed="no"
15+
Compressed="$(var.CompressMSI)"
1616
DownloadUrl="$(var.DownloadUrl)"
1717
ForcePerMachine="no"
1818
InstallCondition="not InstallAllUsers and not CRTInstalled and (Include_core or Include_exe or Include_pip) and not LauncherOnly">

0 commit comments

Comments
 (0)