Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bringing back OSX support #69

Open
3 tasks
lfreist opened this issue Dec 1, 2023 · 0 comments
Open
3 tasks

Bringing back OSX support #69

lfreist opened this issue Dec 1, 2023 · 0 comments
Labels
cross-platform Implement an already existent feature for another platform good first issue Good for newcomers OSX Issues related to OSX

Comments

@lfreist
Copy link
Owner

lfreist commented Dec 1, 2023

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).

Thank you for contributing!

@lfreist lfreist added cross-platform Implement an already existent feature for another platform good first issue Good for newcomers OSX Issues related to OSX labels Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cross-platform Implement an already existent feature for another platform good first issue Good for newcomers OSX Issues related to OSX
Projects
None yet
Development

No branches or pull requests

1 participant