added meta manifests

This commit is contained in:
Eric Froemling 2021-06-17 14:16:35 -05:00
parent 30f6a4595b
commit 85da1991a6
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
5 changed files with 80 additions and 25 deletions

View File

@ -3942,18 +3942,18 @@
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9c/7b/ac1a200be0f37078af0991faca3b",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a4/91/8d8a90a2ccd3aa7e51a62dcd7d7a",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fb/4f/deef20e32ad1a92c79758cd4252d",
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/92/c616a31b4be861abf2a9b0d70de7",
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1e/0f/e5e8b4f0c2da33e0d0f9fdceb434",
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/89/73/9bcb6c8f0a60f6a9c2278c039f58",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f4/19/64399caa4bc76d945c82969d4ebb",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bb/06/7c54efe3d808ecff434d6d77c7e9",
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/61/2700666994aa453c37376288675e",
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/42/eb/84dfabd457c5092c5b40bb11a28a",
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3f/cf/169e47b79a3ae353db735621cbd9",
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9c/27/5c3e3eef62e64063b9f217212f33",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e2/e1/39a42a80ba4c9a37f9e667b3b5f9",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/57/93/29938d6f7b99d990dafeb1a5ce9f",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ab/23/4f9cfb8e92e80c18116c4e2dd934",
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/f2/29/444730cfdc2405f77504dd4b4e43",
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b4/5c/10c3008a0a6a5e7e9d7e657798d2",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/c4/b8/92c752ae082420a17bc6215bb03b",
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/c9/67/47a504bca4906315ff040684e123",
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/50/00/9b08ec7ea6ab5bb23c5b14eb9660",
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e7/b9/f9090bb29c16c6a95f7021581a53",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/54/2d/4f334f63064c97ffd8c5dee1d45b",
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/20/19/a418fe8b3a01729a8902acaa5acc",
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9a/32/bda06e355384dac2fc81c8357812",
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/34/f6/b4db57144d47cfdb153dd4de6742",
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/53/44/cf4405c2ebe2695d55858129d3fe",
@ -3970,12 +3970,12 @@
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b5/5b/0390ee8916f97d302cde3ea356bc",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7a/ee/8249ede29becc0cd41178924b6dc",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c0/5f/e89024a87dd092f6e0cc43afb707",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/92/a0/d808e79d9db491df207c99e91d97",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/37/ea/79a527eb1baff08e700257fcb656",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/53/4c/7ee11892665db5473e339a51a630",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/9b/c8/4b08f3a2191a01d31c113e88e14d",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/29/ac/b962e9954738d7498746ec0c3390",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/df/0f/b50adb3f60401ff5548fd93b131c",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/b3/7b/ce0105af2871a2919cf25683d0a3",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/b5/00/cb9e4eafaceb764f45a8a1e27008"
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/12/95/bb99d1aa9225c9902fa96fbcc109",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/9a/8e/5937ca89f83a4468771f07f13896",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/8c/d6/d268622e403e38140a7dd0631f4d",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/74/a7/f7ea9d4c46be97c066b1ac1f6d67",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/f0/76/b6702722bb3b2024d23f02df0327",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/4c/b6/909765c4a84d6d32250364ba092b",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/48/52/332e822621a37a0ea035cb355004",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/31/b8/95ddc9030874bb4285606be2b0a6"
}

View File

@ -1,5 +1,5 @@
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
<h4><em>last updated on 2021-06-16 for Ballistica version 1.6.4 build 20385</em></h4>
<h4><em>last updated on 2021-06-17 for Ballistica version 1.6.4 build 20387</em></h4>
<p>This page documents the Python classes and functions in the 'ba' module,
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
<hr>

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1,4 @@
[
"src/ballistica/generated/python_embedded/binding.inc",
"src/ballistica/generated/python_embedded/bootstrap.inc"
]

View File

