Skip to content

Add installer build tooling and cross-platform runtime fixes - #5

Merged
eimexdev merged 2 commits into
mainfrom
codex/improve-install-flow-with-bundled-python-rvgk7u
Apr 19, 2026
Merged

Add installer build tooling and cross-platform runtime fixes#5
eimexdev merged 2 commits into
mainfrom
codex/improve-install-flow-with-bundled-python-rvgk7u

Conversation

@eimexdev

@eimexdev eimexdev commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a CI-driven way to produce single-file installers for macOS and Windows so users can install OpenBeat without a local Python environment.
  • Make Resolve-side Lua code more robust on Windows and non-macOS environments by normalizing paths, locating runtime binaries, and writing logs to appropriate platform locations.

Description

  • Add a GitHub Actions workflow Build Installers at .github/workflows/build-installers.yml that builds macOS and Windows installers and uploads artifacts.
  • Add scripts/build_installers.py to build a PyInstaller single-file CLI and package platform-specific installers: OpenBeat-macos-<version>.pkg and OpenBeat-windows-<version>-installer.exe, and copy Resolve script/module payloads into the installer.
  • Update resolve/Fusion/Modules/OpenBeat/OpenBeatCommon.lua to handle Windows path separators, normalize dirname, choose temp directories from TMPDIR/TEMP, find .venv Python on Windows (Scripts/python.exe), create a command_prefix() that invokes the bundled CLI, and write logs to %APPDATA%/macOS locations.
  • Update .gitignore to ignore build artifacts and add installer build docs to README.md describing the new installer option and local build instructions.

Testing

  • No automated tests were executed as part of this change; the PR adds a CI workflow to build installers on push/PR and includes runtime packaging checks executed by the installer script itself when run.

Codex Task

Summary by CodeRabbit

  • New Features

    • Platform-specific installers available for Windows (.exe) and macOS (.pkg)
    • Improved cross-platform behavior and Windows compatibility
  • Documentation

    • Installation guide updated with installer download option and local build instructions
  • Chores

    • Added CI workflow to build and publish installers
    • VCS ignores updated to exclude build output directories

@coderabbitai

coderabbitai Bot commented Apr 18, 2026

Copy link
Copy Markdown
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: e5e48cbb-57a0-4d04-b16f-a6b16ae3e943

📥 Commits

Reviewing files that changed from the base of the PR and between 4dbb608 and 4053412.

📒 Files selected for processing (1)
  • .github/workflows/build-installers.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/build-installers.yml

📝 Walkthrough

Walkthrough

Adds a CI workflow and a build script to produce macOS .pkg and Windows .exe installers for the OpenBeat CLI, updates Lua utilities for cross-platform paths and shell handling, and updates documentation and .gitignore to reflect build outputs.

Changes

Cohort / File(s) Summary
CI / Workflow
.github/workflows/build-installers.yml
New GitHub Actions workflow that runs on pushes to main, pull requests, and manual dispatch; runs a platform matrix, sets up Python 3.11, builds installers via scripts/build_installers.py, and uploads artifacts.
Build Script
scripts/build_installers.py
New Python script that builds a PyInstaller one-file CLI binary, stages Fusion OpenBeat payload, and generates platform-specific installers: macOS .pkg using pkgbuild + postinstall script, and a Windows self-extracting .exe with embedded installation logic; supports --platform and --python.
Cross-Platform Runtime
resolve/Fusion/Modules/OpenBeat/OpenBeatCommon.lua
Introduces Windows detection, platform-specific path_sep, normalized dirname/join_path, Windows-aware shell_quote, environment-based log and temp paths, venv-aware python_bin lookup, and a command_prefix to build CLI invocation.
Docs & Ignore
README.md, .gitignore
Added build/ and dist/ to .gitignore. README updated with Option A installer downloads, local build instructions (scripts/build_installers.py --platform all), and developer-from-source demoted to Option B.

Sequence Diagram

sequenceDiagram
    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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hop with glee and tiny paws,

building bundles without a pause.
macOS pkg and Windows exe,
installers ready — one, two, three!
A carrot-cheer for cross-platform laws 🥕


Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +152 to +153
if lowered:match("python%.exe$") or lowered:match("python$") then
return shell_quote(bin) .. " -m openbeat.cli"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +238 to +242
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))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@eimexdev
eimexdev merged commit 3d83fd9 into main Apr 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant