mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
wscript: fix win32 build
This commit is contained in:
@@ -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
Submodule mainui updated: 0f8b8d809a...c8f22ee638
@@ -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' ]
|
||||
|
||||
Reference in New Issue
Block a user