Added parameter showReleaseName for Sys::GetOSName.

Removed GLU header dependency on Linux.
Updated SOIL2.
This commit is contained in:
Martín Lucas Golini
2014-11-08 23:31:04 -03:00
parent ea4476f134
commit 34e3d1f23d
6 changed files with 26 additions and 16 deletions

View File

@@ -32,8 +32,10 @@ class EE_API Sys {
/** @return The System Time */
static double GetSystemTime();
/** @return The OS Name */
static std::string GetOSName();
/** @return The OS Name
* @param showReleaseName Instead of returning only the OS Name, it will append the release name or number. For Windows instead of "Windows" it will be "Windows 7", for "Linux" it will be "Linux 3.15" and so on.
*/
static std::string GetOSName( bool showReleaseName = false );
/** @return The OS Architecture */
static std::string GetOSArchitecture();

View File

@@ -4,10 +4,10 @@
#include <eepp/config.hpp>
#include <string>
#define EEPP_MAJOR_VERSION 0
#define EEPP_MINOR_VERSION 9
#define EEPP_PATCHLEVEL 5
#define EEPP_CODENAME "Makyo"
#define EEPP_MAJOR_VERSION 1
#define EEPP_MINOR_VERSION 0
#define EEPP_PATCHLEVEL 0
#define EEPP_CODENAME "Bodhisattva"
/** The compiled version of the library */
#define EEPP_VERSION(x) \

View File

@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.0, 2014-07-27T17:43:59. -->
<!-- Written by QtCreator 3.2.2, 2014-11-08T21:28:39. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{b6114084-39c2-4cd0-b9e2-d8803dc6b446}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
@@ -29,9 +33,12 @@
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">2</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">false</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
@@ -54,7 +61,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{388e5431-b31b-42b3-b9ad-9002d279d75d}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">10</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
@@ -1628,11 +1635,11 @@
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QByteArray">{b6114084-39c2-4cd0-b9e2-d8803dc6b446}</value>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">16</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">15</value>
<variable>Version</variable>
<value type="int">16</value>
</data>
</qtcreator>

View File

@@ -236,17 +236,17 @@ static struct timeval start;
#endif
std::string Sys::GetOSName() {
std::string Sys::GetOSName( bool showReleaseName ) {
#if defined( EE_PLATFORM_POSIX )
struct utsname os;
if ( -1 != uname( &os ) ) {
return std::string( os.sysname ) + " " + std::string( os.release );
return std::string( os.sysname ) + ( showReleaseName ? " " + std::string( os.release ) : "" );
}
return "Unknown";
#elif EE_PLATFORM == EE_PLATFORM_WIN
return GetWindowsVersion();
return showReleaseName ? GetWindowsVersion() : "Windows";
#else
return "Unknown";
#endif

View File

@@ -2,6 +2,7 @@
#if defined( EE_X11_PLATFORM )
#define GLEW_NO_GLU
#include <eepp/helper/glew/glxew.h>
#include <X11/Xcursor/Xcursor.h>
#include <X11/cursorfont.h>

View File

@@ -379,7 +379,7 @@ void Window::SendVideoResizeCb() {
void Window::LogSuccessfulInit(const std::string& BackendName , const std::string&ProcessPath ) {
std::string msg( "Engine Initialized Succesfully.\n\tVersion: " + Version::GetVersionName() + " (codename: \"" + Version::GetCodename() + "\")" +
"\n\tBuild time: " + Version::GetBuildTime() +
"\n\tOS: " + Sys::GetOSName() +
"\n\tOS: " + Sys::GetOSName(true) +
"\n\tArch: " + Sys::GetOSArchitecture() +
"\n\tCPU Cores: " + String::ToStr( Sys::GetCPUCount() ) +
"\n\tProcess Path: " + ( !ProcessPath.empty() ? ProcessPath : Sys::GetProcessPath() ) +