Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide console window on Windows in release #410

Closed

Conversation

yangcancai
Copy link
Contributor

No description provided.

@yangcancai
Copy link
Contributor Author

#409

@aaravlu
Copy link
Contributor

aaravlu commented Feb 27, 2025

You can try to write this in Cargo.toml, i am not sure it can work well on 2024 edition.

[[bin]]
name = "package_name"
path = "src/main.rs"
windows_subsystem = "windows"

For cfg_attr(not(debug_assertions) still stay in main, i dont know how to seperate it.

@ZhangHanDong ZhangHanDong added the waiting-on-review This issue is waiting to be reviewed label Feb 28, 2025
@kevinaboos
Copy link
Member

Thanks! This is certainly an improvement that we should make. However, one of the rules of Robrix's implementation is that we must not contain any platform-specific code, as one of the goals of Robrix is to demonstrate that an app dev can write a fully-complex app without any platform-specific code considerations.

Overall, I think this change should happen within Makepad itself. This would allow others to use it too.

Also, the visibility of the console window should not be tied to whether we're building in debug mode or release mode, as we very frequently test Robrix using a release build (for performance reasons), and we still want to see the console log then.

This should probably be a --cfg option offered by Makepad, such that we can specifically choose when to disable the console window, e.g., when building a release package of Robrix for Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-review This issue is waiting to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants