fix: Windows core build, embedded init, byte-exact paths, version info

Closes the remaining core/lib/termio/GTK rows (final-Z2.md):
- ghostty-core compiles for Windows (Unix-only exec fields and file
  modes gated); checked with cargo check --target x86_64-pc-windows-gnu.
- Embedded init: ensure_locale, SIGPIPE ignored in ghostty_init for
  C/Swift hosts, Apple crash tags; the argv passed to ghostty_init feeds
  ghostty_config_load_cli_args; ghostty_config_load_file accepts
  non-UTF-8 paths.
- OSC 7 pwd, embedded surface cwd/command/env/initial input,
  ghostty_surface_text and GTK file drops keep raw bytes.
- XTVERSION, TERM_PROGRAM_VERSION, the About dialog and crash metadata
  use ghostty_build_info instead of hardcoded versions.

Test Plan:
- cargo test --workspace (3327 passed)
- cargo clippy --workspace --all-targets -- -D warnings
This commit is contained in:
ddidderr committed 2026-10-12 08:14:02 +02:00
1 parent 8519f1ba1b
commit ebefad5031
30 files changed
+863 -80

No files matched your search

+13 -1
View File
@@ -215,6 +215,12 @@ impl Surface {
}
}
/// [`Surface::complete_clipboard_request`] for a paste of raw bytes
/// (Zig passes `[]const u8`; e.g. dropped non-UTF-8 file names).
pub fn complete_paste_bytes(&self, data: &[u8], confirmed: bool) -> Result<(), ClipboardError> {
self.complete_clipboard_paste(data, confirmed)
}
/// Paste text (also the target of `text_callback`).
pub(crate) fn complete_clipboard_paste(
&self,
@@ -390,7 +396,13 @@ impl Surface {
/// `textCallback`: text input that is pasted verbatim.
pub fn text_callback(&self, text: &str) -> Result<(), ClipboardError> {
self.text_callback_bytes(text.as_bytes())
}
/// [`Surface::text_callback`] for raw bytes (Zig takes `[]const u8`;
/// the embedded `ghostty_surface_text` forwards the host bytes as is).
pub fn text_callback_bytes(&self, text: &[u8]) -> Result<(), ClipboardError> {
let _crash = self.crash_guard();
self.complete_clipboard_paste(text.as_bytes(), true)
self.complete_clipboard_paste(text, true)
}
}