mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 06:06:50 +00:00
Fix an VPC error related to GUID for VS2019 project
This commit is contained in:
parent
f24e68c845
commit
38ad2399ed
Binary file not shown.
2
external/vpc/tier0/threadtools.cpp
vendored
2
external/vpc/tier0/threadtools.cpp
vendored
@ -49,7 +49,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef _PS3
|
||||
#include <memory.h>
|
||||
#include <memory>
|
||||
#endif
|
||||
#include "tier0/threadtools.h"
|
||||
|
||||
|
35
external/vpc/utils/vpc/main.cpp
vendored
35
external/vpc/utils/vpc/main.cpp
vendored
@ -75,7 +75,7 @@ CVPC::CVPC()
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
m_eVSVersion = k_EVSVersion_2015;
|
||||
m_eVSVersion = k_EVSVersion_2019;
|
||||
m_bUseVS2010FileFormat = true;
|
||||
m_bUseUnity = false;
|
||||
#else
|
||||
@ -175,11 +175,6 @@ void CVPC::Shutdown( bool bHasError )
|
||||
UnloadPerforceInterface();
|
||||
}
|
||||
|
||||
#if defined( STANDALONE_VPC )
|
||||
class CP4;
|
||||
extern CP4 s_p4;
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CVPC::LoadPerforceInterface()
|
||||
@ -190,11 +185,6 @@ bool CVPC::LoadPerforceInterface()
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined( STANDALONE_VPC )
|
||||
p4 = (IP4*)&s_p4;
|
||||
return (p4 != NULL);
|
||||
#else
|
||||
|
||||
//
|
||||
// Try to load p4lib.dll and the filesystem since the p4lib relies on it
|
||||
//
|
||||
@ -234,7 +224,6 @@ bool CVPC::LoadPerforceInterface()
|
||||
p4->Connect( Sys_GetFactory( m_pFilesystemModule ) );
|
||||
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -635,7 +624,8 @@ void CVPC::SpewUsage( void )
|
||||
Log_Msg( LOG_VPC, "[/srcctl]: Enable P4SCC source control integration - can also set environment variable VPC_SRCCTL to 1\n" );
|
||||
#endif
|
||||
Log_Msg( LOG_VPC, "[/mirror]: <path> - Mirror output files to specified path. Used for A:B testing.\n" );
|
||||
Log_Msg( LOG_VPC, "[/2015]: Generate projects and solutions for Visual Studio 2015 [default]\n" );
|
||||
Log_Msg( LOG_VPC, "[/2019]: Generate projects and solutions for Visual Studio 2019 [default]\n" );
|
||||
Log_Msg( LOG_VPC, "[/2015]: Generate projects and solutions for Visual Studio 2015\n" );
|
||||
Log_Msg( LOG_VPC, "[/2013]: Generate projects and solutions for Visual Studio 2013\n" );
|
||||
Log_Msg( LOG_VPC, "[/2012]: Generate projects and solutions for Visual Studio 2012\n" );
|
||||
Log_Msg( LOG_VPC, "[/2010]: Generate projects and solutions for Visual Studio 2010\n" );
|
||||
@ -1004,6 +994,11 @@ void CVPC::HandleSingleCommandLineArg( const char *pArg )
|
||||
m_eVSVersion = k_EVSVersion_2015;
|
||||
m_ExtraOptionsCRCString += pArgName;
|
||||
}
|
||||
else if ( !V_stricmp( pArgName, "2019" ) )
|
||||
{
|
||||
m_eVSVersion = k_EVSVersion_2019;
|
||||
m_ExtraOptionsCRCString += pArgName;
|
||||
}
|
||||
else if ( !V_stricmp( pArgName, "nounity" ) )
|
||||
{
|
||||
m_bUseUnity = false;
|
||||
@ -1825,6 +1820,16 @@ void CVPC::SetMacrosAndConditionals()
|
||||
// VS2010 is strictly win32/xbox360
|
||||
switch ( m_eVSVersion )
|
||||
{
|
||||
case k_EVSVersion_2019:
|
||||
m_ExtraOptionsCRCString += "VS2019";
|
||||
SetConditional( "VS2019", true );
|
||||
|
||||
// temporarily allow VS2013 conditionals also as there are many. Will fix.
|
||||
SetConditional( "VS2013", true );
|
||||
|
||||
m_bUseVS2010FileFormat = true;
|
||||
break;
|
||||
|
||||
case k_EVSVersion_2015:
|
||||
m_ExtraOptionsCRCString += "VS2015";
|
||||
SetConditional( "VS2015", true );
|
||||
@ -2362,7 +2367,9 @@ void CVPC::SetupGenerators()
|
||||
{
|
||||
// spew what we are generating
|
||||
const char *pchLogLine = "Generating for Visual Studio 2005.\n";
|
||||
if ( m_eVSVersion == k_EVSVersion_2015 )
|
||||
if ( m_eVSVersion == k_EVSVersion_2019 )
|
||||
pchLogLine = "Generating for Visual Studio 2019.\n";
|
||||
else if ( m_eVSVersion == k_EVSVersion_2015 )
|
||||
pchLogLine = "Generating for Visual Studio 2015.\n";
|
||||
else if ( m_eVSVersion == k_EVSVersion_2013 )
|
||||
pchLogLine = "Generating for Visual Studio 2013.\n";
|
||||
|
@ -27,6 +27,12 @@ class CSolutionGenerator_Win32 : public IBaseSolutionGenerator
|
||||
public:
|
||||
void GetVCPROJSolutionGUID( char (&szSolutionGUID)[256] )
|
||||
{
|
||||
if ( g_pVPC->Is2019() )
|
||||
{
|
||||
V_strncpy( szSolutionGUID, "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}", ARRAYSIZE(szSolutionGUID) );
|
||||
return;
|
||||
}
|
||||
|
||||
HKEY hKey;
|
||||
int firstVer = 8;
|
||||
const int lastVer = 14; // Handle up to VS 14, AKA VS 2015
|
||||
@ -114,7 +120,12 @@ public:
|
||||
g_pVPC->VPCError( "Can't open %s for writing.", pSolutionFilename );
|
||||
|
||||
|
||||
if ( g_pVPC->Is2015() )
|
||||
if ( g_pVPC->Is2019() )
|
||||
{
|
||||
fprintf( fp, "\xef\xbb\xbf\nMicrosoft Visual Studio Solution File, Format Version 12.00\n" );
|
||||
fprintf( fp, "# Visual Studio Version 16\n" );
|
||||
}
|
||||
else if ( g_pVPC->Is2015() )
|
||||
{
|
||||
fprintf( fp, "\xef\xbb\xbf\nMicrosoft Visual Studio Solution File, Format Version 12.00\n" ); // still on 12
|
||||
fprintf( fp, "# Visual Studio 2015\n" );
|
||||
|
2
external/vpc/utils/vpc/vpc.h
vendored
2
external/vpc/utils/vpc/vpc.h
vendored
@ -182,6 +182,7 @@ enum EVSVersion
|
||||
k_EVSVersion_2012,
|
||||
k_EVSVersion_2013,
|
||||
k_EVSVersion_2015,
|
||||
k_EVSVersion_2019,
|
||||
};
|
||||
|
||||
class CVPC
|
||||
@ -218,6 +219,7 @@ public:
|
||||
bool Is2012() { return m_eVSVersion == k_EVSVersion_2012; } // When this returns true so does Is2010() because of the file format similarities
|
||||
bool Is2013() { return m_eVSVersion == k_EVSVersion_2013; } // When this returns true so does Is2010() because of the file format similarities
|
||||
bool Is2015() { return m_eVSVersion == k_EVSVersion_2015; } // When this returns true so does Is2010() because of the file format similarities
|
||||
bool Is2019() { return m_eVSVersion == k_EVSVersion_2019; } // When this returns true so does Is2010() because of the file format similarities
|
||||
bool BUse2008() { return m_eVSVersion == k_EVSVersion_2008; }
|
||||
bool IsDedicatedBuild() { return m_bDedicatedBuild; }
|
||||
bool IsUnity() { return m_bUseUnity; }
|
||||
|
21
external/vpc/utils/vpc/vpc.vcxproj
vendored
21
external/vpc/utils/vpc/vpc.vcxproj
vendored
@ -13,21 +13,21 @@
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{36C5F545-588F-4091-B480-89E03EDBDA93}</ProjectGuid>
|
||||
<RootNamespace>vpc</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@ -58,9 +58,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>p4 edit ..\..\..\..\devtools\bin\vpc.exe && copy /y $(TargetPath) ..\..\..\..\devtools\bin\vpc.exe
|
||||
p4 edit ..\..\..\..\devtools\bin\vpc.pdb && copy /y $(TargetDir)\vpc.pdb ..\..\..\..\devtools\bin\vpc.pdb
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -83,14 +82,12 @@ p4 edit ..\..\..\..\devtools\bin\vpc.pdb && copy /y $(TargetDir)\vpc.pdb
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>p4 edit ..\..\..\..\devtools\bin\vpc.exe && copy /y $(TargetPath) ..\..\..\..\devtools\bin\vpc.exe
|
||||
p4 edit ..\..\..\..\devtools\bin\vpc.pdb && copy /y $(TargetDir)\vpc.pdb ..\..\..\..\devtools\bin\vpc.pdb
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\interfaces\interfaces.cpp" />
|
||||
<ClCompile Include="..\..\p4lib\p4.cpp" />
|
||||
<ClCompile Include="..\..\tier0\assert_dialog.cpp" />
|
||||
<ClCompile Include="..\..\tier0\commandline.cpp" />
|
||||
<ClCompile Include="..\..\tier0\cpu.cpp" />
|
||||
|
3
external/vpc/utils/vpc/vpc.vcxproj.filters
vendored
3
external/vpc/utils/vpc/vpc.vcxproj.filters
vendored
@ -245,9 +245,6 @@
|
||||
<ClCompile Include="solutiongenerator_codelite.cpp">
|
||||
<Filter>VPC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\p4lib\p4.cpp">
|
||||
<Filter>Dependencies\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\tier0\mem_helpers.h">
|
||||
|
Loading…
Reference in New Issue
Block a user