Repository navigation
feat(distribution): install Open Canvas on Windows - #95
Merged
Merged
Conversation
Windows reports fixed POSIX mode bits and cannot open a directory to fsync it, so the 0700 checks and directory flush made the workspace service refuse to start. Skip those POSIX-only steps on win32 and refuse symlinks explicitly where O_NOFOLLOW does not exist.
install.ps1 mirrors install.sh for Windows: latest, -Version vX.Y.Z or a local -Archive, HTTPS-only downloads with manual redirect checks, SHA-256 verification, staged extraction, a smoke run of the bundle before it is stored, a path-relative command shim in ~/.open-canvas/install/bin that is added to the user PATH, and no overwriting of foreign files. It needs no administrator rights. .gitattributes pins line endings for shell scripts and Windows batch files.
package:local now builds open-canvas-win32-<arch>.tar.gz with node.exe, a bin/open-canvas.cmd launcher and install.ps1. Windows archives use a flat node_modules and replace pnpm's absolute workspace junctions with copies so the tree can be extracted anywhere. The archive keeps the .tar.gz name used by the updater and is written with the system bsdtar.
open-canvas update recognizes the Windows shim layout and runs install.ps1 through Windows PowerShell. mcp-config prints a cmd.exe entry because MCP clients cannot launch a .cmd file directly.
Add win32-x64 and win32-arm64 targets to the manual archive workflow. Windows installs the built archive into a temporary profile with Windows PowerShell 5.1, checks the user PATH entry, rejects a bad checksum, starts the editor with --no-open, requests runtime.json and the browser session, and starts the MCP entry printed by mcp-config. Existing targets keep their steps.
File.Replace received an empty backup path from a PowerShell null and rejected it, so reinstalling over an existing command failed.
Describe the PowerShell installer, Windows layout, MCP entry, update and uninstall steps, and the Windows runtime differences. Record the CI run that exercised both Windows architectures and list what remains unverified. Add the minor changeset.
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The downloadable local app only installed on macOS and Linux. Windows users had no way to install it, even though the bundled Node.js, esbuild, sharp and the native canvas library all ship Windows builds. This adds a Windows package and a PowerShell installer with the same behavior as
install.sh: latest or pinned release, HTTPS-only download, SHA-256 check, staged extraction, a smoke run before switching, and no overwriting of files the installer did not create. It needs no administrator rights.Three things stopped the existing package from working on Windows, beyond the missing launcher and installer:
node_modulesand ship copies of the three shared workspace packages.open-canvas mcp-configprinted a.cmdpath, which most MCP clients cannot launch directly. On Windows it now prints acmd /centry.What users will see
On Windows, in PowerShell:
The command lives in
%USERPROFILE%\.open-canvas\install\bin, which is added to the user PATH. Releases are stored under%USERPROFILE%\.open-canvas\install\releases.open-canvas update,open-canvas changelogandopen-canvas mcp-configwork with that layout.-Version vX.Y.Zand-Archivemirror the shell installer options. On macOS and Linux nothing changes.A release needs
open-canvas-win32-x64.tar.gzandopen-canvas-win32-arm64.tar.gzwith their.sha256files attached before the install command works. The manual archive workflow now builds these two beside the four existing archives.Affected areas
mcp-configentry on Windows only; no tools changed)Acceptance criteria
node.exe,bin/open-canvas.cmd, checksum file: built on a real Windows runner, observed.update,changelog,mcp-configwith the Windows layout:changelogandmcp-configobserved in CI, and the installed-shim detection thatupdatedepends on was exercised. A realupdateto a newer release is unverified.windows-11-armrunners are available. It passed the same checks as x64.Verification
Local, Linux x64 (Node 24.22.1, pnpm 12.21.0):
corepack pnpm run check: passed.corepack pnpm run build: passed.corepack pnpm run changeset:status --since=origin/main: passed, minor bump for@open-cavas/web.git diff --check origin/main: clean.corepack pnpm run package:local <dir>, thenbash scripts/install.sh --archive <archive>into a temporary HOME: installed,open-canvas --versionprinted 0.7.1,runtime.jsonand the session POST returned 200,mcp-configunchanged.install.ps1parsed under PowerShell 7 on Linux, and its download helper was run against a real GitHub redirect, a 404 and an HTTP URL. The installer itself cannot run on Linux.CI: manual workflow
package-local.ymlonfeat/windows-package, run https://github.com/utpalsinghdev/open-canvas/actions/runs/44585766032, all six jobs passed: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64 (windows-2025), win32-arm64 (windows-11-arm). An earlier run (44585318147) failed on both Windows targets at the reinstall step, whereFile.Replacerejected a PowerShell null backup path; the fix is in this PR.The Windows jobs, using Windows PowerShell 5.1 and a temporary
USERPROFILE: installed the built archive, confirmed the user PATH entry, printed--version, rejected a wrong checksum and kept the working command, reinstalled the same archive, ran the installed bundle's managed-install check, printed the changelog, startedopen-canvas.cmd --no-open, fetchedruntime.json, posted the browser session request, and started the exactmcp-configentry and received aninitializeresponse.Not run: a real
updateto a newer published release, the publishedirm | iexURL, browser launch without--no-open, Ctrl+C handling, force-kill recovery, paths with spaces or non-ASCII characters, Windows 10, a machine without the Microsoft Visual C++ Redistributable, antivirus or SmartScreen prompts, and a real MCP client application.Docs and limits
Updated README, install, runtime, local workspaces and verification. Added
.changeset/windows-package.md(minor).Limits:
taskkill /Tends them. Command Prompt may ask "Terminate batch job (Y/N)?" on Ctrl+C.binentry from the user PATH by hand.🤖 Generated with Claude Code