mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
MSVC & Win32 wscript fixes
This commit is contained in:
@@ -14,7 +14,8 @@ def options(opt):
|
||||
def configure(conf):
|
||||
# check for dedicated server build
|
||||
if conf.options.DEDICATED:
|
||||
conf.check( lib='rt' )
|
||||
if(conf.env.DEST_OS == 'linux'):
|
||||
conf.check( lib='rt' )
|
||||
conf.env.append_unique('DEFINES', 'SINGLE_BINARY')
|
||||
conf.env.append_unique('DEFINES', 'XASH_DEDICATED')
|
||||
else:
|
||||
@@ -30,6 +31,12 @@ def configure(conf):
|
||||
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
|
||||
conf.env.append_unique('DEFINES', 'XASH_SDL')
|
||||
|
||||
if conf.env.DEST_OS == 'win32':
|
||||
conf.check( lib='USER32' )
|
||||
conf.check( lib='SHELL32' )
|
||||
conf.check( lib='GDI32' )
|
||||
conf.check( lib='ADVAPI32' )
|
||||
|
||||
def get_subproject_name(ctx):
|
||||
return os.path.basename(os.path.realpath(str(ctx.path)))
|
||||
|
||||
@@ -37,11 +44,17 @@ def build(bld):
|
||||
bld.load_envs()
|
||||
bld.env = bld.all_envs[get_subproject_name(bld)]
|
||||
|
||||
libs = []
|
||||
source = []
|
||||
|
||||
# basic build: dedicated only, no dependencies
|
||||
if bld.env.DEST_OS != 'win32':
|
||||
libs = [ 'DL', 'M', 'PTHREAD' ]
|
||||
|
||||
source = bld.path.ant_glob([
|
||||
libs += [ 'DL', 'M', 'PTHREAD' ]
|
||||
else:
|
||||
libs += ['USER32', 'SHELL32', 'GDI32', 'ADVAPI32']
|
||||
source += bld.path.ant_glob(['platform/win32/*.c'])
|
||||
|
||||
source += bld.path.ant_glob([
|
||||
'common/*.c',
|
||||
'common/imagelib/*.c',
|
||||
'common/soundlib/*.c',
|
||||
|
||||
Reference in New Issue
Block a user