10#include "../../stdafx.h"
12#include "../../3rdparty/fmt/format.h"
13#include "../../survey.h"
16#include <mach-o/arch.h>
19#include "../../safeguards.h"
21void SurveyOS(nlohmann::json &json)
25 const NXArchInfo *arch = NXGetLocalArchInfo();
28 json[
"release"] = fmt::format(
"{}.{}.{}", ver_major, ver_minor, ver_patch);
29 json[
"machine"] = arch !=
nullptr ? arch->description :
"unknown";
30 json[
"min_ver"] = MAC_OS_X_VERSION_MIN_REQUIRED;
31 json[
"max_ver"] = MAC_OS_X_VERSION_MAX_ALLOWED;
34 json[
"hardware_concurrency"] = std::thread::hardware_concurrency();
Functions related to MacOS support.
std::tuple< int, int, int > GetMacOSVersion()
Get the version of the MacOS we are running under.
uint64_t MacOSGetPhysicalMemory()
Ask OS how much RAM it has physically attached.
std::string SurveyMemoryToText(uint64_t memory)
Change the bytes of memory into a textual version rounded up to the biggest unit.