2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-12-03 15:30:21 +01:00

scripts: waifulib: library_naming: make file true_postfix.txt during configure with real platform info

This commit is contained in:
Alibek Omarov 2024-11-18 21:16:19 +03:00
parent 82f85a4a6e
commit fab8cfe7f4

View File

@ -77,8 +77,12 @@ def configure(conf):
# engine/common/build.c
if conf.env.XASH_ANDROID:
buildos = "android"
elif conf.env.XASH_WIN32 or conf.env.XASH_LINUX or conf.env.XASH_APPLE:
buildos = "" # no prefix for default OS
elif conf.env.XASH_WIN32:
buildos = "win32"
elif conf.env.XASH_LINUX:
buildos = "linux"
elif conf.env.XASH_APPLE:
buildos = "apple"
elif conf.env.XASH_FREEBSD:
buildos = "freebsd"
elif conf.env.XASH_NETBSD:
@ -110,10 +114,7 @@ def configure(conf):
if conf.env.XASH_AMD64:
buildarch = "amd64"
elif conf.env.XASH_X86:
if conf.env.XASH_WIN32 or conf.env.XASH_LINUX or conf.env.XASH_APPLE:
buildarch = ""
else:
buildarch = "i386"
buildarch = "i386"
elif conf.env.XASH_ARM and conf.env.XASH_64BIT:
buildarch = "arm64"
elif conf.env.XASH_ARM:
@ -166,6 +167,14 @@ def configure(conf):
raise conf.fatal("Place your architecture name in build.h and library_naming.py!\n"
"If this is a mistake, try to fix conditions above and report a bug")
node = conf.bldnode.make_node('true_postfix.txt')
node.write('%s-%s' % (buildos, buildarch))
if not conf.env.XASH_ANDROID and (conf.env.XASH_WIN32 or conf.env.XASH_LINUX or conf.env.XASH_APPLE):
buildos = ''
if conf.env.XASH_X86:
buildarch = ''
conf.env.revert()
if buildos == 'android':