1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Removed all references to boost::interprocess library

This commit is contained in:
Ivan Savenko
2023-07-27 22:50:50 +03:00
parent e8ee83574c
commit 593b82d178
9 changed files with 6 additions and 158 deletions

View File

@@ -28,8 +28,6 @@
#elif defined(VCMI_IOS)
#include "ios/utils.h"
#include <dispatch/dispatch.h>
#else
#include "../lib/Interprocess.h"
#endif
#ifdef SINGLE_PROCESS_APP
@@ -154,29 +152,6 @@ void CServerHandler::resetStateForLobby(const StartInfo::EMode mode, const std::
myNames = *names;
else
myNames.push_back(settings["general"]["playerName"].String());
#if !defined(VCMI_ANDROID) && !defined(SINGLE_PROCESS_APP)
shm.reset();
if(!settings["session"]["disable-shm"].Bool())
{
std::string sharedMemoryName = "vcmi_memory";
if(settings["session"]["enable-shm-uuid"].Bool())
{
//used or automated testing when multiple clients start simultaneously
sharedMemoryName += "_" + uuid;
}
try
{
shm = std::make_shared<SharedMemory>(sharedMemoryName, true);
}
catch(...)
{
shm.reset();
logNetwork->error("Cannot open interprocess memory. Continue without it...");
}
}
#endif
}
void CServerHandler::startLocalServerAndConnect()
@@ -256,19 +231,13 @@ void CServerHandler::startLocalServerAndConnect()
}
logNetwork->info("waiting for server finished...");
androidTestServerReadyFlag = false;
#else
if(shm)
shm->sr->waitTillReady();
#endif
logNetwork->trace("Waiting for server: %d ms", th->getDiff());
th->update(); //put breakpoint here to attach to server before it does something stupid
#if !defined(VCMI_MOBILE)
const ui16 port = shm ? shm->sr->port : 0;
#else
const ui16 port = 0;
#endif
justConnectToServer(localhostAddress, port);
logNetwork->trace("\tConnecting to the server: %d ms", th->getDiff());
@@ -925,13 +894,7 @@ void CServerHandler::threadRunServer()
comm += " --lobby-port=" + std::to_string(settings["session"]["port"].Integer());
comm += " --lobby-uuid=" + settings["session"]["hostUuid"].String();
}
if(shm)
{
comm += " --enable-shm";
if(settings["session"]["enable-shm-uuid"].Bool())
comm += " --enable-shm-uuid";
}
comm += " > \"" + logName + '\"';
logGlobal->info("Server command line: %s", comm);