1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-27 21:49:10 +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:
mateuszb 2009-10-17 13:13:09 +00:00
parent e88bec607b
commit fdcb286044
2 changed files with 7 additions and 1 deletions

View File

@ -371,7 +371,7 @@ void CClient::newGame( CConnection *con, StartInfo *si )
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?
}

View File

@ -50,6 +50,12 @@ extern std::string NAME_AFFIX; //client / server
#define SERVER_NAME "vcmiserver"
#endif
#ifdef _WIN32
#define PATH_SEPARATOR "\\"
#else
#define PATH_SEPARATOR "/"
#endif
/*
* global.h, part of VCMI engine
*