mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: wscript: drop unfinished work on curl
This commit is contained in:
@@ -26,15 +26,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
'''
|
||||
|
||||
CURL_CHECK_FRAGMENT='''
|
||||
#include <curl/curl.h>
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
CURL *easy = curl_easy_init();
|
||||
return 0;
|
||||
}
|
||||
'''
|
||||
|
||||
frameworks = ['Foundation', 'UIKit', 'QuartzCore', 'GameController', 'SystemConfiguration', 'CFNetwork', 'AVFoundation', 'CoreGraphics']
|
||||
|
||||
@TaskGen.extension('.m')
|
||||
@@ -65,9 +56,6 @@ def options(opt):
|
||||
grp.add_option('--enable-ffmpeg-dlopen', action = 'store_true', dest = 'FFMPEG_DLOPEN', default = False,
|
||||
help = 'load ffmpeg libraries in runtime [default: %(default)s]')
|
||||
|
||||
grp.add_option('--disable-curl', action = 'store_false', dest = 'CURL', default = False,
|
||||
help = 'enable curl-based HTTP downloader [default: %(default)s]')
|
||||
|
||||
opt.load('sdl2')
|
||||
|
||||
def find_sdl(conf):
|
||||
@@ -162,19 +150,6 @@ def configure(conf):
|
||||
conf.define('HAVE_FFMPEG', True)
|
||||
conf.define_cond('XASH_FFMPEG_DLOPEN', conf.options.FFMPEG_DLOPEN)
|
||||
|
||||
if conf.options.CURL:
|
||||
pkgconf_args = '--cflags --libs'
|
||||
features = 'c cprogram'
|
||||
|
||||
# TODO: when dlopen curl is implemented, we might not need this check
|
||||
# as we can safely bundle curl headers as curl never breaks API/ABI
|
||||
conf.check_cfg(package='libcurl', uselib_store='CURL', args=pkgconf_args)
|
||||
|
||||
conf.check(features=features, fragment=CURL_CHECK_FRAGMENT, use='CURL', msg='Checking for curl sanity')
|
||||
|
||||
conf.env.CURL=True
|
||||
conf.define('HAVE_CURL', True)
|
||||
|
||||
conf.define_cond('XASH_STATIC_LIBS', conf.env.STATIC_LINKING)
|
||||
conf.define_cond('XASH_CUSTOM_SWAP', conf.options.CUSTOM_SWAP)
|
||||
conf.define_cond('PSAPI_VERSION', conf.env.DEST_OS == 'win32') # will be defined as 1
|
||||
@@ -190,7 +165,7 @@ def build(bld):
|
||||
includes = ['server', 'client', 'client/vgui', 'common/soundlib', 'platform']
|
||||
|
||||
# basic build: dedicated only
|
||||
source = bld.path.ant_glob(['common/*.c', 'common/imagelib/*.c', 'common/soundlib/*.c', 'server/*.c'])
|
||||
source = bld.path.ant_glob(['common/*.c', 'common/imagelib/*.c', 'common/soundlib/*.c', 'server/*.c', 'common/http/*.c'])
|
||||
|
||||
# include platform-specific sources, this shall not fail if directory doesn't exist
|
||||
source += bld.path.ant_glob('platform/%s/*.c' % bld.env.DEST_OS)
|
||||
@@ -214,12 +189,6 @@ def build(bld):
|
||||
if bld.get_define('XASH_STATIC_LIBS'):
|
||||
source += ['platform/misc/lib_static.c']
|
||||
|
||||
if bld.get_define('HAVE_CURL'):
|
||||
source += ['common/http/net_http_curl.c']
|
||||
libs += ['CURL']
|
||||
else:
|
||||
source += ['common/http/net_http_xash.c']
|
||||
|
||||
if bld.env.DEST_OS == 'win32':
|
||||
libs += ['USER32', 'SHELL32', 'GDI32', 'ADVAPI32', 'DBGHELP', 'PSAPI', 'WS2_32']
|
||||
elif bld.env.DEST_OS == 'nswitch':
|
||||
|
||||
Reference in New Issue
Block a user