mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-25 18:10:54 +00:00
Merge with develop
This commit is contained in:
commit
1c206fc73e
14 changed files with 159 additions and 68 deletions
|
@ -158,9 +158,9 @@ IF(WITH_NEL)
|
||||||
|
|
||||||
IF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL)
|
IF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL)
|
||||||
SET(CURL_STATIC ON)
|
SET(CURL_STATIC ON)
|
||||||
ELSE((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL)
|
ELSE()
|
||||||
SET(CURL_STATIC OFF)
|
SET(CURL_STATIC OFF)
|
||||||
ENDIF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL)
|
ENDIF()
|
||||||
|
|
||||||
IF(CURL_STATIC)
|
IF(CURL_STATIC)
|
||||||
SET(CURL_DEFINITIONS -DCURL_STATICLIB)
|
SET(CURL_DEFINITIONS -DCURL_STATICLIB)
|
||||||
|
@ -172,15 +172,23 @@ IF(WITH_NEL)
|
||||||
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
|
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
|
||||||
ENDIF(OPENSSL_FOUND)
|
ENDIF(OPENSSL_FOUND)
|
||||||
|
|
||||||
|
IF(UNIX)
|
||||||
|
# CURL depends on libidn
|
||||||
|
FIND_LIBRARY(IDN_LIBRARY idn)
|
||||||
|
IF(IDN_LIBRARY)
|
||||||
|
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${IDN_LIBRARY})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# CURL Macports version depends on libidn, libintl and libiconv too
|
# CURL Macports version depends on libidn, libintl and libiconv too
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
FIND_LIBRARY(IDN_LIBRARY idn)
|
|
||||||
FIND_LIBRARY(INTL_LIBRARY intl)
|
FIND_LIBRARY(INTL_LIBRARY intl)
|
||||||
|
IF(INTL_LIBRARY)
|
||||||
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${IDN_LIBRARY} ${INTL_LIBRARY})
|
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${INTL_LIBRARY})
|
||||||
ENDIF(APPLE)
|
ENDIF()
|
||||||
ENDIF(CURL_STATIC)
|
ENDIF()
|
||||||
ENDIF(WITH_GUI)
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include ${LIBXML2_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include ${LIBXML2_INCLUDE_DIR})
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
|
@ -1738,7 +1738,9 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle)
|
||||||
}
|
}
|
||||||
else if (windowStyle == EWSFullscreen)
|
else if (windowStyle == EWSFullscreen)
|
||||||
{
|
{
|
||||||
|
#ifndef _DEBUG
|
||||||
dwNewStyle |= WS_POPUP;
|
dwNewStyle |= WS_POPUP;
|
||||||
|
#endif
|
||||||
isVisible = true;
|
isVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,6 @@
|
||||||
#define FINAL_VERSION 1
|
#define FINAL_VERSION 1
|
||||||
#endif // TEST_CRASH_COUNTER
|
#endif // TEST_CRASH_COUNTER
|
||||||
|
|
||||||
// game share
|
|
||||||
#include "game_share/ryzom_version.h"
|
|
||||||
|
|
||||||
// Client
|
// Client
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
|
|
|
@ -48,8 +48,6 @@
|
||||||
// Std.
|
// Std.
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
// Game Share
|
|
||||||
#include "game_share/ryzom_version.h"
|
|
||||||
// Client
|
// Client
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
@ -89,6 +87,7 @@
|
||||||
#include "interface_v3/add_on_manager.h"
|
#include "interface_v3/add_on_manager.h"
|
||||||
|
|
||||||
#include "bg_downloader_access.h"
|
#include "bg_downloader_access.h"
|
||||||
|
#include "user_agent.h"
|
||||||
|
|
||||||
#include "nel/misc/check_fpu.h"
|
#include "nel/misc/check_fpu.h"
|
||||||
|
|
||||||
|
@ -837,11 +836,7 @@ void prelogInit()
|
||||||
displayCPUInfo();
|
displayCPUInfo();
|
||||||
|
|
||||||
// Display the client version.
|
// Display the client version.
|
||||||
#if FINAL_VERSION
|
nlinfo("RYZOM VERSION : %s", getDebugVersion().c_str());
|
||||||
nlinfo("RYZOM VERSION : FV %s ("__DATE__" "__TIME__")", RYZOM_VERSION);
|
|
||||||
#else
|
|
||||||
nlinfo("RYZOM VERSION : DEV %s ("__DATE__" "__TIME__")", RYZOM_VERSION);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FPU_CHECKER_ONCE
|
FPU_CHECKER_ONCE
|
||||||
|
|
||||||
|
@ -953,14 +948,28 @@ void prelogInit()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// used to determine screen default resolution
|
||||||
if (ClientCfg.Width < 800 || ClientCfg.Height < 600)
|
if (ClientCfg.Width < 800 || ClientCfg.Height < 600)
|
||||||
{
|
{
|
||||||
UDriver::CMode mode;
|
UDriver::CMode mode;
|
||||||
|
|
||||||
|
CConfigFile::CVar *varPtr = NULL;
|
||||||
|
|
||||||
if (!ClientCfg.Windowed && Driver->getCurrentScreenMode(mode))
|
if (!ClientCfg.Windowed && Driver->getCurrentScreenMode(mode))
|
||||||
{
|
{
|
||||||
ClientCfg.Width = mode.Width;
|
ClientCfg.Width = mode.Width;
|
||||||
ClientCfg.Height = mode.Height;
|
ClientCfg.Height = mode.Height;
|
||||||
|
ClientCfg.Depth = mode.Depth;
|
||||||
|
ClientCfg.Frequency = mode.Frequency;
|
||||||
|
|
||||||
|
// update client.cfg with detected depth and frequency
|
||||||
|
varPtr = ClientCfg.ConfigFile.getVarPtr("Depth");
|
||||||
|
if(varPtr)
|
||||||
|
varPtr->forceAsInt(ClientCfg.Depth);
|
||||||
|
|
||||||
|
varPtr = ClientCfg.ConfigFile.getVarPtr("Frequency");
|
||||||
|
if(varPtr)
|
||||||
|
varPtr->forceAsInt(ClientCfg.Frequency);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -969,7 +978,7 @@ void prelogInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
// update client.cfg with detected resolution
|
// update client.cfg with detected resolution
|
||||||
CConfigFile::CVar *varPtr = ClientCfg.ConfigFile.getVarPtr("Width");
|
varPtr = ClientCfg.ConfigFile.getVarPtr("Width");
|
||||||
if(varPtr)
|
if(varPtr)
|
||||||
varPtr->forceAsInt(ClientCfg.Width);
|
varPtr->forceAsInt(ClientCfg.Width);
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,6 @@
|
||||||
// Sound
|
// Sound
|
||||||
#include "nel/sound/sound_anim_manager.h"
|
#include "nel/sound/sound_anim_manager.h"
|
||||||
// Game share
|
// Game share
|
||||||
#include "game_share/ryzom_version.h"
|
|
||||||
#include "game_share/light_cycle.h"
|
#include "game_share/light_cycle.h"
|
||||||
#include "sound_manager.h"
|
#include "sound_manager.h"
|
||||||
#include "precipitation_clip_grid.h"
|
#include "precipitation_clip_grid.h"
|
||||||
|
|
|
@ -2990,12 +2990,15 @@ public:
|
||||||
if (Driver == NULL) return;
|
if (Driver == NULL) return;
|
||||||
|
|
||||||
VideoModes.clear();
|
VideoModes.clear();
|
||||||
vector<string> stringModeList;
|
vector<string> stringModeList, stringFreqList;
|
||||||
|
sint nFoundMode, nFoundFreq;
|
||||||
|
|
||||||
sint nFoundMode = getRyzomModes(VideoModes, stringModeList);
|
getRyzomModes(VideoModes, stringModeList, stringFreqList, nFoundMode, nFoundFreq);
|
||||||
|
|
||||||
// Initialize interface combo box
|
// Initialize interface combo box
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
|
// resolutions
|
||||||
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
||||||
if( pCB )
|
if( pCB )
|
||||||
{
|
{
|
||||||
|
@ -3003,11 +3006,23 @@ public:
|
||||||
for (sint j = 0; j < (sint)stringModeList.size(); j++)
|
for (sint j = 0; j < (sint)stringModeList.size(); j++)
|
||||||
pCB->addText(ucstring(stringModeList[j]));
|
pCB->addText(ucstring(stringModeList[j]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// frequencies
|
||||||
|
pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
||||||
|
if( pCB )
|
||||||
|
{
|
||||||
|
pCB->resetTexts();
|
||||||
|
for (sint j = 0; j < (sint)stringFreqList.size(); j++)
|
||||||
|
pCB->addText(ucstring(stringFreqList[j]));
|
||||||
|
}
|
||||||
|
|
||||||
// -1 is important to indicate we set this value in edit mode
|
// -1 is important to indicate we set this value in edit mode
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(-1);
|
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(-1);
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(-1);
|
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(nFoundMode);
|
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(nFoundMode);
|
||||||
|
|
||||||
|
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(-1);
|
||||||
|
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(nFoundFreq);
|
||||||
|
|
||||||
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
||||||
if (pBut)
|
if (pBut)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1945,7 +1945,10 @@ class CAHInitResLod : public IActionHandler
|
||||||
VideoModes.clear();
|
VideoModes.clear();
|
||||||
StringModeList.clear();
|
StringModeList.clear();
|
||||||
|
|
||||||
CurrentMode = getRyzomModes(VideoModes, StringModeList);
|
std::vector<std::string> stringFreqList;
|
||||||
|
sint currentFreq;
|
||||||
|
|
||||||
|
getRyzomModes(VideoModes, StringModeList, stringFreqList, CurrentMode, currentFreq);
|
||||||
|
|
||||||
// getRyzomModes() expects empty list, so we need to insert 'Windowed' after mode list is filled
|
// getRyzomModes() expects empty list, so we need to insert 'Windowed' after mode list is filled
|
||||||
StringModeList.insert(StringModeList.begin(), "uiConfigWindowed");
|
StringModeList.insert(StringModeList.begin(), "uiConfigWindowed");
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
#include "game_share/brick_types.h"
|
#include "game_share/brick_types.h"
|
||||||
#include "game_share/light_cycle.h"
|
#include "game_share/light_cycle.h"
|
||||||
#include "game_share/time_weather_season/time_and_season.h"
|
#include "game_share/time_weather_season/time_and_season.h"
|
||||||
#include "game_share/ryzom_version.h"
|
|
||||||
#include "game_share/bot_chat_types.h"
|
#include "game_share/bot_chat_types.h"
|
||||||
// PACS
|
// PACS
|
||||||
#include "nel/pacs/u_global_position.h"
|
#include "nel/pacs/u_global_position.h"
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
#include <nel/3d/u_text_context.h>
|
#include <nel/3d/u_text_context.h>
|
||||||
#include <nel/gui/lua_ihm.h>
|
#include <nel/gui/lua_ihm.h>
|
||||||
|
|
||||||
#include "game_share/ryzom_version.h"
|
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "client_cfg.h"
|
#include "client_cfg.h"
|
||||||
#include "user_entity.h"
|
#include "user_entity.h"
|
||||||
|
@ -44,7 +42,7 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "interface_v3/interface_manager.h"
|
#include "interface_v3/interface_manager.h"
|
||||||
#include "actions_client.h"
|
#include "actions_client.h"
|
||||||
|
#include "user_agent.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
@ -244,15 +242,7 @@ void displayDebug()
|
||||||
//-----------//
|
//-----------//
|
||||||
TextContext->setHotSpot(UTextContext::TopLeft);
|
TextContext->setHotSpot(UTextContext::TopLeft);
|
||||||
line = 1.f;
|
line = 1.f;
|
||||||
string str;
|
string str = getDisplayVersion();
|
||||||
#if FINAL_VERSION
|
|
||||||
str = "FV";
|
|
||||||
#else
|
|
||||||
str = "DEV";
|
|
||||||
#endif
|
|
||||||
if(ClientCfg.ExtendedCommands)
|
|
||||||
str += "_E";
|
|
||||||
str += " "RYZOM_VERSION;
|
|
||||||
TextContext->printfAt(0.f, line, "Version %s", str.c_str());
|
TextContext->printfAt(0.f, line, "Version %s", str.c_str());
|
||||||
|
|
||||||
// TOP MIDDLE //
|
// TOP MIDDLE //
|
||||||
|
|
|
@ -1392,12 +1392,19 @@ bool isWindowMaximized()
|
||||||
screenMode.Width == width && screenMode.Height == height);
|
screenMode.Width == width && screenMode.Height == height);
|
||||||
}
|
}
|
||||||
|
|
||||||
sint getRyzomModes(std::vector<NL3D::UDriver::CMode> &videoModes, std::vector<std::string> &stringModeList)
|
bool getRyzomModes(std::vector<NL3D::UDriver::CMode> &videoModes, std::vector<std::string> &stringModeList, std::vector<std::string> &stringFreqList, sint &nFoundStringMode, sint &nFoundStringFreq)
|
||||||
{
|
{
|
||||||
|
// default values
|
||||||
|
nFoundStringMode = -1;
|
||||||
|
nFoundStringFreq = -1;
|
||||||
|
|
||||||
|
// mode index in original video modes
|
||||||
|
sint nFoundMode = -1;
|
||||||
|
|
||||||
// **** Init Video Modes
|
// **** Init Video Modes
|
||||||
Driver->getModes(videoModes);
|
Driver->getModes(videoModes);
|
||||||
// Remove modes under 800x600 and get the unique strings
|
// Remove modes under 800x600 and get the unique strings
|
||||||
sint i, j, nFoundMode = -1;
|
sint i, j;
|
||||||
for (i=0; i < (sint)videoModes.size(); ++i)
|
for (i=0; i < (sint)videoModes.size(); ++i)
|
||||||
{
|
{
|
||||||
if ((videoModes[i].Width < 800) || (videoModes[i].Height < 600))
|
if ((videoModes[i].Width < 800) || (videoModes[i].Height < 600))
|
||||||
|
@ -1408,10 +1415,10 @@ sint getRyzomModes(std::vector<NL3D::UDriver::CMode> &videoModes, std::vector<st
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool bFound = false;
|
bool bFound = false;
|
||||||
string tmp = toString(videoModes[i].Width)+" x "+toString(videoModes[i].Height);
|
string res = toString(videoModes[i].Width)+" x "+toString(videoModes[i].Height);
|
||||||
for (j = 0; j < (sint)stringModeList.size(); ++j)
|
for (j = 0; j < (sint)stringModeList.size(); ++j)
|
||||||
{
|
{
|
||||||
if (stringModeList[j] == tmp)
|
if (stringModeList[j] == res)
|
||||||
{
|
{
|
||||||
bFound = true;
|
bFound = true;
|
||||||
break;
|
break;
|
||||||
|
@ -1419,18 +1426,23 @@ sint getRyzomModes(std::vector<NL3D::UDriver::CMode> &videoModes, std::vector<st
|
||||||
}
|
}
|
||||||
if (!bFound)
|
if (!bFound)
|
||||||
{
|
{
|
||||||
stringModeList.push_back(tmp);
|
stringModeList.push_back(res);
|
||||||
|
|
||||||
if ((videoModes[i].Width <= ClientCfg.Width) && (videoModes[i].Height <= ClientCfg.Height))
|
if ((videoModes[i].Width <= ClientCfg.Width) && (videoModes[i].Height <= ClientCfg.Height))
|
||||||
{
|
{
|
||||||
if (nFoundMode == -1)
|
if (nFoundStringMode == -1)
|
||||||
{
|
{
|
||||||
nFoundMode = j;
|
nFoundStringMode = j;
|
||||||
|
nFoundMode = i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((videoModes[i].Width >= videoModes[nFoundMode].Width) &&
|
if ((videoModes[i].Width >= videoModes[nFoundMode].Width) &&
|
||||||
(videoModes[i].Height >= videoModes[nFoundMode].Height))
|
(videoModes[i].Height >= videoModes[nFoundMode].Height))
|
||||||
nFoundMode = j;
|
{
|
||||||
|
nFoundStringMode = j;
|
||||||
|
nFoundMode = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1438,12 +1450,30 @@ sint getRyzomModes(std::vector<NL3D::UDriver::CMode> &videoModes, std::vector<st
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no modes are available, fallback to windowed mode
|
// If no modes are available, fallback to windowed mode
|
||||||
if (nFoundMode == -1)
|
if (nFoundStringMode == -1)
|
||||||
{
|
{
|
||||||
nlwarning("Mode %ux%u not found, fall back to windowed", (uint)ClientCfg.Width, (uint)ClientCfg.Height);
|
nlwarning("Mode %ux%u not found, fall back to windowed", (uint)ClientCfg.Width, (uint)ClientCfg.Height);
|
||||||
ClientCfg.Windowed = true;
|
ClientCfg.Windowed = true;
|
||||||
ClientCfg.writeInt("FullScreen", 0);
|
ClientCfg.writeInt("FullScreen", 0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// add frequencies to frequencies list
|
||||||
|
for (i=0; i < (sint)videoModes.size(); ++i)
|
||||||
|
{
|
||||||
|
if (videoModes[i].Width == videoModes[nFoundMode].Width && videoModes[i].Height == videoModes[nFoundMode].Height)
|
||||||
|
{
|
||||||
|
uint freq = videoModes[i].Frequency;
|
||||||
|
|
||||||
return nFoundMode;
|
if (ClientCfg.Frequency > 0 && freq == ClientCfg.Frequency)
|
||||||
|
{
|
||||||
|
nFoundStringFreq = stringFreqList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
stringFreqList.push_back(toString(freq));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nFoundStringMode > -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ uint getCurrentColorDepth();
|
||||||
bool isWindowMaximized();
|
bool isWindowMaximized();
|
||||||
|
|
||||||
// get all supported video modes
|
// get all supported video modes
|
||||||
sint getRyzomModes(std::vector<NL3D::UDriver::CMode> &videoModes, std::vector<std::string> &stringModeList);
|
bool getRyzomModes(std::vector<NL3D::UDriver::CMode> &videoModes, std::vector<std::string> &stringModeList, std::vector<std::string> &stringFreqList, sint &nFoundMode, sint &nFoundFreq);
|
||||||
|
|
||||||
#endif // CL_MISC_H
|
#endif // CL_MISC_H
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "nel/misc/events.h"
|
#include "nel/misc/events.h"
|
||||||
#include "nel/3d/u_texture.h"
|
#include "nel/3d/u_texture.h"
|
||||||
#include "game_share/ryzom_version.h"
|
|
||||||
#include "nel/misc/i18n.h"
|
#include "nel/misc/i18n.h"
|
||||||
#include "continent.h"
|
#include "continent.h"
|
||||||
#include "weather.h"
|
#include "weather.h"
|
||||||
|
@ -31,6 +30,7 @@
|
||||||
#include "release.h"
|
#include "release.h"
|
||||||
#include "net_manager.h"
|
#include "net_manager.h"
|
||||||
#include "client_cfg.h"
|
#include "client_cfg.h"
|
||||||
|
#include "user_agent.h"
|
||||||
#include "bg_downloader_access.h"
|
#include "bg_downloader_access.h"
|
||||||
#include "nel/misc/system_utils.h"
|
#include "nel/misc/system_utils.h"
|
||||||
#include "nel/3d/stereo_hmd.h"
|
#include "nel/3d/stereo_hmd.h"
|
||||||
|
@ -277,13 +277,7 @@ void CProgress::internalProgress (float value)
|
||||||
// Display the build version.
|
// Display the build version.
|
||||||
TextContext->setFontSize((uint)(12.f * fontFactor));
|
TextContext->setFontSize((uint)(12.f * fontFactor));
|
||||||
TextContext->setHotSpot(UTextContext::TopRight);
|
TextContext->setHotSpot(UTextContext::TopRight);
|
||||||
string str;
|
string str = getDisplayVersion();
|
||||||
#if FINAL_VERSION
|
|
||||||
str = "FV ";
|
|
||||||
#else
|
|
||||||
str = "DEV ";
|
|
||||||
#endif
|
|
||||||
str += RYZOM_VERSION;
|
|
||||||
TextContext->printfAt(1.0f,1.0f, str.c_str());
|
TextContext->printfAt(1.0f,1.0f, str.c_str());
|
||||||
|
|
||||||
// Display the tips of the day.
|
// Display the tips of the day.
|
||||||
|
|
|
@ -18,10 +18,11 @@
|
||||||
|
|
||||||
#include "stdpch.h"
|
#include "stdpch.h"
|
||||||
#include "user_agent.h"
|
#include "user_agent.h"
|
||||||
|
#include "client_cfg.h"
|
||||||
|
|
||||||
#include "game_share/ryzom_version.h"
|
#include "game_share/ryzom_version.h"
|
||||||
|
|
||||||
#if defined(RYZOM_COMPATIBILITY_VERSION) && defined(HAVE_REVISION_H)
|
#ifdef HAVE_REVISION_H
|
||||||
#include "revision.h"
|
#include "revision.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -60,17 +61,57 @@ std::string getUserAgentVersion()
|
||||||
|
|
||||||
if (s_userAgent.empty())
|
if (s_userAgent.empty())
|
||||||
{
|
{
|
||||||
char buffer[256];
|
#ifdef REVISION
|
||||||
|
s_userAgent = NLMISC::toString("%s.%s-%s-%s", RYZOM_VERSION, REVISION, RYZOM_SYSTEM, RYZOM_ARCH);
|
||||||
#if defined(REVISION) && defined(RYZOM_COMPATIBILITY_VERSION)
|
|
||||||
// we don't need RYZOM_VERSION if we already have a numeric form a.b.c, we just need to append revision to it
|
|
||||||
sprintf(buffer, "%s.%s-%s-%s", RYZOM_COMPATIBILITY_VERSION, REVISION, RYZOM_SYSTEM, RYZOM_ARCH);
|
|
||||||
#else
|
#else
|
||||||
sprintf(buffer, "%s-%s-%s", RYZOM_VERSION, RYZOM_SYSTEM, RYZOM_ARCH);
|
s_userAgent = NLMISC::toString("%s-%s-%s", RYZOM_VERSION, RYZOM_SYSTEM, RYZOM_ARCH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
s_userAgent = buffer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return s_userAgent;
|
return s_userAgent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getVersion()
|
||||||
|
{
|
||||||
|
return RYZOM_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string getDisplayVersion()
|
||||||
|
{
|
||||||
|
static std::string s_version;
|
||||||
|
|
||||||
|
if (s_version.empty())
|
||||||
|
{
|
||||||
|
#if FINAL_VERSION
|
||||||
|
s_version = "FV ";
|
||||||
|
#else
|
||||||
|
s_version = "DEV ";
|
||||||
|
#endif
|
||||||
|
if (ClientCfg.ExtendedCommands) s_version += "_E";
|
||||||
|
|
||||||
|
s_version += getVersion();
|
||||||
|
|
||||||
|
#ifdef REVISION
|
||||||
|
s_version += NLMISC::toString(".%s", REVISION);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return s_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string getDebugVersion()
|
||||||
|
{
|
||||||
|
static std::string s_version;
|
||||||
|
|
||||||
|
if (s_version.empty())
|
||||||
|
{
|
||||||
|
s_version = getDisplayVersion();
|
||||||
|
#ifdef BUILD_DATE
|
||||||
|
s_version += NLMISC::toString(" (%s)", BUILD_DATE);
|
||||||
|
#else
|
||||||
|
s_version += NLMISC::toString(" (%s %s)", __DATE__, __TIME__);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return s_version;
|
||||||
|
}
|
||||||
|
|
|
@ -21,6 +21,10 @@ std::string getUserAgent();
|
||||||
std::string getUserAgentName();
|
std::string getUserAgentName();
|
||||||
std::string getUserAgentVersion();
|
std::string getUserAgentVersion();
|
||||||
|
|
||||||
|
std::string getVersion();
|
||||||
|
std::string getDisplayVersion();
|
||||||
|
std::string getDebugVersion();
|
||||||
|
|
||||||
#endif // CL_USER_AGENT_H
|
#endif // CL_USER_AGENT_H
|
||||||
|
|
||||||
/* End of user_agent.h */
|
/* End of user_agent.h */
|
||||||
|
|
Loading…
Reference in a new issue