mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 07:36:16 +00:00
Changed: Add and use more constants in config.h
--HG-- branch : develop
This commit is contained in:
parent
ce519d6d34
commit
7a2dd18095
15 changed files with 63 additions and 38 deletions
|
@ -49,7 +49,8 @@ PROJECT(RyzomCore CXX C)
|
||||||
SET(NL_VERSION_MAJOR 0)
|
SET(NL_VERSION_MAJOR 0)
|
||||||
SET(NL_VERSION_MINOR 12)
|
SET(NL_VERSION_MINOR 12)
|
||||||
SET(NL_VERSION_PATCH 0)
|
SET(NL_VERSION_PATCH 0)
|
||||||
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}")
|
SET(YEAR "2004-2015")
|
||||||
|
SET(AUTHOR "Winchgate and The Ryzom Core Community")
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Redirect output files
|
# Redirect output files
|
||||||
|
|
|
@ -31,7 +31,26 @@ MACRO(NL_CONFIGURE_CHECKS)
|
||||||
SET(NL_XAUDIO2_AVAILABLE 1)
|
SET(NL_XAUDIO2_AVAILABLE 1)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
IF(NOT RYZOM_VERSION_MAJOR)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
SET(RYZOM_VERSION_MAJOR ${NL_VERSION_MAJOR})
|
||||||
|
SET(RYZOM_VERSION_MINOR ${NL_VERSION_MINOR})
|
||||||
|
SET(RYZOM_VERSION_PATCH ${NL_VERSION_PATCH})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}")
|
||||||
|
SET(NL_VERSION_RC "${NL_VERSION_MAJOR},${NL_VERSION_MINOR},${NL_VERSION_PATCH},${REVISION}")
|
||||||
|
|
||||||
|
SET(RYZOM_VERSION "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}.${REVISION}")
|
||||||
|
SET(RYZOM_VERSION_RC "${RYZOM_VERSION_MAJOR},${RYZOM_VERSION_MINOR},${RYZOM_VERSION_PATCH},${REVISION}")
|
||||||
|
NOW(BUILD_DATE)
|
||||||
|
|
||||||
|
SET(COPYRIGHT "${YEAR} ${AUTHOR}")
|
||||||
|
|
||||||
|
IF(NOT RYZOM_CLIENT_ICON)
|
||||||
|
SET(RYZOM_CLIENT_ICON "ryzom_client")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
|
||||||
|
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
|
||||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
|
@ -20,4 +20,18 @@
|
||||||
#cmakedefine RYZOM_ETC_PREFIX "${RYZOM_ETC_ABSOLUTE_PREFIX}"
|
#cmakedefine RYZOM_ETC_PREFIX "${RYZOM_ETC_ABSOLUTE_PREFIX}"
|
||||||
#cmakedefine RYZOM_SHARE_PREFIX "${RYZOM_SHARE_ABSOLUTE_PREFIX}"
|
#cmakedefine RYZOM_SHARE_PREFIX "${RYZOM_SHARE_ABSOLUTE_PREFIX}"
|
||||||
|
|
||||||
|
#cmakedefine REVISION "${REVISION}"
|
||||||
|
#cmakedefine BUILD_DATE "${BUILD_DATE}"
|
||||||
|
|
||||||
|
#cmakedefine NL_VERSION "${NL_VERSION}"
|
||||||
|
#cmakedefine NL_VERSION_RC ${NL_VERSION_RC}
|
||||||
|
|
||||||
|
#cmakedefine RYZOM_VERSION "${RYZOM_VERSION}"
|
||||||
|
#cmakedefine RYZOM_VERSION_RC ${RYZOM_VERSION_RC}
|
||||||
|
#cmakedefine AUTHOR "${AUTHOR}"
|
||||||
|
#cmakedefine YEAR "${YEAR}"
|
||||||
|
#cmakedefine COPYRIGHT "${COPYRIGHT}"
|
||||||
|
|
||||||
|
#cmakedefine RYZOM_CLIENT_ICON "${RYZOM_CLIENT_ICON}"
|
||||||
|
|
||||||
#endif // CONFIG_H
|
#endif // CONFIG_H
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FILE(GLOB SRC *.cpp *.h *.def)
|
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
||||||
|
|
||||||
NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC})
|
NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC})
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ IF(NOT WIN32)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
FILE(GLOB SRC *.cpp *.h *.def)
|
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
FILE(GLOB MAC_SRC mac/*.h mac/*.m mac/*.mm mac/*.cpp)
|
FILE(GLOB MAC_SRC mac/*.h mac/*.m mac/*.mm mac/*.cpp)
|
||||||
|
|
|
@ -12,7 +12,7 @@ ENDIF()
|
||||||
|
|
||||||
SET(SOURCE_DIR ${CMAKE_SOURCE_DIR}/nel/src/3d/driver/opengl)
|
SET(SOURCE_DIR ${CMAKE_SOURCE_DIR}/nel/src/3d/driver/opengl)
|
||||||
|
|
||||||
FILE(GLOB SRC ${SOURCE_DIR}/*.cpp ${SOURCE_DIR}/*.h ${SOURCE_DIR}/*.def)
|
FILE(GLOB SRC ${SOURCE_DIR}/*.cpp ${SOURCE_DIR}/*.h ${SOURCE_DIR}/*.def *.rc)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
FILE(GLOB MAC_SRC ${SOURCE_DIR}/mac/*.h ${SOURCE_DIR}/mac/*.m ${SOURCE_DIR}/mac/*.mm ${SOURCE_DIR}/mac/*.cpp)
|
FILE(GLOB MAC_SRC ${SOURCE_DIR}/mac/*.h ${SOURCE_DIR}/mac/*.m ${SOURCE_DIR}/mac/*.mm ${SOURCE_DIR}/mac/*.cpp)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FILE(GLOB SRC *.cpp *.h *.def)
|
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
||||||
|
|
||||||
NL_TARGET_DRIVER(nel_drv_dsound_win ${SRC})
|
NL_TARGET_DRIVER(nel_drv_dsound_win ${SRC})
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FILE(GLOB SRC *.cpp *.h *.def)
|
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
||||||
|
|
||||||
NL_TARGET_DRIVER(nel_drv_fmod_win ${SRC})
|
NL_TARGET_DRIVER(nel_drv_fmod_win ${SRC})
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FILE(GLOB SRC *.cpp *.h *.def)
|
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(NLDRV_AL_LIB "nel_drv_openal_win")
|
SET(NLDRV_AL_LIB "nel_drv_openal_win")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FILE(GLOB SRC *.cpp *.h *.def)
|
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
||||||
|
|
||||||
SOURCE_GROUP(sfx FILES
|
SOURCE_GROUP(sfx FILES
|
||||||
buffer_xaudio2.cpp
|
buffer_xaudio2.cpp
|
||||||
|
|
|
@ -50,11 +50,11 @@ if(APPLE)
|
||||||
SET(MACOSX_BUNDLE_INFO_STRING "Ryzom Core Client")
|
SET(MACOSX_BUNDLE_INFO_STRING "Ryzom Core Client")
|
||||||
SET(MACOSX_BUNDLE_ICON_FILE "ryzom.icns")
|
SET(MACOSX_BUNDLE_ICON_FILE "ryzom.icns")
|
||||||
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "")
|
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "")
|
||||||
SET(MACOSX_BUNDLE_LONG_VERSION_STRING ${NL_VERSION})
|
SET(MACOSX_BUNDLE_LONG_VERSION_STRING ${RYZOM_VERSION})
|
||||||
SET(MACOSX_BUNDLE_BUNDLE_NAME "Ryzom Core Client")
|
SET(MACOSX_BUNDLE_BUNDLE_NAME "Ryzom Core Client")
|
||||||
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "0.8")
|
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING ${RYZOM_VERSION})
|
||||||
SET(MACOSX_BUNDLE_BUNDLE_VERSION "1.0")
|
SET(MACOSX_BUNDLE_BUNDLE_VERSION "1.0")
|
||||||
SET(MACOSX_BUNDLE_COPYRIGHT "Winchgate and The Ryzom Core Community")
|
SET(MACOSX_BUNDLE_COPYRIGHT ${COPYRIGHT})
|
||||||
SET(RYZOM_OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app)
|
SET(RYZOM_OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app)
|
||||||
SET(RYZOM_CONTENTS_DIR ${RYZOM_OUTPUT_DIR}/Contents)
|
SET(RYZOM_CONTENTS_DIR ${RYZOM_OUTPUT_DIR}/Contents)
|
||||||
SET(RYZOM_RESOURCES_DIR ${RYZOM_CONTENTS_DIR}/Resources)
|
SET(RYZOM_RESOURCES_DIR ${RYZOM_CONTENTS_DIR}/Resources)
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
//
|
//
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
@ -165,8 +166,8 @@ IDB_ERROR_LOGO BITMAP DISCARDABLE "error_logo.bmp"
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,1,0
|
FILEVERSION RYZOM_VERSION_RC
|
||||||
PRODUCTVERSION 2,1,0
|
PRODUCTVERSION NL_VERSION_RC
|
||||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS VS_FF_DEBUG
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
@ -182,15 +183,15 @@ BEGIN
|
||||||
BLOCK "040904b0"
|
BLOCK "040904b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "Ryzom client"
|
VALUE "FileDescription", "Ryzom client"
|
||||||
VALUE "FileVersion", "2.1.0"
|
VALUE "FileVersion", RYZOM_VERSION
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2004-2015 Winchgate and The Ryzom Core Community"
|
VALUE "LegalCopyright", COPYRIGHT
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
VALUE "OriginalFilename", "ryzom_client_d.exe"
|
VALUE "OriginalFilename", "ryzom_client_d.exe"
|
||||||
#else
|
#else
|
||||||
VALUE "OriginalFilename", "ryzom_client_r.exe"
|
VALUE "OriginalFilename", "ryzom_client_r.exe"
|
||||||
#endif
|
#endif
|
||||||
VALUE "ProductName", "Ryzom"
|
VALUE "ProductName", "Ryzom Core"
|
||||||
VALUE "ProductVersion", "2.1.0"
|
VALUE "ProductVersion", NL_VERSION
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -20,10 +20,8 @@
|
||||||
#include "user_agent.h"
|
#include "user_agent.h"
|
||||||
#include "client_cfg.h"
|
#include "client_cfg.h"
|
||||||
|
|
||||||
#include "game_share/ryzom_version.h"
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
#ifdef HAVE_REVISION_H
|
|
||||||
#include "revision.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_X86_64)
|
#if defined(HAVE_X86_64)
|
||||||
|
@ -61,11 +59,7 @@ std::string getUserAgentVersion()
|
||||||
|
|
||||||
if (s_userAgent.empty())
|
if (s_userAgent.empty())
|
||||||
{
|
{
|
||||||
#ifdef REVISION
|
|
||||||
s_userAgent = NLMISC::toString("%s.%s-%s-%s", RYZOM_VERSION, REVISION, RYZOM_SYSTEM, RYZOM_ARCH);
|
|
||||||
#else
|
|
||||||
s_userAgent = NLMISC::toString("%s-%s-%s", RYZOM_VERSION, RYZOM_SYSTEM, RYZOM_ARCH);
|
s_userAgent = NLMISC::toString("%s-%s-%s", RYZOM_VERSION, RYZOM_SYSTEM, RYZOM_ARCH);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return s_userAgent;
|
return s_userAgent;
|
||||||
|
@ -90,10 +84,6 @@ std::string getDisplayVersion()
|
||||||
if (ClientCfg.ExtendedCommands) s_version += "_E";
|
if (ClientCfg.ExtendedCommands) s_version += "_E";
|
||||||
|
|
||||||
s_version += getVersion();
|
s_version += getVersion();
|
||||||
|
|
||||||
#ifdef REVISION
|
|
||||||
s_version += NLMISC::toString(".%s", REVISION);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return s_version;
|
return s_version;
|
||||||
|
|
|
@ -3,9 +3,9 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/ryzom_client.desktop.in" "${CMAKE_CU
|
||||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/ryzom_client.desktop" DESTINATION share/applications)
|
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/ryzom_client.desktop" DESTINATION share/applications)
|
||||||
INSTALL(FILES ryzom_client.png DESTINATION share/pixmaps)
|
INSTALL(FILES ryzom_client.png DESTINATION share/pixmaps)
|
||||||
INSTALL(FILES ryzom_client.xpm 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.png)
|
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.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.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.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.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.png)
|
INSTALL(FILES ryzom_128x128.png DESTINATION share/icons/hicolor/128x128/apps RENAME ${RYZOM_CLIENT_ICON}.png)
|
||||||
|
|
|
@ -8,7 +8,7 @@ Comment=Ryzom client
|
||||||
Comment[fr_FR]=Client Ryzom
|
Comment[fr_FR]=Client Ryzom
|
||||||
TryExec=${RYZOM_GAMES_PREFIX}/ryzom_client
|
TryExec=${RYZOM_GAMES_PREFIX}/ryzom_client
|
||||||
Exec=${RYZOM_GAMES_PREFIX}/ryzom_client
|
Exec=${RYZOM_GAMES_PREFIX}/ryzom_client
|
||||||
Icon=ryzom_client
|
Icon=${RYZOM_CLIENT_ICON}
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Hidden=false
|
Hidden=false
|
||||||
Categories=Game;RolePlaying;
|
Categories=Game;RolePlaying;
|
||||||
|
|
Loading…
Reference in a new issue