@ -8,6 +8,7 @@ node types, etc).
from __future__ import annotations
import os
import json
import subprocess
from pathlib import Path
from typing import TYPE_CHECKING
@ -129,9 +130,20 @@ def _empty_line_if(condition: bool) -> List[str]:
return [''] if condition else []
def _project_centric_path(path: str) -> str:
projpath = f'{os.getcwd()}/'
assert '\\' not in projpath # Don't expect to work on windows.
abspath = os.path.abspath(os.path.join('src/meta', path))
if not abspath.startswith(projpath):
raise RuntimeError(
f'Path "{abspath}" is not under project root "{projpath}"')
return abspath[len(projpath):]
def update(projroot: str, check: bool) -> None:
"""Update the project meta Makefile."""
# pylint: disable=too-many-locals
# pylint: disable=too-many-statements
# Operate out of root dist dir for consistency.
os.chdir(projroot)
@ -140,10 +152,24 @@ def update(projroot: str, check: bool) -> None:
assert isinstance(public, bool)
fname = 'src/meta/Makefile'
fname_pub_man = 'src/meta/.meta_manifest_public.json'
fname_priv_man = 'src/meta/.meta_manifest_private.json'
with open(fname) as infile:
original = infile.read()
lines = original.splitlines()
with open(fname_pub_man) as infile:
original_pub_man = infile.read()
with open(fname_priv_man) as infile:
original_priv_man = infile.read()
# We'll generate manifests of all public/private files we generate
# (not private-internal though).
all_dsts_public: Set[str] = set()
all_dsts_private: Set[str] = set()
auto_start_public = lines.index('#__AUTOGENERATED_PUBLIC_BEGIN__')
auto_end_public = lines.index('#__AUTOGENERATED_PUBLIC_END__')
auto_start_private = lines.index('#__AUTOGENERATED_PRIVATE_BEGIN__')
@ -156,6 +182,7 @@ def update(projroot: str, check: bool) -> None:
our_lines_public = (_empty_line_if(bool(targets)) +
_emit_group_build_lines(targets, basename) +
[t.emit() for t in targets])
all_dsts_public.update(t.dst for t in targets)
# Only rewrite the private section in the private repo; otherwise
# keep the existing one intact.
@ -170,6 +197,7 @@ def update(projroot: str, check: bool) -> None:
_emit_group_build_lines(targets, basename) +
['#__EFROCACHE_TARGET__\n' + t.emit() for t in targets] +
_emit_group_efrocache_lines(targets, basename))
all_dsts_private.update(t.dst for t in targets)
# NOTE: currently not efrocaching anything here; we'll need to
# add this makefile to the efrocache update if we ever do.
assert not targets
@ -190,18 +218,40 @@ def update(projroot: str, check: bool) -> None:
our_lines_private + lines[auto_end_private:])
out = '\n'.join(filtered) + '\n'
if out == original:
print(f'{fname} is up to date.')
out_pub_man = json.dumps(sorted(
_project_centric_path(p) for p in all_dsts_public),
indent=1)
out_priv_man = json.dumps(sorted(
_project_centric_path(p) for p in all_dsts_private),
indent=1)
if (out == original and out_pub_man == original_pub_man
and out_priv_man == original_priv_man):
print(f'{fname} (and manifests) are up to date.')
else:
if check:
if bool(False):
print(f'FOUND------\n{original}\nEND FOUND--------\n'
f'EXPECTED------\n{out}\nEND EXPECTED-------\n')
raise CleanError(f"ERROR: file is out of date: '{fname}'.")
errname = (fname if out != original else fname_pub_man
if out_pub_man != original_pub_man else fname_priv_man
if out_priv_man != original_priv_man else 'unknown')
raise CleanError(f"ERROR: file is out of date: '{errname}'.")
print(f'{Clr.SBLU}Updating {fname} (and cleaning existing output).'
f'{Clr.RST}')
with open(fname, 'w') as outfile:
outfile.write(out)
if out != original:
with open(fname, 'w') as outfile:
outfile.write(out)
# Also write our output file manifests every time we write the
# Makefile (technically should check them individually in case
# they're out of date but the Makefile isn't, though that should not
# happen normally).
if out_pub_man != fname_pub_man:
with open(fname_pub_man, 'w') as outfile:
outfile.write(out_pub_man)
if out_priv_man != fname_priv_man:
with open(fname_priv_man, 'w') as outfile:
outfile.write(out_priv_man)
# Also clean existing meta output every time the Makefile changes;
# this should minimize the chance of orphan outputs hanging around
# causing trouble.