Support Windows #99
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
lazyforge ships Linux and macOS binaries only. A Windows user is coming soon, so it needs a Windows build and a way to install it.
Acceptance criteria
windows/amd64andwindows/arm64archives alongside the existing four, with their lines inchecksums.txt. (design.md → Install and updates)irm .../install.ps1 | iex) picks the right binary, verifies its checksum, installs to%LOCALAPPDATA%\Programs\lazyforge, and adds that directory to the user'sPATH. Running it again upgrades in place. (design.md → Install: "one command ... verifies its checksum ... running it again upgrades in place")lazyforge.exe, and starts the new version. A failed start rolls back to the old one. (design.md → Updates)%AppData%\lazyforge) on Windows; XDG overrides still win.token_cmdworks on Windows.$EDITORcomments work on Windows; with$EDITORunset the fallback isnotepad, notvi.make checkstays green on Linux and also cross-compiles the Windows targets.Plan
Makefile/release: addwindows/amd64,windows/arm64; package those aslazyforge_<tag>_windows_<arch>.zipcontaininglazyforge.exe.install.ps1(new), plus a check inscripts/that the zip asset names match whatmake releaseproduces.internal/update: asset extension and entry name by GOOS (.zip+lazyforge.exeon windows); extraction viaarchive/zip.cmd/lazyforge/update.go: re-exec bysyscall.Execon Unix; on Windows start the new exe as a child with stdio attached, wait, and exit with its code (build-tagged files, no runtime GOOS branching aroundsyscall.Exec).internal/config/paths.go: windows usesos.UserConfigDir()for both files, as darwin does.internal/ui/actions.go:openBrowserusesrundll32 url.dll,FileProtocolHandleron windows; editor fallbacknotepadon windows.internal/config/token.go:cmd /Con windows,sh -celsewhere.make check: addGOOS=windows go buildandgo vet.Context
GOOS=windows go build ./cmd/lazyforgealready succeeds, so the gaps are behavioral.syscall.Execcompiles on windows but always errors, so the update would apply, fail to restart, and roll back (cmd/lazyforge/update.go:65).internal/update/update.go:116hard-codes.tar.gz;extractlooks for an entry namedlazyforge.internal/config/paths.go:25special-cases darwin only; others get~/.config.internal/ui/actions.go:50only knowsxdg-open/open;:306falls back tovi.internal/config/token.go:25runssh -c.Applystill works.Out of scope
winget/scoop/Chocolatey packages, code signing, Windows CI runners (cross-compile only), terminal-image protocol support on Windows.
🤖 merged: #108