Fix Windows build with WAF

This commit is contained in:
JusicP
2022-03-19 14:40:11 +02:00
parent b296444d0c
commit edbe1baceb
31 changed files with 361 additions and 126 deletions

View File

@@ -18,9 +18,13 @@ def configure(conf):
#'PROTECTED_THINGS_ENABLE', # conflicts with stlport
'strncpy=use_Q_strncpy_instead',
'_snprintf=use_Q_snprintf_instead',
'GL_GLEXT_PROTOTYPES',
'DX_TO_GL_ABSTRACTION'
])
if conf.env.DEST_OS == 'win32' and not conf.env.GL:
conf.env.append_unique('DEFINES',[
'USE_ACTUAL_DX',
])
def build(bld):
source = [
@@ -29,7 +33,6 @@ def build(bld):
'hardwareconfig.cpp',
'meshbase.cpp',
'meshdx8.cpp',
#'recording.cpp', [$WIN32 && !$GL]
'shaderapidx8.cpp',
'shaderdevicebase.cpp',
'shaderapibase.cpp',
@@ -40,11 +43,20 @@ def build(bld):
'cvballoctracker.cpp',
'vertexdecl.cpp',
'vertexshaderdx8.cpp',
#'wmi.cpp', [$WIN32 && !$GL]
#'textureheap.cpp', [$X360]
'winutils.cpp'# [!$WIN32]
]
if bld.env.DEST_OS == 'win32' and not bld.env.GL:
source += [
'recording.cpp',
'wmi.cpp'
]
if bld.env.DEST_OS != 'win32':
source += ['winutils.cpp']
else:
source += ['../../public/tier0/memoverride.cpp']
includes = [
'.',
'../../public',
@@ -60,7 +72,9 @@ def build(bld):
if bld.env.DEST_OS == 'android':
libs += ['ANDROID_SUPPORT']
elif bld.env.DEST_OS == 'win32' and not bld.env.GL:
libs += ['D3D9', 'D3DX9', 'bzip2']
install_path = bld.env.LIBDIR
bld.shlib(

View File

@@ -447,7 +447,8 @@ extern "C"
void CShaderSystem::VerifyBaseShaderDLL( CSysModule *pModule )
{
#if defined( _WIN32 ) && !defined( _X360 )
//#if defined( _WIN32 ) && !defined( _X360 )
#if 0
const char *pErrorStr = "Corrupt save data settings.";
unsigned char *testData1 = new unsigned char[SHADER_DLL_VERIFY_DATA_LEN1];

View File

@@ -47,6 +47,9 @@ def build(bld):
'ctexturecompositor.cpp'
]
if bld.env.DEST_OS == 'win32':
source += ['../public/tier0/memoverride.cpp']
includes = [
'.',
'../../public',