mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 06:53:18 +08:00
Tidying prefab stuff
This commit is contained in:
parent
33857179da
commit
101b9ebb76
@ -1,5 +1,6 @@
|
|||||||
### 1.6.4 (20367)
|
### 1.6.4 (20371)
|
||||||
- Some cleanups in the Favorites tab of the gather window.
|
- Some cleanups in the Favorites tab of the gather window.
|
||||||
|
- Reorganized prefab target names; some targets such as `prefab-debug` are now `prefab-gui-debug` (more consistent with the existing `prefab-server-debug` targets).
|
||||||
|
|
||||||
### 1.6.3 (20366)
|
### 1.6.3 (20366)
|
||||||
- Telnet access works again for gui builds without requiring a password (access must still be granted via the gui).
|
- Telnet access works again for gui builds without requiring a password (access must still be granted via the gui).
|
||||||
|
|||||||
6
Makefile
6
Makefile
@ -124,12 +124,6 @@ clean-list:
|
|||||||
|
|
||||||
# Prebuilt binaries for various platforms.
|
# Prebuilt binaries for various platforms.
|
||||||
|
|
||||||
# Shortcut for run prefab-gui-debug.
|
|
||||||
prefab-debug: prefab-gui-debug
|
|
||||||
|
|
||||||
# Shortcut for prefab-gui-release.
|
|
||||||
prefab-release: prefab-gui-release
|
|
||||||
|
|
||||||
# Assemble & run a gui debug build for this platform.
|
# Assemble & run a gui debug build for this platform.
|
||||||
prefab-gui-debug: prefab-gui-debug-build
|
prefab-gui-debug: prefab-gui-debug-build
|
||||||
${${shell tools/pcommand prefab_run_var gui-debug}}
|
${${shell tools/pcommand prefab_run_var gui-debug}}
|
||||||
|
|||||||
@ -460,14 +460,15 @@ def gen_fulltest_buildfile_linux() -> None:
|
|||||||
outfile.write('\n'.join(lines))
|
outfile.write('\n'.join(lines))
|
||||||
|
|
||||||
|
|
||||||
def get_current_prefab_platform(wsl_gives_windows: bool = True) -> str:
|
def get_current_build_platform(wsl_gives_windows: bool = True) -> str:
|
||||||
"""Get the name of the running platform.
|
"""Get an identifier for the platform running this build.
|
||||||
|
|
||||||
Throws a RuntimeError on unsupported platforms.
|
Throws a RuntimeError on unsupported platforms.
|
||||||
"""
|
"""
|
||||||
import platform
|
import platform
|
||||||
system = platform.system()
|
system = platform.system()
|
||||||
machine = platform.machine()
|
machine = platform.machine()
|
||||||
|
|
||||||
if system == 'Darwin':
|
if system == 'Darwin':
|
||||||
if machine == 'x86_64':
|
if machine == 'x86_64':
|
||||||
return 'mac_x86_64'
|
return 'mac_x86_64'
|
||||||
|
|||||||
@ -475,13 +475,13 @@ def checkenv() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def ensure_build_platform() -> None:
|
def ensure_build_platform() -> None:
|
||||||
"""Ensure we are running on a particular prefab platform."""
|
"""Ensure we are building on a particular platform."""
|
||||||
import batools.build
|
import batools.build
|
||||||
from efro.error import CleanError
|
from efro.error import CleanError
|
||||||
if len(sys.argv) != 3:
|
if len(sys.argv) != 3:
|
||||||
raise CleanError('Expected 1 platform name arg.')
|
raise CleanError('Expected 1 platform name arg.')
|
||||||
needed = sys.argv[2]
|
needed = sys.argv[2]
|
||||||
current = batools.build.get_current_prefab_platform()
|
current = batools.build.get_current_build_platform()
|
||||||
if current != needed:
|
if current != needed:
|
||||||
raise CleanError(
|
raise CleanError(
|
||||||
f'Incorrect platform: we are {current}, this requires {needed}.')
|
f'Incorrect platform: we are {current}, this requires {needed}.')
|
||||||
@ -493,7 +493,7 @@ def prefab_run_var() -> None:
|
|||||||
if len(sys.argv) != 3:
|
if len(sys.argv) != 3:
|
||||||
raise RuntimeError('Expected 1 arg.')
|
raise RuntimeError('Expected 1 arg.')
|
||||||
base = sys.argv[2].replace('-', '_').upper()
|
base = sys.argv[2].replace('-', '_').upper()
|
||||||
platform = batools.build.get_current_prefab_platform().upper()
|
platform = batools.build.get_current_build_platform().upper()
|
||||||
print(f'RUN_PREFAB_{platform}_{base}', end='')
|
print(f'RUN_PREFAB_{platform}_{base}', end='')
|
||||||
|
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ def make_prefab() -> None:
|
|||||||
if len(sys.argv) != 3:
|
if len(sys.argv) != 3:
|
||||||
raise RuntimeError('Expected one argument')
|
raise RuntimeError('Expected one argument')
|
||||||
target = batools.build.PrefabTarget(sys.argv[2])
|
target = batools.build.PrefabTarget(sys.argv[2])
|
||||||
platform = batools.build.get_current_prefab_platform()
|
platform = batools.build.get_current_build_platform()
|
||||||
|
|
||||||
# We use dashes instead of underscores in target names.
|
# We use dashes instead of underscores in target names.
|
||||||
platform = platform.replace('_', '-')
|
platform = platform.replace('_', '-')
|
||||||
@ -663,7 +663,7 @@ def update_cmake_prefab_lib() -> None:
|
|||||||
raise CleanError(f'Invalid buildtype: {buildtype}')
|
raise CleanError(f'Invalid buildtype: {buildtype}')
|
||||||
if mode not in {'debug', 'release'}:
|
if mode not in {'debug', 'release'}:
|
||||||
raise CleanError(f'Invalid mode: {mode}')
|
raise CleanError(f'Invalid mode: {mode}')
|
||||||
platform = batools.build.get_current_prefab_platform(
|
platform = batools.build.get_current_build_platform(
|
||||||
wsl_gives_windows=False)
|
wsl_gives_windows=False)
|
||||||
suffix = '_server' if buildtype == 'server' else '_gui'
|
suffix = '_server' if buildtype == 'server' else '_gui'
|
||||||
target = (f'build/prefab/lib/{platform}{suffix}/{mode}/'
|
target = (f'build/prefab/lib/{platform}{suffix}/{mode}/'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user