feat(app): the Windows program opens no console window; the window is named Wanderbooks (P15 C1)
The installed program is one executable that is the window, the books server's child and the assistants' bridge. Built for the Windows GUI subsystem, a Start Menu launch shows no console; console.rs gives a command run in a terminal its words back and never replaces a pipe an assistant handed the bridge. The two console programs the window starts (the agent's own list, the system's opener) get CREATE_NO_WINDOW. The window title is the product name; the storage id and the Linux app id stay lowercase so nothing already kept moves. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
a44744253d
commit
3b02e70794
9 files changed
+134
-15
No files matched your search
@@ -9,6 +9,13 @@
|
||||
//! From nothing to the first post: `wanderbooks setup`, `wanderbooks books
|
||||
//! create ID`, `wanderbooks connect claude --book ID` (then talk to the
|
||||
//! agent).
|
||||
//!
|
||||
//! On Windows the executable is built for the GUI subsystem, so starting
|
||||
//! it from the Start Menu opens no console window; `console` gives a
|
||||
//! command run in a terminal its words back (WB-pkg-2).
|
||||
#![cfg_attr(all(windows, feature = "gui"), windows_subsystem = "windows")]
|
||||
|
||||
mod console;
|
||||
|
||||
use std::env;
|
||||
use std::io::Write;
|
||||
@@ -700,6 +707,11 @@ fn main() {
|
||||
eprintln!("error: an argument isn't UTF-8 text");
|
||||
std::process::exit(2);
|
||||
};
|
||||
// A command run in a terminal prints there; the app (no words) opens
|
||||
// no console at all (console.rs).
|
||||
if !words.is_empty() {
|
||||
console::attach_parent_console();
|
||||
}
|
||||
// A bare launch is the viewer.
|
||||
if is_bare_launch(&words, std::io::IsTerminal::is_terminal(&std::io::stdin())) {
|
||||
std::process::exit(run_gui(Vec::new()));
|
||||
|
||||
Reference in new issue
Block a user