work towards getting dummy-module generation working under WSL

This commit is contained in:
Eric Froemling 2024-03-13 21:42:23 -07:00
parent 7c45d16155
commit cf284e4755
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
2 changed files with 23 additions and 12 deletions

View File

@ -1,6 +1,6 @@
# Released under the MIT License. See LICENSE for details.
#
"""Utils for wrangling runs of the app.
"""Utils for wrangling running the app as part of a build.
Manages constructing or downloading it as well as running it.
"""
@ -141,14 +141,15 @@ def acquire_binary(assets: bool, purpose: str) -> str:
binary_build_command = ['make', 'cmake-binary']
binary_path = 'build/cmake/debug/staged/ballisticakit'
else:
# Ok; going with prefab headless stuff.
# Ok; going with a downloaded prefab headless build.
# Let the user know how to use their own binaries instead.
# Let the user know how to use their own built binaries instead
# if they prefer.
note = '\n' + textwrap.fill(
'NOTE: You can set env-var BA_APP_RUN_ENABLE_BUILDS=1'
f' to use locally-built binaries for {purpose}'
' instead of prefab ones. This will properly reflect any changes'
' you\'ve made to the C/C++ layer.',
f'NOTE: You can set env-var BA_APP_RUN_ENABLE_BUILDS=1'
f' to use locally-built binaries for {purpose} instead'
f' of prefab ones. This will properly reflect any changes'
f' you\'ve made to the C/C++ layer.',
80,
)
if assets:

View File

@ -652,12 +652,22 @@ def prefab_binary_path() -> None:
raise RuntimeError('Expected 1 arg.')
buildtype, buildmode = sys.argv[2].split('-')
platform = batools.build.get_current_prefab_platform()
if buildtype == 'gui':
binpath = 'ballisticakit'
elif buildtype == 'server':
binpath = 'dist/ballisticakit_headless'
if platform.startswith('windows_'):
if buildtype == 'gui':
binpath = 'BallisticaKit.exe'
elif buildtype == 'server':
binpath = 'dist/BallisticaKitHeadless.exe'
else:
raise ValueError(f"Invalid buildtype '{buildtype}'.")
else:
raise ValueError(f"Invalid buildtype '{buildtype}'.")
if buildtype == 'gui':
binpath = 'ballisticakit'
elif buildtype == 'server':
binpath = 'dist/ballisticakit_headless'
else:
raise ValueError(f"Invalid buildtype '{buildtype}'.")
print(
f'build/prefab/full/{platform}_{buildtype}/{buildmode}/{binpath}',
end='',