mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 10:30:00 +00:00
wscript: fix win32 build
This commit is contained in:
parent
48d1aa5115
commit
8ea5536b42
@ -8,6 +8,9 @@ import os
|
|||||||
top = '.'
|
top = '.'
|
||||||
|
|
||||||
def options(opt):
|
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(
|
opt.add_option(
|
||||||
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
|
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
|
||||||
help = 'build engine with BSP2 map support(recommended for Quake, breaks compability!)')
|
help = 'build engine with BSP2 map support(recommended for Quake, breaks compability!)')
|
||||||
@ -29,7 +32,15 @@ def configure(conf):
|
|||||||
msg='Checking for SDL2',
|
msg='Checking for SDL2',
|
||||||
uselib_store='SDL2')
|
uselib_store='SDL2')
|
||||||
except conf.errors.ConfigurationError:
|
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')
|
conf.env.append_unique('DEFINES', 'XASH_SDL')
|
||||||
|
|
||||||
if(conf.options.SUPPORT_BSP2_FORMAT):
|
if(conf.options.SUPPORT_BSP2_FORMAT):
|
||||||
|
@ -31,6 +31,7 @@ def configure(conf):
|
|||||||
conf.env.append_unique('DEFINES', 'XASH_SDL')
|
conf.env.append_unique('DEFINES', 'XASH_SDL')
|
||||||
else:
|
else:
|
||||||
conf.check(lib='USER32')
|
conf.check(lib='USER32')
|
||||||
|
conf.check(lib='SHELL32')
|
||||||
|
|
||||||
def get_subproject_name(ctx):
|
def get_subproject_name(ctx):
|
||||||
return os.path.basename(os.path.realpath(str(ctx.path)))
|
return os.path.basename(os.path.realpath(str(ctx.path)))
|
||||||
@ -53,7 +54,7 @@ def build(bld):
|
|||||||
else:
|
else:
|
||||||
# compile resource on Windows
|
# compile resource on Windows
|
||||||
bld.load('winres')
|
bld.load('winres')
|
||||||
libs += ['USER32']
|
libs += ['USER32', 'SHELL32']
|
||||||
source += ['game.rc']
|
source += ['game.rc']
|
||||||
|
|
||||||
bld(
|
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)
|
conf.fatal('vgui is not supported on this CPU: ' + conf.env.DEST_CPU)
|
||||||
|
|
||||||
if conf.env.DEST_OS == 'win32':
|
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/'))]
|
conf.env.LIBPATH_VGUI = [os.path.abspath(os.path.join(conf.options.VGUI_DEV, 'lib/win32_vc6/'))]
|
||||||
else:
|
else:
|
||||||
if conf.env.DEST_OS == 'linux':
|
if conf.env.DEST_OS == 'linux':
|
||||||
@ -59,6 +59,8 @@ def build(bld):
|
|||||||
if bld.env.DEDICATED or bld.env.NO_VGUI:
|
if bld.env.DEDICATED or bld.env.NO_VGUI:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
libs = []
|
||||||
|
|
||||||
# basic build: dedicated only, no dependencies
|
# basic build: dedicated only, no dependencies
|
||||||
if bld.env.DEST_OS != 'win32':
|
if bld.env.DEST_OS != 'win32':
|
||||||
libs = [ 'DL', 'M' ]
|
libs = [ 'DL', 'M' ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user