Skip to content

Commit cf3900d

Browse files
committed
wscript: force Android to follow library naming
1 parent 9dc5a94 commit cf3900d

4 files changed

Lines changed: 8 additions & 13 deletions

File tree

cl_dll/wscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def build(bld):
114114
if 'HAVE_STRLCAT=1' not in defines:
115115
source += bld.path.parent.ant_glob('external/openbsd/strlcat.c')
116116

117-
if bld.env.DEST_OS not in ['android', 'dos'] or bld.env.TERMUX:
117+
if bld.env.DEST_OS != 'dos' and not bld.env.ANDROID_APK:
118118
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_INSTALL_DIR)
119119
else:
120120
install_path = bld.env.PREFIX

dlls/wscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def build(bld):
4646
'../public'
4747
]
4848

49-
if bld.env.DEST_OS not in ['android', 'dos'] or bld.env.TERMUX:
49+
if bld.env.DEST_OS != 'dos' and not bld.env.ANDROID_APK:
5050
install_path = os.path.join(bld.env.GAMEDIR, bld.env.SERVER_INSTALL_DIR)
5151
else:
5252
install_path = bld.env.PREFIX

scripts/waifulib/library_naming.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,7 @@ def configure(conf):
183183
if conf.env.XASH_X86:
184184
buildarch = ''
185185

186-
if conf.env.XASH_ANDROID and not conf.env.XASH_TERMUX:
187-
# force disable for Android, as Android ports aren't distributed in normal way and doesn't follow library naming
188-
postfix = ''
189-
elif buildos != '' and buildarch != '':
186+
if buildos != '' and buildarch != '':
190187
postfix = '_%s_%s' % (buildos,buildarch)
191188
elif buildarch != '':
192189
postfix = '_%s' % buildarch

wscript

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ def options(opt):
5858
help = 'disable compilation abort on warning')
5959
grp.add_option('--enable-voicemgr', action = 'store_true', dest = 'USE_VOICEMGR', default = False,
6060
help = 'Enable VOICE MANAGER')
61+
grp.add_option('--enable-android-apk', action = 'store_true', dest = 'ANDROID_APK', default = False,
62+
help = 'Enable Android APK styled libraries deploy')
6163

6264
# a1ba: hidden option for CI
6365
grp.add_option('--enable-msvcdeps', action='store_true', dest='MSVCDEPS', default=False, help='')
@@ -274,13 +276,9 @@ def configure(conf):
274276
if conf.env.HLDEMO_BUILD and conf.env.OEM_BUILD:
275277
conf.fatal('Don\'t mix Demo and OEM builds!')
276278

277-
# force to use server library name
278-
if conf.env.DEST_OS == 'android' and not conf.env.TERMUX:
279-
conf.env.SERVER_LIBRARY_NAME = 'server' # can't be any other name, until specified
280-
else:
281-
# strip lib from pattern
282-
if conf.env.cxxshlib_PATTERN.startswith('lib'):
283-
conf.env.cxxshlib_PATTERN = conf.env.cxxshlib_PATTERN[3:]
279+
# strip lib from pattern
280+
if conf.env.cxxshlib_PATTERN.startswith('lib'):
281+
conf.env.cxxshlib_PATTERN = conf.env.cxxshlib_PATTERN[3:]
284282

285283
conf.load('library_naming')
286284
conf.add_subproject('game_shared dlls cl_dll')

0 commit comments

Comments
 (0)