#! /usr/bin/env python # encoding: utf-8 # a1batross, mittorn, 2018 # Edited by Roy for HL:Invasion # Warning: Completely UNTESTED! # Warning: Won't work properly as this mod requires TRUE VGUI! (If you can edit it in - you're more than welcome!) from waflib import Utils import os def options(opt): # stub return def configure(conf): if conf.env.DEST_OS == 'win32': conf.check_cxx(lib='user32') if conf.env.GOLDSRC: if conf.env.DEST_OS == 'win32': conf.check_cxx(lib='winmm') else: conf.check_cc(lib='dl') def build(bld): source = bld.path.parent.ant_glob([ 'pm_shared/*.c' ]) source += bld.path.ant_glob([ 'hl/*.cpp' ]) source += bld.path.parent.ant_glob([ 'dlls/glock.cpp' ]) source += [ 'clientbriquet.cpp', 'clientfog.cpp', 'clientlflammes.cpp', 'ev_hldm.cpp', 'GameStudioModelRenderer.cpp', 'hl/hl_baseentity.cpp', 'hl/hl_events.cpp', 'hl/hl_objects.cpp', 'hl/hl_weapons.cpp', 'hud_tank.cpp', 'hudradio.cpp', 'hudrpg.cpp', 'hudzoom.cpp', 'lensflare.cpp', 'nvg.cpp', 'particules.cpp', 'studio_util.cpp', 'StudioModelRenderer.cpp', 'ammo.cpp', 'ammo_secondary.cpp', 'ammohistory.cpp', 'battery.cpp', 'cdll_int.cpp', 'com_weapons.cpp', 'death.cpp', 'demo.cpp', 'entity.cpp', 'ev_common.cpp', 'events.cpp', 'flashlight.cpp', 'geiger.cpp', 'health.cpp', 'hud.cpp', 'hud_msg.cpp', 'hud_redraw.cpp', 'hud_spectator.cpp', 'hud_update.cpp', 'in_camera.cpp', 'input.cpp', 'input_goldsource.cpp', 'input_mouse.cpp', 'input_xash3d.cpp', 'menu.cpp', 'message.cpp', 'overview.cpp', 'parsemsg.cpp', 'parsemsg.h', 'saytext.cpp', 'status_icons.cpp', 'statusbar.cpp', 'text_message.cpp', 'train.cpp', 'tri.cpp', 'util.cpp', 'view.cpp' ] includes = [ '.', 'hl/', '../dlls', '../common', '../engine', '../pm_shared', '../game_shared', '../public', '../utils/false_vgui/include' ] defines = ['CLIENT_DLL'] if bld.env.GOLDSRC: defines += ['GOLDSOURCE_SUPPORT'] libs = [] if bld.env.DEST_OS == 'win32': libs += ["USER32"] if bld.env.GOLDSRC: if bld.env.DEST_OS == 'win32': libs += ["WINMM"] else: libs += ['DL'] if bld.env.DEST_OS not in ['android', 'dos']: install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_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() )