mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Avoid including client headers on server builds
This commit is contained in:
parent
bc4ab8b99e
commit
5727d74d37
@ -36,9 +36,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "network/peerhandler.h"
|
||||
#include "gameparams.h"
|
||||
#include "clientdynamicinfo.h"
|
||||
#include <fstream>
|
||||
#include "util/numeric.h"
|
||||
|
||||
#ifdef SERVER
|
||||
#error Do not include in server builds
|
||||
#endif
|
||||
|
||||
#define CLIENT_CHAT_MESSAGE_LIMIT_PER_10S 10.0f
|
||||
|
||||
struct ClientEvent;
|
||||
|
@ -24,6 +24,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "activeobjectmgr.h" // client::ActiveObjectMgr
|
||||
#include <set>
|
||||
|
||||
#ifdef SERVER
|
||||
#error Do not include in server builds
|
||||
#endif
|
||||
|
||||
class ClientSimpleObject;
|
||||
class ClientMap;
|
||||
class ClientScripting;
|
||||
|
@ -22,6 +22,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "irrlichttypes.h"
|
||||
#include <string>
|
||||
|
||||
#ifdef SERVER
|
||||
#error Do not include in server builds
|
||||
#endif
|
||||
|
||||
class InputHandler;
|
||||
class ChatBackend;
|
||||
class RenderingEngine;
|
||||
|
@ -30,6 +30,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
// include the shadow mapper classes too
|
||||
#include "client/shadows/dynamicshadowsrender.h"
|
||||
|
||||
#ifdef SERVER
|
||||
#error Do not include in server builds
|
||||
#endif
|
||||
|
||||
struct VideoDriverInfo {
|
||||
std::string name;
|
||||
std::string friendly_name;
|
||||
|
@ -26,6 +26,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#ifdef SERVER
|
||||
#error Do not include in server builds
|
||||
#endif
|
||||
|
||||
struct SoundSpec;
|
||||
|
||||
class SoundFallbackPathProvider
|
||||
|
@ -17,9 +17,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "irrlichttypes.h" // must be included before anything irrlicht, see comment in the file
|
||||
#include "irrlichttypes_bloated.h"
|
||||
#include "irrlicht.h" // createDevice
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "irrlicht_changes/printing.h"
|
||||
#include "benchmark/benchmark.h"
|
||||
#include "chat_interface.h"
|
||||
@ -28,7 +27,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "server.h"
|
||||
#include "filesys.h"
|
||||
#include "version.h"
|
||||
#include "client/game.h"
|
||||
#include "defaultsettings.h"
|
||||
#include "gettext.h"
|
||||
#include "log.h"
|
||||
|
@ -19,7 +19,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include "client/sound.h"
|
||||
#include "nodedef.h"
|
||||
#include "itemdef.h"
|
||||
#include "dummygamedef.h"
|
||||
|
@ -20,7 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#pragma once
|
||||
|
||||
#include "irrlichttypes_bloated.h"
|
||||
#ifndef SERVER
|
||||
#include "irrString.h"
|
||||
#endif
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
@ -732,6 +734,7 @@ inline std::string str_join(const std::vector<std::string> &list,
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#ifndef SERVER
|
||||
/**
|
||||
* Create a UTF8 std::string from an irr::core::stringw.
|
||||
*/
|
||||
@ -749,6 +752,7 @@ inline irr::core::stringw utf8_to_stringw(std::string_view input)
|
||||
std::wstring str = utf8_to_wide(input);
|
||||
return irr::core::stringw(str.c_str(), str.size());
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sanitize the name of a new directory. This consists of two stages:
|
||||
|
Loading…
Reference in New Issue
Block a user