diff --git a/.efrocachemap b/.efrocachemap index a0f42aca..21800dd0 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4072,50 +4072,50 @@ "build/assets/workspace/ninjafightplug.py": "https://files.ballistica.net/cache/ba1/c5/09/4f10b8a21ba87aa5509cff7a164b", "build/assets/workspace/onslaughtplug.py": "https://files.ballistica.net/cache/ba1/ff/0a/a354984f9c074dab0676ac7e4877", "build/assets/workspace/runaroundplug.py": "https://files.ballistica.net/cache/ba1/2a/1c/9ee5db6d1bceca7fa6638fb8abde", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/9b/5a/2e57d92bd49c32716854e827b71e", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/32/ea/13f98e040b2bf944046346041d74", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/89/d6/002489b27c6e1fea3e34bf3be78a", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/cf/b6/263c06715ee5fa22376996589fd8", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/40/4a/7f808b6cb7adc311a45f6d8316f1", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/b1/90/46e457296568ea53d33d2bd45684", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/dc/98/d7c1578092f33711a9a35598851e", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/a3/d0/03780531e147bd77dd50ba609f5e", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/c9/c8/8a1391b84a42e318f65d45f750d4", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/52/83/df80fa75f67a956d2791877cab81", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/1f/bc/92f5d56317f1f992370fd669ce00", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/56/77/7d5b74a6be4e6416810bc6202091", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/c0/ce/3015c1ce7ef327ca2482c0881ba1", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/45/0c/cfaac054884219c8c4c212dfb2cd", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/0b/c3/d68f065ec79f8159add0626f0610", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/29/5c/3d1b5ea503fbfc59ece5ca869ff0", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/99/92/ff7812b81a96217092af3c443588", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/e6/87/81355e544cb9222c91fcdb69e4aa", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/f1/43/626c026a6ac4d681dc829111032e", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/27/5e/02c847cbecbc5f316548c061e1f5", - "build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/21/2f/7d4a687d49772e1e5ef78afe6953", - "build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/97/a8/64f3e8e31f4ea820da487e80776b", - "build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/7b/8e/e95a4dbbe3dd345463fc8fa0bd96", - "build/prefab/lib/linux_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/ae/bb/c1e106cd2952f58e1e40c38f8ac8", - "build/prefab/lib/linux_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/51/24/8ecde92d034247c9d193b094c9a7", - "build/prefab/lib/linux_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/55/16/9257bf17c2e1e2b69f9ca9565bfd", - "build/prefab/lib/linux_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/8f/ce/613f1f5bd5154a0b0bc0498a1cd9", - "build/prefab/lib/linux_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/c9/09/5f2e451716a9a637fa4f57081d1a", - "build/prefab/lib/mac_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/e3/22/3c2f4b5041b7529b43c6f02d2bb0", - "build/prefab/lib/mac_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/2f/53/c7463229114457f9961fe982cf6e", - "build/prefab/lib/mac_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/47/47/725d64124db479e4e3bfc869ad7e", - "build/prefab/lib/mac_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/f3/61/d25c351d34cbcc9f5a13a07e37b0", - "build/prefab/lib/mac_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/a0/ec/eaee7f3df8e63262054d5c9fb478", - "build/prefab/lib/mac_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/27/38/c234ba181b79f2f02960dbed6f74", - "build/prefab/lib/mac_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/5b/b8/c26d5a60d055ec764f63670b5c1f", - "build/prefab/lib/mac_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/98/2f/7ed250c1d9c346cecb6e08a3b4a9", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/fe/26/d29f2d6fba29d522b23dfe6559c8", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/3d/da/14557d469123377792c0e09c786e", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/6f/02/1e5f31c18bbedf0a8387e8ee3c25", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/c6/75/673608739f78a7902d994b960c40", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/4e/fe/1932ac089742c134a1b004eed2b6", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/ce/66/c77850f3097938d8067176640469", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/f3/ef/56ca9ced6b6a589f22baa85db006", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/1e/be/d7c743ea3e73b69f1e5bfdcb61af", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/08/31/5d96f2877eaa60bf5a0ea55d048c", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/75/1a/e6ef50aa74f65e9fe3f13c853279", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/0f/84/f5e384fdc74c47d4bd4c6b6eaac9", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/37/3c/c66a6a131ec8f7835d8712cfe238", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/4d/b1/67f33a358fe4d35cfaa930451ef6", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/d6/55/77df633da6941bdabd74f68d6e80", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ff/5d/82ef178f8642b2ff2a89b8cdceab", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7b/47/f54a24cf37a655dae7543ea721f7", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/37/30/c1706853d253a202fce71f0ff5ac", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/55/d6/e8bf2427d8dad886439951f96fa3", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/0d/8f/38d9457a489236f7a0f7765ccdfd", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ad/d5/72f9e7186c6ec2a0c8229dbb1540", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/03/3a/b5889f0f805852b8dc455b845ef2", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/7c/c0/5121a56d897944f523102e6ca3f3", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/a9/f3/a4358ba8cde80e5fc074d126e9e1", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/97/1e/bff8628d637651fe1dc10969592b", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/2a/57/27595c9e8ac8de6bc6d7ae8125ac", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/9d/69/ccad421d41a53b79e3ffc5bc99fb", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/cb/41/873f27f3744ae160307375e9c107", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/ec/97/6f817c385ed0cd5cabeaf88afa84", + "build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/d4/6a/dd303a200b98a56ba3b100277057", + "build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/fc/2c/2996c558fb408a548fdd37398c9a", + "build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/ed/28/b7a72be7ae1bd2b58dda4b6902a0", + "build/prefab/lib/linux_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/9a/c1/7d453af7505f0da4f811c463e20b", + "build/prefab/lib/linux_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/69/8f/f8d2a4a001faff21d6583fc548e5", + "build/prefab/lib/linux_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/de/c4/c40f356300a03ee787de3b7a2e9e", + "build/prefab/lib/linux_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/59/88/6c03f3f277caf5f549422a3dfe46", + "build/prefab/lib/linux_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/c7/d3/029366a92c45727c9b2e4517027d", + "build/prefab/lib/mac_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/4e/12/3194fc2a754634006cd74b0236dd", + "build/prefab/lib/mac_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/4b/75/688be5b92c30b4b9121badee151c", + "build/prefab/lib/mac_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/76/ae/475cdfca344fa3034d013045ddef", + "build/prefab/lib/mac_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/d8/a3/7cdd584948ce51caed019495773e", + "build/prefab/lib/mac_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/08/8a/a873b8c8f181721e17c083e9101e", + "build/prefab/lib/mac_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/71/f6/691482915ad58ea1e953cc23d74c", + "build/prefab/lib/mac_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/b8/2b/6ec8c78980a62e3e0ee4b36ece04", + "build/prefab/lib/mac_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/4e/56/a95c987b2a371759896b037fea86", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/fe/78/fb2bff22f5f5e63e5eead251357c", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/e6/2e/1981d72b4c51d8e1d8b63e5e0832", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/3c/8f/e15d203360e2820449d9179c2c92", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/1c/80/24cafb783f4bd5c8830afd66f305", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/05/ba/132c92d6ada5a3abf2840fbe7622", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/51/e4/aec63a799a718984d77c8492d3aa", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/a0/18/102df5f0be3db0f5e1177551bb61", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/aa/95/464288c1ed651ae3e50f1c8bfb12", "src/assets/ba_data/python/babase/_mgen/__init__.py": "https://files.ballistica.net/cache/ba1/52/c6/c11130af7b10d6c0321add5518fa", "src/assets/ba_data/python/babase/_mgen/enums.py": "https://files.ballistica.net/cache/ba1/38/c3/1dedd5e74f2508efc5974c8815a1", "src/ballistica/base/mgen/pyembed/binding_base.inc": "https://files.ballistica.net/cache/ba1/b4/3d/e352190a0e5673d101c0f3ee3ad2", diff --git a/CHANGELOG.md b/CHANGELOG.md index 26ce5261..5e19b2f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.20 (build 21027, api 8, 2023-05-30) +### 1.7.20 (build 21028, api 8, 2023-05-30) - This seems like a good time for a `refactoring` release in anticipation of changes coming in 1.8. Basically this means that a lot of things will be diff --git a/src/assets/ba_data/python/babase/_app.py b/src/assets/ba_data/python/babase/_app.py index 652ffeed..86b35f3a 100644 --- a/src/assets/ba_data/python/babase/_app.py +++ b/src/assets/ba_data/python/babase/_app.py @@ -570,14 +570,14 @@ class App: if self._initial_sign_in_completed and self._meta_scan_completed: if self.state != self.State.RUNNING: self.state = self.State.RUNNING - _babase.bootlog('app state running') + _babase.lifecyclelog('app state running') if not self._called_on_app_running: self._called_on_app_running = True self.on_app_running() elif self._launch_completed: if self.state is not self.State.LOADING: self.state = self.State.LOADING - _babase.bootlog('app state loading') + _babase.lifecyclelog('app state loading') if not self._called_on_app_loading: self._called_on_app_loading = True self.on_app_loading() @@ -587,7 +587,7 @@ class App: assert self._app_bootstrapping_complete if self.state is not self.State.LAUNCHING: self.state = self.State.LAUNCHING - _babase.bootlog('app state launching') + _babase.lifecyclelog('app state launching') if not self._called_on_app_launching: self._called_on_app_launching = True self.on_app_launching() diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 75b35e17..caadd8c5 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -31,7 +31,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21027 +TARGET_BALLISTICA_BUILD = 21028 TARGET_BALLISTICA_VERSION = '1.7.20' _g_env_config: EnvConfig | None = None diff --git a/src/ballistica/base/app/app.cc b/src/ballistica/base/app/app.cc index dfa5214b..c51f105c 100644 --- a/src/ballistica/base/app/app.cc +++ b/src/ballistica/base/app/app.cc @@ -363,24 +363,9 @@ void App::PushResetAchievementsCall() { } void App::OnMainThreadStartApp() { - assert(g_core->InMainThread()); - assert(g_base->input); + assert(g_base); assert(g_core); - - // If we're running in a terminal, print some info. - // if (g_core->platform->is_stdin_a_terminal()) { - { - char buffer[256]; - if (g_buildconfig.headless_build()) { - snprintf(buffer, sizeof(buffer), "BallisticaKit Headless %s build %d.", - kEngineVersion, kEngineBuildNumber); - } else { - snprintf(buffer, sizeof(buffer), "BallisticaKit %s build %d.", - kEngineVersion, kEngineBuildNumber); - } - Log(LogLevel::kInfo, buffer); - } - // } + assert(g_core->InMainThread()); // If we've got a nice themed hardware cursor, show it. // Otherwise, hide the hardware cursor; we'll draw it in software. @@ -405,7 +390,7 @@ void App::OnMainThreadStartApp() { void App::PushCursorUpdate(bool vis) { event_loop()->PushCall([vis] { - assert(g_core->InMainThread()); + assert(g_core && g_core->InMainThread()); g_core->platform->SetHardwareCursorVisible(vis); }); } diff --git a/src/ballistica/base/base.cc b/src/ballistica/base/base.cc index 7bdc9cc1..78e44096 100644 --- a/src/ballistica/base/base.cc +++ b/src/ballistica/base/base.cc @@ -82,7 +82,7 @@ void BaseFeatureSet::OnModuleExec(PyObject* module) { assert(g_core == nullptr); g_core = core::CoreFeatureSet::Import(); - g_core->BootLog("_babase exec begin"); + g_core->LifecycleLog("_babase exec begin"); // Want to run this at the last possible moment before spinning up // our BaseFeatureSet. This locks in baenv customizations. @@ -125,7 +125,7 @@ void BaseFeatureSet::OnModuleExec(PyObject* module) { // import us. Python::MarkReachedEndOfModule(module); - g_core->BootLog("_babase exec end"); + g_core->LifecycleLog("_babase exec end"); } auto BaseFeatureSet::Import() -> BaseFeatureSet* { @@ -153,7 +153,10 @@ void BaseFeatureSet::StartApp() { called_start_app_ = true; assert(!app_running_); // Shouldn't be possible. - g_core->BootLog("start-app begin"); + g_core->LifecycleLog("main-thread start-app begin"); + + LogVersionInfo(); + // Allow our subsystems to start doing work in their own threads // and communicating with other subsystems. Note that we may still // want to run some things serially here and ordering may be important @@ -185,7 +188,19 @@ void BaseFeatureSet::StartApp() { // the app config which will kick off screen creation and otherwise // get the ball rolling. logic->event_loop()->PushCall([this] { logic->ApplyAppConfig(); }); - g_core->BootLog("start-app end"); + g_core->LifecycleLog("main-thread start-app end"); +} + +void BaseFeatureSet::LogVersionInfo() { + char buffer[256]; + if (g_buildconfig.headless_build()) { + snprintf(buffer, sizeof(buffer), "BallisticaKit Headless %s build %d.", + kEngineVersion, kEngineBuildNumber); + } else { + snprintf(buffer, sizeof(buffer), "BallisticaKit %s build %d.", + kEngineVersion, kEngineBuildNumber); + } + Log(LogLevel::kInfo, buffer); } void BaseFeatureSet::set_app_mode(AppMode* mode) { diff --git a/src/ballistica/base/base.h b/src/ballistica/base/base.h index 43e9e08b..2e9cdd65 100644 --- a/src/ballistica/base/base.h +++ b/src/ballistica/base/base.h @@ -719,6 +719,7 @@ class BaseFeatureSet : public FeatureSetNativeComponent, private: BaseFeatureSet(); + void LogVersionInfo(); void PrintContextNonLogicThread(); void PrintContextForCallableLabel(const char* label); void PrintContextUnavailable(); diff --git a/src/ballistica/base/logic/logic.cc b/src/ballistica/base/logic/logic.cc index 8c514a19..a17c3f71 100644 --- a/src/ballistica/base/logic/logic.cc +++ b/src/ballistica/base/logic/logic.cc @@ -34,7 +34,7 @@ void Logic::OnMainThreadStartApp() { void Logic::OnAppStart() { assert(g_base->InLogicThread()); - g_core->BootLog("logic-thread on-app-start begin"); + g_core->LifecycleLog("logic-thread on-app-start begin"); try { // Our thread should not be holding the GIL here at the start (and // probably not have any Python state at all). So here we set both @@ -80,7 +80,7 @@ void Logic::OnAppStart() { throw std::logic_error(what.c_str()); }); } - g_core->BootLog("logic-thread on-app-start end"); + g_core->LifecycleLog("logic-thread on-app-start end"); } void Logic::OnAppPause() { @@ -143,7 +143,7 @@ void Logic::OnAppShutdown() { void Logic::ApplyAppConfig() { assert(g_base->InLogicThread()); - g_core->BootLog("apply-app-config begin"); + g_core->LifecycleLog("apply-app-config begin"); // Give all our other subsystems a chance. // Note: keep these in the same order as OnAppStart. @@ -164,7 +164,7 @@ void Logic::ApplyAppConfig() { g_base->app->LogicThreadApplyAppConfig(); applied_app_config_ = true; - g_core->BootLog("apply-app-config end"); + g_core->LifecycleLog("apply-app-config end"); } void Logic::OnInitialScreenCreated() { @@ -194,7 +194,7 @@ void Logic::CompleteAppBootstrapping() { assert(!app_bootstrapping_complete_); app_bootstrapping_complete_ = true; - g_core->BootLog("app bootstrapping complete"); + g_core->LifecycleLog("app bootstrapping complete"); // Let the assets system know it can start loading stuff now that // we have a screen and thus know texture formats/etc. diff --git a/src/ballistica/base/python/methods/python_methods_app.cc b/src/ballistica/base/python/methods/python_methods_app.cc index 121eb92c..80d0df3b 100644 --- a/src/ballistica/base/python/methods/python_methods_app.cc +++ b/src/ballistica/base/python/methods/python_methods_app.cc @@ -866,9 +866,9 @@ static PyMethodDef PyDisplayLogDef = { "directly and should instead be fed Python logging output.", }; -// ------------------------------- bootlog ------------------------------------- +// ------------------------------ lifecyclelog --------------------------------- -static auto PyBootLog(PyObject* self, PyObject* args, PyObject* keywds) +static auto PyLifecycleLog(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { BA_PYTHON_TRY; static const char* kwlist[] = {"message", nullptr}; @@ -878,18 +878,18 @@ static auto PyBootLog(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } - g_core->BootLog(message); + g_core->LifecycleLog(message); Py_RETURN_NONE; BA_PYTHON_CATCH; } -static PyMethodDef PyBootLogDef = { - "bootlog", // name - (PyCFunction)PyBootLog, // method +static PyMethodDef PyLifecycleLogDef = { + "lifecyclelog", // name + (PyCFunction)PyLifecycleLog, // method METH_VARARGS | METH_KEYWORDS, // flags - "bootlog(message: str) -> None\n" + "lifecyclelog(message: str) -> None\n" "\n" "(internal)", }; @@ -1302,7 +1302,7 @@ auto PythonMethodsApp::GetMethods() -> std::vector { PyMacMusicAppPlayPlaylistDef, PyMacMusicAppGetPlaylistsDef, PyIsOSPlayingMusicDef, - PyBootLogDef, + PyLifecycleLogDef, PyExecArgDef, }; } diff --git a/src/ballistica/classic/classic.cc b/src/ballistica/classic/classic.cc index 10781a89..a6b730e0 100644 --- a/src/ballistica/classic/classic.cc +++ b/src/ballistica/classic/classic.cc @@ -21,7 +21,7 @@ void ClassicFeatureSet::OnModuleExec(PyObject* module) { assert(g_core == nullptr); g_core = core::CoreFeatureSet::Import(); - g_core->BootLog("_baclassic exec begin"); + g_core->LifecycleLog("_baclassic exec begin"); // Create our feature-set's C++ front-end. assert(g_classic == nullptr); @@ -42,7 +42,7 @@ void ClassicFeatureSet::OnModuleExec(PyObject* module) { // (save it the trouble of trying to load us if it uses us passively). g_base->set_classic(g_classic); - g_core->BootLog("_baclassic exec end"); + g_core->LifecycleLog("_baclassic exec end"); } ClassicFeatureSet::ClassicFeatureSet() diff --git a/src/ballistica/core/core.cc b/src/ballistica/core/core.cc index 1e774b38..364bdbd1 100644 --- a/src/ballistica/core/core.cc +++ b/src/ballistica/core/core.cc @@ -48,8 +48,8 @@ void CoreFeatureSet::DoImport(const CoreConfig& config) { auto seconds_since_actual_start = static_cast(CorePlatform::GetCurrentMillisecs() - start_millisecs) / 1000.0; - g_core->BootLog("core import begin", -seconds_since_actual_start); - g_core->BootLog("core import end"); + g_core->LifecycleLog("core import begin", -seconds_since_actual_start); + g_core->LifecycleLog("core import end"); } CoreFeatureSet::CoreFeatureSet(CoreConfig config) @@ -159,13 +159,13 @@ auto CoreFeatureSet::SoftImportBase() -> BaseSoftInterface* { return g_base_soft; } -void CoreFeatureSet::BootLog(const char* msg, double offset_seconds) { - if (!core_config_.log_boot_process) { +void CoreFeatureSet::LifecycleLog(const char* msg, double offset_seconds) { + if (!core_config_.lifecycle_log) { return; } char buffer[128]; // It's not safe to use Log until - snprintf(buffer, sizeof(buffer), "BOOT: %s @ %.3fs.", msg, + snprintf(buffer, sizeof(buffer), "LIFE: %s @ %.3fs.", msg, g_core->GetAppTimeSeconds() + offset_seconds); Log(LogLevel::kInfo, buffer); } diff --git a/src/ballistica/core/core.h b/src/ballistica/core/core.h index aeda83d8..2a8bbbf4 100644 --- a/src/ballistica/core/core.h +++ b/src/ballistica/core/core.h @@ -93,8 +93,8 @@ class CoreFeatureSet { /// Generally this is the thread that runs graphics and os event processing. auto InMainThread() -> bool; - /// Log a boot-related message (only if core_config.log_boot_process is true). - void BootLog(const char* msg, double offset_seconds = 0.0); + /// Log a boot-related message (only if core_config.lifecycle_log is true). + void LifecycleLog(const char* msg, double offset_seconds = 0.0); /// Base path of build src dir so we can attempt to remove it from /// any source file paths we print. diff --git a/src/ballistica/core/python/core_python.cc b/src/ballistica/core/python/core_python.cc index cf455aea..7f46e1bc 100644 --- a/src/ballistica/core/python/core_python.cc +++ b/src/ballistica/core/python/core_python.cc @@ -213,7 +213,7 @@ void CorePython::VerifyPythonEnvironment() { void CorePython::MonolithicModeBaEnvConfigure() { assert(g_buildconfig.monolithic_build()); assert(g_core); - g_core->BootLog("baenv.configure() begin"); + g_core->LifecycleLog("baenv.configure() begin"); auto gil{Python::ScopedInterpreterLock()}; @@ -267,7 +267,7 @@ void CorePython::MonolithicModeBaEnvConfigure() { "This usually means you are running the app from the wrong location.\n" "See log for details."); } - g_core->BootLog("baenv.configure() end"); + g_core->LifecycleLog("baenv.configure() end"); } void CorePython::LoggingCall(LogLevel loglevel, const std::string& msg) { diff --git a/src/ballistica/core/support/core_config.cc b/src/ballistica/core/support/core_config.cc index ccb6f04c..33f1998c 100644 --- a/src/ballistica/core/support/core_config.cc +++ b/src/ballistica/core/support/core_config.cc @@ -80,9 +80,9 @@ auto CoreConfig::FromCommandLineAndEnv(int argc, char** argv) -> CoreConfig { // First set any values we allow env-vars for. // We want explicitly passed values to override these in any cases where both // forms are accepted. - if (auto* envval = getenv("BA_BOOT_LOG")) { + if (auto* envval = getenv("BA_LIFECYCLE_LOG")) { if (!strcmp(envval, "1")) { - cfg.log_boot_process = true; + cfg.lifecycle_log = true; } } if (auto* envval = getenv("BA_DEBUGGER_ATTACHED")) { @@ -92,8 +92,8 @@ auto CoreConfig::FromCommandLineAndEnv(int argc, char** argv) -> CoreConfig { } // REMOVE ME FOR 1.7.20 FINAL. - printf("TEMP: forcing BA_BOOT_LOG=1 during 1.7.20 development.\n"); - cfg.log_boot_process = true; + printf("TEMP: forcing BA_LIFECYCLE_LOG=1 during 1.7.20 development.\n"); + cfg.lifecycle_log = true; try { // First handle single-arg special cases like --help or --version. diff --git a/src/ballistica/core/support/core_config.h b/src/ballistica/core/support/core_config.h index 9468d49c..34566f3d 100644 --- a/src/ballistica/core/support/core_config.h +++ b/src/ballistica/core/support/core_config.h @@ -42,7 +42,7 @@ class CoreConfig { std::optional user_python_dir{}; /// Log various stages/times in the bootstrapping process. - bool log_boot_process{}; + bool lifecycle_log{}; /// Normally early C++ Log() calls are held until babase has been imported /// so that when they are pushed out to the Python logging calls they are diff --git a/src/ballistica/scene_v1/scene_v1.cc b/src/ballistica/scene_v1/scene_v1.cc index cd6cc949..20740fa8 100644 --- a/src/ballistica/scene_v1/scene_v1.cc +++ b/src/ballistica/scene_v1/scene_v1.cc @@ -47,7 +47,7 @@ void SceneV1FeatureSet::OnModuleExec(PyObject* module) { assert(g_core == nullptr); g_core = core::CoreFeatureSet::Import(); - g_core->BootLog("_bascenev1 exec begin"); + g_core->LifecycleLog("_bascenev1 exec begin"); // Create our feature-set's C++ front-end. assert(g_scene_v1 == nullptr); @@ -69,7 +69,7 @@ void SceneV1FeatureSet::OnModuleExec(PyObject* module) { // Define our classes. g_scene_v1->python->AddPythonClasses(module); - g_core->BootLog("_bascenev1 exec end"); + g_core->LifecycleLog("_bascenev1 exec end"); } SceneV1FeatureSet::SceneV1FeatureSet() : python{new SceneV1Python()} { diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 674bdbff..796d142e 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 = 21027; +const int kEngineBuildNumber = 21028; const char* kEngineVersion = "1.7.20"; auto MonolithicMain(const core::CoreConfig& core_config) -> int { diff --git a/src/ballistica/ui_v1/ui_v1.cc b/src/ballistica/ui_v1/ui_v1.cc index e74ab478..30685611 100644 --- a/src/ballistica/ui_v1/ui_v1.cc +++ b/src/ballistica/ui_v1/ui_v1.cc @@ -25,7 +25,7 @@ void UIV1FeatureSet::OnModuleExec(PyObject* module) { // Various ballistica functionality will fail if this has not been done. g_core = core::CoreFeatureSet::Import(); - g_core->BootLog("_bauiv1 exec begin"); + g_core->LifecycleLog("_bauiv1 exec begin"); // Create our feature-set's C++ front-end. assert(g_ui_v1 == nullptr); @@ -49,7 +49,7 @@ void UIV1FeatureSet::OnModuleExec(PyObject* module) { // (save it the trouble of trying to load us if it uses us passively). g_base->set_ui_v1(g_ui_v1); - g_core->BootLog("_bauiv1 exec end"); + g_core->LifecycleLog("_bauiv1 exec end"); } auto UIV1FeatureSet::Import() -> UIV1FeatureSet* {