2018-05-28 15:17:25 +00:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# encoding: utf-8
|
|
|
|
# a1batross, mittorn, 2018
|
|
|
|
|
|
|
|
from waflib import Logs
|
|
|
|
import os
|
2018-12-13 05:03:51 +00:00
|
|
|
import sys
|
2018-05-28 15:17:25 +00:00
|
|
|
|
|
|
|
top = '.'
|
|
|
|
|
|
|
|
def options(opt):
|
2021-01-07 19:24:16 +00:00
|
|
|
grp = opt.add_option_group('Game launcher options')
|
|
|
|
|
|
|
|
grp.add_option('--disable-menu-changegame', action = 'store_true', dest = 'DISABLE_MENU_CHANGEGAME', default = False,
|
|
|
|
help = 'disable changing the game from the menu [default: %default]')
|
2018-05-28 15:17:25 +00:00
|
|
|
|
|
|
|
def configure(conf):
|
2019-02-19 14:49:09 +00:00
|
|
|
if conf.env.DEST_OS == 'win32':
|
|
|
|
conf.load('winres')
|
2018-05-28 15:17:25 +00:00
|
|
|
|
2021-01-07 19:24:16 +00:00
|
|
|
conf.define_cond('XASH_DISABLE_MENU_CHANGEGAME', conf.options.DISABLE_MENU_CHANGEGAME)
|
|
|
|
|
2018-05-28 15:17:25 +00:00
|
|
|
def build(bld):
|
2022-09-10 17:05:21 +00:00
|
|
|
libs = ['sdk_includes']
|
2022-09-10 19:14:50 +00:00
|
|
|
source = ['game.cpp']
|
|
|
|
|
2018-05-28 15:17:25 +00:00
|
|
|
if bld.env.DEST_OS != 'win32':
|
|
|
|
libs += [ 'DL' ]
|
|
|
|
else:
|
2018-11-18 22:19:24 +00:00
|
|
|
libs += ['USER32', 'SHELL32']
|
2018-06-14 17:34:51 +00:00
|
|
|
source += ['game.rc']
|
2018-05-28 15:17:25 +00:00
|
|
|
|
2022-09-10 19:14:50 +00:00
|
|
|
bld(source = source,
|
2018-05-28 15:17:25 +00:00
|
|
|
target = 'xash3d', # hl.exe
|
2019-07-12 15:13:03 +00:00
|
|
|
features = 'c cxx cxxprogram',
|
2018-05-28 22:02:32 +00:00
|
|
|
use = libs,
|
2022-07-25 16:56:31 +00:00
|
|
|
rpath = '$ORIGIN',
|
2018-10-24 17:12:32 +00:00
|
|
|
install_path = bld.env.BINDIR,
|
|
|
|
subsystem = bld.env.MSVC_SUBSYSTEM
|
2018-05-28 15:17:25 +00:00
|
|
|
)
|