dgiagio / warp

Create self-contained single binary applications
MIT License
1.92k stars 92 forks source link

Can the runner window start hidden? #31

Closed pablopioli closed 5 years ago

pablopioli commented 5 years ago

I'm trying Warp with a WPF app in net core 3. When it runs it shows a console window followed by the WPF window, wich runs as expected.

There is a way to hide the runner window? It is confusing as it stays open as the WPF app is running.

GeorgDangl commented 5 years ago

Yes, on Windows you can disable this behavior with the editbin utility. It's described here, scroll down to Change the Generated Exe to Hide its Console Window: https://blog.dangl.me/archive/transform-your-aspnet-core-website-into-a-single-file-executable-desktop-app/

elisee commented 5 years ago

For integration into warp no matter the host platform, it should be possible to port NSubsys's code that parses PE files and updates the subsystem. Should this be a command-line option, are there cases where it's useful to show the console window?

See https://github.com/jmacato/NSubsys/blob/b8d26cfe049299eb657411a1cd1d5223cc476955/NSubsys.cs#L49 and https://github.com/jmacato/NSubsys/blob/b8d26cfe049299eb657411a1cd1d5223cc476955/PeUtility.cs

pablopioli commented 5 years ago

Any of the posted answers can solve the original problem. Don't know if it should be added to warp since it can be automated easily. It's up to the decision of the creator of warp.

Closing this since it's has valid workarounds.

AndrewSav commented 4 years ago

So the workaround is to download and install Visual Studio? As workarounds go, this is not a very appealing one. @dgiagio

If we are talking about running warp as a part of automated/containarized build pipeline, this is especially unworkable ;(

joshua-software-dev commented 4 years ago

For anyone discovering this now who don't want to install Visual Studio in order to download editbin, I took NSubsys's implementation and repurposed it as a simple cross platform console app.

https://github.com/joshua-software-dev/SharpGuiConverter

There are versions for Linux, Mac OS, and Windows. There is also a statically linked binary for use in muslc containers. The statically linked version gave me a lot of compiler warnings, but none seem to be relevant to its function, and it worked fine in my testing on both glibc and muslc containers. Submit an issue if you encounter any problems.

mistapetroz commented 2 years ago

The above solutions don't work for me at all. Is it because I am working with JAVA instead of the .NET implementations above?

zenos879 commented 2 years ago

same to you. have you found any solutions?