Browse Source

wscript: move options to subgroups, reorder option plugins loading

pull/2/head
Alibek Omarov 6 years ago
parent
commit
1b372115a5
  1. 15
      engine/wscript
  2. 9
      scripts/waflib/sdl2.py
  3. 11
      vgui_support/wscript
  4. 15
      wscript

15
engine/wscript

@ -9,17 +9,20 @@ from fwgslib import get_subproject_name @@ -9,17 +9,20 @@ from fwgslib import get_subproject_name
top = '.'
def options(opt):
opt.load('sdl2')
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!)')
opt.add_option(
grp = opt.add_option_group('Engine options')
grp.add_option(
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
help = 'build engine with BSP2 map support(recommended for Quake, breaks compatibility!)')
grp.add_option(
'--single-binary', action = 'store_true', dest = 'SINGLE_BINARY', default = None,
help = 'build single "xash" binary instead of xash.dll/libxash.so (default for dedicated)')
opt.add_option(
grp.add_option(
'--stdin-input', action = 'store_true', dest = 'USE_SELECT', default = None,
help = 'enable console input from stdin (default for dedicated)')
opt.load('sdl2')
def configure(conf):
# check for dedicated server build

9
scripts/waflib/sdl2.py

@ -14,13 +14,14 @@ @@ -14,13 +14,14 @@
import os
def options(opt):
opt.add_option(
grp = opt.add_option_group('SDL2 options')
grp.add_option(
'--sdl2', action='store', type='string', dest = 'SDL2_PATH', default = None,
help = 'SDL2 path to build(required for Windows)')
help = 'path to precompiled SDL2 library(required for Windows)')
opt.add_option(
grp.add_option(
'--skip-sdl2-sanity-check', action='store_false', default = True, dest='SDL2_SANITY_CHECK',
help = 'Skip checking SDL2 sanity')
help = 'skip checking SDL2 sanity')
def my_dirname(path):
# really dumb, will not work with /path/framework//, but still enough

11
vgui_support/wscript

@ -9,19 +9,18 @@ from fwgslib import get_subproject_name @@ -9,19 +9,18 @@ from fwgslib import get_subproject_name
top = '.'
def options(opt):
opt.add_option(
grp = opt.add_option_group('VGUI options')
grp.add_option(
'--vgui', action = 'store', type='string', dest = 'VGUI_DEV',
help = 'path to vgui-dev repo', default='' )
opt.add_option(
grp.add_option(
'--disable-vgui', action = 'store_true', dest = 'NO_VGUI',
help = 'disable vgui_support', default=False )
opt.add_option(
grp.add_option(
'--skip-vgui-sanity-check', action = 'store_false', dest = 'VGUI_SANITY_CHECK',
help = 'Skip checking VGUI sanity', default=True )
# stub
help = 'skip checking VGUI sanity', default=True )
return
def configure(conf):

15
wscript

@ -17,27 +17,28 @@ SUBDIRS = [ 'engine', 'game_launch', 'mainui', 'vgui_support' ] @@ -17,27 +17,28 @@ SUBDIRS = [ 'engine', 'game_launch', 'mainui', 'vgui_support' ]
top = '.'
def options(opt):
opt.load('xcompile compiler_cxx compiler_c')
if sys.platform == 'win32':
opt.load('msvc msvs')
grp = opt.add_option_group('Common options')
opt.add_option(
grp.add_option(
'--build-type', action='store', type='string', dest='BUILD_TYPE', default = None,
help = 'build type: debug, release or none(custom flags)')
opt.add_option(
grp.add_option(
'--dedicated', action = 'store_true', dest = 'DEDICATED', default = False,
help = 'build Xash Dedicated Server(XashDS)')
opt.add_option(
grp.add_option(
'--64bits', action = 'store_true', dest = 'ALLOW64', default = False,
help = 'allow targetting 64-bit engine')
opt.add_option(
grp.add_option(
'--win-style-install', action = 'store_true', dest = 'WIN_INSTALL', default = False,
help = 'install like Windows build, ignore prefix, useful for development')
opt.recurse(SUBDIRS)
opt.load('xcompile compiler_cxx compiler_c')
if sys.platform == 'win32':
opt.load('msvc msvs')
def configure(conf):
conf.start_msg('Build type')

Loading…
Cancel
Save