-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Compile without console #13107
Comments
Ref #12941 |
That may be a better solution, as you don't need 2 windows binaries |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
I've managed to solve this with a little workaround: take the .exe generated by deno and somehow change the Subsystem flag in the optional headers of the executable, there is a lot of ways to do this, the most pratical for me is using a python script that does this automatically like so import os
import os.path
import pefile
print('Modifying generated executable subsystem...')
binary = pefile.PE(os.getcwd()+"\\deno_test.exe", fast_load=True)
binary.OPTIONAL_HEADER.Subsystem = 2
binary.write(filename="deno_test.mod.exe")
binary.close()
os.remove("deno_test.exe")
os.rename("deno_test.mod.exe", "deno_test.exe") You can also use a program like PE Bear to then open the executable in the program, find the optional headers section and change the subsystem manually |
this needs to be resolved for us that want to use deno to make small gui apps. like using webUI on windows. tested python script but got no gui at all then. |
You can use |
The parameter is called "--no-terminal" and does not work as intended. |
could not get --no-terminal to work so i made this https://jsr.io/@svefro/win-console-window-state |
I've been annoyed by this issue recently and decided to look into what's going wrong. I'm able to get stderr from my compiled exe (using
Without being familiar with the backend of deno, I interpret this as an issue regressed when adding node support. It's also clear that it's an issue getting stdin. So I've tried my program again, providing a file for stdin, stdout and stderr, and everything works. The only reason I was able to debug this at all was because I happened to try |
I've found #21091 which seems like the right issue |
This was mentioned in a comment before
It would be nice to have given that webview_deno will (hopefully) be updated soon after deno#12828 was merged
Which would allow for electron like applications
One way to do this could be with a command like
deno compile --no-console
That downloads a deno binary that doesn't use the console, similar to how
--target
worksCompiling deno without a console can be done by adding:
#![windows_subsystem = "windows"]
To the top of
cli/main.rs
Or by passing arguments to
rustc
The text was updated successfully, but these errors were encountered: