浏览代码

Fix handling of 'developmentMode' for lobby-only builds

Ivan Savenko 1 年之前
父节点
当前提交
64ff0e0486
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      lib/VCMIDirs.cpp

+ 3 - 2
lib/VCMIDirs.cpp

@@ -367,8 +367,9 @@ 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
-	const bool result = bfs::exists("AI") && bfs::exists("config") && bfs::exists("Mods") && bfs::exists("vcmiclient");
-	return result;
+	const bool hasConfigs = bfs::exists("config") && bfs::exists("Mods");
+	const bool hasBinaries = bfs::exists("vcmiclient") || bfs::exists("vcmiserver") || bfs::exists("vcmilobby");
+	return hasConfigs && hasBinaries;
 }
 
 bfs::path IVCMIDirsUNIX::clientPath() const { return binaryPath() / "vcmiclient"; }