cyberstrawberry101 / Borealis-Server-Manager

Utility designed to facilitate the deployment, management, and control of various kinds of dedicated gameservers.
35 stars 5 forks source link

Implemented an initial version of the 'control server window' #27

Closed Capsup closed 7 years ago

Capsup commented 7 years ago

I've implemented the 'Control GameServers' window such that after a server has been deployed using the 'Deploy GameServers' functionality, it is possible to start and stop the installed server.

Once a deploy is made, I add a new XNode to the XML file called "installation_folder". This is to know where the server files where deployed to and what servers are already installed. Currently I only use the single XNode, which means only one server of every game can exist. This can be changed if necessary.

I only introduced a new XNode, the "binaries" element. This is a manually input field that is necessary, because the different games save their binaries in vastly different locations, so it is necessary to manually define what executable file to run when pressing on 'start server'.

When entering the 'Manage GameServers' window, all installed games are added to the list. One of these can be selected while pressing 'Start Server' will start the given binary, at the given installation folder, with the given "default_launchscript". This currently works perfectly for Conan Exiles, which is what I've been testing with. The "Stop Server" button then becomes active and the server can be stopped. A todo here is to introduce asynchronious stop operations, such that the UI Thread is not blocked while we're waiting for the process to gracefully exit. I'll leave this implementation to someone else or once I have a need for it myself.

The InputTextbox in the form has not been entirely implemented. The function in ExternalExectuin_Classes is setup to properly pipe input from a TextReader to the process, but I haven't tested it and I haven't finished implementing it with the InputTextbox.

I changed ExternalExecution_Classes quite a bit.

You're free to use whatever code here that you may deem interesting. I'm not sure if you want to use any of it, but atleast I've shared it with you in case it proves relevant. Keep up the good work! (PS, I wish I could make as pretty UI as this)

cyberstrawberry101 commented 7 years ago

Due to the nature of how XML data storage is depreciated in favor of JSON, and that we have made some large changes to the functionality of some of the code that your pull request modified, we will consider merging a pull once we have implemented a config.json configuration file in Borealis that allows you to persistently add and change configuration settings of gameservers as well as Borealis itself.

Please wait until the config.json is implemented and revise your code to work with it if you still wish to submit an update to Borealis.

Thank you for all your work regardless.