8000 bpo-36085: Add installer check for KB2533625 (GH-12636) · python/cpython@79da388 · GitHub
[go: up one dir, main page]

Skip to content

Commit 79da388

Browse files
authored
bpo-36085: Add installer check for KB2533625 (GH-12636)
1 parent ac19d96 commit 79da388

File tree

4 files changed

+34
-11
lines changed

4 files changed

+34
-11
lines changed

Doc/whatsnew/3.8.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,9 @@ Changes in the Python API
754754
used, and modifications to these will no longer have any effect on normal DLL
755755
resolution. If your application relies on these mechanisms, you should check
756756
for :func:`~os.add_dll_directory` and if it exists, use it to add your DLLs
757-
directory while loading your library.
757+
directory while loading your library. Note that Windows 7 users will need to
758+
ensure that Windows Update KB2533625 has been installed (this is also verified
759+
by the installer).
758760
(See :issue:`36085`.)
759761

760762

Tools/msi/build.bat

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set PCBUILD=%D%..\..\PCbuild\
66
set BUILDX86=
77
set BUILDX64=
88
set BUILDDOC=
9-
set BUILDTEST=--test-marker
9+
set BUILDTEST=
1010
set BUILDPACK=
1111
set REBUILD=
1212

@@ -16,6 +16,7 @@ if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
1616
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
1717
if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
1818
if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
19+
if "%~1" EQU "--test-marker" (set BUILDTEST=--test-marker) && shift && goto CheckOpts
1920
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
2021
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
2122

@@ -69,11 +70,12 @@ if defined BUILDX64 (
6970
exit /B 0
7071

7172
:Help
72-
echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r]
73+
echo build.bat [-x86] [-x64] [--doc] [-h] [--test-marker] [--pack] [-r]
7374
echo.
7475
echo -x86 Build x86 installers
7576
echo -x64 Build x64 installers
7677
echo --doc Build CHM documentation
77-
echo --no-test-marker Build without test markers
78+
echo --test-marker Build with test markers
79+
echo --no-test-marker Build without test markers (default)
7880
echo --pack Embed core MSIs into installer
7981
echo -r Rebuild rather than incremental build

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2989,9 +2989,20 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
29892989
LOC_STRING *pLocString = nullptr;
29902990

29912991
if (IsWindowsServer()) {
2992-
if (IsWindowsVersionOrGreater(6, 1, 1)) {
2993-
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2008 R2 or later");
2992+
if (IsWindowsVersionOrGreater(6, 2, 0)) {
2993+
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2012 or later");
29942994
return;
2995+
} else if (IsWindowsVersionOrGreater(6, 1, 1)) {
2996+
HMODULE hKernel32 = GetModuleHandleW(L"kernel32");
2997+
if (hKernel32 && !GetProcAddress(hKernel32, "AddDllDirectory")) {
2998+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2 without KB2533625");
2999+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "KB2533625 update is required to continue.");
3000+
/* The "MissingSP1" error also specifies updates are required */
3001+
LocGetString(_wixLoc, L"#(loc.FailureWS2K8R2MissingSP1)", &pLocString);
3002+
} else {
3003+
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2008 R2 or later");
3004+
return;
3005+
}
29953006
} else if (IsWindowsVersionOrGreater(6, 1, 0)) {
29963007
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
29973008
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");
@@ -3009,9 +3020,20 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
30093020
LocGetString(_wixLoc, L"#(loc.FailureWS2K3OrEarlier)", &pLocString);
30103021
}
30113022
} else {
3012-
if (IsWindows7SP1OrGreater()) {
3013-
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 7 SP1 or later");
3023+
if (IsWindows8OrGreater()) {
3024+
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 8 or later");
30143025
return;
3026+
} else if (IsWindows7SP1OrGreater()) {
3027+
HMODULE hKernel32 = GetModuleHandleW(L"kernel32");
3028+
if (hKernel32 && !GetProcAddress(hKernel32, "AddDllDirectory")) {
3029+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 SP1 without KB2533625");
3030+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "KB2533625 update is required to continue.");
3031+
/* The "MissingSP1" error also specifies updates are required */
3032+
LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString);
3033+
} else {
3034+
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 7 SP1 or later");
3035+
return;
3036+
}
30153037
} else if (IsWindows7OrGreater()) {
30163038
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM");
30173039
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");

Tools/msi/lib/lib_files.wxs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@
6262
<Component Id="libssl.pdb" Directory="DLLs" Guid="*">
6363
<File Name="libssl$(var.ssltag).pdb" KeyPath="yes" />
6464
</Component>
65-
<Component Id="libffi.pdb" Directory="DLLs" Guid="*">
66-
<File Name="libffi-7.pdb" KeyPath="yes" />
67-
</Component>
6865
<Component Id="venvlauncher.pdb" Directory="Lib_venv_scripts_nt__pdbs" Guid="*">
6966
<File Name="python.pdb" Source="venvlauncher.pdb" KeyPath="yes" />
7067
</Component>

0 commit comments

Comments
 (0)
0