Add installer build tooling and cross-platform runtime fixes - #5
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a CI workflow and a build script to produce macOS Changes
Sequence DiagramsequenceDiagram
participant GH as GitHub Actions
participant Build as scripts/build_installers.py
participant PyI as PyInstaller
participant mac as macOS Tools (pkgbuild/postinstall)
participant win as Windows Tools (embedded installer runtime)
participant Art as Artifact Storage
GH->>Build: trigger (push/PR/dispatch)
Build->>PyI: build one-file CLI binary
PyI-->>Build: produced CLI artifact
alt macOS
Build->>mac: stage Fusion payload + create postinstall
Build->>mac: run pkgbuild -> .pkg
mac-->>Build: OpenBeat.pkg
Build->>Art: upload .pkg
else Windows
Build->>win: stage payload + generate installer entry script
Build->>PyI: build installer .exe
PyI-->>Build: OpenBeat-installer.exe
Build->>Art: upload .exe
end
Art-->>GH: artifacts available
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 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: 4dbb60837f
ℹ️ 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".
| if lowered:match("python%.exe$") or lowered:match("python$") then | ||
| return shell_quote(bin) .. " -m openbeat.cli" |
There was a problem hiding this comment.
Append module flag for python3-based command prefixes
python_bin() falls back to "python3" when no local config/venv is found, but command_prefix() only appends -m openbeat.cli for names ending in python or python.exe. In that fallback path, generated commands become "python3" analyze ..., so Python tries to open a script named analyze and OpenBeat actions fail. This is a regression from the prior behavior where the module invocation was always added.
Useful? React with 👍 / 👎.
| if args.platform in ("macos", "all"): | ||
| outputs.append(create_macos_pkg(cli_binary=cli_binary, version=version)) | ||
|
|
||
| if args.platform in ("windows", "all"): | ||
| outputs.append(create_windows_exe(cli_binary=cli_binary, version=version, python_bin=args.python)) |
There was a problem hiding this comment.
Prevent
--platform all from invoking unsupported builders
The default flow executes both installers, but each builder is OS-specific (create_macos_pkg requires pkgbuild, while create_windows_exe assumes a Windows .exe output path). As written, running with --platform all (the default and also what README recommends) fails on a single host OS instead of producing usable local output. Guarding by host OS or changing the default to the current platform would avoid this failure mode.
Useful? React with 👍 / 👎.
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
Documentation
Chores