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

feat(cli/autostart): add --no-console to autostart without a console window #598

Merged
merged 8 commits into from
Dec 3, 2023

Conversation

amrbashir
Copy link
Contributor

@amrbashir amrbashir commented Nov 25, 2023

So this PR actually contains two approaches for this in 08494b4and e97aaa3

The first one, moves komorebic logic into a lib.rs file and calls it from main.rs (normal behavior) and then there is a second binary komorebic-no-console binary that uses #![windows_subsystem = "windows"] which tells the linker to not attach a console window to this binary.

The second one, creates a second binary komorebic-no-console binary that uses #![windows_subsystem = "windows"] which tells the linker to not attach a console window to this binary and its only job is to run and pass its args to komorebic.

Both have benefits and drawbacks, but the main benefit of the second approach (which I recommend anyways) is that it creates a smaller binary and thus doesn't bloat the final installer.

This moves `komorebic` logic into a `lib.rs` file and calls it from `main.rs` (normal behavior) and then there is a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary.
This creates a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary and its only job is to run and pass its args to `komorebic`.
@amrbashir amrbashir changed the title feat(cli): autostart without a console window feat(cli/autostart): add --no-console to autostart without a console window Nov 25, 2023
komorebic/src/main.rs Outdated Show resolved Hide resolved
@LGUG2Z
Copy link
Owner

LGUG2Z commented Dec 2, 2023

I think this looks good; let's just drop the --no-console flag from the autostart command and resolve the conflicts and then I think we'll be good to merge this 👌

@LGUG2Z LGUG2Z merged commit 900051a into LGUG2Z:master Dec 3, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants