diff --git a/harbor/logbook_auto.py b/harbor/logbook_auto.py index 00d1c33..92c3124 100644 --- a/harbor/logbook_auto.py +++ b/harbor/logbook_auto.py @@ -84,6 +84,10 @@ def rebuild_stats(project, repo, stats_repo, head): tools = Path(stats_repo) / "tools" / "progress" # its own data dir: the agents' compiles hold the shared decomp-build\pirates.h open env = dict(os.environ, OPENSEAS_DATA=os.environ.get("HARBOR_LOGBOOK_DATA", r"R:\Workspace\Data\openseas-logbook")) + # the readable build finds the compiler through vswhere, which a server started without a shell's PATH lacks + installer = r"C:\Program Files (x86)\Microsoft Visual Studio\Installer" + if os.path.isdir(installer) and installer.lower() not in env.get("PATH", "").lower(): + env["PATH"] = installer + os.pathsep + env.get("PATH", "") run = lambda *argv: subprocess.run([sys.executable, "-B", *map(str, argv)], cwd=str(stats_repo), env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=900) sync = run(tools / "sync_decomp.py", "--decomp", repo)