Allow building campaignd with Visual Studio
This makes it easier for me to test add-on uploading.
This commit is contained in:
parent
c617567865
commit
261bf4fcab
5 changed files with 194 additions and 17 deletions
121
projectfiles/VC12/campaignd.vcxproj
Normal file
121
projectfiles/VC12/campaignd.vcxproj
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}</ProjectGuid>
|
||||
<RootNamespace>campaignd</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IntDir>$(Configuration)\campaignd\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\..\external\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WINXP;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\..\external\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\..\external\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WINXP;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>..\..\..\external\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="wesnothlib.vcxproj">
|
||||
<Project>{4a16638b-127b-4ae8-8e0b-4b211b96f976}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\addon\validation.hpp" />
|
||||
<ClInclude Include="..\..\src\campaign_server\addon_utils.hpp" />
|
||||
<ClInclude Include="..\..\src\campaign_server\blacklist.hpp" />
|
||||
<ClInclude Include="..\..\src\campaign_server\campaign_server.hpp" />
|
||||
<ClInclude Include="..\..\src\campaign_server\control.hpp" />
|
||||
<ClInclude Include="..\..\src\hash.hpp" />
|
||||
<ClInclude Include="..\..\src\md5.hpp" />
|
||||
<ClInclude Include="..\..\src\server\server_base.hpp" />
|
||||
<ClInclude Include="..\..\src\server\simple_wml.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\addon\validation.cpp">
|
||||
<ObjectFileName>$(IntDir)Addon\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\campaign_server\addon_utils.cpp">
|
||||
<ObjectFileName>$(IntDir)Campaign_Server\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\campaign_server\blacklist.cpp">
|
||||
<ObjectFileName>$(IntDir)Campaign_Server\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\campaign_server\campaign_server.cpp">
|
||||
<ObjectFileName>$(IntDir)Campaign_Server\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\hash.cpp">
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\md5.cpp">
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\server\server_base.cpp">
|
||||
<ObjectFileName>$(IntDir)Server\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\server\simple_wml.cpp">
|
||||
<ObjectFileName>$(IntDir)Server\</ObjectFileName>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
61
projectfiles/VC12/campaignd.vcxproj.filters
Normal file
61
projectfiles/VC12/campaignd.vcxproj.filters
Normal file
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Addon">
|
||||
<UniqueIdentifier>{3f44d190-c2f6-4d26-9902-e9f9452dac22}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Server">
|
||||
<UniqueIdentifier>{4053cbc0-8a41-470e-aa62-45ea801ed834}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Campaign_Server">
|
||||
<UniqueIdentifier>{1e0c6b2f-b2e7-44db-b7f6-81ee59a6caa3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\addon\validation.hpp">
|
||||
<Filter>Addon</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\server\simple_wml.hpp">
|
||||
<Filter>Server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\server\server_base.hpp">
|
||||
<Filter>Server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\campaign_server\control.hpp">
|
||||
<Filter>Campaign_Server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\campaign_server\addon_utils.hpp">
|
||||
<Filter>Campaign_Server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\campaign_server\blacklist.hpp">
|
||||
<Filter>Campaign_Server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\campaign_server\campaign_server.hpp">
|
||||
<Filter>Campaign_Server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\hash.hpp" />
|
||||
<ClInclude Include="..\..\src\md5.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\addon\validation.cpp">
|
||||
<Filter>Addon</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\server\simple_wml.cpp">
|
||||
<Filter>Server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\server\server_base.cpp">
|
||||
<Filter>Server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\campaign_server\addon_utils.cpp">
|
||||
<Filter>Campaign_Server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\campaign_server\blacklist.cpp">
|
||||
<Filter>Campaign_Server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\campaign_server\campaign_server.cpp">
|
||||
<Filter>Campaign_Server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\hash.cpp" />
|
||||
<ClCompile Include="..\..\src\md5.cpp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -12,6 +12,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "liblua.vcxproj",
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsTimeout", "WindowsTimeout.vcxproj", "{06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "campaignd", "campaignd.vcxproj", "{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_with_VLD|Win32 = Debug_with_VLD|Win32
|
||||
|
@ -60,6 +62,14 @@ Global
|
|||
{06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Release|Win32.Build.0 = Release|Win32
|
||||
{06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.ReleaseDEBUG|Win32.ActiveCfg = Debug|Win32
|
||||
{06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.ReleaseDEBUG|Win32.Build.0 = Debug|Win32
|
||||
{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Debug_with_VLD|Win32.ActiveCfg = Debug|Win32
|
||||
{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Debug_with_VLD|Win32.Build.0 = Debug|Win32
|
||||
{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Release|Win32.Build.0 = Release|Win32
|
||||
{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.ReleaseDEBUG|Win32.ActiveCfg = Release|Win32
|
||||
{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.ReleaseDEBUG|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -429,13 +429,9 @@ void server::send_error(const std::string& msg, socket_ptr sock)
|
|||
async_send_doc(sock, doc, std::bind(&server::handle_new_client, this, _1), null_handler);
|
||||
}
|
||||
|
||||
void server::register_handler(const std::string& cmd, const request_handler& func)
|
||||
{
|
||||
handlers_[cmd] = func;
|
||||
}
|
||||
|
||||
#define REGISTER_CAMPAIGND_HANDLER(req_id) \
|
||||
register_handler(#req_id, &server::handle_##req_id)
|
||||
handlers_[#req_id] = std::bind(&server::handle_##req_id, \
|
||||
std::placeholders::_1, std::placeholders::_2)
|
||||
|
||||
void server::register_handlers()
|
||||
{
|
||||
|
|
|
@ -161,17 +161,6 @@ private:
|
|||
*/
|
||||
void register_handlers();
|
||||
|
||||
/**
|
||||
* Registers a single request handler.
|
||||
*
|
||||
* @param cmd The request command, corresponding to the name of the [tag}
|
||||
* with the request body (e.g. "handle_request_terms").
|
||||
* @param func The request function. This should be a class method passed
|
||||
* as a @a std::bind function object that takes a single
|
||||
* parameter of type @a request.
|
||||
*/
|
||||
void register_handler(const std::string& cmd, const request_handler& func);
|
||||
|
||||
void handle_request_campaign_list(const request&);
|
||||
void handle_request_campaign(const request&);
|
||||
void handle_request_terms(const request&);
|
||||
|
|
Loading…
Add table
Reference in a new issue