Skip to content

Add installer build tooling, CI workflow, and cross-platform Lua runtime support - #3

Closed
eimexdev wants to merge 2 commits into
mainfrom
codex/improve-install-flow-with-bundled-python-yugtek
Closed

Add installer build tooling, CI workflow, and cross-platform Lua runtime support#3
eimexdev wants to merge 2 commits into
mainfrom
codex/improve-install-flow-with-bundled-python-yugtek

Conversation

@eimexdev

@eimexdev eimexdev commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide single-file platform installers so end users can install OpenBeat without a separate Python setup by bundling the CLI runtime.
  • Automate building macOS and Windows installers via CI to produce distributable artifacts for releases.
  • Make the Resolve Lua runtime code robust on Windows by handling path separators, temp locations, log paths, and venv layout differences.

Description

  • Add a GitHub Actions workflow /.github/workflows/build-installers.yml to build installers for macos and windows and upload artifacts named openbeat-<platform>-installer.
  • Add scripts/build_installers.py which invokes PyInstaller to produce a single-file CLI binary and then packages a macOS .dmg (install.command) and a Windows installer .exe (single-file PyInstaller wrapper that installs files into the Resolve Fusion folders).
  • Update resolve/Fusion/Modules/OpenBeat/OpenBeatCommon.lua to be cross-platform by normalizing path separators, adding is_windows, path_sep, Windows-safe shell_quote, command_prefix, improved python_bin detection (including .venv/Scripts/python.exe), portable temp_path, and Windows-aware logging paths; switch calls like analyze_source and render_click_track to use the new command prefix.
  • Update README.md to document the new installer options and local build steps, and add build/ and dist/ to .gitignore to avoid committing build artifacts.

Testing

  • No automated tests were added or executed for this change in-tree as part of the rollout.
  • A CI workflow was added (Build Installers) which will run on push, pull_request, and workflow_dispatch and will perform the automated build steps when triggered.

Codex Task

Summary by CodeRabbit

  • New Features

    • CI-built, downloadable platform-specific installers for macOS and Windows
    • Simplified single-file installer option for easier installation
  • Documentation

    • Installation guide updated with pre-built installer option and local build instructions
  • Quality of Life

    • Improved cross-platform behavior and path handling for more reliable installs and usage on Windows and Unix systems

@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: 63738782-3e32-4012-b0fa-b3076cad2627

📥 Commits

Reviewing files that changed from the base of the PR and between 3179561 and 35fcf8d.

📒 Files selected for processing (3)
  • .github/workflows/build-installers.yml
  • README.md
  • scripts/build_installers.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

📝 Walkthrough

Walkthrough

Adds platform-specific installer build support: a GitHub Actions workflow to build macOS and Windows installers, a local Python build script using PyInstaller to produce packaged installers and payloads, cross-platform path/env handling in OpenBeat Lua code, and README updates documenting installer usage and local builds.

Changes

Cohort / File(s) Summary
CI / Workflow
\.github/workflows/build-installers.yml
New GitHub Actions workflow that runs on push/PR/dispatch with a macOS/Windows matrix; checks out, sets up Python 3.11, builds installers via scripts/build_installers.py, and uploads artifacts.
Ignore Build Outputs
\.gitignore
Added build/ and dist/ to ignore generated installer/build artifacts.
Documentation
README.md
Added Option A for CI-built installers, reorganized developer Option B steps, and added "Building installers locally" instructions using scripts/build_installers.py.
Cross-platform runtime logic
resolve/Fusion/Modules/OpenBeat/OpenBeatCommon.lua
Introduced platform detection, path separator and join helpers, Windows-aware shell quoting, platform-specific log/tmp directory resolution, expanded Python executable discovery (including Windows venv paths), and command_prefix() for conditional CLI invocation.
Installer builder
scripts/build_installers.py
New script that reads version from pyproject.toml, builds a one-file CLI via PyInstaller, stages Fusion payloads, generates macOS pkg (via pkgbuild) and Windows single-file installer executable (PyInstaller onefile with an embedded payload), and writes outputs to dist/installers/.
sequenceDiagram
    autonumber
    participant GH as "GitHub Actions"
    participant Repo as "Repository"
    participant Builder as "scripts/build_installers.py"
    participant PyInstaller as "PyInstaller"
    participant PKG as "pkgbuild (macOS)"
    participant Uploader as "actions/upload-artifact"

    GH->>Repo: checkout code
    GH->>Repo: setup Python 3.11, pip, install deps
    GH->>Builder: run python scripts/build_installers.py --platform (macos|windows)
    Builder->>PyInstaller: build one-file CLI (per-platform)
    Builder->>Repo: stage Fusion payload (resolve/Fusion/...)
    alt macOS
        Builder->>PKG: create pkg with staged payload and postinstall
        PKG-->>Builder: produced OpenBeat-macos-<ver>.pkg
    else Windows
        Builder->>PyInstaller: build installer exe bundling payload
        PyInstaller-->>Builder: produced OpenBeat-windows-<ver>-installer.exe
    end
    Builder->>Uploader: upload produced installer artifact(s)
    Uploader-->>GH: artifact available
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 I hopped through scripts and CI lanes,

Packed bins and payloads, wrapped in trains.
From macOS pkg to Windows EXE,
A rabbit’s build—now installers are free! 🥕✨


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: 3179561f26

ℹ️ 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.

P1 Badge Preserve module invocation for python3 fallback

When no OpenBeatConfig.local.lua is present and no project virtualenv is found, python_bin() falls back to python3, but command_prefix() only appends -m openbeat.cli for executables ending in python or python.exe. In that common fallback path the command becomes python3 analyze ... / python3 click-track ..., which fails because Python treats analyze as a script name instead of a module subcommand; this is a regression from the previous behavior that always used -m openbeat.cli.

Useful? React with 👍 / 👎.

Comment on lines +229 to +233
if args.platform in ("macos", "all"):
outputs.append(create_macos_dmg(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 Avoid defaulting installer builds to unsupported cross-OS mode

The default --platform value is all, and the main flow executes both macOS and Windows packaging branches for that mode; this makes the default command fail on a normal single-OS machine because each branch depends on OS-specific tooling/artifacts (e.g., hdiutil for macOS and .exe output assumptions for the Windows branch). As written, the documented local command path using defaults is not runnable unless callers always remember to override --platform.

Useful? React with 👍 / 👎.

@eimexdev eimexdev closed this Apr 18, 2026
@eimexdev eimexdev reopened this Apr 18, 2026
@eimexdev eimexdev closed this Apr 18, 2026
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