wscript: remove DEST_OS2

This commit is contained in:
Alibek Omarov 2019-09-19 17:07:41 +03:00
parent cd0f7af38a
commit b91e97ca53
3 changed files with 21 additions and 23 deletions

View File

@ -9,12 +9,10 @@ top = '.'
def options(opt):
grp = opt.add_option_group('Engine options')
grp.add_option(
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
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(
'--stdin-input', action = 'store_true', dest = 'USE_SELECT', default = None,
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')
@ -22,13 +20,12 @@ def options(opt):
def configure(conf):
# check for dedicated server build
if conf.options.DEDICATED:
if(conf.env.DEST_OS == 'linux'):
if conf.env.DEST_OS == 'linux':
conf.check_cc( lib='rt' )
conf.env.append_unique('DEFINES', 'XASH_DEDICATED')
elif conf.env.DEST_OS2 == 'android': # Android doesn't need SDL2
conf.check_cc(lib='android')
conf.check_cc(lib='log')
conf.check_cc(lib='EGL')
conf.env.append_unique('DEFINES', 'XASH_DEDICATED=1')
elif conf.env.DEST_OS == 'android': # Android doesn't need SDL2
for i in ['android', 'log', 'EGL']:
conf.check_cc(lib = i)
else:
conf.load('sdl2')
if not conf.env.HAVE_SDL2:
@ -40,6 +37,7 @@ def configure(conf):
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')
@ -77,9 +75,9 @@ def build(bld):
libs.append('SDL2')
source += bld.path.ant_glob(['platform/sdl/*.c'])
if bld.env.DEST_OS2 == 'android':
if bld.env.DEST_OS == 'android':
libs += ['LOG', 'EGL', 'ANDROID']
source += bld.path.ant_glob(['platform/android/*.cpp', 'platform/android/*.c'])
source += bld.path.ant_glob(['platform/android/*.cpp', 'platform/android/*.c', 'platform/linux/*.c'])
# add client files
if not bld.env.DEDICATED:
@ -101,8 +99,7 @@ def build(bld):
install_path = bld.env.LIBDIR
features = 'c cshlib'
bld(
source = source,
bld(source = source,
target = 'xash',
features = features,
includes = includes,

2
mainui

@ -1 +1 @@
Subproject commit c3095f477ff4ecfd8bc1f803c6d9e6e63ba32926
Subproject commit 59d65fdf60b088846bcd01de97481724ac40e8cb

17
wscript
View File

@ -98,7 +98,7 @@ def configure(conf):
conf.env.append_unique('CXXFLAGS_cxxstlib', '-fPIC')
# modify options dictionary early
if conf.env.DEST_OS2 == 'android':
if conf.env.DEST_OS == 'android':
conf.options.ALLOW64 = True # skip pointer length check
conf.options.NO_VGUI = True # skip vgui
conf.options.NANOGL = True
@ -115,7 +115,7 @@ def configure(conf):
conf.env.BIT32_ALLOW64 = True
conf.env.BIT32_MANDATORY = not conf.env.BIT32_ALLOW64
conf.load('force_32bit')
if conf.env.DEST_OS2 != 'android' and not conf.options.DEDICATED:
if conf.env.DEST_OS != 'android' and not conf.options.DEDICATED:
conf.load('sdl2')
linker_flags = {
@ -193,8 +193,10 @@ def configure(conf):
conf.check_cc( lib='dl' )
if conf.env.DEST_OS != 'win32':
if conf.env.DEST_OS2 != 'android':
conf.check_cc( lib='m' ) # HACK: already added in xcompile!
if not conf.env.LIB_M: # HACK: already added in xcompile!
conf.check_cc( lib='m' )
if conf.env.DEST_OS != 'android': # Android has pthread directly in libc
conf.check_cc( lib='pthread' )
else:
# Common Win32 libraries
@ -212,8 +214,7 @@ def configure(conf):
# indicate if we are packaging for Linux/BSD
if(not conf.options.WIN_INSTALL and
conf.env.DEST_OS not in ['win32', 'darwin'] and
conf.env.DEST_OS2 not in ['android']):
conf.env.DEST_OS not in ['win32', 'darwin', 'android']):
conf.env.LIBDIR = conf.env.BINDIR = '${PREFIX}/lib/xash3d'
else:
conf.env.LIBDIR = conf.env.BINDIR = conf.env.PREFIX
@ -224,7 +225,7 @@ def configure(conf):
if conf.env.SINGLE_BINARY and i.singlebin:
continue
if conf.env.DEST_OS2 == 'android' and i.singlebin:
if conf.env.DEST_OS == 'android' and i.singlebin:
continue
if conf.env.DEDICATED and i.dedicated:
@ -237,7 +238,7 @@ def build(bld):
if bld.env.SINGLE_BINARY and i.singlebin:
continue
if bld.env.DEST_OS2 == 'android' and i.singlebin:
if bld.env.DEST_OS == 'android' and i.singlebin:
continue
if bld.env.DEDICATED and i.dedicated: