From fa1df9315097b936ed4ec5878de4b1503d07e3cd Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 10:46:33 -0700 Subject: [PATCH] more prefab/wsl cleanup --- .efrocachemap | 56 +++++++++++++-------------- CHANGELOG.md | 2 +- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/shared/ballistica.cc | 2 +- tools/batools/pcommands.py | 60 +++++++++++++++-------------- tools/batools/pcommands2.py | 28 ++++++++++++++ tools/pcommand | 3 +- 7 files changed, 92 insertions(+), 61 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index eebd7d12..8b203d9e 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4061,26 +4061,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "e02d676254f37e6a6bfc2d992832edc7", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "b6aae173f0657f98481ad513d9d4cbd5", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "35fb45c3895174231254aa97ff2d43e5", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "f7bb6bcc1884a692e03f52c58d83bc89", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "42b848cb83e3fee4a56b0f24901c1423", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "0af09f79ae95b7d31229e62ef925c283", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "1babb2d89a351a48c1318515b23fb256", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "0ed1b2deda022680096fcc185437b2f5", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "e3b96fd440e737d7ee9588aa5517a270", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "345a3346b1b3b28932b9fc3b6802ba58", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "c4cfd2482416cf9a71a3dcb283dc06cc", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "af6c9def782a7be317a247b0294d2577", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "6537ce8b82230275d3baa495f0b087e2", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "18c6239b2284547be3f354a9ab74f65c", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "a53872e247c56e1d297c8fc227ad38e9", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "38607776459217d77b60417a5a9a5fbe", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "fb23a676c5e53441a101499801c5e0ee", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3bf6afb5a18a95b7a7d7286c6dcc106c", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "8b0d174baa273f6d7921e067fae3316a", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "2f37b65edd1c4eca4c2dd32506977696", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "f86cf722ec86ba34c8873232610ed6a4", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "f05d3419f7b53f69e7f86ed21ee0f6a0", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "bd10264cd21dde10c33b65216212897f", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "9285d2a9c610e53634da874b98c4f59e", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "aac94860b46ff290e7712899637cfcfc", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e5db667cca97477bdc53745597ce96c0", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "a691fe1725d4e3e8659d4a8910767a6b", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "757d3686278016f0a8c14ca32351869f", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "7882e6a67274134121269297adba650c", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e0aad2e5e0429f267c68e1adc01f4de2", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "2949c67081ab95fa6b3c200b6e8dac90", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "7f3147c3eb2d6b47d060cec361333609", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "8e651eb94e21d37c38831363d2bf06d3", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "60e4941df0d4d6f05f4f5d4497f5b31f", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "906d81ef963eb5817f9a09dacdb42496", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c4908dc4c7bff0f87e2469b145e9fe64", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "af603ec4c7548c309c560aa78d80209c", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "e084002e7c8dcced5e671535d819423b", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "d20a89662c0d976cb5c3559b553913b7", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "1fe7fa727099fcf24eaf260d74cb3ae4", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "403d99152d4610ad11ea524772a84ca3", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "ce022601dc7ce016fe11ed5092534672", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "e45a094dba08254cf1ba50bf435f5e8d", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "ea38b10f23c2791d92696f17b53f8fa7", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "5ee3cbfcce6b6cd9bdaf8239c3b78d0d", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "aa3b5bd935d8593611f13108af5d9633", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "1104c4f10bbe25539c1b4e38ba041375", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "aa0c1c558389babcaa2166ef9ae4bad0", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "80963fe5c501c728c16bb9fccb2b59ab", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "ba75fa26bde66b7ee80cf8f840ff1806", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "847bf3a0acffb54856509c53e18c1656", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "480b7d544c3c0b642bcf5aae73641cfe", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "f1ecc6a4e2e034fb5c6b483b798cc68d", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "3cfcded3e0b07261ffb5b6828993c89b", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "9cc7af3fc84382412f03b4482e4c847e", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "e64ca3bc0adc45804fb6a558dc925a36", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/CHANGELOG.md b/CHANGELOG.md index ef81158d..1a2bec12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.33 (build 21785, api 8, 2024-03-14) +### 1.7.33 (build 21787, api 8, 2024-03-14) - Stress test input-devices are now a bit smarter; they won't press any buttons while UIs are up (this could cause lots of chaos if it happened). - Added a 'Show Demos When Idle' option in advanced settings. If enabled, the diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 9662b7b8..688b37c3 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21785 +TARGET_BALLISTICA_BUILD = 21787 TARGET_BALLISTICA_VERSION = '1.7.33' diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 2a4c53ad..62fb9a39 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21785; +const int kEngineBuildNumber = 21787; const char* kEngineVersion = "1.7.33"; const int kEngineApiVersion = 8; diff --git a/tools/batools/pcommands.py b/tools/batools/pcommands.py index 678647ed..79add57c 100644 --- a/tools/batools/pcommands.py +++ b/tools/batools/pcommands.py @@ -487,34 +487,6 @@ def efrocache_get() -> None: pcommand.clientprint(output) -def get_modern_make() -> None: - """Print name of a modern make command.""" - import platform - import subprocess - - pcommand.disallow_in_batch() - - # Mac gnu make is outdated (due to newer versions using GPL3 I believe). - # so let's return 'gmake' there which will point to homebrew make which - # should be up to date. - if platform.system() == 'Darwin': - if ( - subprocess.run( - ['which', 'gmake'], check=False, capture_output=True - ).returncode - != 0 - ): - print( - 'WARNING: this requires gmake (mac system make is too old).' - " Install it with 'brew install make'", - file=sys.stderr, - flush=True, - ) - print('gmake') - else: - print('make') - - def warm_start_asset_build() -> None: """Prep asset builds to run faster.""" import os @@ -608,6 +580,24 @@ def checkenv() -> None: batools.build.checkenv() +def prefab_platform() -> None: + """Print the current prefab-platform value.""" + from efro.error import CleanError + + from batools.build import PrefabPlatform + + # Platform determination uses env vars; won't work in batch. + pcommand.disallow_in_batch() + + args = pcommand.get_args() + if len(args) != 0: + raise CleanError('No arguments expected.') + + current = PrefabPlatform.get_current() + + print(current.value, end='') + + def ensure_prefab_platform() -> None: """Ensure we are running on a particular prefab platform. @@ -620,9 +610,15 @@ def ensure_prefab_platform() -> None: from batools.build import PrefabPlatform + # Platform determination uses env vars; won't work in batch. + pcommand.disallow_in_batch() + args = pcommand.get_args() if len(args) != 1: - raise CleanError('Expected 1 platform name arg.') + options = ', '.join(t.value for t in PrefabPlatform) + raise CleanError( + f'Expected 1 PrefabPlatform arg. Options are {options}.' + ) needed = PrefabPlatform(args[0]) current = PrefabPlatform.get_current() if current is not needed: @@ -636,6 +632,9 @@ def prefab_run_var() -> None: """Print the current platform prefab run target var.""" from batools.build import PrefabPlatform + # Platform determination uses env vars; won't work in batch. + pcommand.disallow_in_batch() + args = pcommand.get_args() if len(args) != 1: raise RuntimeError('Expected 1 arg.') @@ -652,6 +651,7 @@ def prefab_binary_path() -> None: from batools.build import PrefabPlatform, PrefabTarget + # Platform determination uses env vars; won't work in batch. pcommand.disallow_in_batch() if len(sys.argv) != 3: @@ -699,6 +699,7 @@ def make_prefab() -> None: import subprocess from batools.build import PrefabPlatform, PrefabTarget + # Platform determination uses env vars; won't work in batch. pcommand.disallow_in_batch() if len(sys.argv) != 3: @@ -727,6 +728,7 @@ def lazybuild() -> None: # This command is not a good candidate for batch since it can be # long running and prints various stuff throughout the process. pcommand.disallow_in_batch() + args = pcommand.get_args() if len(args) < 3: diff --git a/tools/batools/pcommands2.py b/tools/batools/pcommands2.py index 0b9d4808..a367718d 100644 --- a/tools/batools/pcommands2.py +++ b/tools/batools/pcommands2.py @@ -544,3 +544,31 @@ def wsl_path_to_win() -> None: if escape: out = out.replace('\\', '\\\\') print(out, end='') + + +def get_modern_make() -> None: + """Print name of a modern make command.""" + import platform + import subprocess + + pcommand.disallow_in_batch() + + # Mac gnu make is outdated (due to newer versions using GPL3 I believe). + # so let's return 'gmake' there which will point to homebrew make which + # should be up to date. + if platform.system() == 'Darwin': + if ( + subprocess.run( + ['which', 'gmake'], check=False, capture_output=True + ).returncode + != 0 + ): + print( + 'WARNING: this requires gmake (mac system make is too old).' + " Install it with 'brew install make'", + file=sys.stderr, + flush=True, + ) + print('gmake') + else: + print('make') diff --git a/tools/pcommand b/tools/pcommand index 0a6eef2a..8493c487 100755 --- a/tools/pcommand +++ b/tools/pcommand @@ -96,13 +96,13 @@ from batools.pcommands import ( upper, efrocache_update, efrocache_get, - get_modern_make, warm_start_asset_build, gen_docs_pdoc, gen_docs_sphinx, list_pip_reqs, install_pip_reqs, checkenv, + prefab_platform, ensure_prefab_platform, prefab_run_var, prefab_binary_path, @@ -135,6 +135,7 @@ from batools.pcommands2 import ( tests_warm_start, wsl_path_to_win, wsl_build_check_win_drive, + get_modern_make, ) # pylint: enable=unused-import