1. Hi,

    I am in the process of making a GUI for Rust Dedicated server on Windows programmed in C# (WPF). I have the most of the application planned out but i have stumbled upon some difficulties regarding redirection of output from RustDedicated.exe so i can parse. Is there anyone here with C# skills that can have a look?

    To not flood the post with code i will only add a part of it, but ask to see more if you want.
    Oh, and yes this will be free forever once it is done.

    Code:
    private void StartServerThread()
            {
                var serverArguments = GenerateServerArguments();
                var serverExecutable = Properties.Settings.Default.Rustserverexecutable;
                try
                {
                    ProcessStartInfo info = new ProcessStartInfo
                    {
                        WorkingDirectory = System.IO.Path.GetDirectoryName(serverExecutable),
                        FileName = serverExecutable, // "E:/SteamCMD/servers/rust/RustDedicated.exe",
                        Arguments = "-batchmode",
                        UseShellExecute = false,
                        RedirectStandardOutput = true,
                        RedirectStandardInput = true,
                    };
                    serverProcess = new Process();
                    serverProcess.StartInfo = info;
                    serverProcess.Start();
                    serverProcess.OutputDataReceived += ServerProcess_OutputDataReceived;
                    serverProcess.BeginOutputReadLine();
                }
                catch (Exception e)
                {
                    Console.WriteLine("Exception: " + e.Message);
                }
            }
    So what is happening is that the following lines get outputted to the debugging console:

    Code:
    Mono path[0] = 'E:/SteamCMD/servers/rust/RustDedicated_Data/Managed'
    Mono path[1] = 'E:/SteamCMD/servers/rust/RustDedicated_Data/Mono'
    Mono config path = 'E:/SteamCMD/servers/rust/RustDedicated_Data/Mono/etc'
    After that the RustDedicated.exe shows up with a blank console, but the caret is in the top left corner blinking. The server fires up but nothing is outputed to console or RustDedicated.exe itself.

    Anyone?

    Oh, some pictures for those of you that like that stuff.

    Cheers!

    [​IMG]

    [​IMG]

    [​IMG]
    [DOUBLEPOST=1459566137][/DOUBLEPOST]Thanks for moving it, i did not know if this was the appropriate forum, but apparently it was :)
     
  2. I just wanted to say this looks really nice, i'd love to help, but i have no experience with making programs with c#
     
  3. Thank you :) I wanted it to be the same style as the actual Rust client.
    [DOUBLEPOST=1459666082,1459567315][/DOUBLEPOST]I managed to work around it for now by clever usage of the different logfiles Rust Server produces, but ideally i want it to work with output direclty.
    I will look more into it.

    LINK: https://www.tdservice.no/MurkysRustBoot.zip

    Be aware that this is a very early build and some bugs may occur.

    Usage:
    1. Unzip and simply drop the executable into the server folder besides RustDedicated.exe and start it.
    2. It will prompt for RustDedicated.exe
    3. Adjust the settings to match your needs.
    4. Click "Ready" to launch the server.
    5. When the buttons below the console lights up the server is fully running.
    6. To show the Rust console use the togglebutton in the lower left corner.
    Will be added in the next version:
    • Drag&Drop installation of plugins onto window.
    • Administration of plugins
    • Custom parameters
     
    Last edited by a moderator: Apr 3, 2016