diff --git a/eframe/examples/file_dialog.rs b/eframe/examples/file_dialog.rs index d1c0ca79..b9767e3e 100644 --- a/eframe/examples/file_dialog.rs +++ b/eframe/examples/file_dialog.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release + use eframe::{egui, epi}; #[derive(Default)] diff --git a/eframe/examples/hello_world.rs b/eframe/examples/hello_world.rs index 49a07d50..9a944929 100644 --- a/eframe/examples/hello_world.rs +++ b/eframe/examples/hello_world.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release + use eframe::{egui, epi}; struct MyApp { diff --git a/eframe/examples/image.rs b/eframe/examples/image.rs index dda07f36..91e0f4f5 100644 --- a/eframe/examples/image.rs +++ b/eframe/examples/image.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release + use eframe::{egui, epi}; #[derive(Default)] diff --git a/egui_demo_app/src/main.rs b/egui_demo_app/src/main.rs index eae34c46..75e36cdf 100644 --- a/egui_demo_app/src/main.rs +++ b/egui_demo_app/src/main.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release + // Forbid warnings in release builds: #![cfg_attr(not(debug_assertions), deny(warnings))] #![forbid(unsafe_code)] diff --git a/egui_glium/examples/native_texture.rs b/egui_glium/examples/native_texture.rs index c380d66f..4c2b7a21 100644 --- a/egui_glium/examples/native_texture.rs +++ b/egui_glium/examples/native_texture.rs @@ -1,4 +1,7 @@ //! Example how to use [epi::NativeTexture] with glium. + +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release + use epi::NativeTexture; use glium::glutin; diff --git a/egui_glium/examples/pure_glium.rs b/egui_glium/examples/pure_glium.rs index a9610f3c..0578f4c9 100644 --- a/egui_glium/examples/pure_glium.rs +++ b/egui_glium/examples/pure_glium.rs @@ -1,4 +1,7 @@ //! Example how to use pure `egui_glium` without [`epi`]. + +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release + use glium::glutin; fn create_display(event_loop: &glutin::event_loop::EventLoop<()>) -> glium::Display { diff --git a/egui_glow/examples/pure_glow.rs b/egui_glow/examples/pure_glow.rs index a4b04f48..e954fb2a 100644 --- a/egui_glow/examples/pure_glow.rs +++ b/egui_glow/examples/pure_glow.rs @@ -1,5 +1,7 @@ //! Example how to use pure `egui_glow` without [`epi`]. +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release + fn create_display( event_loop: &glutin::event_loop::EventLoop<()>, ) -> (