Closed JasperVanEsveld closed 2 years ago
That may be a better solution, as you don't need 2 windows binaries Though it does feel hacky
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 --no-console
flag with deno compile
You can use
--no-console
flag withdeno compile
"unexpected argument '--no-console' found"
The parameter is called "--no-terminal" and does not work as intended. No gui is shown at all on windows. and application exits right away
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 ofcli/main.rs
Or by passing arguments torustc