From 5378494199209712df836fd3c71be7587ca946cd Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 1 Feb 2025 18:18:43 +0300 Subject: [PATCH] wscript: enable main() function for Android port, which was forgotten after last refactoring --- engine/wscript | 7 ++++++- wscript | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/engine/wscript b/engine/wscript index 732de0a6..7dd829f0 100644 --- a/engine/wscript +++ b/engine/wscript @@ -194,7 +194,12 @@ def build(bld): source += bld.path.ant_glob('client/**/*.c') libs += ['bzip2', 'MultiEmulator', 'opus', 'opusfile', 'vorbis', 'vorbisfile'] - if not bld.env.LAUNCHER and bld.env.DEST_OS != 'android': + # Android port is linked differently + if bld.env.DEST_OS == 'android': + f = bld.shlib + install_path = bld.env.LIBDIR + defines += ['XASH_ENABLE_MAIN=1', 'XASH_SDLMAIN=1'] + elif not bld.env.LAUNCHER: f = bld.program install_path = bld.env.BINDIR defines += ['XASH_ENABLE_MAIN=1'] diff --git a/wscript b/wscript index 4630f38c..35d6671a 100644 --- a/wscript +++ b/wscript @@ -239,14 +239,12 @@ def configure(conf): conf.options.GL4ES = True conf.options.GLES3COMPAT = True conf.options.GL = False - conf.define('XASH_SDLMAIN', 1) elif conf.env.MAGX: conf.options.SDL12 = True conf.options.NO_VGUI = True conf.options.GL = False conf.options.LOW_MEMORY = 1 conf.options.NO_ASYNC_RESOLVE = True - conf.define('XASH_SDLMAIN', 1) enforce_pic = False elif conf.env.DEST_OS == 'nswitch': conf.options.NO_VGUI = True