[PR #6496] fix(desktop): Windows support for PTY and cross-platform build scripts #11933

Closed
opened 2026-02-16 18:16:52 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6496

State: closed
Merged: No


Summary

  • Add Windows PTY library support at runtime with proper path handling
  • Bundle PTY library for all target platforms in build process
  • Fix desktop build scripts to work cross-platform without requiring env vars

Changes

  • packages/opencode/src/pty/index.ts: Add Windows
    ust_pty.dll detection, normalize paths with forward slashes, quote commands with spaces, add try-catch for better error logging
  • packages/opencode/script/build.ts: Install un-pty for all OS/CPU combinations, copy platform-specific PTY library to dist
  • packages/desktop/scripts/utils.ts: Add RUST_TARGET fallback for local dev, use s API instead of shell commands, derive PTY library name from target triple (not process.platform)
  • packages/desktop/scripts/predev.ts: Handle .exe extension for Windows binaries
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6496 **State:** closed **Merged:** No --- ## Summary - Add Windows PTY library support at runtime with proper path handling - Bundle PTY library for all target platforms in build process - Fix desktop build scripts to work cross-platform without requiring env vars ## Changes - **packages/opencode/src/pty/index.ts**: Add Windows ust_pty.dll detection, normalize paths with forward slashes, quote commands with spaces, add try-catch for better error logging - **packages/opencode/script/build.ts**: Install un-pty for all OS/CPU combinations, copy platform-specific PTY library to dist - **packages/desktop/scripts/utils.ts**: Add RUST_TARGET fallback for local dev, use s API instead of shell commands, derive PTY library name from target triple (not process.platform) - **packages/desktop/scripts/predev.ts**: Handle .exe extension for Windows binaries
yindo added the pull-request label 2026-02-16 18:16:52 -05:00
yindo closed this issue 2026-02-16 18:16:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11933