halflife-thewastes-sdk/cl_dll/wscript
2023-09-06 03:27:45 +03:00

146 lines
3.9 KiB
Python

#! /usr/bin/env python
# encoding: utf-8
# a1batross, mittorn, 2018
from waflib import Utils
import os
def options(opt):
grp = opt.add_option_group('Client options')
grp.add_option('--enable-vgui', action = 'store_true', dest = 'USE_VGUI', default = False,
help = 'Enable VGUI1')
grp.add_option('--enable-vgui2', action = 'store_true', dest = 'USE_VGUI2', default = False,
help = 'Enable VGUI2. UNDONE')
grp.add_option('--enable-novgui-motd', action = 'store_true', dest = 'USE_NOVGUI_MOTD', default = False,
help = 'Prefer non-VGUI MOTD when USE_VGUI is enabled')
grp.add_option('--enable-novgui-scoreboard', action = 'store_true', dest = 'USE_NOVGUI_SCOREBOARD', default = False,
help = 'Prefer non-VGUI Scoreboard when USE_VGUI is enabled')
grp.add_option('--disable-goldsrc-support', action = 'store_false', dest = 'GOLDSOURCE_SUPPORT',
default=True, help = 'disable GoldSource compatibility')
opt.load('vgui')
def configure(conf):
conf.env.USE_VGUI = conf.options.USE_VGUI
conf.env.USE_NOVGUI_MOTD = conf.options.USE_NOVGUI_MOTD
conf.env.USE_NOVGUI_SCOREBOARD = conf.options.USE_NOVGUI_SCOREBOARD
conf.env.USE_VOICEMGR = conf.options.USE_VOICEMGR
conf.env.GOLDSOURCE_SUPPORT = conf.options.GOLDSOURCE_SUPPORT
if conf.env.USE_VGUI:
conf.load('vgui')
if not conf.check_vgui():
conf.fatal('VGUI was enabled but VGUI cannot be used')
def build(bld):
libs = ['VGUI']
defines = ['CLIENT_DLL']
includes = ['.',
'../dlls',
'../common',
'../engine',
'../pm_shared',
'../game_shared',
'../public']
source = [
'./ev_thewastes.cpp',
'./thewastes/hl_baseentity.cpp',
'./thewastes/hl_events.cpp',
'./thewastes/hl_objects.cpp',
'./thewastes/hl_weapons.cpp',
'../common/interface.cpp',
'../dlls/thewastes.cpp',
'../dlls/wpn_shared/tw_akimbos.cpp',
'../dlls/wpn_shared/tw_automatics.cpp',
'../dlls/wpn_shared/tw_explosives.cpp',
'../dlls/wpn_shared/tw_melee.cpp',
'../dlls/wpn_shared/tw_shotguns.cpp',
'../dlls/wpn_shared/tw_sidearms.cpp',
'../game_shared/vgui_scrollbar2.cpp',
'../game_shared/vgui_slider2.cpp',
'../game_shared/voice_banmgr.cpp',
'../game_shared/voice_status.cpp',
'../game_shared/voice_vgui_tweakdlg.cpp',
'./ammo.cpp',
'./ammo_secondary.cpp',
'./ammohistory.cpp',
'./cdll_int.cpp',
'./com_weapons.cpp',
'./death.cpp',
'./demo.cpp',
'./entity.cpp',
'./env_fog.cpp',
'./ev_common.cpp',
'./events.cpp',
'./flashlight.cpp',
'./GameStudioModelRenderer.cpp',
'./geiger.cpp',
'./health.cpp',
'./hud.cpp',
'./hud_msg.cpp',
'./hud_redraw.cpp',
'./hud_servers.cpp',
'./hud_spectator.cpp',
'./hud_update.cpp',
'./in_camera.cpp',
'./input.cpp',
'./inputw32.cpp',
'./menu.cpp',
'./message.cpp',
'./overview.cpp',
'./parsebsp.cpp',
'./ParseBspEnt.cpp',
'./parsemsg.cpp',
'./ParticleBase.cpp',
'../pm_shared/pm_debug.c',
'../pm_shared/pm_math.c',
'../pm_shared/pm_shared.c',
'./saytext.cpp',
'./status_icons.cpp',
'./statusbar.cpp',
'./studio_util.cpp',
'./studioevent.cpp',
'./StudioModelRenderer.cpp',
'./text_message.cpp',
'./thewastes_hud.cpp',
'./train.cpp',
'./tri.cpp',
'./twm.cpp',
'./util.cpp',
'../game_shared/vgui_checkbutton2.cpp',
'./vgui_ConsolePanel.cpp',
'./vgui_ControlConfigPanel.cpp',
'./vgui_CustomObjects.cpp',
'../game_shared/vgui_grid.cpp',
'../game_shared/vgui_helpers.cpp',
'./vgui_int.cpp',
'./vgui_ItemSelection.cpp',
'../game_shared/vgui_listbox.cpp',
'../game_shared/vgui_loadtga.cpp',
'./vgui_MOTDWindow.cpp',
'./vgui_SchemeManager.cpp',
'./vgui_ScorePanel.cpp',
'./vgui_ServerBrowser.cpp',
'./vgui_teammenu.cpp',
'./vgui_TheWastesViewport.cpp',
'./view.cpp',
]
if bld.env.DEST_OS not in ['android', 'dos']:
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_INSTALL_DIR)
else:
install_path = bld.env.PREFIX
bld.shlib(
source = source,
target = 'client' + bld.env.POSTFIX,
name = 'client',
features = 'c cxx',
includes = includes,
defines = defines,
use = libs,
install_path = install_path,
subsystem = bld.env.MSVC_SUBSYSTEM,
idx = bld.get_taskgen_count()
)