1
0
Fork 0
forked from fte/fteqw

Dotnet2005 project file hand edited so when MSVC 2008 & 2010 convert it, various builds (mostly x64 targets) now compile properly.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3698 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2010-12-15 12:29:58 +00:00
parent c1b7db7125
commit b20336853e
10 changed files with 279 additions and 222 deletions

View file

@ -5736,7 +5736,6 @@
</FileConfiguration>
<FileConfiguration
Name="Release Dedicated Server|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -5777,7 +5776,6 @@
</FileConfiguration>
<FileConfiguration
Name="Debug Dedicated Server|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -10982,6 +10980,24 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Dedicated Server|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug Dedicated Server|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\client\p_script.c"
@ -14091,7 +14107,6 @@
>
<FileConfiguration
Name="MinGLDebug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -14099,7 +14114,6 @@
</FileConfiguration>
<FileConfiguration
Name="MinGLDebug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -14123,7 +14137,6 @@
</FileConfiguration>
<FileConfiguration
Name="MinGLRelease|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -14131,7 +14144,6 @@
</FileConfiguration>
<FileConfiguration
Name="MinGLRelease|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -14211,7 +14223,6 @@
</FileConfiguration>
<FileConfiguration
Name="GLRelease|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"

View file

@ -1,3 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ftequake", "ftequake.vcproj", "{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}"
@ -9,6 +10,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gas2masm", "gas2masm.vcproj
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "npfte", "npfte.vcproj", "{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "botlib", "..\..\plugins\botlib\botlib.vcproj", "{77725D10-5A04-4CB3-887D-F23AB5652DA9}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "setup", "..\setup\setup.vdproj", "{E0EE8B50-3A75-42A9-B80A-787675979B0C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
D3DDebug|Win32 = D3DDebug|Win32
@ -136,6 +141,7 @@ Global
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.GLDebug|x64.ActiveCfg = GLDebug|x64
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.GLDebug|x64.Build.0 = GLDebug|x64
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.GLRelease|Win32.ActiveCfg = GLRelease|Win32
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.GLRelease|Win32.Build.0 = GLRelease|Win32
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.GLRelease|x64.ActiveCfg = GLRelease|x64
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.GLRelease|x64.Build.0 = GLRelease|x64
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.MDebug|Win32.ActiveCfg = GLRelease|x64
@ -159,6 +165,60 @@ Global
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.Release|Win32.Build.0 = GLRelease|Win32
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.Release|x64.ActiveCfg = GLRelease|x64
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.Release|x64.Build.0 = GLRelease|x64
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.D3DDebug|Win32.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.D3DDebug|Win32.Build.0 = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.D3DDebug|x64.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Debug Dedicated Server|Win32.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Debug Dedicated Server|Win32.Build.0 = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Debug Dedicated Server|x64.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Debug|Win32.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Debug|Win32.Build.0 = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Debug|x64.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.GLDebug|Win32.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.GLDebug|Win32.Build.0 = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.GLDebug|x64.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.GLRelease|Win32.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.GLRelease|x64.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MDebug|Win32.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MDebug|Win32.Build.0 = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MDebug|x64.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MinGLDebug|Win32.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MinGLDebug|Win32.Build.0 = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MinGLDebug|x64.ActiveCfg = Debug|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MinGLRelease|Win32.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MinGLRelease|Win32.Build.0 = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MinGLRelease|x64.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MRelease|Win32.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MRelease|Win32.Build.0 = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.MRelease|x64.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Release|Win32.ActiveCfg = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Release|Win32.Build.0 = Release|Win32
{77725D10-5A04-4CB3-887D-F23AB5652DA9}.Release|x64.ActiveCfg = Release|Win32
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.D3DDebug|Win32.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.D3DDebug|x64.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.Debug Dedicated Server|Win32.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.Debug Dedicated Server|x64.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.Debug|Win32.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.Debug|x64.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.GLDebug|Win32.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.GLDebug|x64.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.GLRelease|Win32.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.GLRelease|x64.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.MDebug|Win32.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.MDebug|x64.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.MinGLDebug|Win32.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.MinGLDebug|x64.ActiveCfg = Debug
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.MinGLRelease|Win32.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.MinGLRelease|x64.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.MRelease|Win32.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.MRelease|x64.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.Release Dedicated Server|Win32.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.Release Dedicated Server|x64.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.Release|Win32.ActiveCfg = Release
{E0EE8B50-3A75-42A9-B80A-787675979B0C}.Release|x64.ActiveCfg = Release
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -5719,7 +5719,6 @@
</FileConfiguration>
<FileConfiguration
Name="Release Dedicated Server|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -5760,7 +5759,6 @@
</FileConfiguration>
<FileConfiguration
Name="Debug Dedicated Server|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -10957,6 +10955,16 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Dedicated Server|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug Dedicated Server|Win32"
ExcludedFromBuild="true"
@ -10965,6 +10973,14 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug Dedicated Server|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\client\p_script.c"
@ -14072,22 +14088,6 @@
<File
RelativePath="..\client\snd_al.c"
>
<FileConfiguration
Name="MinGLDebug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="MinGLDebug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="D3DDebug|Win32"
ExcludedFromBuild="true"
@ -14104,22 +14104,6 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="MinGLRelease|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="MinGLRelease|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="GLDebug|x64"
ExcludedFromBuild="true"
@ -14192,14 +14176,6 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="GLRelease|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\client\snd_directx.c"

