mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
* VCMI works again on Windows.
hint: ./executable.exe does not run executable on Windows - you must use executable.exe or .\executable.exe
This commit is contained in:
@@ -371,7 +371,7 @@ void CClient::newGame( CConnection *con, StartInfo *si )
|
|||||||
|
|
||||||
void CClient::runServer(const char * portc)
|
void CClient::runServer(const char * portc)
|
||||||
{
|
{
|
||||||
static std::string comm = std::string(BIN_DIR "/" SERVER_NAME " ") + portc + " > server_log.txt"; //needs to be static, if not - will be probably destroyed before new thread reads it
|
static std::string comm = std::string(BIN_DIR PATH_SEPARATOR SERVER_NAME " ") + portc + " > server_log.txt"; //needs to be static, if not - will be probably destroyed before new thread reads it
|
||||||
boost::thread servthr(boost::bind(system,comm.c_str())); //runs server executable; //TODO: will it work on non-windows platforms?
|
boost::thread servthr(boost::bind(system,comm.c_str())); //runs server executable; //TODO: will it work on non-windows platforms?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
global.h
6
global.h
@@ -50,6 +50,12 @@ extern std::string NAME_AFFIX; //client / server
|
|||||||
#define SERVER_NAME "vcmiserver"
|
#define SERVER_NAME "vcmiserver"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define PATH_SEPARATOR "\\"
|
||||||
|
#else
|
||||||
|
#define PATH_SEPARATOR "/"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* global.h, part of VCMI engine
|
* global.h, part of VCMI engine
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user