diff --git a/devtools/bin/vpc.exe b/devtools/bin/vpc.exe index 51f7a247..407acc2f 100755 Binary files a/devtools/bin/vpc.exe and b/devtools/bin/vpc.exe differ diff --git a/external/vpc/tier0/threadtools.cpp b/external/vpc/tier0/threadtools.cpp index 735f2330..5d757c63 100644 --- a/external/vpc/tier0/threadtools.cpp +++ b/external/vpc/tier0/threadtools.cpp @@ -49,7 +49,7 @@ #endif #ifndef _PS3 -#include +#include #endif #include "tier0/threadtools.h" diff --git a/external/vpc/utils/vpc/main.cpp b/external/vpc/utils/vpc/main.cpp index 0caa9c93..e237df50 100644 --- a/external/vpc/utils/vpc/main.cpp +++ b/external/vpc/utils/vpc/main.cpp @@ -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]: - 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"; diff --git a/external/vpc/utils/vpc/solutiongenerator_win32.cpp b/external/vpc/utils/vpc/solutiongenerator_win32.cpp index 93147956..3df22793 100644 --- a/external/vpc/utils/vpc/solutiongenerator_win32.cpp +++ b/external/vpc/utils/vpc/solutiongenerator_win32.cpp @@ -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" ); diff --git a/external/vpc/utils/vpc/vpc.h b/external/vpc/utils/vpc/vpc.h index 4ff493e4..d0e7ab98 100644 --- a/external/vpc/utils/vpc/vpc.h +++ b/external/vpc/utils/vpc/vpc.h @@ -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; } diff --git a/external/vpc/utils/vpc/vpc.vcxproj b/external/vpc/utils/vpc/vpc.vcxproj index be37d599..c8c8f5cc 100644 --- a/external/vpc/utils/vpc/vpc.vcxproj +++ b/external/vpc/utils/vpc/vpc.vcxproj @@ -13,21 +13,21 @@ {36C5F545-588F-4091-B480-89E03EDBDA93} vpc - 8.1 + 10.0.19041.0 Application true - NotSet - v140_xp + MultiByte + v142 Application false true - NotSet - v140_xp + MultiByte + v142 @@ -58,9 +58,8 @@ Console - 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 - + + @@ -83,14 +82,12 @@ p4 edit ..\..\..\..\devtools\bin\vpc.pdb && copy /y $(TargetDir)\vpc.pdb Console - 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 - + + - diff --git a/external/vpc/utils/vpc/vpc.vcxproj.filters b/external/vpc/utils/vpc/vpc.vcxproj.filters index be39a000..78aa4870 100644 --- a/external/vpc/utils/vpc/vpc.vcxproj.filters +++ b/external/vpc/utils/vpc/vpc.vcxproj.filters @@ -245,9 +245,6 @@ VPC\Source Files - - Dependencies\Source Files -