View file

@ -1,4 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ftequake", "ftequake.vcxproj", "{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}"
@ -7,6 +7,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gas2masm", "gas2masm.vcxpro
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "npfte", "npfte.vcxproj", "{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "botlib", "..\..\plugins\botlib\botlib.vcproj", "{77725D10-5A04-4CB3-887D-F23AB5652DA9}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "setup", "..\setup\setup.vdproj", "{E0EE8B50-3A75-42A9-B80A-787675979B0C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
D3DDebug|Win32 = D3DDebug|Win32

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="D3DDebug|Win32">
@ -2330,7 +2330,6 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|Win32'">qwsvdef.h</PrecompiledHeaderFile>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|x64'">true</ExcludedFromBuild>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|x64'">qwsvdef.h</PrecompiledHeaderFile>
@ -2377,7 +2376,6 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|Win32'">qwsvdef.h</PrecompiledHeaderFile>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|x64'">true</ExcludedFromBuild>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|x64'">qwsvdef.h</PrecompiledHeaderFile>
@ -3657,7 +3655,11 @@
</ClCompile>
<ClCompile Include="..\client\p_null.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|x64'">true</ExcludedFromBuild>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\client\p_script.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|Win32'">true</ExcludedFromBuild>
@ -4458,8 +4460,11 @@
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Dedicated Server|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\client\snd_al.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='D3DDebug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='D3DDebug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated Server|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='GLDebug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MDebug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MDebug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MRelease|Win32'">true</ExcludedFromBuild>

View file

