SFML community forums

General => Feature requests => Topic started by: graphitemaster on December 12, 2010, 11:34:40 pm

Title: System Info
Post by: graphitemaster on December 12, 2010, 11:34:40 pm
I'm requesting a SystemInfo class for the System library that ships with SFML, something like: http://www.hyperic.com/products/sigar These systems are not hard to implement, I actually wrote my own LinuxSystemInfo class that uses <sys/sysinfo.h>, with MacOS there is some other things that need to be done, and Windows requires the use of the WinAPI or requires the use of registry searches, which in turn requires a different search method for each Windows OS. At first I figured it would be out of the scope of SFML, but then I understand that SFML has a A+ System library for unicode, and threads mutxes locks and even a clock, so why can't it have a SystemInfo class. Anyways below is a implementation for getting linux system info. http://codepad.org/XtiR8XAn so theres a start, now just fill in for Mac and Windows and you have a SystemInfo class that people like me would love to use.
Title: System Info
Post by: Laurent on December 13, 2010, 08:06:34 am
Quote
I'm requesting a SystemInfo class for the System library that ships with SFML, something like: http://www.hyperic.com/products/sigar

Why don't you use this library?

Quote
At first I figured it would be out of the scope of SFML, but then I understand that SFML has a A+ System library for unicode, and threads mutxes locks and even a clock, so why can't it have a SystemInfo class.

Actually, the purpose of the system module is to define whatever is needed by other modules. So it's not a design choice if it contains threads, mutexes and Unicode strings, it's because all this stuff is needed by other modules.
Title: System Info
Post by: graphitemaster on December 14, 2010, 08:04:28 pm
Quote from: "Laurent"

Why don't you use this library?


Because it's LGPL.
Title: System Info
Post by: Laurent on December 14, 2010, 08:57:22 pm
Quote
Because it's LGPL.

What's the problem with LGPL?
Title: System Info
Post by: danman on December 14, 2010, 09:20:29 pm
lGPL is compatible with almost licenses whenever you don't make a static link with ;) .
Title: System Info
Post by: Lynix on December 15, 2010, 02:09:14 pm
Actually, it's GPL

http://sourceforge.net/projects/sigar/
GNU General Public License (GPL)