mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Merge with develop
This commit is contained in:
parent
b89fcda4db
commit
2a6153235c
6 changed files with 53 additions and 38 deletions
|
@ -33,6 +33,7 @@
|
|||
#include "view.h" // For the cameraDistance funtion
|
||||
#include "user_entity.h"
|
||||
#include "misc.h"
|
||||
#include "user_agent.h"
|
||||
|
||||
// 3D Interface.
|
||||
#include "nel/3d/u_driver.h"
|
||||
|
@ -40,10 +41,6 @@
|
|||
// Game Share.
|
||||
#include "game_share/time_weather_season/time_and_season.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#ifdef NL_OS_MAC
|
||||
#include "app_bundle_utils.h"
|
||||
#endif // NL_OS_MAC
|
||||
|
@ -1977,10 +1974,10 @@ void CClientConfig::init(const string &configFileName)
|
|||
if (varPtr)
|
||||
{
|
||||
string str = varPtr->asString ();
|
||||
if (str != RYZOM_VERSION && ClientCfg.SaveConfig)
|
||||
if (str != getVersion() && ClientCfg.SaveConfig)
|
||||
{
|
||||
nlinfo ("Update and save the ClientVersion variable in config file %s -> %s", str.c_str(), RYZOM_VERSION);
|
||||
varPtr->setAsString (RYZOM_VERSION);
|
||||
nlinfo ("Update and save the ClientVersion variable in config file %s -> %s", str.c_str(), getVersion().c_str());
|
||||
varPtr->setAsString (getVersion());
|
||||
ClientCfg.ConfigFile.save ();
|
||||
}
|
||||
}
|
||||
|
@ -2194,12 +2191,12 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const
|
|||
#ifdef NL_OS_MAC
|
||||
// on mac, client_default.cfg should be searched in .app/Contents/Resources/
|
||||
defaultConfigPath = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources/");
|
||||
#elif defined(RYZOM_ETC_PREFIX)
|
||||
#elif defined(NL_OS_UNIX)
|
||||
// if RYZOM_ETC_PREFIX is defined, client_default.cfg might be over there
|
||||
defaultConfigPath = CPath::standardizePath(RYZOM_ETC_PREFIX);
|
||||
if (!getRyzomEtcPrefix().empty()) defaultConfigPath = CPath::standardizePath(getRyzomEtcPrefix());
|
||||
#else
|
||||
// some other prefix here :)
|
||||
#endif // RYZOM_ETC_PREFIX
|
||||
#endif // NL_OS_UNIX
|
||||
|
||||
// look in the current working directory first
|
||||
if (CFile::isExists(defaultConfigFileName))
|
||||
|
|
|
@ -99,10 +99,7 @@
|
|||
#include "far_tp.h"
|
||||
#include "zone_util.h"
|
||||
#include "nel/gui/lua_manager.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include "user_agent.h"
|
||||
|
||||
|
||||
//
|
||||
|
@ -690,10 +687,10 @@ NLMISC_COMMAND(bugReport, "Call the bug report tool with dump", "<AddScreenshot>
|
|||
sys += "AttachedFile "+filename+" ";
|
||||
}
|
||||
|
||||
sys += "ClientVersion "RYZOM_VERSION" ";
|
||||
sys += NLMISC::toString("ClientVersion %s ", getVersion().c_str());
|
||||
|
||||
// for now, set the same version than client one
|
||||
sys += "ShardVersion "RYZOM_VERSION" ";
|
||||
sys += NLMISC::toString("ShardVersion %s ", getVersion().c_str());
|
||||
|
||||
if (ClientCfg.Local)
|
||||
sys += "ShardName OFFLINE ";
|
||||
|
|
|
@ -95,14 +95,6 @@
|
|||
|
||||
#include "browse_faq.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifndef RYZOM_CLIENT_ICON
|
||||
#define RYZOM_CLIENT_ICON "ryzom_client"
|
||||
#endif
|
||||
|
||||
// XMLLib
|
||||
#include <libxml/xmlmemory.h>
|
||||
|
||||
|
@ -682,8 +674,8 @@ void addSearchPaths(IProgressCallback &progress)
|
|||
|
||||
#ifdef NL_OS_MAC
|
||||
defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources");
|
||||
#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX)
|
||||
defaultDirectory = CPath::standardizePath(std::string(RYZOM_SHARE_PREFIX));
|
||||
#elif defined(NL_OS_UNIX)
|
||||
if (!getRyzomSharePrefix().empty()) defaultDirectory = CPath::standardizePath(getRyzomSharePrefix());
|
||||
#endif
|
||||
|
||||
// add in last position, a specific possibly read only directory
|
||||
|
@ -727,8 +719,9 @@ void addPreDataPaths(NLMISC::IProgressCallback &progress)
|
|||
|
||||
#ifdef NL_OS_MAC
|
||||
defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources");
|
||||
#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX)
|
||||
#elif defined(NL_OS_UNIX)
|
||||
defaultDirectory = CPath::standardizePath(std::string(RYZOM_SHARE_PREFIX));
|
||||
if (!getRyzomSharePrefix().empty()) defaultDirectory = CPath::standardizePath(getRyzomSharePrefix());
|
||||
#endif
|
||||
|
||||
// add in last position, a specific possibly read only directory
|
||||
|
@ -767,7 +760,7 @@ static bool addRyzomIconBitmap(const std::string &directory, vector<CBitmap> &bi
|
|||
if (CFile::isDirectory(directory))
|
||||
{
|
||||
// build filename from directory and default ryzom client icon name
|
||||
std::string filename = NLMISC::toString("%s/%s.png", directory.c_str(), RYZOM_CLIENT_ICON);
|
||||
std::string filename = NLMISC::toString("%s/%s.png", directory.c_str(), getRyzomClientIcon().c_str());
|
||||
|
||||
if (CFile::fileExists(filename))
|
||||
{
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
#define RYZOM_SYSTEM "unknown"
|
||||
#endif
|
||||
|
||||
#ifndef RYZOM_CLIENT_ICON
|
||||
#define RYZOM_CLIENT_ICON "ryzom_client"
|
||||
#endif
|
||||
|
||||
std::string getUserAgent()
|
||||
{
|
||||
return getUserAgentName() + "/" + getUserAgentVersion();
|
||||
|
@ -114,3 +118,18 @@ bool isStereoAvailable()
|
|||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string getRyzomClientIcon()
|
||||
{
|
||||
return RYZOM_CLIENT_ICON;
|
||||
}
|
||||
|
||||
std::string getRyzomEtcPrefix()
|
||||
{
|
||||
return RYZOM_ETC_PREFIX;
|
||||
}
|
||||
|
||||
std::string getRyzomSharePrefix()
|
||||
{
|
||||
return RYZOM_SHARE_PREFIX;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,10 @@ std::string getDebugVersion();
|
|||
|
||||
bool isStereoAvailable();
|
||||
|
||||
std::string getRyzomClientIcon();
|
||||
std::string getRyzomEtcPrefix();
|
||||
std::string getRyzomSharePrefix();
|
||||
|
||||
#endif // CL_USER_AGENT_H
|
||||
|
||||
/* End of user_agent.h */
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/ryzom_client.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/ryzom_client.desktop")
|
||||
IF(RYZOM_ETC_PREFIX STREQUAL ".")
|
||||
# in case of local client, only copy 48x48 icon
|
||||
INSTALL(FILES ryzom_48x48.png DESTINATION ${RYZOM_ETC_PREFIX} RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
ELSE()
|
||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/ryzom_client.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/ryzom_client.desktop")
|
||||
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/ryzom_client.desktop" DESTINATION share/applications)
|
||||
INSTALL(FILES ryzom_client.png DESTINATION share/pixmaps)
|
||||
INSTALL(FILES ryzom_client.xpm DESTINATION share/pixmaps)
|
||||
INSTALL(FILES ryzom_16x16.png DESTINATION share/icons/hicolor/16x16/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_22x22.png DESTINATION share/icons/hicolor/22x22/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_24x24.png DESTINATION share/icons/hicolor/24x24/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_32x32.png DESTINATION share/icons/hicolor/32x32/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_48x48.png DESTINATION share/icons/hicolor/48x48/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_128x128.png DESTINATION share/icons/hicolor/128x128/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/ryzom_client.desktop" DESTINATION share/applications)
|
||||
INSTALL(FILES ryzom_client.png DESTINATION share/pixmaps)
|
||||
INSTALL(FILES ryzom_client.xpm DESTINATION share/pixmaps)
|
||||
INSTALL(FILES ryzom_16x16.png DESTINATION share/icons/hicolor/16x16/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_22x22.png DESTINATION share/icons/hicolor/22x22/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_24x24.png DESTINATION share/icons/hicolor/24x24/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_32x32.png DESTINATION share/icons/hicolor/32x32/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_48x48.png DESTINATION share/icons/hicolor/48x48/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
INSTALL(FILES ryzom_128x128.png DESTINATION share/icons/hicolor/128x128/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||
ENDIF()
|
||||
|
|
Loading…
Reference in a new issue