mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
vcmi can be compiled as single app on Linux
TODO: check compilation on Win/Mac using Github Actions
This commit is contained in:
parent
fd21f9ead2
commit
6463e906d5
@ -4,4 +4,6 @@
|
||||
|
||||
// This header should be treated as a pre compiled header file(PCH) in the compiler building settings.
|
||||
|
||||
// Here you can add specific libraries and macros which are specific to this project.
|
||||
// Here you can add specific libraries and macros which are specific to this project.
|
||||
|
||||
VCMI_LIB_USING_NAMESPACE
|
||||
|
@ -25,12 +25,15 @@
|
||||
#include "../lib/CAndroidVMHelper.h"
|
||||
#elif defined(VCMI_IOS)
|
||||
#include "ios/utils.h"
|
||||
#include "../server/CVCMIServer.h"
|
||||
|
||||
#include <dispatch/dispatch.h>
|
||||
#else
|
||||
#include "../lib/Interprocess.h"
|
||||
#endif
|
||||
|
||||
#ifdef SINGLE_PROCESS_APP
|
||||
#include "../server/CVCMIServer.h"
|
||||
#endif
|
||||
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
#include "../lib/CThreadHelper.h"
|
||||
@ -142,7 +145,7 @@ void CServerHandler::resetStateForLobby(const StartInfo::EMode mode, const std::
|
||||
else
|
||||
myNames.push_back(settings["general"]["playerName"].String());
|
||||
|
||||
#if !defined(VCMI_ANDROID) && !defined(VCMI_IOS)
|
||||
#if !defined(VCMI_ANDROID) && !defined(SINGLE_PROCESS_APP)
|
||||
shm.reset();
|
||||
|
||||
if(!settings["session"]["disable-shm"].Bool())
|
||||
|
@ -367,7 +367,7 @@ class IVCMIDirsUNIX : public IVCMIDirs
|
||||
bool IVCMIDirsUNIX::developmentMode() const
|
||||
{
|
||||
// We want to be able to run VCMI from single directory. E.g to run from build output directory
|
||||
return bfs::exists("AI") && bfs::exists("config") && bfs::exists("Mods") && bfs::exists("vcmiserver") && bfs::exists("vcmiclient");
|
||||
return bfs::exists("AI") && bfs::exists("config") && bfs::exists("Mods") && bfs::exists("../CMakeCache.txt");
|
||||
}
|
||||
|
||||
bfs::path IVCMIDirsUNIX::clientPath() const { return binaryPath() / "vcmiclient"; }
|
||||
|
@ -1043,7 +1043,7 @@ static void handleCommandOptions(int argc, char * argv[], boost::program_options
|
||||
#endif
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
#if !defined(VCMI_ANDROID) && !defined(VCMI_IOS)
|
||||
#if !defined(VCMI_ANDROID) && !defined(SINGLE_PROCESS_APP)
|
||||
// Correct working dir executable folder (not bundle folder) so we can use executable relative paths
|
||||
boost::filesystem::current_path(boost::filesystem::system_complete(argv[0]).parent_path());
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user