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

+8 -2
View File
@@ -43,7 +43,10 @@ fn host_program_passes() {
"host failed\nstdout:\n{stdout}\nstderr:\n{stderr}"
);
assert!(stdout.contains("OK"), "stdout:\n{stdout}");
assert!(stdout.contains("version=1.3.1"), "stdout:\n{stdout}");
assert!(
stdout.contains(&format!("version={}", ghostty_build_info::VERSION_STRING)),
"stdout:\n{stdout}"
);
}
#[test]
@@ -55,7 +58,10 @@ fn cli_try_action_runs_version_and_exits() {
"stderr: {}",
String::from_utf8_lossy(&out.stderr)
);
assert!(stdout.starts_with("Ghostty 1.3.1"), "stdout:\n{stdout}");
assert!(
stdout.starts_with(&format!("Ghostty {}", ghostty_build_info::VERSION_STRING)),
"stdout:\n{stdout}"
);
// The action ran instead of the rest of the program.
assert!(!stdout.contains("OK"));
}