Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add compatibility for all macOS versions and ppc
Make it compilable in all versions of Xcode, all SDKs, all architectures (PowerPC, Intel, ARM). Changes: - Added separate Xcode project files for older versions of macOS. Separate project files makes them easier to compare. Each project has one target and builds to a separate folder in a build folder (when built with xcodebuild). -- AllRez10.6 builds in Mac OS X 10.6. It builds 32-bit binaries for PowerPC and Intel which is required for Mac OS X 10.4 which has only 32-bit ApplicationServices.framework. It can build 64-bit Intel for Mac OS X 10.5 and later. For ppc64, the 10.5 SDK is required and it won't run for Mac OS X 10.4 or for Rosetta (but don't run AllRez for Rosetta since it doesn't do endian swap in some cases). -- AllRez10.12 builds in OS X 10.12. This works for Mac OS X starting from 10.5. It can work for 10.4 if you remove the 64-bit binary. -- AllRez builds in macOS 13. It builds 64-bit binaries for ARM and Intel which work with macOS versions starting from OS X 10.8 (though deployment target is 10.9). -- All project files are Xcode version 3.1 so the file can be opened in older version of Xcode. - Added MacOSMacros.h which determines the SDK version in case MAC_OS_X_VERSION_MAX_ALLOWED is insufficient (it's not always the same as the SDK version). SDK version is not needed for header files that have a version define but most do not. - Added AppleMisc.cpp which does the following (among other things related to AppleMisc.h): -- get the current Darwin and macOS Version. The macOS version may not be accurate if kern.osproductversion doesn't exist because in that case it guesses the macOS version from the Darwin version which might have a different minor version number. The best way to get macOS Version is probably from reading the SystemVersion.plist file. -- UniversalI2CSendRequest is a version of I2CSendRequest that works in all MacOS versions for 32-bit and 64-bit. - Added olderversions of iogdiagnose. -- IOGraphics530.14 is for macOS 10.13.4 to 10.14.3. -- IOGraphics530.66 is for macOS 10.14.4 to 10.14.6. -- IOGraphics576.1 is for macOS 10.15 to 10.15.7. -- IOGraphics is for macOS 11 to 13.2. Only this version has the extra AGDCDiagnose displaypolicyd parsing. - APIs that exist and later macOS versions may not exist in earlier macOS versions. AllRez will check if the API exists before using it. - Fields of structs in later macOS versions may not exist in earlier macOS versions. AllRez will not output fields that don't exist for the current macOS version. It will output flags that are set even if the current macOS version shouldn't know about that flag. - iofbdebuguser.cpp has example of overriding EDID (uses joevt Lilu/WhateverGreen forks - not finished yet). The override occurs at a lower level than the Display overrides. - oui.cpp compiles faster when the oui list is used in an array instead of a switch statement. - CFOutput in printf.cpp uses regex to transform CFCopyDescription output of older macOS versions. - Added parsing of scaled-resolutions, dspc, drng, trng, tinf, tovr
- Loading branch information