Added better OS information for Mac OS X
This commit is contained in:
parent
d0c03f804f
commit
444e581860
|
@ -242,6 +242,7 @@ protected:
|
||||||
|
|
||||||
// For Mac
|
// For Mac
|
||||||
bool ParseSysCtl();
|
bool ParseSysCtl();
|
||||||
|
void CallSwVers();
|
||||||
kwsys_stl::string ExtractValueFromSysCtl(const char* word);
|
kwsys_stl::string ExtractValueFromSysCtl(const char* word);
|
||||||
kwsys_stl::string SysCtlBuffer;
|
kwsys_stl::string SysCtlBuffer;
|
||||||
|
|
||||||
|
@ -3369,12 +3370,39 @@ bool SystemInformationImplementation::QueryOSInformation()
|
||||||
this->OSVersion = unameInfo.version;
|
this->OSVersion = unameInfo.version;
|
||||||
this->OSPlatform = unameInfo.machine;
|
this->OSPlatform = unameInfo.machine;
|
||||||
}
|
}
|
||||||
|
#ifdef __APPLE__
|
||||||
|
this->CallSwVers();
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SystemInformationImplementation::CallSwVers()
|
||||||
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
kwsys_stl::string output;
|
||||||
|
kwsys_stl::vector<const char*> args;
|
||||||
|
args.clear();
|
||||||
|
args.push_back("sw_vers");
|
||||||
|
|
||||||
|
args.push_back("-productName");
|
||||||
|
output = this->RunProcess(args);
|
||||||
|
this->OSName = output;
|
||||||
|
args.pop_back();
|
||||||
|
|
||||||
|
args.push_back("-productVersion");
|
||||||
|
output = this->RunProcess(args);
|
||||||
|
this->OSRelease = output;
|
||||||
|
args.pop_back();
|
||||||
|
|
||||||
|
args.push_back("-buildVersion");
|
||||||
|
output = this->RunProcess(args);
|
||||||
|
this->OSVersion = output;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/** Return true if the machine is 64 bits */
|
/** Return true if the machine is 64 bits */
|
||||||
bool SystemInformationImplementation::Is64Bits()
|
bool SystemInformationImplementation::Is64Bits()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue