mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-09 05:34:22 +00:00
wscript: add possibility to select windows subsystem during link, add define to use WinXP SDK. This commit forces WinXP compability on latest Visual Studio
This commit is contained in:
parent
e9e364f054
commit
ca501c0378
@ -94,7 +94,8 @@ def build(bld):
|
|||||||
features = 'c cprogram',
|
features = 'c cprogram',
|
||||||
includes = includes,
|
includes = includes,
|
||||||
use = libs,
|
use = libs,
|
||||||
install_path = bld.env.BINDIR
|
install_path = bld.env.BINDIR,
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
@ -103,5 +104,6 @@ def build(bld):
|
|||||||
features = 'c',
|
features = 'c',
|
||||||
includes = includes,
|
includes = includes,
|
||||||
use = libs,
|
use = libs,
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR,
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM
|
||||||
)
|
)
|
||||||
|
@ -63,5 +63,6 @@ def build(bld):
|
|||||||
features = 'c cprogram',
|
features = 'c cprogram',
|
||||||
includes = includes,
|
includes = includes,
|
||||||
use = libs,
|
use = libs,
|
||||||
install_path = bld.env.BINDIR
|
install_path = bld.env.BINDIR,
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM
|
||||||
)
|
)
|
||||||
|
2
mainui
2
mainui
@ -1 +1 @@
|
|||||||
Subproject commit dac66977620487260c7351c2a2c845f081a5dc71
|
Subproject commit 72233d02c1a0912e8667fab1ce4561b470ce4293
|
26
wscript
26
wscript
@ -71,18 +71,16 @@ def configure(conf):
|
|||||||
conf.env.DEST_64BIT = False # predict state
|
conf.env.DEST_64BIT = False # predict state
|
||||||
try:
|
try:
|
||||||
conf.check_cc(
|
conf.check_cc(
|
||||||
fragment='''
|
fragment='''int main( void )
|
||||||
int main( void )
|
{
|
||||||
{
|
int check[sizeof(void*) == 4 ? 1: -1];
|
||||||
int check[sizeof(void*) == 4 ? 1: -1];
|
return 0;
|
||||||
return 0;
|
}''',
|
||||||
}
|
|
||||||
''',
|
|
||||||
msg = 'Checking if compiler create 32 bit code')
|
msg = 'Checking if compiler create 32 bit code')
|
||||||
except conf.errors.ConfigurationError:
|
except conf.errors.ConfigurationError:
|
||||||
# Program not compiled, we have 64 bit
|
# Program not compiled, we have 64 bit
|
||||||
conf.env.DEST_64BIT = True
|
conf.env.DEST_64BIT = True
|
||||||
|
|
||||||
if(conf.env.DEST_64BIT):
|
if(conf.env.DEST_64BIT):
|
||||||
if(not conf.options.ALLOW64):
|
if(not conf.options.ALLOW64):
|
||||||
conf.env.append_value('LINKFLAGS', ['-m32'])
|
conf.env.append_value('LINKFLAGS', ['-m32'])
|
||||||
@ -91,7 +89,7 @@ def configure(conf):
|
|||||||
Logs.info('NOTE: will build engine with 64-bit toolchain using -m32')
|
Logs.info('NOTE: will build engine with 64-bit toolchain using -m32')
|
||||||
else:
|
else:
|
||||||
Logs.warn('WARNING: 64-bit engine may be unstable')
|
Logs.warn('WARNING: 64-bit engine may be unstable')
|
||||||
|
|
||||||
if(conf.env.COMPILER_CC != 'msvc'):
|
if(conf.env.COMPILER_CC != 'msvc'):
|
||||||
if(conf.env.COMPILER_CC == 'gcc'):
|
if(conf.env.COMPILER_CC == 'gcc'):
|
||||||
conf.env.append_unique('LINKFLAGS', ['-Wl,--no-undefined'])
|
conf.env.append_unique('LINKFLAGS', ['-Wl,--no-undefined'])
|
||||||
@ -112,15 +110,21 @@ def configure(conf):
|
|||||||
conf.env.append_unique('CFLAGS', ['/Z7'])
|
conf.env.append_unique('CFLAGS', ['/Z7'])
|
||||||
conf.env.append_unique('CXXFLAGS', ['/Z7'])
|
conf.env.append_unique('CXXFLAGS', ['/Z7'])
|
||||||
conf.env.append_unique('LINKFLAGS', ['/DEBUG'])
|
conf.env.append_unique('LINKFLAGS', ['/DEBUG'])
|
||||||
|
conf.env.append_unique('DEFINES', '_USING_V110_SDK71_') # Force XP compability
|
||||||
|
|
||||||
|
# Force XP compability, all build targets should add
|
||||||
|
# subsystem=bld.env.MSVC_SUBSYSTEM
|
||||||
|
# TODO: wrapper around bld.stlib, bld.shlib and so on?
|
||||||
|
conf.env.MSVC_SUBSYSTEM = 'WINDOWS,5.01'
|
||||||
|
|
||||||
if(conf.env.DEST_OS != 'win32'):
|
if(conf.env.DEST_OS != 'win32'):
|
||||||
conf.check( lib='dl' )
|
conf.check( lib='dl' )
|
||||||
conf.check( lib='m' )
|
conf.check( lib='m' )
|
||||||
conf.check( lib='pthread' )
|
conf.check( lib='pthread' )
|
||||||
|
|
||||||
conf.env.DEDICATED = conf.options.DEDICATED
|
conf.env.DEDICATED = conf.options.DEDICATED
|
||||||
conf.env.SINGLE_BINARY = conf.options.DEDICATED # We don't need game launcher on dedicated
|
conf.env.SINGLE_BINARY = conf.options.DEDICATED # We don't need game launcher on dedicated
|
||||||
|
|
||||||
# indicate if we are packaging for Linux/BSD
|
# indicate if we are packaging for Linux/BSD
|
||||||
if(not conf.options.WIN_INSTALL and
|
if(not conf.options.WIN_INSTALL and
|
||||||
conf.env.DEST_OS != 'win32' and
|
conf.env.DEST_OS != 'win32' and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user