Connecting from the 0.22.0 Windows client bounces straight back to the host list, on every host. The shell is fine; the binary it spawns is not.b0ea1e6bwas a `clients/linux` change that also dropped a verbatim copy of the GTK shell into `clients/session/src/` — app.rs, cli.rs, the four ui_*.rs, shortcuts.rs, spawn.rs — and, fatally, OVERWROTE `clients/session/src/main.rs` with the shell's. That file is `[[bin]] punktfunk-session`. So the binary every shell execs for a stream stopped being the Vulkan session and became the GTK shell: - Windows: the shell's `#[cfg(not(target_os = "linux"))]` arm — print "punktfunk-client is Linux-only" to stderr, `exit(2)`. It never writes a single line of the stdout contract, so the shell sees EOF with no `ready`, no `error`, no `ended`, and returns to the host list with a BLANK banner. Exactly the report. - Linux: `app::run()` sees `--connect` in argv and calls `exec_session()`, which execs `punktfunk-session` — itself. A stream is an exec loop. CI could not catch it. The Windows leg of the clobbered file is a three-line stub that compiles perfectly; `cargo build -p punktfunk-client-session` stayed green while building the wrong program. Only running it fails, and nothing runs it.61bdf11ethen read the 327 E0433s on the Linux leg as a missing-manifest bug and declared gtk4/libadwaita/relm4 on this crate. That fixed the build of the wrong file and cemented the clobber. Both go: the copy is deleted, `main.rs` is restored frombf981027(the last commit that touched the real one), and the manifest loses the GTK block plus the gresource build-dep and `data/` that arrived with944c03ddto feed it. serde_json returns to `optional`/`ui`, which is what it always was — the reason `--no-default-features` didn't compile was cli.rs, and cli.rs was never ours. Also closes the hole that made this silent. `SpawnEvent::Exited` now carries the child's exit code, and a child that exits nonzero having said NOTHING gets a banner naming that code instead of an empty string. Code 0 (stream window closed) and -1 (our own Disconnect/Cancel kill) stay silent, as before. A wrong or crashing session binary is now a legible failure rather than a connect that quietly does nothing. Verified. Windows x86_64 on the CI runner: check, clippy -D warnings, rustfmt, tests (5 passed, incl. the new one) all green, and the rebuilt punktfunk-session.exe answers `--connect` with `{"error":"presenter: SDL window: …"}` — the real contract — where 0.22.0's answered with nothing. Linux amd64 in the CI image: check with default AND --no-default-features, clippy -D warnings, rustfmt, tests green, and the built binary emits `{"error":"presenter: SDL video: …"}` + exit 4 instead of exec-looping. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
28 lines
1.4 KiB
Rust
28 lines
1.4 KiB
Rust
//! Embed the Windows version-info + icon resources into `punktfunk-session.exe`. The
|
|
//! icon drives Explorer, and `pf-presenter`'s `win32::stamp_window_icon` loads it by
|
|
//! ordinal 1 onto the SDL window's title bar / taskbar / Alt-Tab (SDL's own window-class
|
|
//! icon is the generic default).
|
|
|
|
fn main() {
|
|
// No Linux leg: this binary carries no toolkit, so it has no gresource to compile. The
|
|
// OS-mark icons belong to the GTK shell (`clients/linux/data`), which builds its own.
|
|
|
|
// cfg(windows) is the HOST (skips Linux/macOS builds of this cross-platform binary);
|
|
// CARGO_CFG_WINDOWS is the TARGET (x64 and cross-compiled ARM64 both pass).
|
|
#[cfg(windows)]
|
|
if std::env::var_os("CARGO_CFG_WINDOWS").is_some() {
|
|
let icon = "../../packaging/windows/branding/punktfunk.ico";
|
|
println!("cargo:rerun-if-changed={icon}");
|
|
winresource::WindowsResource::new()
|
|
// Ordinal 1 — pf-presenter's win32.rs loads it by this id for WM_SETICON.
|
|
.set_icon_with_id(icon, "1")
|
|
// The version-info strings Windows surfaces for the bare exe — UAC prompts,
|
|
// Task Manager and Properties→Details all show FileDescription (without one
|
|
// the exe appears as its raw filename).
|
|
.set("FileDescription", "Punktfunk Session")
|
|
.set("ProductName", "Punktfunk")
|
|
.compile()
|
|
.expect("embed windows icon resource");
|
|
}
|
|
}
|