Skip to content

Add optional Windows LuaBinaries installs#13

Merged
yeshan333 merged 15 commits into
mainfrom
feature/windows-luabinaries-option
May 24, 2026
Merged

Add optional Windows LuaBinaries installs#13
yeshan333 merged 15 commits into
mainfrom
feature/windows-luabinaries-option

Conversation

@yeshan333
Copy link
Copy Markdown
Owner

Summary

Add an opt-in Windows installation path that downloads prebuilt LuaBinaries packages instead of compiling Lua from source.

Changes

  • add VFOX_LUA_WINDOWS_LUABINARIES=1 to switch Windows installs from source builds to LuaBinaries packages
  • map supported LuaBinaries versions and normalize versioned executables like lua54.exe into lua.exe/luac.exe
  • document the Windows opt-in flow in the README
  • add a dedicated GitHub Actions job that exercises Windows LuaBinaries installs for 5.5.0, 5.4.8, and 5.3.6

Testing

  • git diff --check HEAD~3..HEAD
  • ruby -e "require 'yaml'; YAML.load_file('.github/workflows/e2e_test.yaml')"
  • manual download validation for LuaBinaries Win64_bin.zip packages for 5.5.0, 5.4.8, 5.3.6, 5.2.4

Notes

  • the default Windows install path remains the existing MSYS2 source-build flow
  • the LuaBinaries option currently supports the verified versions 5.5.0, 5.4.8, 5.3.6, and 5.2.4

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an opt-in Windows installation path for the vfox Lua plugin that downloads and installs prebuilt LuaBinaries artifacts (instead of compiling Lua via MSYS2), and validates that flow in CI.

Changes:

  • Add VFOX_LUA_WINDOWS_LUABINARIES=1 flag to switch Windows installs to LuaBinaries downloads (with a supported-version map).
  • Add Windows post-install normalization that renames versioned executables (e.g., lua54.exe) into lua.exe/luac.exe.
  • Document the opt-in flow and add a dedicated GitHub Actions job to exercise it.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
README.md Documents the Windows opt-in LuaBinaries flow and supported versions.
lib/utils.lua Adds LuaBinaries version/package metadata and helpers to enable the opt-in path.
hooks/pre_install.lua Switches download URL selection to LuaBinaries when the opt-in flag is set.
hooks/post_install.lua Adds a PowerShell-based post-install step to normalize LuaBinaries layout into expected bin/root executables.
hooks/env_keys.lua Prepends install root to PATH when a root lua.exe exists (LuaBinaries path).
.github/workflows/e2e_test.yaml Adds a Windows CI job to validate LuaBinaries installs for selected versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hooks/post_install.lua Outdated
Comment thread hooks/post_install.lua Outdated
Comment thread hooks/pre_install.lua Outdated
Comment thread hooks/pre_install.lua Outdated
Comment thread lib/utils.lua Outdated
Comment thread .github/workflows/e2e_test.yaml Outdated
yeshan333 and others added 7 commits May 23, 2026 15:34
The previous PowerShell-based copy was being echoed to stdout instead
of executed in CI, leaving lua.exe missing from the install dir. Use
binary io.open read/write so the copies are independent of any shell
quoting or invocation rules.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The mkdir for an extra bin/ subdirectory was failing on the Windows
runner ("The filename, directory name, or volume label syntax is
incorrect"). Since env_keys.lua already prepends the install root to
PATH, the canonical-name aliases (lua.exe, luac.exe, wlua.exe) only
need to live in the install root next to the original lua54.exe etc.
This removes the only os.execute call from the LuaBinaries path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Why: PR #13 reviewer flagged the supply-chain risk of installing
prebuilt LuaBinaries archives without integrity checking. The skip
is deliberate (SourceForge mirror-redirect breaks the hash), but
that rationale wasn't visible in the code or to end users.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@yeshan333
Copy link
Copy Markdown
Owner Author

@codex[agent] review please

Copy link
Copy Markdown

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

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: 8e1b3bb1d0

ℹ️ 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 thread hooks/env_keys.lua Outdated
@Codex
Copy link
Copy Markdown

Codex AI commented May 24, 2026

@codex[agent] review please

Reviewed current PR state at 8e1b3bb. The E2E tests workflow run 26353157141 is green (including the Windows LuaBinaries job), and the hook/utils changes look consistent with the opt-in behavior. No further changes requested.

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

Why: Codex review on PR #13 flagged that EnvKeys was gating the
extra PATH entry on VFOX_LUA_WINDOWS_LUABINARIES. That flag is an
install-time opt-in and isn't persisted per SDK, so any later
`vfox use` in a shell without the flag would leave the LuaBinaries
install unusable. Probing for the root lua.exe is stable across
activation shells and cleanly distinguishes the LuaBinaries layout
from the MSYS2 source build (which only populates bin/).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@yeshan333 yeshan333 merged commit da17af0 into main May 24, 2026
17 checks passed
@yeshan333 yeshan333 deleted the feature/windows-luabinaries-option branch May 24, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants