Open GoogleCodeExporter opened 8 years ago
Honestly we didn't test the L4D2 support for Windows by now - so your input is
highly
appreciated.
If I try to run "srcds.exe -console" using cmd.exe I got the same output as the
ServerOutputReader prints out:
#Console initialized.
#hl2\gameinfo.txt is missing.
#hl2\gameinfo.txt is missing
I'll look into this in more detail ASAP.
Original comment by hannes.s...@googlemail.com
on 11 Feb 2010 at 7:04
Original comment by hannes.s...@googlemail.com
on 11 Feb 2010 at 7:04
Original comment by hannes.s...@googlemail.com
on 11 Feb 2010 at 7:05
Is the server starting if you run it without the srcds controller or does it
fail
also? The last log statement from the dying srcds.exe was:
#hl2\gameinfo.txt
Does this file exist?
Original comment by HolgerCr...@gmail.com
on 11 Feb 2010 at 7:50
The server does start when executing the command in a batch file but the server
is down
at the moment, plus I'm at work so I can't check.
I'll try to gain access later tonight and I'll post the command I use to start
the
server. I'll also check for the gameinfo.txt file.
Thanks for looking into this!
Original comment by tsche...@gmail.com
on 11 Feb 2010 at 8:05
I just recognized that the Java ProcessBuilder works slightly different if
running on
a Windows machine. Command line parameters with an additional option have to be
passed as two items (e.g. "-game", "left4dead2") whereas Linux needs them to be
a
single item.
I changed the code to deal with this and it seems to work fine. But now I ran
into a
problem you find quite often mentioned on the internet. It seems like you cannot
execute srcds.exe directly from Java (according to some forum threads - same
for C#).
The process terminates with following error message:
"CTextConsoleWin32::GetLine:
!GetNumberOfConsoleInputEvents)".
It seems to work fine if I try to start it using e.g. "cmd /K" or a batch file,
but
then the process runs completely independent from the controller - thus no way
to
stop it and no live output available then.
Original comment by hannes.s...@googlemail.com
on 11 Feb 2010 at 8:22
BTW: The log output "hl2\gameinfo.txt" is a consequence of the fact that due to
the
wrong handling of arguments by the controller, the "-game" parameter was not
set.
This caused "-game" to be set to "hl2" - which is the default game for srcds.
Original comment by hannes.s...@googlemail.com
on 11 Feb 2010 at 8:27
That sounds rather discouraging so I gave it a google and I came across the
same forum post you did. Explained
exactly that and the example was in C#. So, I started a search to see if java
can monitor an external program
after launch.
I found this one article which makes it sound like you can do this.
<snippet page=4>
One additional improvement to TestExec would include a command-line switch to
accept input from standard input.
You would then use the Process.getOutputStream() method to pass the input to
the spawned external program.
</snippet>
Link: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=1
It's four pages which I just skimmed through but it looks possible.
Does this look feasible to you? Would SRCSD allow this kind of control?
Original comment by tsche...@gmail.com
on 12 Feb 2010 at 1:42
Thanks, we do it the same way.
This works under Linux and for most of the Windows processes, but srcds.exe
behaves
strangely. However I managed to start and stop srcds.exe using the controller by
disabling the "live server output". If "live server output" is enabled you see
the
first ~20 lines in the log, but then srcds.exe crashes with the error message I
mentioned above. I'll continue investigating this issue and will keep you
posted on this.
@tscheick: If you're interested in this test version (without live output), I
could
upload a jar file here.
Original comment by hannes.s...@googlemail.com
on 12 Feb 2010 at 9:33
That sounds great! I thought you couldn't interact with SRCDS at all. Viewing
the
server output would be a nice perk but it's not a requirement for me. If it
works for
starting/stopping the server, that's all I really need at the moment.
I would definitely like to try the test version without live output. I will be
going
away for the weekend, so it would be nice to give my friends access to
start/stop the
server if necessary.
Thanks!
Original comment by tsche...@gmail.com
on 12 Feb 2010 at 4:02
Is it possible to pull just a portion of the output without the server crashing?
I'm wondering if I can enter an rcon command and view the response. For
example, I'd
like to enter the "status" command to see if there are users connected, etc.
If not, I'll still try the test version - I'm just curious if this would be any
different (I'm assuming it's not).
Original comment by tsche...@gmail.com
on 12 Feb 2010 at 4:17
Rcon should work fine, because it is completly independant from the output of
the
process. But I'll try first and then provide you the test version.
Original comment by hannes.s...@googlemail.com
on 12 Feb 2010 at 4:55
@tscheick
Please keep in mind that you should change your rcon and srcds controller
password.
After you have uploaded your configuration file, everyone with little java
skills
could decrypt your passwords.
Original comment by HolgerCr...@gmail.com
on 12 Feb 2010 at 5:20
I just finished testing and I'm sad to say that the test version doesn't work as
expected - means you have to wait a little longer. I'm not sure how long it'll
take
to fix this, but I'll keep you posted.
Maybe we should think about letting srcds run as a service (see also:
http://code.google.com/p/srcds-controller/issues/detail?id=5).
Original comment by hannes.s...@googlemail.com
on 12 Feb 2010 at 6:43
@HolgerCremer Good point, I will change the password.
@hannes.scharmann That's alright, I will keep following your progress.
I appreciate the help!
Original comment by tsche...@gmail.com
on 12 Feb 2010 at 6:48
Original issue reported on code.google.com by
tsche...@gmail.com
on 8 Feb 2010 at 12:30Attachments: