Hide console on windows for all examples in release builds (#1008)

This commit is contained in:
Emil Ernerfeldt 2021-12-30 22:43:53 +01:00 committed by GitHub
parent 4ef21380a2
commit 753d709d3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 0 deletions

View file

@ -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)]

View file

@ -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 {

View file

@ -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)]

View file

@ -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)]

View file

@ -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;

View file

@ -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 {

View file

@ -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<()>,
) -> (