Merge with develop

--HG--
branch : compatibility-develop
hg/compatibility-develop
kervala 9 years ago
commit 5bc5527fd6

@ -218,6 +218,11 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_EXTERNAL "With provided external." OFF) OPTION(WITH_EXTERNAL "With provided external." OFF)
ENDIF(WIN32) ENDIF(WIN32)
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF) OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
IF(UNIX AND NOT APPLE)
OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" ON )
ELSE()
OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" OFF)
ENDIF()
OPTION(WITH_INSTALL_LIBRARIES "Install development files." ON ) OPTION(WITH_INSTALL_LIBRARIES "Install development files." ON )
OPTION(WITH_ASSIMP "Use assimp exporter" OFF) OPTION(WITH_ASSIMP "Use assimp exporter" OFF)
@ -315,7 +320,6 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON ) OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON )
OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON ) OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON )
OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON ) OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON )
OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF)
### ###
# Optional support # Optional support
@ -324,6 +328,8 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
OPTION(WITH_LUA52 "Build Ryzom Core using Lua 5.2" OFF) OPTION(WITH_LUA52 "Build Ryzom Core using Lua 5.2" OFF)
OPTION(WITH_LUA53 "Build Ryzom Core using Lua 5.3" OFF) OPTION(WITH_LUA53 "Build Ryzom Core using Lua 5.3" OFF)
OPTION(WITH_RYZOM_CLIENT_UAC "Ask to run as Administrator" OFF) OPTION(WITH_RYZOM_CLIENT_UAC "Ask to run as Administrator" OFF)
OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF)
OPTION(WITH_RYZOM_CUSTOM_PATCH_SERVER "Only use patch server from CFG file" OFF)
ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS) MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS)
@ -908,121 +914,120 @@ ENDMACRO(NL_SETUP_BUILD_FLAGS)
MACRO(NL_MAKE_ABSOLUTE_PREFIX NAME_RELATIVE NAME_ABSOLUTE) MACRO(NL_MAKE_ABSOLUTE_PREFIX NAME_RELATIVE NAME_ABSOLUTE)
IF(IS_ABSOLUTE "${${NAME_RELATIVE}}") IF(IS_ABSOLUTE "${${NAME_RELATIVE}}")
SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}}) SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}})
ELSE(IS_ABSOLUTE "${${NAME_RELATIVE}}") ELSE()
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}})
ELSE(WIN32)
SET(${NAME_ABSOLUTE} ${CMAKE_INSTALL_PREFIX}/${${NAME_RELATIVE}}) SET(${NAME_ABSOLUTE} ${CMAKE_INSTALL_PREFIX}/${${NAME_RELATIVE}})
ENDIF(WIN32) ELSE()
SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}})
ENDIF()
ENDIF(IS_ABSOLUTE "${${NAME_RELATIVE}}") ENDIF(IS_ABSOLUTE "${${NAME_RELATIVE}}")
ENDMACRO(NL_MAKE_ABSOLUTE_PREFIX) ENDMACRO(NL_MAKE_ABSOLUTE_PREFIX)
MACRO(NL_SETUP_PREFIX_PATHS) MACRO(NL_SETUP_PREFIX_PATHS)
## Allow override of install_prefix/etc path. ## Allow override of install_prefix/etc path.
IF(NOT NL_ETC_PREFIX) IF(NOT NL_ETC_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(NL_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
ELSE(WIN32)
SET(NL_ETC_PREFIX "etc/nel" CACHE PATH "Installation path for configurations") SET(NL_ETC_PREFIX "etc/nel" CACHE PATH "Installation path for configurations")
ENDIF(WIN32) ELSE()
ENDIF(NOT NL_ETC_PREFIX) SET(NL_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
ENDIF()
ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(NL_ETC_PREFIX NL_ETC_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_ETC_PREFIX NL_ETC_ABSOLUTE_PREFIX)
## Allow override of install_prefix/share path. ## Allow override of install_prefix/share path.
IF(NOT NL_SHARE_PREFIX) IF(NOT NL_SHARE_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(NL_SHARE_PREFIX "." CACHE PATH "Installation path for data.")
ELSE(WIN32)
SET(NL_SHARE_PREFIX "share/nel" CACHE PATH "Installation path for data.") SET(NL_SHARE_PREFIX "share/nel" CACHE PATH "Installation path for data.")
ENDIF(WIN32) ELSE()
ENDIF(NOT NL_SHARE_PREFIX) SET(NL_SHARE_PREFIX "." CACHE PATH "Installation path for data.")
ENDIF()
ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(NL_SHARE_PREFIX NL_SHARE_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_SHARE_PREFIX NL_SHARE_ABSOLUTE_PREFIX)
## Allow override of install_prefix/sbin path. ## Allow override of install_prefix/sbin path.
IF(NOT NL_SBIN_PREFIX) IF(NOT NL_SBIN_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(NL_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.")
ELSE(WIN32)
SET(NL_SBIN_PREFIX "sbin" CACHE PATH "Installation path for admin tools and services.") SET(NL_SBIN_PREFIX "sbin" CACHE PATH "Installation path for admin tools and services.")
ENDIF(WIN32) ELSE()
ENDIF(NOT NL_SBIN_PREFIX) SET(NL_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.")
ENDIF()
ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(NL_SBIN_PREFIX NL_SBIN_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_SBIN_PREFIX NL_SBIN_ABSOLUTE_PREFIX)
## Allow override of install_prefix/bin path. ## Allow override of install_prefix/bin path.
IF(NOT NL_BIN_PREFIX) IF(NOT NL_BIN_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(NL_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.")
ELSE(WIN32)
SET(NL_BIN_PREFIX "bin" CACHE PATH "Installation path for tools and applications.") SET(NL_BIN_PREFIX "bin" CACHE PATH "Installation path for tools and applications.")
ENDIF(WIN32) ELSE()
ENDIF(NOT NL_BIN_PREFIX) SET(NL_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.")
ENDIF()
ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(NL_BIN_PREFIX NL_BIN_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_BIN_PREFIX NL_BIN_ABSOLUTE_PREFIX)
## Allow override of install_prefix/lib path. ## Allow override of install_prefix/lib path.
IF(NOT NL_LIB_PREFIX) IF(NOT NL_LIB_PREFIX)
IF(LIBRARY_ARCHITECTURE) IF(LIBRARY_ARCHITECTURE)
SET(NL_LIB_PREFIX "lib/${LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.") SET(NL_LIB_PREFIX "lib/${LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.")
ELSE(LIBRARY_ARCHITECTURE) ELSE()
SET(NL_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.") SET(NL_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.")
ENDIF(LIBRARY_ARCHITECTURE) ENDIF()
ENDIF(NOT NL_LIB_PREFIX) ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(NL_LIB_PREFIX NL_LIB_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_LIB_PREFIX NL_LIB_ABSOLUTE_PREFIX)
## Allow override of install_prefix/lib path. ## Allow override of install_prefix/lib path.
IF(NOT NL_DRIVER_PREFIX) IF(NOT NL_DRIVER_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(NL_DRIVER_PREFIX "." CACHE PATH "Installation path for drivers.")
ELSE(WIN32)
IF(LIBRARY_ARCHITECTURE) IF(LIBRARY_ARCHITECTURE)
SET(NL_DRIVER_PREFIX "lib/${LIBRARY_ARCHITECTURE}/nel" CACHE PATH "Installation path for drivers.") SET(NL_DRIVER_PREFIX "lib/${LIBRARY_ARCHITECTURE}/nel" CACHE PATH "Installation path for drivers.")
ELSE(LIBRARY_ARCHITECTURE) ELSE()
SET(NL_DRIVER_PREFIX "lib/nel" CACHE PATH "Installation path for drivers.") SET(NL_DRIVER_PREFIX "lib/nel" CACHE PATH "Installation path for drivers.")
ENDIF(LIBRARY_ARCHITECTURE) ENDIF()
ENDIF(WIN32) ELSE()
ENDIF(NOT NL_DRIVER_PREFIX) SET(NL_DRIVER_PREFIX "." CACHE PATH "Installation path for drivers.")
ENDIF()
ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(NL_DRIVER_PREFIX NL_DRIVER_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_DRIVER_PREFIX NL_DRIVER_ABSOLUTE_PREFIX)
ENDMACRO(NL_SETUP_PREFIX_PATHS) ENDMACRO(NL_SETUP_PREFIX_PATHS)
MACRO(RYZOM_SETUP_PREFIX_PATHS) MACRO(RYZOM_SETUP_PREFIX_PATHS)
## Allow override of install_prefix/etc path. ## Allow override of install_prefix/etc path.
IF(NOT RYZOM_ETC_PREFIX) IF(NOT RYZOM_ETC_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
ELSE(WIN32)
SET(RYZOM_ETC_PREFIX "etc/ryzom" CACHE PATH "Installation path for configurations") SET(RYZOM_ETC_PREFIX "etc/ryzom" CACHE PATH "Installation path for configurations")
ENDIF(WIN32) ELSE()
SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
ENDIF()
ENDIF(NOT RYZOM_ETC_PREFIX) ENDIF(NOT RYZOM_ETC_PREFIX)
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_ETC_PREFIX RYZOM_ETC_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(RYZOM_ETC_PREFIX RYZOM_ETC_ABSOLUTE_PREFIX)
## Allow override of install_prefix/share path. ## Allow override of install_prefix/share path.
IF(NOT RYZOM_SHARE_PREFIX) IF(NOT RYZOM_SHARE_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.")
ELSE(WIN32)
SET(RYZOM_SHARE_PREFIX "share/ryzom" CACHE PATH "Installation path for data.") SET(RYZOM_SHARE_PREFIX "share/ryzom" CACHE PATH "Installation path for data.")
ENDIF(WIN32) ELSE()
ENDIF(NOT RYZOM_SHARE_PREFIX) SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.")
ENDIF()
ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_SHARE_PREFIX RYZOM_SHARE_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(RYZOM_SHARE_PREFIX RYZOM_SHARE_ABSOLUTE_PREFIX)
## Allow override of install_prefix/sbin path. ## Allow override of install_prefix/sbin path.
IF(NOT RYZOM_SBIN_PREFIX) IF(NOT RYZOM_SBIN_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.")
ELSE(WIN32)
SET(RYZOM_SBIN_PREFIX "sbin" CACHE PATH "Installation path for admin tools and services.") SET(RYZOM_SBIN_PREFIX "sbin" CACHE PATH "Installation path for admin tools and services.")
ENDIF(WIN32) ELSE()
ENDIF(NOT RYZOM_SBIN_PREFIX) SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.")
ENDIF()
ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_SBIN_PREFIX RYZOM_SBIN_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(RYZOM_SBIN_PREFIX RYZOM_SBIN_ABSOLUTE_PREFIX)
## Allow override of install_prefix/bin path. ## Allow override of install_prefix/bin path.
IF(NOT RYZOM_BIN_PREFIX) IF(NOT RYZOM_BIN_PREFIX)
IF(WIN32) IF(WITH_UNIX_STRUCTURE)
SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.")
ELSE(WIN32)
SET(RYZOM_BIN_PREFIX "bin" CACHE PATH "Installation path for tools.") SET(RYZOM_BIN_PREFIX "bin" CACHE PATH "Installation path for tools.")
ENDIF(WIN32) ELSE()
ENDIF(NOT RYZOM_BIN_PREFIX) SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.")
ENDIF()
ENDIF()
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_BIN_PREFIX RYZOM_BIN_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(RYZOM_BIN_PREFIX RYZOM_BIN_ABSOLUTE_PREFIX)
## Allow override of install_prefix/lib path. ## Allow override of install_prefix/lib path.

@ -10,6 +10,10 @@ ADD_SUBDIRECTORY(seven_zip)
IF(WITH_RYZOM_PATCH) IF(WITH_RYZOM_PATCH)
ADD_DEFINITIONS(-DRZ_USE_PATCH) ADD_DEFINITIONS(-DRZ_USE_PATCH)
IF(WITH_RYZOM_CUSTOM_PATCH_SERVER)
ADD_DEFINITIONS(-DRZ_USE_CUSTOM_PATCH_SERVER)
ENDIF()
ENDIF() ENDIF()
FILE(GLOB CFG ../*.cfg) FILE(GLOB CFG ../*.cfg)
@ -98,8 +102,6 @@ IF(APPLE)
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing bundle...") ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing bundle...")
ENDIF() ENDIF()
ENDIF() ENDIF()
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/installscript_osx.vdf ${RYZOM_OUTPUT_DIR})
ENDIF() ENDIF()
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(

@ -416,7 +416,6 @@ CClientConfig::CClientConfig()
PatchUrl.clear(); PatchUrl.clear();
PatchletUrl.clear(); PatchletUrl.clear();
PatchVersion.clear(); PatchVersion.clear();
PatchServer.clear();
WebIgMainDomain = "atys.ryzom.com"; WebIgMainDomain = "atys.ryzom.com";
WebIgTrustedDomains.push_back(WebIgMainDomain); WebIgTrustedDomains.push_back(WebIgMainDomain);
@ -1039,12 +1038,19 @@ void CClientConfig::setValues()
///////////////////////// /////////////////////////
// NEW PATCHING SYSTEM // // NEW PATCHING SYSTEM //
READ_BOOL_FV(PatchWanted) READ_BOOL_DEV(PatchWanted)
#ifdef RZ_USE_CUSTOM_PATCH_SERVER
READ_STRING_FV(PatchUrl)
READ_STRING_FV(PatchVersion)
READ_STRING_FV(RingReleaseNotePath)
READ_STRING_FV(ReleaseNotePath)
#else
READ_STRING_DEV(PatchUrl) READ_STRING_DEV(PatchUrl)
READ_STRING_DEV(PatchVersion) READ_STRING_DEV(PatchVersion)
READ_STRING_DEV(RingReleaseNotePath) READ_STRING_DEV(RingReleaseNotePath)
READ_STRING_DEV(ReleaseNotePath) READ_STRING_DEV(ReleaseNotePath)
READ_STRING_FV(PatchServer) #endif
///////////////////////// /////////////////////////
// NEW PATCHLET SYSTEM // // NEW PATCHLET SYSTEM //

@ -296,7 +296,6 @@ struct CClientConfig
std::string PatchUrl; std::string PatchUrl;
std::string PatchletUrl; std::string PatchletUrl;
std::string PatchVersion; std::string PatchVersion;
std::string PatchServer;
std::string RingReleaseNotePath; std::string RingReleaseNotePath;
std::string ReleaseNotePath; std::string ReleaseNotePath;

@ -991,11 +991,18 @@ void removeSpace(string &s)
static void getPatchParameters(std::string &url, std::string &ver, std::vector<std::string> &patchURIs) static void getPatchParameters(std::string &url, std::string &ver, std::vector<std::string> &patchURIs)
{ {
if (ClientCfg.R2Mode) if (ClientCfg.R2Mode)
{
url = ClientCfg.PatchUrl;
ver = ClientCfg.PatchVersion;
// if PatchUrl is forced, don't use URLs returned by server
if (url.empty())
{ {
patchURIs = R2PatchURLs; patchURIs = R2PatchURLs;
url = R2BackupPatchURL; url = R2BackupPatchURL;
ver = R2ServerVersion; ver = R2ServerVersion;
} }
}
else else
{ {
nlassert(ShardSelected != -1); nlassert(ShardSelected != -1);

@ -275,6 +275,7 @@ void CPatchManager::init(const std::vector<std::string>& patchURIs, const std::s
{ {
uint i; uint i;
PatchServers.clear(); PatchServers.clear();
for (i=0; i<patchURIs.size(); ++i) for (i=0; i<patchURIs.size(); ++i)
{ {
PatchServers.push_back(CPatchServer(patchURIs[i])); PatchServers.push_back(CPatchServer(patchURIs[i]));

@ -202,10 +202,10 @@ int main(int argc, char *argv[])
// load client.cfg or client_default.cfg // load client.cfg or client_default.cfg
ClientCfg.init(config); ClientCfg.init(config);
// check if PatchServer is defined // check if PatchUrl is defined
if (ClientCfg.PatchServer.empty()) if (ClientCfg.PatchUrl.empty())
{ {
printError("PatchServer not defined in " + config); printError("PatchUrl not defined in " + config);
return 1; return 1;
} }
@ -273,9 +273,9 @@ int main(int argc, char *argv[])
// set the correct root path // set the correct root path
pPM->setClientRootPath(rootPath); pPM->setClientRootPath(rootPath);
// use PatchServer URL // use PatchUrl
vector<string> patchURLs; vector<string> patchURLs;
pPM->init(patchURLs, ClientCfg.PatchServer, ClientCfg.PatchVersion); pPM->init(patchURLs, ClientCfg.PatchUrl, ClientCfg.PatchVersion);
pPM->startCheckThread(true /* include background patchs */); pPM->startCheckThread(true /* include background patchs */);
ucstring state; ucstring state;

Loading…
Cancel
Save