feat(windows): native host and desktop installer - #1426
Conversation
232c866 to
c94ebed
Compare
|
First PR from this fork, so the two Actions workflows are waiting on a maintainer approval (CI + version lockstep). The branch is conflict-free with If someone on the team can approve those runs, the required Ubuntu checks should start. Happy to rebase if #1392 lands first.
|
c94ebed to
73747cb
Compare
|
Rebased onto current Build it with First-fork Actions still need a maintainer approval before the required Ubuntu checks can start.
|
|
Why not the entire #1206 ? :) There is a detailed plan and even verification plan. |
Treat win32 as a first-class host. Project paths accept C:\ and UNC. Protocol 113 carries the platform. Process stop, Git setup hooks, ConPTY, PATHEXT CLI lookup, and bb.cmd follow.
Use path.relative so a relative bb.server entry stays inside the plugin directory on win32. The server manifest uses the same helper.
Unlock @bb/desktop on win32. electron-builder emits win-unpacked/bb.exe, afterPack fetches Electron-ABI natives and the parcel watcher prebuild, and the log viewer plus owned-runtime stop work without POSIX tail or SIGTERM cascade.
Auto-update and the JSON version feed stay darwin-only because there is no Windows latest.yml. Docs call native Windows a source-checkout path, not a published support claim.
electron-builder target is nsis. dist:win writes bb-<version>-x64.exe as a per-user wizard with Start Menu and desktop shortcuts. package:win stays the unpacked smoke path.
One launch spec so Node never spawns .cmd. Protocol 124 carries win32. Drive-letter preview, lexical containment, Explorer folder-open, and windowsHide/log-tail leftovers from the first-cut plan.
73747cb to
8997e2a
Compare
GUI shortcuts inherit a stripped PATH. Read HKLM then HKCU Path instead of spawning pwsh, matching Explorer's environment block.
Fair question. When I opened this I hadn't planned to take on all of #1206. It started as "make a Win11 checkout actually run" (host, C:\ paths, ConPTY, unsigned NSIS). After your comment I went back through the design and verification attachments and treated them as the program. This PR is now written as a first cut of that, same shape as #1392. The rest is listed in plans/windows-native-later.md so it stays on your roadmap instead of a second one. A few #1206 items I can't finish from here even if I wanted to: Authenticode / SmartScreen, a latest.yml Windows feed, required windows-latest CI, and the verification pass with WSL actually disabled. Those need signing secrets, a blessed runner, and a clean machine. What I could do here is already in the branch. Happy to take the next slice from #1206 after this lands, or pull something forward if you want it in this PR! |
signAndEditExecutable: false skipped rcedit, so bb.exe kept Electron's icon and FileDescription. Raycast and Start Menu then showed the atom. Flip the flag so electron-builder stamps icon.ico. Signing still no-ops without a cert.
Pin signAndEditExecutable to true in the config contract. Windows-only electron-builder runs drop CSC_LINK and CSC_KEY_PASSWORD so a macOS p12 cannot reach Authenticode. WIN_CSC_LINK still signs Windows when set.
Hey, hi! This is my attempt on making bb work on windows, i really tried to make things as clean/reviewed as possible, but its still ai generated; Im happy to help in any changes necessary;
I tried to cover properly the CLI, App with electron and the NSIS installation for the .exe
The product-level native Windows 11 program, including the design and
verification plan this PR is a first cut of, is #1206 by Rodion Mostovoi
(@rodion-m).
----- FROM HERE DOWNWARDS ITS AI SLOP -----
Why
Native Windows still has to go through WSL2 today. The product rejects
C:\project paths,
bb-appwill not install onwin32, and the desktop packagewas
os: darwinonly. This is a slice toward Rodion's #1206, not the fullproposal (no signing, no Windows CI, no published
latest.yml).Per CONTRIBUTING this would normally wait for issue sign-off. Opening it so
the concrete diff is easy to evaluate, same approach as #1392.
What changed
Host.
win32is aHostPlatform(protocol 124;mainis 123).Project paths accept drive-letter and UNC input. Process stop uses
taskkill /T. Worktree setup hooks run through Git's bundledbashwhenshis missing. Terminals use ConPTY. Provider CLI lookup honorsPATHEXT.apps/cli/bin/bb.cmdsits next to the Unixbbscript.Launch. One
BbCliLaunchSpec: Node always spawnsprocess.execPathplusthe JS entry.
bb.cmdis only the PATHEXT / agent-shell path. Reexec and thelauncher never
spawna.cmd.Plugins. Manifest containment used
rootDir + "/", so./src/server.tslooked like an escape on Windows. It now uses
path.relative.Desktop.
@bb/desktopinstalls onwin32.dist:winwrites an NSISinstaller (
bb-<version>-x64.exe), per-user, with a Start Menu and desktopshortcut.
package:winonly emitsrelease/win-unpacked/bb.exefor localsmoke.
afterPackfetches Electron-ABIbetter-sqlite3and copies@parcel/watcher-win32-x64. The log viewer tails incrementally (bytesReadand the JSON version feed stay darwin-only. There is no Windows feed yet.
Docs. README,
docs/platform-support.md,docs/worktrees.md, and thebb-appREADME describe the source-checkout path. Published download assetsremain macOS Apple Silicon.
plans/windows-native.mdis this cut;plans/windows-native-later.mdis the rest of #1206.Intentionally deferred
Same spirit as #1392. See
plans/windows-native-later.md.windows-latestCI and packaged E2Elatest.ymlpathKey/ daemon-owned paths, registry PATH,.bb-env-setup.ps1License / contributing
MIT. No CLA. Rebased onto current
main(protocol 124). Happy to restack.