mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 09:16:18 +00:00
merge
This commit is contained in:
commit
d093649d5c
9 changed files with 54 additions and 12 deletions
|
@ -33,6 +33,12 @@ FIND_PATH(WINSDK_INCLUDE_DIR Windows.h
|
||||||
${WINSDKCURRENT_DIR}/Include
|
${WINSDKCURRENT_DIR}/Include
|
||||||
)
|
)
|
||||||
|
|
||||||
|
FIND_PROGRAM(WINSDK_SIGNTOOL signtool
|
||||||
|
PATHS
|
||||||
|
${WINSDK71_DIR}/Bin
|
||||||
|
${WINSDKCURRENT_DIR}/Bin
|
||||||
|
)
|
||||||
|
|
||||||
IF(WINSDK_INCLUDE_DIR)
|
IF(WINSDK_INCLUDE_DIR)
|
||||||
SET(WINSDK_FOUND TRUE)
|
SET(WINSDK_FOUND TRUE)
|
||||||
ELSE(WINSDK_INCLUDE_DIR)
|
ELSE(WINSDK_INCLUDE_DIR)
|
||||||
|
|
|
@ -37,9 +37,7 @@ ENDMACRO(NL_TARGET_DRIVER)
|
||||||
# Argument:
|
# Argument:
|
||||||
###
|
###
|
||||||
MACRO(NL_DEFAULT_PROPS name label)
|
MACRO(NL_DEFAULT_PROPS name label)
|
||||||
IF(NOT MSVC10)
|
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES PROJECT_LABEL ${label})
|
SET_TARGET_PROPERTIES(${name} PROPERTIES PROJECT_LABEL ${label})
|
||||||
ENDIF(NOT MSVC10)
|
|
||||||
GET_TARGET_PROPERTY(type ${name} TYPE)
|
GET_TARGET_PROPERTY(type ${name} TYPE)
|
||||||
IF(${type} STREQUAL SHARED_LIBRARY)
|
IF(${type} STREQUAL SHARED_LIBRARY)
|
||||||
# Set versions only if target is a shared library
|
# Set versions only if target is a shared library
|
||||||
|
@ -49,6 +47,15 @@ MACRO(NL_DEFAULT_PROPS name label)
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES INSTALL_NAME_DIR ${NL_LIB_PREFIX})
|
SET_TARGET_PROPERTIES(${name} PROPERTIES INSTALL_NAME_DIR ${NL_LIB_PREFIX})
|
||||||
ENDIF(NL_LIB_PREFIX)
|
ENDIF(NL_LIB_PREFIX)
|
||||||
ENDIF(${type} STREQUAL SHARED_LIBRARY)
|
ENDIF(${type} STREQUAL SHARED_LIBRARY)
|
||||||
|
|
||||||
|
IF(${type} STREQUAL EXECUTABLE AND WIN32)
|
||||||
|
SET_TARGET_PROPERTIES(${name} PROPERTIES
|
||||||
|
VERSION ${NL_VERSION}
|
||||||
|
SOVERSION ${NL_VERSION_MAJOR}
|
||||||
|
COMPILE_FLAGS "/GA"
|
||||||
|
LINK_FLAGS "/VERSION:${NL_VERSION}")
|
||||||
|
ENDIF(${type} STREQUAL EXECUTABLE AND WIN32)
|
||||||
|
|
||||||
IF(WITH_STLPORT AND WIN32)
|
IF(WITH_STLPORT AND WIN32)
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "/X")
|
SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "/X")
|
||||||
ENDIF(WITH_STLPORT AND WIN32)
|
ENDIF(WITH_STLPORT AND WIN32)
|
||||||
|
@ -315,14 +322,21 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(SPEED_OPTIMIZATIONS "/Ox /GF /GS-")
|
SET(SPEED_OPTIMIZATIONS "/Ox /GF /GS-")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(MIN_OPTIMIZATIONS "/Od /Ob1")
|
SET(MIN_OPTIMIZATIONS "/Od /Ob1")
|
||||||
ELSE(MSVC10)
|
ELSEIF(MSVC90)
|
||||||
# don't use a /O[012x] flag if you want custom optimizations
|
# don't use a /O[012x] flag if you want custom optimizations
|
||||||
SET(SPEED_OPTIMIZATIONS "/Ob2 /Oi /Ot /Oy /GT /GF /GS-")
|
SET(SPEED_OPTIMIZATIONS "/Ob2 /Oi /Ot /Oy /GT /GF /GS-")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(MIN_OPTIMIZATIONS "/Ob1")
|
SET(MIN_OPTIMIZATIONS "/Ob1")
|
||||||
|
ELSEIF(MSVC80)
|
||||||
|
# don't use a /O[012x] flag if you want custom optimizations
|
||||||
|
SET(SPEED_OPTIMIZATIONS "/Ox /GF /GS-")
|
||||||
|
# without inlining it's unusable, use custom optimizations again
|
||||||
|
SET(MIN_OPTIMIZATIONS "/Od /Ob1")
|
||||||
|
ELSE(MSVC10)
|
||||||
|
MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}")
|
||||||
ENDIF(MSVC10)
|
ENDIF(MSVC10)
|
||||||
|
|
||||||
SET(PLATFORM_CFLAGS "/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /W3 /Zi /Zm1000 /MP /Gy-")
|
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /W3 /Zi /Zm1000 /MP /Gy-")
|
||||||
|
|
||||||
# Common link flags
|
# Common link flags
|
||||||
SET(PLATFORM_LINKFLAGS "-DEBUG")
|
SET(PLATFORM_LINKFLAGS "-DEBUG")
|
||||||
|
@ -504,6 +518,10 @@ MACRO(SETUP_EXTERNAL)
|
||||||
|
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
||||||
IF(MSVC10)
|
IF(MSVC10)
|
||||||
|
IF(NOT MSVC10_REDIST_DIR)
|
||||||
|
# If you have VC++ 2010 Express, put x64/Microsoft.VC100.CRT/*.dll in ${EXTERNAL_PATH}/redist
|
||||||
|
SET(MSVC10_REDIST_DIR "${EXTERNAL_PATH}/redist")
|
||||||
|
ENDIF(NOT MSVC10_REDIST_DIR)
|
||||||
GET_FILENAME_COMPONENT(VC_ROOT_DIR "[HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\10.0_Config;InstallDir]" ABSOLUTE)
|
GET_FILENAME_COMPONENT(VC_ROOT_DIR "[HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\10.0_Config;InstallDir]" ABSOLUTE)
|
||||||
# VC_ROOT_DIR is set to "registry" when a key is not found
|
# VC_ROOT_DIR is set to "registry" when a key is not found
|
||||||
IF(VC_ROOT_DIR MATCHES "registry")
|
IF(VC_ROOT_DIR MATCHES "registry")
|
||||||
|
|
|
@ -70,6 +70,10 @@
|
||||||
#include "internationalization.h"
|
#include "internationalization.h"
|
||||||
#include "game_time.h"
|
#include "game_time.h"
|
||||||
|
|
||||||
|
#ifdef NL_OS_WINDOWS
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
using namespace NL3D;
|
using namespace NL3D;
|
||||||
|
@ -602,7 +606,7 @@ void loopLogin()
|
||||||
string LSHost(ConfigFile->getVar("LSHost").asString());
|
string LSHost(ConfigFile->getVar("LSHost").asString());
|
||||||
Login = ConfigFile->getVar("Login").asString();
|
Login = ConfigFile->getVar("Login").asString();
|
||||||
string Password = ConfigFile->getVar("Password").asString();
|
string Password = ConfigFile->getVar("Password").asString();
|
||||||
CHashKeyMD5 hk = getMD5((uint8 *)Password.c_str(), Password.size());
|
CHashKeyMD5 hk = getMD5((uint8 *)Password.c_str(), (uint32)Password.size());
|
||||||
string CPassword = hk.toString();
|
string CPassword = hk.toString();
|
||||||
nlinfo("The crypted password is %s", CPassword.c_str());
|
nlinfo("The crypted password is %s", CPassword.c_str());
|
||||||
string Application = ConfigFile->getVar("ClientApplication").asString();
|
string Application = ConfigFile->getVar("ClientApplication").asString();
|
||||||
|
@ -1073,8 +1077,8 @@ sint main(int argc, char **argv)
|
||||||
// extract the 2 first param (argv[1] and argv[2]) it must be cookie and addr
|
// extract the 2 first param (argv[1] and argv[2]) it must be cookie and addr
|
||||||
|
|
||||||
string cmd = cmdline;
|
string cmd = cmdline;
|
||||||
int pos1 = cmd.find_first_not_of (' ');
|
string::size_type pos1 = cmd.find_first_not_of (' ');
|
||||||
int pos2;
|
string::size_type pos2;
|
||||||
if (pos1 != string::npos)
|
if (pos1 != string::npos)
|
||||||
{
|
{
|
||||||
pos2 = cmd.find (' ', pos1);
|
pos2 = cmd.find (' ', pos1);
|
||||||
|
|
|
@ -36,6 +36,9 @@
|
||||||
// We're using the NeL Service framework, and layer 5
|
// We're using the NeL Service framework, and layer 5
|
||||||
#include <nel/net/service.h>
|
#include <nel/net/service.h>
|
||||||
|
|
||||||
|
#ifdef NL_OS_WINDOWS
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
#include "collision_service.h"
|
#include "collision_service.h"
|
||||||
#include <nel/3d/u_instance_group.h>
|
#include <nel/3d/u_instance_group.h>
|
||||||
|
|
||||||
|
#ifdef NL_OS_WINDOWS
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace SBSERVICE;
|
using namespace SBSERVICE;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
using namespace NLNET;
|
using namespace NLNET;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
FILE(GLOB SRC *.cpp *.h)
|
FILE(GLOB SRC *.cpp *.h)
|
||||||
|
|
||||||
ADD_EXECUTABLE(snowballs_frontend_service ${SRC})
|
ADD_EXECUTABLE(snowballs_frontend_service WIN32 ${SRC})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,10 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#ifdef NL_OS_WINDOWS
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
using namespace NLNET;
|
using namespace NLNET;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -41,6 +41,9 @@
|
||||||
|
|
||||||
#include "physics.h"
|
#include "physics.h"
|
||||||
|
|
||||||
|
#ifdef NL_OS_WINDOWS
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
using namespace NLNET;
|
using namespace NLNET;
|
||||||
|
|
Loading…
Reference in a new issue