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
Windows srcds doesn't obey "-console" flag #3771
Comments
It's always done this. It spawns its own console window. |
It's always been doing so. srcds.exe is actually compiled as a "Windowed Application", contrary to a "Console Application" Tough changing the type probably won't magically solve it as valve used a lot of (by now) obsolete code mechanics that make the actual console act out of the ordinary, so you'd have to rewrite a not small part of it's inner workings to make it a true console application. One could probably try to write a alternative exe as the actual dedicated server is stored inside dedicated.dll and not inside srcds.exe which is only a launcher of sorts. |
This is a GMod specific issue though as I've had people try and help me with this and its worked fine for them, which I'm assuming they were using other srcds versions for other games. |
There are ways to grab stdout and stderr from the window console (called pipe redirecting) and prevent srcds.exe from calling But it is the source1 default behavior of srcds.exe, if it's different somewhere, then someone fiddled with it because he wasn't satisfied with it. (different branches, especially more modern ones like csgo might have it changed) It's unlikely that FP staff will spend any time on such a trivial thing. (even if I wouldn't mind srcds getting some facelift code-wise to properly expose stdout etc. for easy consumption) In either case, this is more of a request than a issue (defect). |
Just a note, Alien Swarm: Reactive Drop has an executable in the root directory of the game named "srcds_console.exe" which doesn't spawn another window and can be freely used across all Source¹ games. (Still requires appending "-console" though) |
Albeit this does not let it remain in the initial window, running the srcds.exe with the start command closes the prior window, resulting in only one window remaining, rather than two. See the following: start srcds.exe -console +maxplayers 16 +gamemode %GamemodeID% +map %MapID% |
Then there was no point to even commenting on an issue requesting this functionality. |
Details
When launching srcds on Windows, if you have the -console flag in it'll always launch in its own window.
Tested with both plain cmd and cmder/ConEmu.
Steps to reproduce
The text was updated successfully, but these errors were encountered: