Browse Source

Merge pull request #95 from nillerusr/dedicated-build-fix

fix dedicated build
pull/96/head
nillerusr 2 years ago committed by GitHub
parent
commit
8200eda3ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 33
      .github/workflows/build.yml
  2. 5
      datacache/datacache.h
  3. 8
      engine/matsys_interface.cpp
  4. 2
      game/shared/collisionproperty.cpp
  5. 2
      public/engine/thinktracecounter.h
  6. 17
      public/tier0/threadtools.h
  7. 4
      scripts/build-ubuntu-amd64.sh
  8. 4
      scripts/build-ubuntu-i386.sh
  9. 8
      tier0/threadtools.cpp

33
.github/workflows/build.yml

@ -9,7 +9,7 @@ on: @@ -9,7 +9,7 @@ on:
- "*"
jobs:
build-linux-32:
build-linux-i386:
runs-on: ubuntu-18.04
steps:
@ -18,7 +18,7 @@ jobs: @@ -18,7 +18,7 @@ jobs:
run: |
scripts/build-ubuntu-i386.sh
build-linux-64:
build-linux-amd64:
runs-on: ubuntu-18.04
steps:
@ -46,3 +46,32 @@ jobs: @@ -46,3 +46,32 @@ jobs:
git submodule init && git submodule update
./waf.bat configure -T debug
./waf.bat build
build-dedicated-windows-i386:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Build dedicated windows-i386
run: |
git submodule init && git submodule update
./waf.bat configure -T debug -d
./waf.bat build
build-dedicated-linux-i386:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Build dedicated linux-i386
run: |
scripts/build-ubuntu-i386.sh -d
build-dedicated-linux-amd64:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Build dedicated linux-amd64
run: |
scripts/build-ubuntu-amd64.sh -d

5
datacache/datacache.h vendored

@ -181,10 +181,9 @@ private: @@ -181,10 +181,9 @@ private:
DataCacheItem_t *m_pFirst;
int m_iThread;
};
typedef CThreadLocal<FrameLock_t *> CThreadFrameLock;
CDataCacheLRU & m_LRU;
CThreadFrameLock m_ThreadFrameLock;
CTHREADLOCAL(FrameLock_t*) m_ThreadFrameLock;
DataCacheStatus_t m_status;
DataCacheLimits_t m_limits;
IDataCacheClient * m_pClient;
@ -381,4 +380,4 @@ inline void CDataCacheSection::NoteUnlock( int size ) @@ -381,4 +380,4 @@ inline void CDataCacheSection::NoteUnlock( int size )
//-----------------------------------------------------------------------------
#endif // DATACACHE_H
#endif // DATACACHE_H

8
engine/matsys_interface.cpp

@ -269,6 +269,8 @@ static const char *s_pRegistryConVars[] = @@ -269,6 +269,8 @@ static const char *s_pRegistryConVars[] =
static CThreadMutex g_VideoConfigMutex;
#endif
#ifndef DEDICATED
static int ReadVideoConfigInt( const char *pName, int nDefault )
{
#if USE_VIDEOCONFIG_FILE
@ -379,6 +381,8 @@ static void WriteVideoConfigString( const char *pName, const char *pString ) @@ -379,6 +381,8 @@ static void WriteVideoConfigString( const char *pName, const char *pString )
#endif
}
#endif
//-----------------------------------------------------------------------------
// Scan for video config convars which are overridden on the cmd line, used
// for development and automated timedemo regression testing.
@ -685,6 +689,7 @@ static void OverrideMaterialSystemConfigFromCommandLine( MaterialSystem_Config_t @@ -685,6 +689,7 @@ static void OverrideMaterialSystemConfigFromCommandLine( MaterialSystem_Config_t
//-----------------------------------------------------------------------------
void OverrideMaterialSystemConfig( MaterialSystem_Config_t &config )
{
#ifndef DEDICATED
// enable/disable flashlight support based on mod (user can also set this explicitly)
// FIXME: this is only here because dxsupport_override.cfg is currently broken
ConVarRef mat_supportflashlight( "mat_supportflashlight" );
@ -718,7 +723,8 @@ void OverrideMaterialSystemConfig( MaterialSystem_Config_t &config ) @@ -718,7 +723,8 @@ void OverrideMaterialSystemConfig( MaterialSystem_Config_t &config )
WriteVideoConfigInt( "ScreenWindowed", 1 );
config.SetFlag( MATSYS_VIDCFG_FLAGS_WINDOWED, true );
}
}
#endif
}
void HandleServerAllowColorCorrection()

2
game/shared/collisionproperty.cpp

