2018-05-28 17:17:25 +02:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# encoding: utf-8
|
|
|
|
# a1batross, mittorn, 2018
|
|
|
|
|
|
|
|
from waflib import Logs
|
|
|
|
import os
|
2018-12-13 06:03:51 +01:00
|
|
|
import sys
|
2018-05-28 17:17:25 +02:00
|
|
|
|
|
|
|
top = '.'
|
|
|
|
|
|
|
|
def options(opt):
|
2021-01-07 20:24:16 +01: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 17:17:25 +02:00
|
|
|
|
|
|
|
def configure(conf):
|
2019-02-19 15:49:09 +01:00
|
|
|
if conf.env.DEST_OS == 'win32':
|
|
|
|
conf.load('winres')
|
2018-05-28 17:17:25 +02:00
|
|
|
|
2021-01-07 20:24:16 +01:00
|
|
|
conf.define_cond('XASH_DISABLE_MENU_CHANGEGAME', conf.options.DISABLE_MENU_CHANGEGAME)
|
|
|
|
|
2018-05-28 17:17:25 +02:00
|
|
|
def build(bld):
|
2022-09-10 19:05:21 +02:00
|
|
|
libs = ['sdk_includes']
|
2022-09-10 21:14:50 +02:00
|
|
|
source = ['game.cpp']
|
2023-06-01 03:56:30 +02:00
|
|
|
defines = []
|
2022-09-10 21:14:50 +02:00
|
|
|
|
2018-05-28 17:17:25 +02:00
|
|
|
if bld.env.DEST_OS != 'win32':
|
|
|
|
libs += [ 'DL' ]
|
|
|
|
else:
|
2018-11-18 23:19:24 +01:00
|
|
|
libs += ['USER32', 'SHELL32']
|
2018-06-14 19:34:51 +02:00
|
|
|
source += ['game.rc']
|
2018-05-28 17:17:25 +02:00
|
|
|
|
2022-09-10 21:14:50 +02:00
|
|
|
bld(source = source,
|
2018-05-28 17:17:25 +02:00
|
|
|
target = 'xash3d', # hl.exe
|
2019-07-12 17:13:03 +02:00
|
|
|
features = 'c cxx cxxprogram',
|
2018-05-29 00:02:32 +02:00
|
|
|
use = libs,
|
2023-06-01 03:56:30 +02:00
|
|
|
defines = defines,
|
|
|
|
rpath = bld.env.DEFAULT_RPATH,
|
2018-10-24 19:12:32 +02:00
|
|
|
install_path = bld.env.BINDIR,
|
|
|
|
subsystem = bld.env.MSVC_SUBSYSTEM
|
2018-05-28 17:17:25 +02:00
|
|
|
)
|