@ -2,54 +2,54 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{75842d86-5c10-45e1-bf1a-1cbff85ff47d}</UniqueIdentifier>
<UniqueIdentifier>{c01b583a-6d59-435e-ac38-0f05bae046dc}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Source Files\server">
<UniqueIdentifier>{a103857d-227f-4b12-b44b-fabe0adffe4f}</UniqueIdentifier>
<UniqueIdentifier>{1247b008-5a3b-40e8-b6d6-d02ef7478f30}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\client">
<UniqueIdentifier>{f20116cc-8d03-4489-aab2-a75426a0dfd5}</UniqueIdentifier>
<UniqueIdentifier>{320ba4a3-6917-4194-a085-112dee44135e}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\client\sound">
<UniqueIdentifier>{56fe551d-a906-4dab-86db-e4fcb898558f}</UniqueIdentifier>
<UniqueIdentifier>{c03681f5-7d76-4862-9856-12d8d1e631a5}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\common">
<UniqueIdentifier>{9e22231b-d88a-41b2-a09c-62710d1272e0}</UniqueIdentifier>
<UniqueIdentifier>{b5af446c-cfb9-4484-a0e0-afed2c8a29c1}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\QCLIB">
<UniqueIdentifier>{bf8c823d-8eff-46c5-a355-b9406f7e8692}</UniqueIdentifier>
<UniqueIdentifier>{85d02247-b083-4f98-8e5f-8636123cbeb6}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\asm">
<UniqueIdentifier>{8a550921-3a3b-4db7-b8c6-c9c66282f7fc}</UniqueIdentifier>
<UniqueIdentifier>{e029e80c-d7a6-46fa-a6d0-75205f86f8fc}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\http">
<UniqueIdentifier>{f6c0ca12-5ce4-46f0-8a26-01fecf567934}</UniqueIdentifier>
<UniqueIdentifier>{b1130758-606d-454c-9c91-197882d450aa}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\dedicated">
<UniqueIdentifier>{3551b596-1fbc-43a1-90b6-f231baeb5528}</UniqueIdentifier>
<UniqueIdentifier>{9cbb2b82-9fcd-453e-9efb-5c5ba2acd9d4}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\nonwin">
<UniqueIdentifier>{d36f234b-a9fc-4b45-a87a-41c95f170919}</UniqueIdentifier>
<UniqueIdentifier>{39153834-5dcd-4090-8961-18df3c0d654d}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\renderer">
<UniqueIdentifier>{d0bd3ce2-b533-4801-baca-e9922798a563}</UniqueIdentifier>
<UniqueIdentifier>{bb19ebb2-2de3-4910-9100-bee763022974}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\renderer\gl">
<UniqueIdentifier>{569fbcaa-a4a0-46ca-8fda-8be6d7f462be}</UniqueIdentifier>
<UniqueIdentifier>{7842d309-5704-4cc6-9180-7eb5a6943e6b}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\renderer\d3d">
<UniqueIdentifier>{042ac2d4-5992-4f53-a0e9-2a34b32db426}</UniqueIdentifier>
<UniqueIdentifier>{c4220099-c56c-410d-aab7-bea303bfcf3d}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\libmad">
<UniqueIdentifier>{1e1d9e14-038d-47a7-8632-78bb57353581}</UniqueIdentifier>
<UniqueIdentifier>{13a9c3e5-7ee8-4a07-9cdd-d6df856068f8}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\libmad\Header Files">
<UniqueIdentifier>{e10ced12-94c2-4384-b014-74446a4f7fd4}</UniqueIdentifier>
<UniqueIdentifier>{50336757-5c37-4a7b-9c4f-34e95791026a}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{f9526ecc-06b4-4e0a-b448-419d1f94a0b8}</UniqueIdentifier>
<UniqueIdentifier>{472a4842-1281-4ee7-853a-83c0eb0fdc68}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>

View file

@ -2,15 +2,15 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{22c45493-2eb8-487b-b9bf-bb815864261c}</UniqueIdentifier>
<UniqueIdentifier>{23ca0d9b-c559-461b-befb-309e10d3e15f}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{e2375b0e-b4ef-4e73-b340-d7ce05c4da93}</UniqueIdentifier>
<UniqueIdentifier>{8657f21b-c8e5-48bb-a840-745abd0b8164}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;fi;fd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{14acc5de-bf37-4cc0-b54c-5939a81b0dd2}</UniqueIdentifier>
<UniqueIdentifier>{f8a76aaf-c731-49f2-b0c2-04dd958a5564}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>

View file

