Skip to content

Report macOS 11+ and Windows 11 correctly to the update checker - #717

Merged
CoffeeFlux merged 1 commit into
TypesettingTools:masterfrom
CoffeeFlux:fix-macos-update-check-os
Oct 5, 2026
Merged

CoffeeFlux merged 1 commit into
TypesettingTools:masterfrom
CoffeeFlux:fix-macos-update-check-os

Conversation

@CoffeeFlux

@CoffeeFlux CoffeeFlux commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Fixes two ways the update checker misreports the OS (the os query parameter).

macOS 11 and later report as unknown (about 10% of all update checks). GetOSShortName() only recognized a macOS major version of 10 (or 0x10), and its decoding was out of date:

  • It was written for wxWidgets 2.8 (merged from 2.1.8 in 0cd4f12), which returned Gestalt's BCD-packed version: 0x10 and 0x46 for 10.4.6. Splitting the minor version into nibbles was correct then.
  • wxWidgets switched to plain integers in 2011. d132364 (2012) accepted a decimal 10 but kept the nibble decoding, so e.g. 10.15 became osx0o.
  • Since Big Sur, the major version is 11 and up, so modern macOS fell through to unknown.

wxWidgets 3.2 (our minimum) and 3.3 get the version from NSProcessInfo as plain integers, so the packed format can no longer occur. This reports the plain major and minor version instead, e.g. osx15.6 or osx10.15.

Windows 11 reports as win10. Windows 11 is still NT 10.0 in every version API; only the build number distinguishes it. This reports win11 for build 22000 and later, the same cutoff wxWidgets uses (wxGetOsVersion returns the build number as the micro version). Server 2022 (build 20348) stays win10; Server 2025 reports win11.

The update server stores the value as-is, so it needs no change.

@CoffeeFlux
CoffeeFlux force-pushed the fix-macos-update-check-os branch from 4728ad0 to a5367bc Compare October 5, 2026 16:59
@CoffeeFlux CoffeeFlux changed the title Report macOS 11 and later correctly to the update checker Report macOS 11+ and Windows 11 correctly to the update checker Oct 5, 2026
GetOSShortName() only recognized a major version of 10 (or 0x10) on
macOS, so macOS 11 and later fell through to "unknown". The version
decoding was also out of date: it dates from wxWidgets 2.8, which
returned Gestalt's BCD-packed version (e.g. 0x10 and 0x46 for 10.4.6),
so it split the minor version into nibbles. wxWidgets started returning
plain integers in 2011 (d132364 adapted to the new major version but
kept the nibbles), which turned e.g. 10.15 into "osx0o". The required
wxWidgets 3.2 gets the version from NSProcessInfo, so the packed format
can no longer occur. Report the plain major and minor version instead,
e.g. "osx15.6".

Windows 11 also reports version 10.0, so it was counted as "win10".
Report "win11" for build 22000 and later, the same cutoff wxWidgets
uses; wxGetOsVersion returns the build number as the micro version.
@CoffeeFlux
CoffeeFlux force-pushed the fix-macos-update-check-os branch from a5367bc to 1a0a282 Compare October 5, 2026 17:00
@CoffeeFlux
CoffeeFlux merged commit d51735f into TypesettingTools:master Oct 5, 2026
9 checks passed
@CoffeeFlux
CoffeeFlux deleted the fix-macos-update-check-os branch October 5, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant