supertuxkart / stk-stats

Tool to record and display statistics about SuperTuxKart clients
MIT License
9 stars 9 forks source link

Add a stk-version information #2

Open hiker opened 10 years ago

hiker commented 10 years ago

Not only would we need the version number, but if possible also the 'source': e.g. self compiled, our binary, Ubuntu, ... not sure how to enforce this though :(

We would require at cmake time to add a specific -D (but then we need this for any user as well :( ). Perhaps only enforce this in our src package (assuming that all packager just pick up the src package, and not a certain revision from our repo). Or is there an api/etc-something-file we could use to find which distribution was being used? For Suse we can look at /etc/SuSE-release (for older Suse), and /etc/os-release:

NAME=openSUSE VERSION="13.1 (Bottle)" VERSION_ID="13.1" PRETTY_NAME="openSUSE 13.1 (Bottle) (x86_64)" ID=opensuse ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:opensuse:13.1" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://opensuse.org/" ID_LIKE="suse"

Similarly information about windows and osx version.

It's easy enough to add this on the STK side (once we figure out how to get it ;) ), I have just no idea about the server side.

vampy commented 10 years ago

We can create a page that is similar to the CPU one just for the OS (will also include the current pie chart or we can just move it). I think it will be better that all the OS specific fields be be prefixed with 'os_'. We must compile a list of fields that is required for the OS (if there are some other different fields than those specified above).

hiker commented 10 years ago

I've added "os_version", which can be one of:

    case 0x0500: m_os_version="Windows 2000";  break;
    case 0x0501: m_os_version="Windows XP";    break;
    case 0x0502: m_os_version="Windows XP64";  break;
    case 0x0600: m_os_version="Windows Vista"; break;
    case 0x0601: m_os_version="Windows 7";     break;
    case 0x0602: m_os_version="Windows 8";     break;
    default: {
                 m_os_version = StringUtils::insertValues("Windows %d", 
                                                          windows_version);

or on linux something like "Fedora 21", "openSUSE 13.1" etc.

Do you need a list of all possible values? Easy for windows, no idea for linux (it's taken from /etc/*-release files), not yet implemented for OXS.

vampy commented 10 years ago

I do not need that kind of list, will rely on the os version input to be valid.