@ -2,43 +2,43 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{0ac0d85b-d6c9-4337-88b8-7745c80e532f}</UniqueIdentifier>
<UniqueIdentifier>{0825d072-3626-4d3c-a6de-9128a72ce4b5}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Source Files\server">
<UniqueIdentifier>{eacdeb57-d091-46b6-a54e-b10c660491e2}</UniqueIdentifier>
<UniqueIdentifier>{cef6010f-73d9-4bb4-95f4-4a793d57d53c}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\client">
<UniqueIdentifier>{cb4d9b25-5f3a-4d9c-b47c-d1bcac50edbb}</UniqueIdentifier>
<UniqueIdentifier>{a8984a11-a163-47b4-ae77-2c163d90c888}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\gl">
<UniqueIdentifier>{a7cd768c-0bfa-4f54-ab61-371235c450ee}</UniqueIdentifier>
<UniqueIdentifier>{7a9977d9-0ce4-4a10-9627-b40cdcce507b}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\common">
<UniqueIdentifier>{eaa19162-d973-40d2-a2c1-862fbe64e362}</UniqueIdentifier>
<UniqueIdentifier>{21e7cf93-5d5c-46d6-ae17-a94f9e72bb34}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\QCLIB">
<UniqueIdentifier>{564cd03c-217e-49c4-88da-5c186eb17a26}</UniqueIdentifier>
<UniqueIdentifier>{1d265c9d-4348-47a8-99ca-1f5af9329239}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\asm">
<UniqueIdentifier>{78f9267e-76b0-41ce-89af-29abacb92d86}</UniqueIdentifier>
<UniqueIdentifier>{571dff65-f389-426b-8ebc-ad16c4c9f175}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\http">
<UniqueIdentifier>{4bc20db2-c09a-4e72-8e77-7d388941f4a6}</UniqueIdentifier>
<UniqueIdentifier>{e57d67fc-8997-4e80-974c-16065af3e42a}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\dedicated">
<UniqueIdentifier>{9aff6f46-2982-456f-b7ee-cb4612b4d448}</UniqueIdentifier>
<UniqueIdentifier>{eb402794-b6b5-4c48-865f-a351ef468161}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{0eb726a9-9fa9-4253-b140-79f03bd5c469}</UniqueIdentifier>
<UniqueIdentifier>{99e3af59-e878-4acb-af10-51114c5ee977}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{1da10002-3304-4fed-a2e6-3357ae937c83}</UniqueIdentifier>
<UniqueIdentifier>{cda3d8dd-01ba-4b28-b998-fb70a1f715db}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
<Filter Include="libmad">
<UniqueIdentifier>{e4e65e0a-57ae-4707-b5a7-cd54f8645d0b}</UniqueIdentifier>
<UniqueIdentifier>{211f82fa-c7aa-4b83-ad3a-0f3e7b84c53b}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View file

