mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-23 17:25:24 +01:00
wscript: fix win32 build
This commit is contained in:
parent
48d1aa5115
commit
8ea5536b42
@ -8,6 +8,9 @@ import os
|
||||
top = '.'
|
||||
|
||||
def options(opt):
|
||||
opt.add_option(
|
||||
'--sdl2', action='store', type='string', dest = 'SDL2_PATH', default = None,
|
||||
help = 'SDL2 path to build(required for Windows)')
|
||||
opt.add_option(
|
||||
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
|
||||
help = 'build engine with BSP2 map support(recommended for Quake, breaks compability!)')
|
||||
@ -29,7 +32,15 @@ def configure(conf):
|
||||
msg='Checking for SDL2',
|
||||
uselib_store='SDL2')
|
||||
except conf.errors.ConfigurationError:
|
||||
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
|
||||
if(conf.options.SDL2_PATH):
|
||||
conf.start_msg('Configuring SDL2 by provided path')
|
||||
conf.env.HAVE_SDL2 = 1
|
||||
conf.env.INCLUDES_SDL2 = [os.path.abspath(os.path.join(conf.options.SDL2_PATH, 'include'))]
|
||||
conf.env.LIBPATH_SDL2 = [os.path.abspath(os.path.join(conf.options.SDL2_PATH, 'lib/x86'))]
|
||||
conf.env.LIB_SDL2 = ['SDL2']
|
||||
conf.end_msg('ok')
|
||||
else:
|
||||
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
|
||||
conf.env.append_unique('DEFINES', 'XASH_SDL')
|
||||
|
||||
if(conf.options.SUPPORT_BSP2_FORMAT):
|
||||
|
@ -31,6 +31,7 @@ def configure(conf):
|
||||
conf.env.append_unique('DEFINES', 'XASH_SDL')
|
||||
else:
|
||||
conf.check(lib='USER32')
|
||||
conf.check(lib='SHELL32')
|
||||
|
||||
def get_subproject_name(ctx):
|
||||
return os.path.basename(os.path.realpath(str(ctx.path)))
|
||||
@ -53,7 +54,7 @@ def build(bld):
|
||||
else:
|
||||
# compile resource on Windows
|
||||
bld.load('winres')
|
||||
libs += ['USER32']
|
||||
libs += ['USER32', 'SHELL32']
|
||||
source += ['game.rc']
|
||||
|
||||
bld(
|
||||
|
2
mainui
2
mainui
@ -1 +1 @@
|
||||
Subproject commit 0f8b8d809a8406757cebb72077d608e512f7d9db
|
||||
Subproject commit c8f22ee638d6009db1998e72956ddae26fa39724
|
@ -34,7 +34,7 @@ def configure(conf):
|
||||
conf.fatal('vgui is not supported on this CPU: ' + conf.env.DEST_CPU)
|
||||
|
||||
if conf.env.DEST_OS == 'win32':
|
||||
conf.env.LIB_VGUI = ['vgui.lib']
|
||||
conf.env.LIB_VGUI = ['vgui']
|
||||
conf.env.LIBPATH_VGUI = [os.path.abspath(os.path.join(conf.options.VGUI_DEV, 'lib/win32_vc6/'))]
|
||||
else:
|
||||
if conf.env.DEST_OS == 'linux':
|
||||
@ -59,6 +59,8 @@ def build(bld):
|
||||
if bld.env.DEDICATED or bld.env.NO_VGUI:
|
||||
return
|
||||
|
||||
libs = []
|
||||
|
||||
# basic build: dedicated only, no dependencies
|
||||
if bld.env.DEST_OS != 'win32':
|
||||
libs = [ 'DL', 'M' ]
|
||||
|
Loading…
Reference in New Issue
Block a user