From 3c55a584a30ca99a5897673fad23cf12d25879aa Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 9 Sep 2023 04:11:47 +0300 Subject: [PATCH] wscript: add special case for library naming to allow _i386 postfixes for old mods --- dlls/wscript | 2 +- mod_options.txt | 3 ++- scripts/waifulib/library_naming.py | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/wscript b/dlls/wscript index 8c31674..3577321 100644 --- a/dlls/wscript +++ b/dlls/wscript @@ -96,7 +96,7 @@ def build(bld): bld.shlib( source = source, - target = bld.env.SERVER_LIBRARY_NAME + bld.env.POSTFIX, + target = bld.env.SERVER_LIBRARY_NAME + bld.env.SERVER_POSTFIX, name = 'server', features = 'c cxx', includes = includes, diff --git a/mod_options.txt b/mod_options.txt index a6b19d5..3ccc37c 100644 --- a/mod_options.txt +++ b/mod_options.txt @@ -1,4 +1,5 @@ -CLIENT_WEAPONS=ON +SERVER_USES_OLD_I386_POSTFIX=ON # Add _i386 on linux-i386 builds +CLIENT_WEAPONS=ON # Use client-side weapon prediction GAMEDIR=thewastes # Gamedir path SERVER_INSTALL_DIR=dlls # Where put server dll CLIENT_INSTALL_DIR=cl_dlls # Where put client dll diff --git a/scripts/waifulib/library_naming.py b/scripts/waifulib/library_naming.py index 4369b3b..39c847d 100644 --- a/scripts/waifulib/library_naming.py +++ b/scripts/waifulib/library_naming.py @@ -73,6 +73,8 @@ def configure(conf): conf.multicheck(*tests, msg = '', mandatory = False, quiet = True) + append_i386 = False + # engine/common/build.c if conf.env.XASH_ANDROID: buildos = "android" @@ -107,6 +109,9 @@ def configure(conf): if conf.env.XASH_AMD64: buildarch = "amd64" elif conf.env.XASH_X86: + if conf.env.SERVER_USES_OLD_I386_POSTFIX and conf.env.XASH_LINUX: + append_i386 = True + if conf.env.XASH_WIN32 or conf.env.XASH_LINUX or conf.env.XASH_APPLE: buildarch = "" else: @@ -175,4 +180,9 @@ def configure(conf): else: conf.env.POSTFIX = '' + if append_i386: + conf.env.SERVER_POSTFIX = '_i386' + else: + conf.env.SERVER_POSTFIX = conf.env.POSTFIX + conf.end_msg(conf.env.POSTFIX)