@ -2,49 +2,49 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{245730af-c31c-4e37-86ac-227cf2a55cd8}</UniqueIdentifier>
<UniqueIdentifier>{03f78a59-fa40-4404-8518-78461a973f3c}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Source Files\server">
<UniqueIdentifier>{165565b2-51d8-460b-a460-f3d5c31cb894}</UniqueIdentifier>
<UniqueIdentifier>{01af052d-6029-42a1-a077-557db32531a0}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\client">
<UniqueIdentifier>{655e82cc-e023-4416-91b9-7a29c37bf411}</UniqueIdentifier>
<UniqueIdentifier>{d7bcd6fa-7132-4b90-bdd1-3fa6251e7282}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\gl">
<UniqueIdentifier>{80f903b0-0a91-412a-9b91-7ce911ffa22c}</UniqueIdentifier>
<UniqueIdentifier>{a814fc4f-632a-4df7-a9f1-17928c10ca8a}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\sw">
<UniqueIdentifier>{948a85a1-e631-4e9a-b573-db5eca1df958}</UniqueIdentifier>
<UniqueIdentifier>{3dbc1545-15a4-462c-b363-f3d45e5f5529}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\common">
<UniqueIdentifier>{882282be-745d-4190-929f-0e996d56a3f2}</UniqueIdentifier>
<UniqueIdentifier>{c66e5f6e-9f50-41dc-b06f-edb84731fbba}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\QCLIB">
<UniqueIdentifier>{773f3fd7-73e0-4cf5-9ab6-31692d05a744}</UniqueIdentifier>
<UniqueIdentifier>{7cbbe0cb-eb2e-4c70-81d5-73e0bc345cc0}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\asm">
<UniqueIdentifier>{e5bd39da-04a4-4fa9-97d8-786e5fe79207}</UniqueIdentifier>
<UniqueIdentifier>{4ed0af22-9b59-4fae-81d6-fbab8fd475c4}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\http">
<UniqueIdentifier>{ce3a9cfe-9574-42d8-bddf-13b3d1242cfe}</UniqueIdentifier>
<UniqueIdentifier>{c66cfea6-b5f6-4297-9245-1323ff88e22e}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\vc">
<UniqueIdentifier>{bc48a09d-6d47-4c24-bf73-23d4ef6713d7}</UniqueIdentifier>
<UniqueIdentifier>{49ebebc4-e2c9-4afc-a0e4-63b7a0fb6957}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\dedicated">
<UniqueIdentifier>{f78bf676-f54a-4d9d-b5c2-70360ac25b95}</UniqueIdentifier>
<UniqueIdentifier>{4e819ed6-fd7f-457e-9b38-fb984242a7a2}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{e0bdeeb3-6934-4875-bc17-70aafba3e0b8}</UniqueIdentifier>
<UniqueIdentifier>{77db063d-3d27-402b-865c-94e2502104ec}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{ce9b3ab4-9285-40bc-9f7c-dc6cf0e765e1}</UniqueIdentifier>
<UniqueIdentifier>{1638d93f-e3e5-4b41-8dec-a40d3be5757e}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
<Filter Include="libmad">
<UniqueIdentifier>{39355fd8-fa4a-4291-8ff1-85e52a1b11fd}</UniqueIdentifier>
<UniqueIdentifier>{009dccf8-b2e3-4e02-b6f4-d8ecb17ab957}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View file

