Browse Source

wscript: move options to subgroups, reorder option plugins loading

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

13
engine/wscript

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

9
scripts/waflib/sdl2.py

@ -14,13 +14,14 @@
import os import os
def options(opt): 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, '--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', '--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): def my_dirname(path):
# really dumb, will not work with /path/framework//, but still enough # 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
top = '.' top = '.'
def options(opt): def options(opt):
opt.add_option( grp = opt.add_option_group('VGUI options')
grp.add_option(
'--vgui', action = 'store', type='string', dest = 'VGUI_DEV', '--vgui', action = 'store', type='string', dest = 'VGUI_DEV',
help = 'path to vgui-dev repo', default='' ) help = 'path to vgui-dev repo', default='' )
opt.add_option( grp.add_option(
'--disable-vgui', action = 'store_true', dest = 'NO_VGUI', '--disable-vgui', action = 'store_true', dest = 'NO_VGUI',
help = 'disable vgui_support', default=False ) help = 'disable vgui_support', default=False )
opt.add_option( grp.add_option(
'--skip-vgui-sanity-check', action = 'store_false', dest = 'VGUI_SANITY_CHECK', '--skip-vgui-sanity-check', action = 'store_false', dest = 'VGUI_SANITY_CHECK',
help = 'Skip checking VGUI sanity', default=True ) help = 'skip checking VGUI sanity', default=True )
# stub
return return
def configure(conf): def configure(conf):

15
wscript

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

Loading…
Cancel
Save