HWinfo aims to provide a uniform API for Linux, Windows and OSX.
Since I do not have a device running OSX, it's development sluggish.
Bringing back OSX support is a great first task for passionated OSX developers of any levels of experience:
It teaches you the internal structure of HWinfo and enables you to contribute further improvements/ideas to its functionality later.
How to approach this task
Querying information of the hardware/system is heavily OS specific. In Order to provide a uniform API for different OSs, HWinfo is structured as follows:
The header files are platform unspecific and define the API.
There are folders for each supported OS in the src directory (src/windows, src/apple, src/linux). These folders contain the OS specific implementations
If implementations are not OS specific, there are corresponding source files in src to reduce redundancy
Getting started
My recommended approach is the following:
[ ] Make it compile on OSX: first of all, add missing class/function/method definitions in the source files. You can orient yourself in the Windows and Linux implementations. Keep it simple and don't do any logic yet! Instead, return default values like "unknown" for functions returning std::string and -1 for functions returning int.
[ ] Start implementing the logic. Use the apple developers reference to get an idea on how things may work and implement it. You can orient yourself on already provided implementations (e.g. CPU).
[ ] Do not hesitate to pull-request partial solutions. Just make sure, the coding style is correct (run the corresponding bash script to check the style before submitting).
HWinfo aims to provide a uniform API for Linux, Windows and OSX.
Since I do not have a device running OSX, it's development sluggish.
Bringing back OSX support is a great first task for passionated OSX developers of any levels of experience: It teaches you the internal structure of HWinfo and enables you to contribute further improvements/ideas to its functionality later.
How to approach this task
Querying information of the hardware/system is heavily OS specific. In Order to provide a uniform API for different OSs, HWinfo is structured as follows:
src
directory (src/windows
,src/apple
,src/linux
). These folders contain the OS specific implementationssrc
to reduce redundancyGetting started
My recommended approach is the following:
"unknown"
for functions returningstd::string
and-1
for functions returningint
.Thank you for contributing!