diff --git a/engine/wscript b/engine/wscript index db158206..213a88ef 100644 --- a/engine/wscript +++ b/engine/wscript @@ -13,13 +13,19 @@ def options(opt): 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( + '--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( + '--stdin-input', action = 'store_true', dest = 'USE_SELECT', default = None, + help = 'enable console input from stdin (default for dedicated)') + def configure(conf): # check for dedicated server build if conf.options.DEDICATED: if(conf.env.DEST_OS == 'linux'): conf.check_cc( lib='rt' ) - conf.env.append_unique('DEFINES', 'SINGLE_BINARY') conf.env.append_unique('DEFINES', 'XASH_DEDICATED') elif conf.env.DEST_OS2 == 'android': # Android doesn't need SDL2 conf.check_cc(lib='log') @@ -29,6 +35,17 @@ def configure(conf): conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated') conf.env.append_unique('DEFINES', 'XASH_SDL') + if conf.options.SINGLE_BINARY == None: + conf.options.SINGLE_BINARY = conf.options.DEDICATED # We don't need game launcher on dedicated + conf.env.SINGLE_BINARY = conf.options.SINGLE_BINARY + if conf.options.SINGLE_BINARY: + conf.env.append_unique('DEFINES', 'SINGLE_BINARY') + + if conf.options.USE_SELECT == None: + conf.options.USE_SELECT = conf.options.DEDICATED + if conf.options.USE_SELECT: + conf.env.append_unique('DEFINES', 'XASH_USE_SELECT') + if conf.options.SUPPORT_BSP2_FORMAT: conf.env.append_unique('DEFINES', 'SUPPORT_BSP2_FORMAT') diff --git a/wscript b/wscript index 78003a23..09070f1b 100644 --- a/wscript +++ b/wscript @@ -100,8 +100,6 @@ def configure(conf): linker_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) conf.env.DEDICATED = conf.options.DEDICATED - conf.env.SINGLE_BINARY = conf.options.DEDICATED # We don't need game launcher on dedicated - if conf.env.DEST_OS == 'linux': conf.check_cc( lib='dl' )