make wesnothd compile and link on windows/msvc9,
...updated projectfile, change some msvc-specific #ifdef _WIN32 to #ifdef _MSC_VER
This commit is contained in:
parent
f680f4bd0a
commit
5a2ff20e52
7 changed files with 37 additions and 112 deletions
|
@ -118,7 +118,7 @@
|
|||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="../../src"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
|
@ -135,7 +135,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libintl.lib SDL.lib SDL_image.lib SDL_ttf.lib SDL_mixer.lib SDL_net.lib fribidi.lib cairo.lib winmm.lib dxguid.lib ws2_32.lib zlib.lib libjpeg.lib libpng.lib libogg.lib libvorbisfile.lib libtiff.lib mikmod.lib native_midi.lib timidity.lib smpeg.lib SDLmain.lib pango-1.0.lib pangocairo-1.0.lib freetype.lib gobject-2.0.lib"
|
||||
AdditionalDependencies="libintl.lib SDL.lib SDL_net.lib winmm.lib dxguid.lib ws2_32.lib SDLmain.lib freetype.lib gobject-2.0.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
|
@ -233,125 +233,29 @@
|
|||
<Filter
|
||||
Name="Serialization"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\binary_or_text.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\binary_wml.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\parser.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\preprocessor.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\string_utils.cpp"
|
||||
RelativePath="..\..\src\serialization\preprocessor.hpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\tokenizer.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\Serialization\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\tokenizer.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
|
@ -485,6 +389,10 @@
|
|||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\server\sample_user_handler.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\server\server.cpp"
|
||||
>
|
||||
|
@ -686,6 +594,10 @@
|
|||
<Filter
|
||||
Name="Serialization"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\binary_or_text.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\binary_or_text.hpp"
|
||||
>
|
||||
|
@ -699,7 +611,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\serialization\preprocessor.hpp"
|
||||
RelativePath="..\..\src\serialization\string_utils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
|
|
@ -276,7 +276,7 @@ namespace wesnothd {
|
|||
try {
|
||||
ip_mask pair = parse_ip(ip);
|
||||
return (ip_ & mask_) == (pair.first & mask_);
|
||||
} catch (banned::error& e) {
|
||||
} catch (banned::error&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace wesnothd {
|
|||
bool operator()(const banned_ptr& a, const banned_ptr& b) const;
|
||||
};
|
||||
|
||||
class subnet_compare_setter;
|
||||
struct subnet_compare_setter;
|
||||
struct banned_compare_subnet {
|
||||
bool operator()(const banned_ptr& a, const banned_ptr& b) const;
|
||||
private:
|
||||
|
@ -48,7 +48,7 @@ namespace wesnothd {
|
|||
bool less_with_subnet(const banned_ptr& a, const banned_ptr& b) const;
|
||||
typedef bool (banned_compare_subnet::*compare_fn)(const banned_ptr& a, const banned_ptr& b) const;
|
||||
static compare_fn active_;
|
||||
friend class subnet_compare_setter;
|
||||
friend struct subnet_compare_setter;
|
||||
};
|
||||
|
||||
struct subnet_compare_setter {
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
|
||||
#include "game.hpp"
|
||||
|
||||
#ifndef __func__
|
||||
#ifdef __FUNCTION__
|
||||
#define __func__ __FUNCTION__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#define ERR_GAME LOG_STREAM(err, mp_server)
|
||||
#define WRN_GAME LOG_STREAM(warn, mp_server)
|
||||
|
|
|
@ -26,9 +26,11 @@
|
|||
#define __COMPAT_H__
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4786 )
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning( disable : 4786 )
|
||||
// tell the linker which libraries to find functions in
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
# pragma comment(lib, "ws2_32.lib")
|
||||
# endif
|
||||
#include <winsock2.h>
|
||||
#else // assume some unix variant
|
||||
#include <sys/socket.h>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
// http://johnwiggins.net
|
||||
// smtplib@johnwiggins.net
|
||||
//
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
// std::vector<std::string> This gives this warning in VC..
|
||||
// bloody annoying, there is a way round it according to MS.
|
||||
// The debugger basically cannot browse anything with a name
|
||||
|
|
|
@ -512,8 +512,13 @@ config server::read_config() const {
|
|||
|
||||
void server::load_config() {
|
||||
#ifndef FIFODIR
|
||||
# warning "No FIFODIR set"
|
||||
# define FIFODIR "/var/run/wesnothd"
|
||||
# ifdef _MSC_VER
|
||||
# pragma message ("No FIFODIR set")
|
||||
# define FIFODIR "d:/"
|
||||
# else
|
||||
# warning "No FIFODIR set"
|
||||
# define FIFODIR "/var/run/wesnothd"
|
||||
# endif
|
||||
#endif
|
||||
const std::string fifo_path = (cfg_["fifo_path"].empty() ? std::string(FIFODIR) + "/socket" : std::string(cfg_["fifo_path"]));
|
||||
input_.reset();
|
||||
|
|
Loading…
Add table
Reference in a new issue