Skip to content

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

Closed
eimexdev wants to merge 1 commit into
mainfrom
codex/improve-install-flow-with-bundled-python-lnqqc5
Closed

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

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

    • Pre-built single-file installers now available for macOS (DMG) and Windows (EXE).
    • Enhanced cross-platform compatibility for installation and configuration.
  • Documentation

    • Updated installation guide with streamlined options: download pre-built installers or install from source.
    • Added instructions for building installers locally.

@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: 5e332d15-bc52-48a1-b57a-8be392e20525

📥 Commits

Reviewing files that changed from the base of the PR and between dd5fb86 and 767188c.

📒 Files selected for processing (5)
  • .github/workflows/build-installers.yml
  • .gitignore
  • README.md
  • resolve/Fusion/Modules/OpenBeat/OpenBeatCommon.lua
  • scripts/build_installers.py

📝 Walkthrough

Walkthrough

This PR introduces cross-platform installer generation for OpenBeat, including a GitHub Actions workflow to automatically build macOS DMG and Windows EXE installers, a Python build script to package the CLI executable and Fusion modules, Lua script updates for Windows path handling, and documentation for both CI-built installer installation and local developer builds.

Changes

Cohort / File(s) Summary
Installer Build Infrastructure
.github/workflows/build-installers.yml, scripts/build_installers.py
New GitHub Actions workflow triggers on main pushes and PRs to build platform-specific installers via matrix. Build script uses PyInstaller to bundle the CLI, packages it with Fusion payloads, and creates versioned DMG/EXE artifacts with embedded installer logic.
Cross-Platform Path Handling
resolve/Fusion/Modules/OpenBeat/OpenBeatCommon.lua
Added OS detection and path utilities (is_windows(), path_sep()) to normalize backslash paths. Updated log file resolution to use Windows-specific DaVinci Resolve paths and USERPROFILE. Enhanced temp directory resolution and Python discovery to support both POSIX/Windows virtualenv layouts. Added command_prefix() to handle Windows-specific command construction.
Configuration & Documentation
.gitignore, README.md
Added build/ and dist/ to gitignore. README now presents two installation paths: Option A for downloading platform-specific CI-built installers (DMG/EXE), and Option B for developer source installation. Added new section documenting local installer builds via build_installers.py.

Sequence Diagram(s)

sequenceDiagram
    participant GHA as GitHub Actions
    participant Checkout as Repository
    participant PyEnv as Python Environment
    participant PyInstaller as PyInstaller
    participant BuildScript as Build Script
    participant FS as File System
    participant DMGTool as hdiutil (macOS)
    
    GHA->>Checkout: Checkout repo
    GHA->>PyEnv: Setup Python 3.11
    PyEnv->>PyEnv: Install project + pyinstaller
    GHA->>BuildScript: Run build_installers.py --platform
    BuildScript->>BuildScript: Parse version from pyproject.toml
    BuildScript->>PyInstaller: Bundle CLI (--onefile)
    PyInstaller->>FS: Generate executable
    BuildScript->>FS: Copy Fusion payload assets
    alt macOS
        BuildScript->>FS: Generate install.command script
        BuildScript->>DMGTool: Create installer DMG
        DMGTool->>FS: Write *.dmg
    else Windows
        BuildScript->>FS: Generate installer entry script
        BuildScript->>PyInstaller: Bundle as openbeat-installer.exe
        PyInstaller->>FS: Generate one-file EXE
    end
    BuildScript->>FS: Write to dist/installers/
    GHA->>FS: Upload artifact
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐰 Our installers hop cross every land,
macOS and Windows, hand-in-hand,
PyInstaller bundles with Lua-smart paths,
DMGs and EXEs—the build's aftermath!
From workflows to scripts, our tooling's complete,
One-file happiness, oh how neat!


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: 767188c1f6

ℹ️ 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 Handle python3 in command_prefix as interpreter

The new command_prefix() logic only appends -m openbeat.cli when the executable ends with python or python.exe, but python_bin() now falls back to python3. In any install where OpenBeatConfig.local.lua is missing/invalid and no .venv Python is found, generated commands become "python3" analyze ... / "python3" click-track ..., which makes Python treat analyze as a script path and fail immediately. This is a regression from the previous behavior where fallback always executed the CLI module.

Useful? React with 👍 / 👎.

@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