@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
@ -189,7 +189,7 @@ char *Sys_GetNameForAddress(dllhandle_t *module, void *address)
datadir = &ntheader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT];
block = (IMAGE_EXPORT_DIRECTORY *)(base + datadir->VirtualAddress);
funclist = (DWORD*)(base+block->AddressOfFunctions);
namelist = (DWORD*)(base+block->AddressOfNames);
@ -242,7 +242,8 @@ void *Sys_GetGameAPI (void *parms)
char name[MAX_OSPATH];
char *path;
char cwd[MAX_OSPATH];
#if defined _M_IX86
// _M_X64 should be really loading gamex64.dll
#if defined _M_IX86 || defined _M_X64
const char *gamename = "gamex86.dll";
#ifdef NDEBUG
@ -321,7 +322,7 @@ void *Sys_GetGameAPI (void *parms)
GetGameAPI = (void *)GetProcAddress (game_library, "GetGameAPI");
if (!GetGameAPI)
{
Sys_UnloadGame ();
Sys_UnloadGame ();
return NULL;
}
@ -341,8 +342,8 @@ void *Sys_GetGameAPI (void *parms)
#ifdef USESERVICE
qboolean asservice;
SERVICE_STATUS_HANDLE ServerServiceStatusHandle;
SERVICE_STATUS MyServiceStatus;
SERVICE_STATUS_HANDLE ServerServiceStatusHandle;
SERVICE_STATUS MyServiceStatus;
void CreateSampleService(qboolean create);
#endif
@ -357,10 +358,10 @@ HWND hiddenwindowhandler;
int Sys_DebugLog(char *file, char *fmt, ...)
{
va_list argptr;
va_list argptr;
static char data[1024];
int fd;
va_start(argptr, fmt);
vsnprintf(data, sizeof(data)-1, fmt, argptr);
va_end(argptr);
@ -382,14 +383,14 @@ Sys_FileTime
int Sys_FileTime (char *path)
{
FILE *f;
f = fopen(path, "rb");
if (f)
{
fclose(f);
return 1;
}
return -1;
}
@ -414,7 +415,7 @@ qboolean Sys_remove (char *path)
int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const char *, int, void *), void *parm)
{
HANDLE r;
WIN32_FIND_DATA fd;
WIN32_FIND_DATA fd;
char apath[MAX_OSPATH];
char file[MAX_OSPATH];
char *s;
@ -423,12 +424,12 @@ int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const
// sprintf(apath, "%s%s", gpath, match);
for (s = apath+strlen(apath)-1; s>= apath; s--)
{
if (*s == '/')
if (*s == '/')
break;
}
s++;
*s = '\0';
*s = '\0';
Q_snprintfz(file, sizeof(file), "%s/%s", gpath, match);
@ -584,7 +585,7 @@ double Sys_DoubleTime (void)
if (!starttime)
starttime = tstruct.time;
t = (tstruct.time-starttime) + tstruct.millitm*0.001;
return t;
}
@ -681,7 +682,7 @@ void ApplyColour(unsigned int chr)
{
unsigned short val = 0;
// bits 28-31 of the console chars match up to the attributes for
// bits 28-31 of the console chars match up to the attributes for
// the CHAR_INFO struct exactly
if (chr & CON_NONCLEARBG)
val = ((chr & (CON_FGMASK|CON_BGMASK)) >> CON_FGSHIFT);
@ -728,7 +729,7 @@ Sys_Printf
#define MAXPRINTMSG 4096
void Sys_Printf (char *fmt, ...)
{
va_list argptr;
va_list argptr;
if (sys_nostdout.value)
return;
@ -744,7 +745,7 @@ void Sys_Printf (char *fmt, ...)
{
int i;
for (i = 0; i < coninput_len; i++)
putch('\b');
putch('\b');
@ -902,13 +903,13 @@ void Sys_Quit (void)
#ifdef USESERVICE
if (asservice)
{
MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus);
SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus);
}
#endif
exit (0);
@ -1121,7 +1122,7 @@ void StartQuakeServer(void)
SV_Init (&parms);
// run one frame immediately for first heartbeat
SV_Frame ();
SV_Frame ();
}
@ -1150,19 +1151,19 @@ void ServerMainLoop(void)
switch(servicecontrol)
{
case SERVICE_CONTROL_PAUSE:
// Initialization complete - report running status.
MyServiceStatus.dwCurrentState = SERVICE_PAUSED;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
// Initialization complete - report running status.
MyServiceStatus.dwCurrentState = SERVICE_PAUSED;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus);
sv.paused |= 2;
break;
case SERVICE_CONTROL_CONTINUE:
// Initialization complete - report running status.
MyServiceStatus.dwCurrentState = SERVICE_RUNNING;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
// Initialization complete - report running status.
MyServiceStatus.dwCurrentState = SERVICE_RUNNING;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus);
@ -1192,23 +1193,23 @@ void WINAPI StartQuakeServerService (DWORD argc, LPTSTR *argv)
asservice = true;
MyServiceStatus.dwServiceType = SERVICE_WIN32|SERVICE_INTERACTIVE_PROCESS;
MyServiceStatus.dwCurrentState = SERVICE_START_PENDING;
MyServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP |
SERVICE_ACCEPT_PAUSE_CONTINUE;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
MyServiceStatus.dwServiceType = SERVICE_WIN32|SERVICE_INTERACTIVE_PROCESS;
MyServiceStatus.dwCurrentState = SERVICE_START_PENDING;
MyServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP |
SERVICE_ACCEPT_PAUSE_CONTINUE;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
ServerServiceStatusHandle = RegisterServiceCtrlHandler(
SERVICENAME,
MyServiceCtrlHandler);
ServerServiceStatusHandle = RegisterServiceCtrlHandler(
SERVICENAME,
MyServiceCtrlHandler);
if (ServerServiceStatusHandle == (SERVICE_STATUS_HANDLE)0)
{
printf(" [MY_SERVICE] RegisterServiceCtrlHandler failed %d\n", GetLastError());
return;
if (ServerServiceStatusHandle == (SERVICE_STATUS_HANDLE)0)
{
printf(" [MY_SERVICE] RegisterServiceCtrlHandler failed %d\n", GetLastError());
return;
}
@ -1225,55 +1226,55 @@ void WINAPI StartQuakeServerService (DWORD argc, LPTSTR *argv)
StartQuakeServer();
// Handle error condition
// Handle error condition
if (!sv.state)
{
MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
{
MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus);
return;
}
SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus);
return;
}
// Initialization complete - report running status.
MyServiceStatus.dwCurrentState = SERVICE_RUNNING;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
// Initialization complete - report running status.
MyServiceStatus.dwCurrentState = SERVICE_RUNNING;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
if (!SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus))
{
printf(" [MY_SERVICE] SetServiceStatus error %ld\n",GetLastError());
}
if (!SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus))
{
printf(" [MY_SERVICE] SetServiceStatus error %ld\n",GetLastError());
}
ServerMainLoop();
MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus);
SetServiceStatus (ServerServiceStatusHandle, &MyServiceStatus);
return;
return;
}
SERVICE_TABLE_ENTRY DispatchTable[] =
{
{ SERVICENAME, StartQuakeServerService },
{ NULL, NULL }
};
SERVICE_TABLE_ENTRY DispatchTable[] =
{
{ SERVICENAME, StartQuakeServerService },
{ NULL, NULL }
};
#endif
qboolean NET_Sleep(int msec, qboolean stdinissocket);
int main (int argc, char **argv)
{
#ifdef USESERVICE
if (StartServiceCtrlDispatcher( DispatchTable))
{
if (StartServiceCtrlDispatcher( DispatchTable))
{
return true;
}
#endif
@ -1319,8 +1320,8 @@ int main (int argc, char **argv)
}
#ifdef USESERVICE
void CreateSampleService(qboolean create)
{
void CreateSampleService(qboolean create)
{
BOOL deleted;
char path[MAX_OSPATH];
char exe[MAX_OSPATH];
@ -1328,13 +1329,13 @@ void CreateSampleService(qboolean create)
SC_HANDLE schSCManager;
// Open a handle to the SC Manager database.
schSCManager = OpenSCManager(
NULL, // local machine
NULL, // ServicesActive database
SC_MANAGER_ALL_ACCESS); // full access rights
if (NULL == schSCManager)
// Open a handle to the SC Manager database.
schSCManager = OpenSCManager(
NULL, // local machine
NULL, // ServicesActive database
SC_MANAGER_ALL_ACCESS); // full access rights
if (NULL == schSCManager)
{
Con_Printf("Failed to open SCManager (%d)\n", GetLastError());
return;
@ -1366,30 +1367,30 @@ void CreateSampleService(qboolean create)
RegSetValueEx(hk, "servicepath", 0, REG_SZ, path, strlen(path));
RegCloseKey(hk);
schService = CreateService(
schSCManager, // SCManager database
SERVICENAME, // name of service
FULLENGINENAME" Server", // service name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_WIN32_OWN_PROCESS|SERVICE_INTERACTIVE_PROCESS, // service type
SERVICE_AUTO_START, // start type
SERVICE_ERROR_NORMAL, // error control type
exe, // service's binary
NULL, // no load ordering group
NULL, // no tag identifier
NULL, // no dependencies
NULL, // LocalSystem account
NULL); // no password
schService = CreateService(
schSCManager, // SCManager database
SERVICENAME, // name of service
FULLENGINENAME" Server", // service name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_WIN32_OWN_PROCESS|SERVICE_INTERACTIVE_PROCESS, // service type
SERVICE_AUTO_START, // start type
SERVICE_ERROR_NORMAL, // error control type
exe, // service's binary
NULL, // no load ordering group
NULL, // no tag identifier
NULL, // no dependencies
NULL, // LocalSystem account
NULL); // no password
}
if (schService == NULL)
if (schService == NULL)
{
Con_Printf("CreateService failed.\n");
Con_Printf("CreateService failed.\n");
return;
}
else
{
CloseServiceHandle(schService);
CloseServiceHandle(schService);
return;
}
}
@ -1411,7 +1412,7 @@ DWORD WINAPI threadwrapper(void *args)
tw.args = ((threadwrap_t *)args)->args;
free(args);
tw.func(tw.args);
tw.func(tw.args);
#ifndef WIN32CRTDLL
_endthreadex(0);
@ -1423,7 +1424,7 @@ void *Sys_CreateThread(int (*func)(void *), void *args, int stacksize)
{
threadwrap_t *tw = (threadwrap_t *)malloc(sizeof(threadwrap_t));
HANDLE handle;
if (!tw)
return NULL;
@ -1445,7 +1446,7 @@ void *Sys_CreateThread(int (*func)(void *), void *args, int stacksize)
}
void Sys_WaitOnThread(void *thread)
{
{
WaitForSingleObject((HANDLE)thread, INFINITE);
CloseHandle((HANDLE)thread);
}
@ -1498,8 +1499,8 @@ typedef struct condvar_s
HANDLE wait_done;
} condvar_t;
void *Sys_CreateConditional(void)
{
void *Sys_CreateConditional(void)
{
condvar_t *cv;
cv = (condvar_t *)malloc(sizeof(condvar_t));
@ -1528,16 +1529,16 @@ void *Sys_CreateConditional(void)
return NULL;
}
qboolean Sys_LockConditional(void *condv)
{
qboolean Sys_LockConditional(void *condv)
{
EnterCriticalSection(&((condvar_t *)condv)->mainlock);
return true;
return true;
}
qboolean Sys_UnlockConditional(void *condv)
{
qboolean Sys_UnlockConditional(void *condv)
{
LeaveCriticalSection(&((condvar_t *)condv)->mainlock);
return true;
return true;
}
qboolean Sys_ConditionWait(void *condv)
@ -1557,7 +1558,7 @@ qboolean Sys_ConditionWait(void *condv)
// update waiting count and alert signaling thread that we're done to avoid the deadlock condition
EnterCriticalSection(&cv->countlock);
if (cv->signals > 0)
if (cv->signals > 0)
{
ReleaseSemaphore(cv->wait_done, cv->signals, NULL);
cv->signals = 0;
@ -1570,7 +1571,7 @@ qboolean Sys_ConditionWait(void *condv)
return success;
}
qboolean Sys_ConditionSignal(void *condv)
qboolean Sys_ConditionSignal(void *condv)
{
condvar_t *cv = (condvar_t *)condv;
@ -1589,24 +1590,24 @@ qboolean Sys_ConditionSignal(void *condv)
return true;
}
qboolean Sys_ConditionBroadcast(void *condv)
qboolean Sys_ConditionBroadcast(void *condv)
{
condvar_t *cv = (condvar_t *)condv;
// if there are non-signaled waiting threads, we signal all of them and wait on all the responses back
EnterCriticalSection(&cv->countlock);
if (cv->waiting > cv->signals)
if (cv->waiting > cv->signals)
{
int i, num_waiting;
num_waiting = (cv->waiting - cv->signals);
cv->signals = cv->waiting;
ReleaseSemaphore(cv->wait_sem, num_waiting, NULL);
LeaveCriticalSection(&cv->countlock);
// there's no call to wait for the same object multiple times so we need to loop through
// and burn up the semaphore count
for (i = 0; i < num_waiting; i++)
for (i = 0; i < num_waiting; i++)
WaitForSingleObject(cv->wait_done, INFINITE);
}
else