mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
fix windows build scripts, add windows opus support
This commit is contained in:
@@ -42,6 +42,8 @@
|
||||
#undef GetCurrentDirectory
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
@@ -2800,7 +2802,7 @@ unsigned int CBaseFileSystem::Size( const char* pFileName, const char *pPathID )
|
||||
// *pFileName -
|
||||
// Output : long
|
||||
//-----------------------------------------------------------------------------
|
||||
long CBaseFileSystem::FastFileTime( const CSearchPath *path, const char *pFileName )
|
||||
time_t CBaseFileSystem::FastFileTime( const CSearchPath *path, const char *pFileName )
|
||||
{
|
||||
struct _stat buf;
|
||||
|
||||
@@ -3323,7 +3325,7 @@ char *CBaseFileSystem::ReadLine( char *pOutput, int maxChars, FileHandle_t file
|
||||
// Input : *pFileName -
|
||||
// Output : long
|
||||
//-----------------------------------------------------------------------------
|
||||
long CBaseFileSystem::GetFileTime( const char *pFileName, const char *pPathID )
|
||||
time_t CBaseFileSystem::GetFileTime( const char *pFileName, const char *pPathID )
|
||||
{
|
||||
VPROF_BUDGET( "CBaseFileSystem::GetFileTime", VPROF_BUDGETGROUP_OTHER_FILESYSTEM );
|
||||
|
||||
@@ -3340,7 +3342,7 @@ long CBaseFileSystem::GetFileTime( const char *pFileName, const char *pPathID )
|
||||
|
||||
for ( CSearchPath *pSearchPath = iter.GetFirst(); pSearchPath != NULL; pSearchPath = iter.GetNext() )
|
||||
{
|
||||
long ft = FastFileTime( pSearchPath, tempFileName );
|
||||
time_t ft = FastFileTime( pSearchPath, tempFileName );
|
||||
if ( ft != 0L )
|
||||
{
|
||||
if ( !pSearchPath->GetPackFile() && m_LogFuncs.Count() )
|
||||
@@ -3363,12 +3365,12 @@ long CBaseFileSystem::GetFileTime( const char *pFileName, const char *pPathID )
|
||||
return ft;
|
||||
}
|
||||
}
|
||||
return 0L;
|
||||
return (time_t)0L;
|
||||
}
|
||||
|
||||
long CBaseFileSystem::GetPathTime( const char *pFileName, const char *pPathID )
|
||||
time_t CBaseFileSystem::GetPathTime( const char *pFileName, const char *pPathID )
|
||||
{
|
||||
VPROF_BUDGET( "CBaseFileSystem::GetFileTime", VPROF_BUDGETGROUP_OTHER_FILESYSTEM );
|
||||
VPROF_BUDGET( "CBaseFileSystem::GetPathTime", VPROF_BUDGETGROUP_OTHER_FILESYSTEM );
|
||||
|
||||
CSearchPathsIterator iter( this, &pFileName, pPathID );
|
||||
|
||||
@@ -3379,10 +3381,10 @@ long CBaseFileSystem::GetPathTime( const char *pFileName, const char *pPathID )
|
||||
Q_strlower( tempFileName );
|
||||
#endif
|
||||
|
||||
long pathTime = 0L;
|
||||
time_t pathTime = 0L;
|
||||
for ( CSearchPath *pSearchPath = iter.GetFirst(); pSearchPath != NULL; pSearchPath = iter.GetNext() )
|
||||
{
|
||||
long ft = FastFileTime( pSearchPath, tempFileName );
|
||||
time_t ft = FastFileTime( pSearchPath, tempFileName );
|
||||
if ( ft > pathTime )
|
||||
pathTime = ft;
|
||||
if ( ft != 0L )
|
||||
@@ -3707,7 +3709,7 @@ void CBaseFileSystem::SetWhitelistSpewFlags( int flags )
|
||||
// maxCharsIncludingTerminator -
|
||||
// fileTime -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseFileSystem::FileTimeToString( char *pString, int maxCharsIncludingTerminator, long fileTime )
|
||||
void CBaseFileSystem::FileTimeToString( char *pString, int maxCharsIncludingTerminator, time_t fileTime )
|
||||
{
|
||||
if ( IsX360() )
|
||||
{
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
#include "vpklib/packedstore.h"
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -312,10 +314,10 @@ public:
|
||||
virtual void MarkPathIDByRequestOnly( const char *pPathID, bool bRequestOnly );
|
||||
|
||||
virtual bool FileExists( const char *pFileName, const char *pPathID = NULL );
|
||||
virtual long GetFileTime( const char *pFileName, const char *pPathID = NULL );
|
||||
virtual time_t GetFileTime( const char *pFileName, const char *pPathID = NULL );
|
||||
virtual bool IsFileWritable( char const *pFileName, const char *pPathID = NULL );
|
||||
virtual bool SetFileWritable( char const *pFileName, bool writable, const char *pPathID = 0 );
|
||||
virtual void FileTimeToString( char *pString, int maxChars, long fileTime );
|
||||
virtual void FileTimeToString( char *pString, int maxChars, time_t fileTime );
|
||||
|
||||
virtual const char *FindFirst( const char *pWildCard, FileFindHandle_t *pHandle );
|
||||
virtual const char *FindFirstEx( const char *pWildCard, const char *pPathID, FileFindHandle_t *pHandle );
|
||||
@@ -338,7 +340,7 @@ public:
|
||||
virtual FileNameHandle_t FindFileName( char const *pFileName );
|
||||
virtual bool String( const FileNameHandle_t& handle, char *buf, int buflen );
|
||||
virtual int GetPathIndex( const FileNameHandle_t &handle );
|
||||
long GetPathTime( const char *pFileName, const char *pPathID );
|
||||
time_t GetPathTime( const char *pFileName, const char *pPathID );
|
||||
|
||||
virtual void EnableWhitelistFileTracking( bool bEnable, bool bCacheAllVPKHashes, bool bRecalculateAndCheckHashes );
|
||||
virtual void RegisterFileWhitelist( IPureServerWhitelist *pWhiteList, IFileList **ppFilesToReload ) OVERRIDE;
|
||||
@@ -794,7 +796,7 @@ protected:
|
||||
void HandleOpenRegularFile( CFileOpenInfo &openInfo, bool bIsAbsolutePath );
|
||||
|
||||
FileHandle_t FindFileInSearchPath( CFileOpenInfo &openInfo );
|
||||
long FastFileTime( const CSearchPath *path, const char *pFileName );
|
||||
time_t FastFileTime( const CSearchPath *path, const char *pFileName );
|
||||
|
||||
const char *GetWritePath( const char *pFilename, const char *pathID );
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ def configure(conf):
|
||||
conf.define('FILESYSTEM_STDIO_EXPORTS',1)
|
||||
conf.define('DONT_PROTECT_FILEIO_FUNCTIONS',1)
|
||||
# conf.define('PROTECTED_THINGS_ENABLE',1)
|
||||
conf.define('_USE_32BIT_TIME_T',1)
|
||||
# conf.define('_USE_32BIT_TIME_T',1)
|
||||
conf.define('SUPPORT_PACKED_STORE',1)
|
||||
|
||||
def build(bld):
|
||||
|
||||
Reference in New Issue
Block a user