Add installer build tooling and cross-platform runtime fixes#4
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis change adds a complete installer build and distribution pipeline for OpenBeat, including a GitHub Actions workflow that automatically builds macOS and Windows installers, a Python build script that packages the CLI with platform-specific resources, cross-platform path handling in the Lua module, and updated documentation with installation instructions. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes The review spans heterogeneous changes across infrastructure, documentation, and platform-specific logic. The cross-platform path handling in OpenBeatCommon.lua and the intricate PyInstaller integration in build_installers.py require careful verification of Windows/macOS-specific behaviors and command construction patterns. Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5be008df0b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
|
|
||
| def build_cli_binary(python_bin: str = "python") -> Path: | ||
| return pyinstaller_binary("openbeat", ROOT / "openbeat" / "cli.py", python_bin=python_bin) |
There was a problem hiding this comment.
Bundle CLI using a module entry point
build_cli_binary() passes openbeat/cli.py as a file entry script, but that file relies on package-relative imports (from .analysis ...) and does not run as a standalone script (e.g. python openbeat/cli.py raises ImportError). Because PyInstaller one-file apps execute that entry as __main__, the bundled openbeat binary produced by this path is likely to fail at startup before any subcommand runs.
Useful? React with 👍 / 👎.
| local function command_prefix() | ||
| local bin = python_bin() | ||
| local lowered = string.lower(bin) | ||
| if lowered:match("python%.exe$") or lowered:match("python$") then |
There was a problem hiding this comment.
Treat python3 fallback as a Python interpreter
When no local config or .venv interpreter is found, python_bin() returns python3, but command_prefix() only appends -m openbeat.cli for names ending in python/python.exe. In that fallback path the generated command becomes "python3" analyze ... (missing module invocation), so OpenBeat commands fail immediately on systems using the fallback interpreter.
Useful? React with 👍 / 👎.
|
|
||
| def main() -> int: | ||
| parser = argparse.ArgumentParser(description="Build OpenBeat single-file installers") | ||
| parser.add_argument("--platform", choices=["macos", "windows", "all"], default="all") |
There was a problem hiding this comment.
Default installer builds to host platform only
The CLI defaults --platform to all, which unconditionally runs both platform builders on a single host. That makes local builds fail in normal environments (e.g., non-macOS hosts cannot run pkgbuild, and non-Windows hosts will not produce dist/openbeat-installer.exe, triggering the FileNotFoundError path), so the default behavior is broken unless users manually override it.
Useful? React with 👍 / 👎.
|
Closing this as superseded by the current main branch and the merged release-hardening work in #6. Main now has installer build tooling, the artifact-safe workflow updates, Windows/runtime fixes, and the focused test coverage from the newer release-prep branch. |
Motivation
Description
Build Installersat.github/workflows/build-installers.ymlthat builds macOS and Windows installers and uploads artifacts.scripts/build_installers.pyto build a PyInstaller single-file CLI and package platform-specific installers:OpenBeat-macos-<version>.pkgandOpenBeat-windows-<version>-installer.exe, and copy Resolve script/module payloads into the installer.resolve/Fusion/Modules/OpenBeat/OpenBeatCommon.luato handle Windows path separators, normalizedirname, choose temp directories fromTMPDIR/TEMP, find.venvPython on Windows (Scripts/python.exe), create acommand_prefix()that invokes the bundled CLI, and write logs to%APPDATA%/macOS locations..gitignoreto ignore build artifacts and add installer build docs toREADME.mddescribing the new installer option and local build instructions.Testing
Codex Task
Summary by CodeRabbit
New Features
.pkg) and Windows (.exe) distributionsDocumentation