@ -78,7 +78,7 @@ private: @@ -78,7 +78,7 @@ private:
CTSListWithFreeList<CBaseHandle> m_DirtyEntities;
CThreadSpinRWLock m_partitionMutex;
uint32 m_partitionWriteId;
CThreadLocalInt<> m_readLockCount;
CTHREADLOCALINT m_readLockCount;
};

2
public/engine/thinktracecounter.h

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
#ifdef THINK_TRACE_COUNTER_COMPILED
// create a macro that is true if we are allowed to debug traces during thinks, and compiles out to nothing otherwise.
#if defined( _GAMECONSOLE ) || defined( NO_STEAM )
#define DEBUG_THINK_TRACE_COUNTER_ALLOWED() (!IsCert())
#define DEBUG_THINK_TRACE_COUNTER_ALLOWED() (false)
#else
#ifdef THINK_TRACE_COUNTER_COMPILE_FUNCTIONS_ENGINE
bool DEBUG_THINK_TRACE_COUNTER_ALLOWED()

17
public/tier0/threadtools.h

@ -486,22 +486,7 @@ PLATFORM_INTERFACE void ThreadNotifySyncReleasing(void *p); @@ -486,22 +486,7 @@ PLATFORM_INTERFACE void ThreadNotifySyncReleasing(void *p);
#ifndef NO_THREAD_LOCAL
#if ( defined(_LINUX) && defined(DEDICATED) ) && !defined(OSX)
// linux totally supports compiler thread locals, even across dll's.
#define PLAT_COMPILER_SUPPORTED_THREADLOCALS 1
#define CTHREADLOCALINTEGER( typ ) __thread int
#define CTHREADLOCALINT __thread int
#define CTHREADLOCALPTR( typ ) __thread typ *
#define CTHREADLOCAL( typ ) __thread typ
#define GETLOCAL( x ) ( x )
#ifndef TIER0_DLL_EXPORT
DLL_IMPORT __thread int g_nThreadID;
#endif
#endif
#if defined(WIN32) || defined(OSX) || defined( _PS3 ) || ( defined (_LINUX) && !defined(DEDICATED) )
#if defined(WIN32) || defined(OSX) || defined( _PS3 ) || ( defined (_LINUX) )
#ifndef __AFXTLS_H__ // not compatible with some Windows headers
#if defined(_PS3)

4
scripts/build-ubuntu-amd64.sh

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
git submodule init && git submodule update
sudo apt-get update
sudo apt-get install -f -y libopenal-dev g++-multilib gcc-multilib libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libcurl4-gnutls-dev libsdl2-dev zlib1g-dev libbz2-dev
sudo apt-get install -f -y libopenal-dev g++-multilib gcc-multilib libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libcurl4-gnutls-dev libsdl2-dev zlib1g-dev libbz2-dev libedit-dev
./waf configure -T debug --64bits --disable-warns &&
./waf configure -T debug --64bits --disable-warns $* &&
./waf build

4
scripts/build-ubuntu-i386.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
git submodule init && git submodule update
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -f -y libopenal-dev:i386 g++-multilib gcc-multilib libpng-dev:i386 libjpeg-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386 libcurl4-gnutls-dev:i386 libsdl2-dev:i386 zlib1g-dev:i386 libbz2-dev:i386
sudo apt-get install -f -y libopenal-dev:i386 g++-multilib gcc-multilib libpng-dev:i386 libjpeg-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386 libcurl4-gnutls-dev:i386 libsdl2-dev:i386 zlib1g-dev:i386 libbz2-dev:i386 libedit-dev:i386
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T debug --disable-warns &&
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T debug --disable-warns $* &&
./waf build

8
tier0/threadtools.cpp

@ -94,11 +94,7 @@ const int MAX_THREAD_IDS = 128; @@ -94,11 +94,7 @@ const int MAX_THREAD_IDS = 128;
static volatile bool s_bThreadIDAllocated[MAX_THREAD_IDS];
#if defined(_LINUX) && defined(DEDICATED)
DLL_CLASS_EXPORT __thread int g_nThreadID;
#elif defined(_PS3)
#if defined(_PS3)
#include "tls_ps3.h"
#else
DLL_CLASS_EXPORT CTHREADLOCALINT g_nThreadID;
@ -1684,7 +1680,7 @@ bool CThreadFullMutex::Release() @@ -1684,7 +1680,7 @@ bool CThreadFullMutex::Release()
//
//-----------------------------------------------------------------------------
#if defined( WIN32 ) || defined( _PS3 ) || defined( _OSX ) || ( defined (_LINUX) && !defined(DEDICATED) )
#if defined( WIN32 ) || defined( _PS3 ) || defined( _OSX ) || defined (_LINUX)
#if !defined(_PS3)
namespace GenericThreadLocals
{

Loading…
Cancel
Save