Repository navigation
Win7 floor trunk - #518
Merged
Merged
Win7 floor trunk#518
Conversation
Trunk builds only with a VS2015-or-newer toolset -- Python 3.11 needs one -- and that toolset's runtime does not install on anything older than Windows 7 SP1. The dmake and gbuild platform settings still declared Windows 2000 (WINVER/_WIN32_WINNT/_WIN32_IE 0x0500), and gbuild declared no _WIN32_WINNT at all. Declare the floor the result actually has, with the values the Bazel build has compiled and run at: WINVER/_WIN32_WINNT 0x0601 and the _WIN32_IE 0x0800 the Windows SDK derives from them. Unchanged on purpose: the GUI subsystem version pin in wntmsc14.mk (5.02/5.01 -- 6.00 switches Windows to the brokered drag-and-drop path our drop targets fail), and the modules that state their own value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream Python 3.9+ targets Windows 8: PC/pyconfig.h sets Py_WINVER 0x0602
and pythoncore links pathcch.lib, whose API set (api-ms-win-core-path-l1-1-0)
does not exist on Windows 7 -- python311.dll would not even load there.
PCbuild compiles with its own settings, so the solenv floor does not reach it.
The patch is the Windows 7 support the Bazel build has compiled and run with
(ext_libraries/modules/python/3.11.15/overlay on bazel-migration):
PC/pyconfig.h Py_WINVER 0x0601, Py_NTDDI NTDDI_WIN7
PC/pathcch.h shadows the SDK header (PC/ is ahead on the path)
PC/pathcch_win7.c PathCchSkipRoot/FindExtension/CombineEx: the real
ones from KernelBase.dll where exported (Windows 8+),
documented-behaviour fallbacks on Windows 7
PC/aoo_win7_compat.h the two Windows 8 LCMAP_* constants _winapi.c uses
only to reject them, force-included everywhere
pythoncore.vcxproj compiles pathcch_win7.c, links shlwapi.lib instead
of pathcch.lib
_freeze_module keeps pathcch.lib: it only runs on the build machine. The
patch is applied for the Windows build only. Verified to apply with
tg_ext.mk's own `patch --binary -p2' against the pristine tarball and to
reproduce the intended tree byte for byte.
On Windows 7 SP1 Python's dynload needs KB2533623 (LOAD_LIBRARY_SEARCH_*),
the same class of prerequisite as the UCRT update the VS2015+ runtime needs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The office is now built for Windows 7 SP1 (WINVER/_WIN32_WINNT 0x0601, the VS2015+ runtime, Python 3.11), but the MSI would still install on Vista or Windows 7 RTM and leave an office that cannot start. Add a launch condition so the installer stops with a clear message instead: (VersionNT > 601) or (VersionNT = 601 and ServicePackLevel >= 1) or Installed The "or Installed" keeps repair and removal of an existing installation working. Office MSI only: the language pack, SDK and URE packages install next to an office and carry only the privilege check. The new string OOO_LAUNCH_3 is en-US until translated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record the floor raise (solenv WINVER/_WIN32_WINNT 0x0601), why Python is where the floor is actually decided (python-3.11.15-win7.patch), the installer's launch condition, what was deliberately left alone (the GUI subsystem pin, per-module values), and the Windows 7 SP1 install-time prerequisites (KB2999226, KB2533623, a Windows 7-capable VC++ runtime). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f74c7b0 set _WIN32_IE=0x0800 next to _WIN32_WINNT=0x0601. That is the value the Windows SDK derives at 0x0601, but a fixed value is not the same thing as a derived one: sal/systools/win32/uwinapi's CopyFileEx{A,W}.cpp define _WIN32_WINNT 0x0400 themselves, and sdkddkver.h rejects an NT4 _WIN32_WINNT next to an IE above 6.0 SP1: sdkddkver.h(296): fatal error C1189: _WIN32_WINNT settings conflicts with _WIN32_IE setting Leave _WIN32_IE unset, as the Bazel build does, so each translation unit gets the value matching its own _WIN32_WINNT. Everything at the floor still compiles at 0x0800. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At the Windows 7 floor (_WIN32_WINNT 0x0601) psapi.h defaults to PSAPI_VERSION 2 and maps GetModuleFileNameExA/W to the K32 names, so the uwinapi thunks were defined as K32GetModuleFileNameExA/W while uwinapi.dxp exports the classic names: LNK2001 + LNK1120. Pin version 1 for this module only; callers elsewhere keep the default and bind to kernel32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commit 805d7ec raised BUILD from 9900 to 99000. get_fileversion() in solenv/bin/modules/installer/windows/file.pm splices that value into the third field of every file's version, so each File.Version row became 10.0.99000.0. Windows Installer stores each version field in 16 bits and rejects anything above 65535, so the whole database is judged invalid and every install aborts at InstallValidate with Internal Error 2725 -- Invalid database tables That hit every package the tree produces -- office, SDK and language pack, x86 and x64 alike -- and the message names neither a table nor the value responsible. Lower BUILD to 9900, and derive RSCREVISION from RSCVERSION, LAST_MINOR and BUILD so the build id is written in exactly one place instead of twice. Reject an out-of-range build id in get_fileversion() as well: a package that no Windows machine can install should fail while it is being built, not after it ships. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit ca673c293cf2eb5f1c8f982dc62180981fbaa8b0)
lngconvex substitutes each %PLACEHOLDER% in an .rc template from the string table of the language being written. A string that has an en-US entry but no translation yet -- every string added since the last translation round -- was left as the raw placeholder in all other language sections. setup.exe shows this: on a non-English system a failed runtime install reported "%RUNTIME_FAILED%" instead of the message, and %OS_TO_OLD% and %USER_CANCELED% had the same problem. Fall back to the en-US text. The fallback looks the en-US table up with find() so that it cannot create an empty table, which would add an extra language section to the output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The office is now built for Windows 7 SP1 (WINVER/_WIN32_WINNT 0x0601) and the MSI launch condition stops below Windows 7 SP1, but setup.exe still refused to run on anything older than Windows 10. Check for 6.1 SP1 instead, and say so in the message. The version still comes from RtlGetVersion, because GetVersionEx reports 6.3 on Windows 10 and 11 without a supportedOS manifest entry. The service pack level needs OSVERSIONINFOEXW. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the Windows 7 SP1 floor, the bundled VC v14 redistributable must install on Windows 7 SP1. The current v14 releases do not, so the "latest" permalinks are wrong for this build. The 14.29 redistributable that ships with the VS2019 build tools still supports Windows 7 SP1 and matches the toolset. Also document how a wrong file shows up: setup.exe runs the package with the v14 switches "/install /quiet /norestart". The Visual C++ 2008 package does not understand them and fails, and setup.exe stops with "The Microsoft Visual C++ runtime could not be installed". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The DirectShow backend keeps its Player / Window object in the extra bytes of its notification windows with SetWindowLong(..., (DWORD) this), and the window classes reserve only sizeof(DWORD) for it. On x64 that cuts the pointer to 32 bits; when DirectShow posts WM_GRAPHNOTIFY during playback, the window procedure reads it back with GetWindowLong and calls processEvent() through a bogus pointer. Playing a sound inserted in Impress via Insert > Movie and Sound died with "SEH Exception: ACCESS VIOLATION". Use SetWindowLongPtr / GetWindowLongPtr and reserve sizeof(LONG_PTR). Both exist in every SDK we build with, so 32-bit builds are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three more places stored an object pointer in 32 bits, the same defect as avmedia's notify windows: - sfx2 quickstarter: the owner-drawn tray menu set mi.dwItemData = (DWORD) pMyItem. Right-clicking the tray icon sent WM_MEASUREITEM, OnMeasureItem dereferenced the truncated pointer, and the crash brought up the document recovery dialog. - crashrep: the dialog stored &Params with SetWindowLongPtr( ..., GWLP_USERDATA, (LONG)lParam ). - embedserv: the OLE hatch window kept its CHatchWin with SetWindowLong( ..., (LONG)phw ) in a class reserving sizeof(LONG). Use ULONG_PTR / LONG_PTR and GetWindowLongPtr / SetWindowLongPtr, and reserve sizeof(LONG_PTR) for the hatch window. The tray menu was verified on x64; the crashrep and embedserv changes are the same mechanical fix and were not exercised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CLI-UNO assemblies (cli_basetypes, cli_uretypes, cli_ure, cli_cppuhelper) are built for the .NET 4 runtime (CLR v4.0.30319) by the current toolchain, but REQUIRED_DOTNET_VERSION was still 2.0.0.0. On Windows 7 SP1, which ships only .NET 3.5, DotNetCheck therefore reported .NET as sufficient, the assembly components were installed into the GAC, and setup stopped with "Error 1304. Error writing to file cli_basetypes.dll". Require 4.0.0.0. Without .NET 4, DotNetCheck sets DOTNET_SUFFICIENT=0, the assembly components are skipped and the rest of the office installs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The download .exe opened with its own welcome page and a page asking where to put the "Installation Files" folder on the desktop, before the MSI wizard showed a welcome page of its own. - Drop the welcome and directory pages; only the unpack progress page remains, followed by the MSI wizard. - Unpack into "<ProgramData>\<product> Installation Files" and keep it. setup.exe starts the MSI from there, so Windows Installer records it as the installation source and repair, modify and patching find the cabinet again. /EXTRACTONLY=ON still unpacks to the desktop, /D= still overrides, silent installs still use %TEMP%. - Wait for setup.exe in every mode, then remove kept installation sets whose product is no longer installed: the version a major upgrade has just replaced, or an install that was cancelled. A folder is judged by the productcode in its setup.ini via MsiQueryProductState, never by its name, and only INSTALLSTATE_UNKNOWN deletes, so language packs and installs for other users keep their source. The template compiles with makensis without new warnings; the cleanup function was exercised against test folders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add an unchecked "Reset my user profile" box to the ReadyToInstall dialog (property RESETUSERPROFILE, also settable on the command line). A new immediate custom action, ResetUserProfile in shlxtmsi.dll, runs behind InstallFinalize, so only after a successful install and impersonated as the installing user. It reads UserInstallation from the installed program\bootstrap.ini (e.g. $SYSUSERCONFIG/OpenOffice/5), maps $SYSUSERCONFIG to AppDataFolder, and renames the profile to <profile>.backup-YYYYMMDD-HHMMSS; nothing is deleted. No profile, an unexpected UserInstallation value or a failed rename (office still running) are logged and leave the install successful. Only the installing user's profile is touched; with over-the-shoulder elevation that is the administrator's. The new string is en-US only and falls back to English in the other languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening a .ppt as the first document of a session crashed on Windows (and FreeBSD) right after the import, in SdrObjListIter::ImpProcessObj, calling through a vtable that pointed into memory no longer mapped. SdPPTFilter::Import() loads sdfilt with OpenLibrary(), calls ImportPPT and deletes the osl::Module, which unloads sdfilt and, when nothing else holds it, msfilter with it. The imported document still holds objects whose virtual-function tables live in those libraries, so the next virtual call jumps into unmapped memory. With any document opened before, another component kept msfilter loaded and nothing happened; on Linux dlclose of such a C++ library usually does not unload it. Found under cdb with full page heap: the faulting vtable was inside msfilter's former range, and sdfilt's range had been reused by another DLL. SdFilter::OpenLibrary() now takes one extra reference per filter library the first time it is opened and never releases it, so the library stays loaded for the rest of the process. This covers every sd filter going through OpenLibrary (PPT import/export, VBA save, CGM). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every build gets a new product code, so a second build of the same version is a different product. The SAMEPRODUCTS row in the Upgrade table detected it and SameProductFound aborted with "The same version of ... is already installed", leaving no way to install the new build other than uninstalling first. Drop that row and let OLDPRODUCTSSAMEMAJOR, which is always removed, include the current version (VersionMaxInclusive, attributes 769 instead of 257; patches keep 257). Another build of the same version is now replaced like an older one. FindRelatedProducts never lists the package's own product code, so running the identical package again still shows the maintenance dialog, and NEWPRODUCTS still refuses a downgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in sd/source/filter/sdfilter.cxx: trunk replaced std::auto_ptr with std::unique_ptr in SdFilter::OpenLibrary, which this branch had rewritten to keep filter libraries loaded. Kept the branch's version with unique_ptr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the Windows build floor from Windows 10 to Windows 7 SP1 (x64, VS2019) and fixes the defects found while testing the resulting installer on Windows 7 and Windows 11.
Windows 7 SP1 floor
_WIN32_WINNT=0x0601;_WIN32_IEno longer pinnedPSAPI_VERSION 1Win64 crashes (pointers cut to 32 bits)
These show on Windows 11 but rarely on Windows 7, because only Windows 8 and later place heap memory above 4 GB.
Impress
Installer
RESETUSERPROFILE=1): renames the profile to a timestamped backup after a successful installTesting
Tested on x64: sound playback, tray menu, and opening presentations including .ppt. Not yet tested: the installer changes on a Windows 7 VM, and the crashrep/embedserv changes.
🤖 Generated with Claude Code