Borealis Server Manager (BSM) Development Discussion Thread
103 replies, posted
[IMG]http://i.imgur.com/BSF4oVS.png[/IMG]
[B]Preface:[/B]
My name is Nicole, I have previously worked on another program similar to this a long time ago. I decided to come back to Facepunch to use it as a platform for development and discussions of my newest iteration of my gameserver management software. The software depends on SteamCMD as it's foundation, so it is unlikely that i will be incorporating non-SteamCMD gameservers. It is also strictly designed to be ran on Windows as linux is currently saturated with software of similar caliber, and I wanted to make this utility first and foremost for myself, since i host my own gameservers, but I wanted the community to be able to use it as well. Due to the proprietary nature of one of the UI frameworks, most people wont be able to compile the program themselves using the source-code.
[B]Description of what this utility will do:[/B]
The core functionality of the program is to deploy, manage, and control gameservers with auto-restart crash-handling built-in. You, as a user load the program and go to the deployment panel, once the panel loads, it pulls default gameserver data from an offsite server via an API that we have designed to be used with BSM specifically. The launch parameters, default configuration, and things of that nature are pulled via the API. Then you can manage the gameservers configuration files with the management panel, and finally you will be able to control the server console directly from BSM. While doing this, you will be able to keep tabs on individual and overall resource utilization of the gameservers.
[B]BSM Discord Discussion Channel: [/B][URL="https://discord.gg/6rMpYXz"]Here[/URL]
[B]GitHub Link: [/B][URL="https://github.com/cyberstrawberry101/Borealis-Server-Manager"]Here[/URL]
[B]Binaries: [/B][URL="https://github.com/cyberstrawberry101/Borealis-Server-Manager/releases"]Here[/URL]
[B]Screenshots: [/B][URL="https://github.com/cyberstrawberry101/Borealis-Server-Manager/tree/master/Screenshots"]Here[/URL]
[B][U]Current Status:[/U][/B]
[CODE]
- GameServer Dashboard Functionality = 70%
- GameServer Deployment Functionality = 90%
- GameServer Management Functionality = 25%
- GameServer Control Functionality = 15%
[/CODE]
[IMG]http://i.imgur.com/BSF4oVS.png[/IMG]
[IMG]http://i.imgur.com/NB2GQno.png[/IMG]
[IMG]https://cdn.discordapp.com/attachments/276981822343086081/306319642828210179/unknown.png[/IMG]
[IMG]http://i.imgur.com/bZQhkyg.png[/IMG]
[IMG]http://i.imgur.com/eERf39L.png[/IMG]
Updated the performance metrics screen with something more understandable with placeholder data to fill the data.
[img]https://i.imgur.com/bH5MBQf.png[/img]
What programming language are you using?
[QUOTE=masesm;51748328]What programming language are you using?[/QUOTE]
C# as noted by the thread icon.
For a moment, I thought this thread was about [URL="https://gameservermanagers.com/"]this[/URL]. You might want to come up with a more unique name for the project.
[QUOTE=sannys;51748390]For a moment, I thought this thread was about [URL="https://gameservermanagers.com/"]this[/URL]. You might want to come up with a more unique name for the project.[/QUOTE]
I've never heard of that one before, which further supports the main post declaring that the Linux gameserver management software is saturated. I will see if I can come up with a unique name. Thank you for letting me know!
[editline]29th January 2017[/editline]
I've gone ahead and rebranded the program to something a little more unique.
I've changed all internal code referencing the old name, as well as updated all of the screenshots, the github repository, hyperlinks, and the discord chat room.
[B]Can I have a mod rename the thread to "Borealis Game Manager (BGM) Development Discussion Thread"[/B]? Thank you!
[B]Here is a video of Borealis with some new UI changes, and for anyone who doesn't want to directly run the program themselves.[/B]
[video=youtube;1pArLlz_AfI]https://www.youtube.com/watch?v=MGJqnbVxJEI[/video]
[QUOTE=WhiteWhiskers;51749398][B]Here is a video of Borealis with some new UI changes, and for anyone who doesn't want to directly run the program themselves.[/B]
[video=youtube;1pArLlz_AfI]https://www.youtube.com/watch?v=MGJqnbVxJEI[/video][/QUOTE]
The UI looks really nice, is that using Blend?
[QUOTE=JWki;51749959]The UI looks really nice, is that using Blend?[/QUOTE]
It's using a mix of the MetroFramework and Bunifu Framework.
Looks good, I like the interface style
Finally finished coding in the SteamCMD deployment class. Now, when you deploy a gameserver for the first time, if you have never previously downloaded steamcmd via Borealis, it will automatically create the folder, download steamcmd, extract steamcmd, delete the zip, and execute steamcmd temporarily to generate its necessary files. Afterwards, the code will tell Borealis what server to install in that directory. This all happens in the background.
I am still working on finding a way to either create a class in the main form or a delegate, to allow the SteamCMD class that I made to be able to update the progress bars in the main form with a more detailed status.
[IMG]https://i.imgur.com/ilROuWN.png[/IMG]
[editline]30th January 2017[/editline]
Just finished incorporating [I]actual[/I] server deployment to the list of servers currently in BGM. It works flawlessly, and currently just needs more detailed reporting delegates. Until then, I have allowed all console windows such as steamcmd to be visible so you have actual feedback on how complete the process is.
[img]https://i.imgur.com/s1a63rK.png[/img]
[editline]30th January 2017[/editline]
I've rapidly added more steamcmd gameservers to the list, and all are functional, but i have not yet tested them to see which ones need authentication (if any).
[img]https://i.imgur.com/lBMH3dH.png[/img]
[editline]30th January 2017[/editline]
[B]Tonight after I get off work, I am going to start adding classes and deploy code for the following anonymous-friendly steamcmd servers:[/B]
Some of them are going to be culled from the list due to how pointless they may be. Some have already been added, but this list represents all servers.
The servers that require authentication will simply have your steam credentials piped into the class arguments for steamcmd to deploy the server. Nothing magic, no smoke and mirrors.
I am also going to be creating a new giant class that handles all of the switch case code for all of the servers, instead of having it in the main deployment code. That way it's easier to update separate from the main program.
7 Days to Die Dedicated Server 294420
Age of Chivalry Dedicated Server 17515
ARK: Survival Evolved with scorched earth 376030
Black Mesa: Deathmatch Dedicated Server 346680
BlazeRush Dedicated Server 332850
Counter-Strike 1.6 Dedicated Server 90 +app_set_config "90 mod czero"
Counter-Strike Global Offensive Dedicated Server 40
Counter-Strike: Condition Zero Dedicated Server 90 +app_set_config "90 mod dod"
Counter-Strike: Source Dedicated Server 232330
D.I.P.R.I.P. Dedicated Server 17535
Day of Defeat Dedicated Server 90 +app_set_config "90 mod dmc"
Double Action Dedicated Server 317800
Dystopia Dedicated Server 17585
Eden Star Dedicated Server 419790
Empires Dedicated Server 460040
Eternal Silence Dedicated Server 17555
Fistful of Frags Server 295230
Fortress Forever Dedicated Server 329710
Garry's Mod Dedicated Server 4020
Half-Life 2: Deathmatch Dedicated Server 232370
Half-Life Deathmatch: Source Dedicated server 255470
Half-Life Dedicated Server 90 Official page: [url]https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server[/url]
Half-Life: Opposing Force Dedicated Server 90 +app_set_config "90 mod gearbox"
Hurtworld dedicated server 405100
Insurgency Dedicated Server 237410
Insurgency: Modern Infantry Combat Dedicated Server 17705
Just Cause 2: Multiplayer Dedicated Server 261140
Killing Floor 2 Dedicated Server Windows 232130
Kingdoms Rise Dedicated Server 265360
Left 4 Dead 2 Dedicated Server 222860
Left 4 Dead Dedicated Server 222840
Life is Feudal: Your Own Dedicated Server 320850
NEOTOKYO Dedicated Server 313600
NS2: Combat Dedicated Server 313900
Nuclear Dawn Dedicated Server 111710
Pirates, Vikings, and Knights II Dedicated Server 17575
Reflex Dedicated Server 329740
Ricochet Dedicated Server 90 +app_set_config "90 mod ricochet"
Rust Dedicated Server 258550
Serious Sam HD: The Second Encounter Dedicated Server 299310
Source SDK Base 2006 MP Dedicated Server 205
Source 2007 Dedicated Server 310
Source Dedicated Server 205
Source SDK Base 2013 Dedicated Server 244310
Space Engineers Dedicated Server 298740
Synergy Dedicated Server 17525
Takedown: Red Sabre Dedicated Server 261020
Team Fortress 2 Dedicated Server 232250
Team Fortress Classic dedicated server 90 +app_set_config "90 mod tfc"
Tower Unite Dedicated server 439660
Zombie Panic Source Dedicated Server 17505
[editline]30th January 2017[/editline]
ADDENDUM: I am going to actually code in a method to download an XML database of all supported servers, so I dont have to recompile the program everytime you want more, new servers. This way, it will download a tiny XML file to your BGM directory, and read that for all information regarding applicable servers and launch parameters.
[B]I've successfully migrated all server data from internal classes to an external XML file. When you launch the program and open the deployment panel, it queries the XML file for a list of all applicable gameservers to install, and when you choose to deploy one of those servers, it then queries the specific parameters necessary for that server. It's easier to push updates since the XML file is only currently 8kb, and will soon be part of an automatic update system where the file is re-downloaded (when available) everytime you launch BGM.[/B]
[video=youtube;_MastwBEZUc]https://www.youtube.com/watch?v=_MastwBEZUc&feature=youtu.be[/video]
We have been making major progress transitioning the program from using XML to store data, over to JSON partly using a client-server relationship when it comes to keeping server profiles up-to-date.
The program communicates with a webserver [URL="https://github.com/Mezarith/bsmapi"]Repository found here[/URL] that runs commands remotely using NodeJS to verify that the files you are using are the most up-to date at the time when you attempt to deploy a server. If they have mismatched hashes, the program downloads an updated copy of the server profile to the local machine before allowing you to deploy the gameserver.
[B]An example of the JSON code used to store the server profile data is below:[/B]
[CODE]
{
"name": "Half-Life Deathmatch: Source",
"steam_authrequired": false,
"default_launchscript": "",
"deployment_parameters": "+login anonymous +app_update 255470 +quit",
"server_config_file": "",
"bgm_integration": "none"
}[/CODE]
[b]An example of what the server hashlist may look like in production is below.[/b]
[CODE]
{
"4020.json": "A927353D3784E476943A37418395EAAD2FA3BC510241353E69144D1D9F6B5AD9",
"17505.json": "45CEE37D51049726FA655DCCDBD313E299DBC27FBBB1B8423D44E4CFC340398F",
"17515.json": "0FFBDD72E704D6C3AF9E6D2D9DEF42252E6FD657D1B8A8A89EFA2EAB2498BBD5",
"17525.json": "75D5EDF53DEE5456ED5BF408F5E2366A407D421E54DD312B302F4B53A4CF6D36",
"17535.json": "A37E1878A5F1F39B1BEF3F359F31F58E8C9D9B195574584BA934CF638C953A00",
"17555.json": "BA96792F667F11EA802280484F23FD3A1ADD261F4E0CFA652539B34F47706673"
}
[/CODE]
We may have not been talking much on the forums, but we have certainly be very busy continuing work on the Borealis project.
[B]Thanks again for everyone's patience![/B]
[img]https://cdn.discordapp.com/attachments/269687654310739969/277032544158089217/NewAlgorithm.png[/img]
[B]Small Update:[/B]
Due to Borealis transitioning from XML-based configuration to JSON-based configuration, BGM is currently in a state of limbo until my other developer comes back from vacation to continue work on the server API. I've done some miscellaneous updates to BGM that include tidying up the internal code and tweaking the UI. You can still continue to use BGM to deploy gameservers in the meantime.
We have also implemented an [I]"Experimental Area"[/I] where we are testing new code, since the program is still in heavy development. By default, it's disabled.
[B]Download Link:[/B] [URL="https://github.com/cyberstrawberry101/Borealis-Game-Manager/releases/tag/v0.2.0.0-alpha"]Here[/URL]
[IMG]https://i.imgur.com/shlM3kx.png[/IMG]
This looks really decent actually and it's something I've been wanting to make myself, but never gotten around to. Keep up the good work.
What determines whether or not the <bgm_integration> tag is set to none, partial or full? I thought steamCMD games were fairly standardised?
[QUOTE=Capsup;51779291]This looks really decent actually and it's something I've been wanting to make myself, but never gotten around to. Keep up the good work.
What determines whether or not the <bgm_integration> tag is set to none, partial or full? I thought steamCMD games were fairly standardised?[/QUOTE]
The property is determined based on three factors. None means that you can simply deploy the server, nothing more. Partial means that you can configure most of the server from BGM directly, and Full means that you can directly interact and control the gameserver from BGM.
I will add more documentation to the program explaining each level of support.
If you would like to contribute in some way, reach out to me on the discord channel linked in the first post.
Just a quick thought about this, I quickly skimmed through the thread and instantly picked this up
[IMG]http://i.imgur.com/dD57rPx.png[/IMG]
Any specific reason you're doing this? You do not need an if else, especially if your first condition does nothing.
You can do:
[code]if (!System.IO.File.Exists(DestinationFolder + @"\steamcmd.exe"))
{
//Create Server Directory for SteamCMD
}[/code]
and no need for any else condition unless you plan to do/return something.
App looks good btw, keep going ;)
[QUOTE=Anthracite;51780536]Just a quick thought about this, I quickly skimmed through the thread and instantly picked this up
[IMG]http://i.imgur.com/dD57rPx.png[/IMG]
Any specific reason you're doing this? You do not need an if else, especially if your first condition does nothing.
You can do:
[code]if (!System.IO.File.Exists(DestinationFolder + @"\steamcmd.exe"))
{
//Create Server Directory for SteamCMD
}[/code]
and no need for any else condition unless you plan to do/return something.
App looks good btw, keep going ;)[/QUOTE]
I know I sometimes use that construction to remind me that there is something that I need to deal with here, once I can be bothered making it.
I've updated the class to be more structured in-line with previous suggestions given to clean up the code for SteamCMD's deployment.
[code]
public class SteamCMD_Classes
{
//===================================================================================//
// Download | Extract | First-Run SteamCMD //
//===================================================================================//
public static void DownloadSteamCMD(string DestinationFolder)
{
try
{
ServerDeployment ServerDeploymentDelegate = new ServerDeployment();
if (System.IO.File.Exists(DestinationFolder + @"\steamcmd.exe") == false)
{
//Create Server Directory for SteamCMD
System.IO.FileInfo file = new System.IO.FileInfo(DestinationFolder);
file.Directory.Create();
//Download SteamCMD.zip to Server Directory
using (System.Net.WebClient client = new System.Net.WebClient())
{
client.DownloadFile(new Uri("https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip"),
DestinationFolder + @"\SteamCMD.zip");
}
//Extract SteamCMD.zip to Server Directory
ZipFile.ExtractToDirectory(DestinationFolder + @"\SteamCMD.zip", DestinationFolder);
//Delete old zip file.
System.IO.File.Delete(DestinationFolder + @"\SteamCMD.zip");
//Execute SteamCMD to download files from Valve.
ExternalExecution_Classes.LaunchExternalProgram(DestinationFolder + @"\steamcmd.exe", "+quit", false);
}
}
catch (Exception)
{
MessageBox.Show("It appears that either you have no internet connection, or you are unable to connect to Valve's servers.", "Unable to Connect");
}
}
}
[/code]
If anyone is versed in C#, feel free to do a pull request on the repo if you think you can improve something you notice an issue with.
I am also going to have the next 3 days off after tonight, so most of my time will be dedicated to BGM since my friend will be back from vacation to finish implementing the server back-end.
Progress Report:
[B]The code that you use to invoke the functions:[/B]
[code]ServerAPI_Classes.QUERY_DATA("bgm_integration", ServerAPI_Classes.QUERY_STEAM_APPID(dropdownServerSelection.Text)[/code]
[B]The QUERY_INDEX function:[/B]
[code]
//===================================================================================//
// Query Index Data via API //
//===================================================================================//
public static string QUERY_STEAM_APPID(string serverGiven)
{
using (var webClient = new System.Net.WebClient())
{
var json = webClient.DownloadString("http://sfo3.hauteclaire.me/index");
Newtonsoft.Json.Linq.JObject o = Newtonsoft.Json.Linq.JObject.Parse(json);
foreach (var serverAppIDLink in o)
{
JToken value = serverAppIDLink.Value; //ServerName
string name = serverAppIDLink.Key; //Steam appID
if (value.ToString() == serverGiven)
{
return name; //appID
}
}
return "NULL";
}
}
[/code]
[B]The QUERY_DATA function:[/B]
[code]
//===================================================================================//
// Download Config Data via API //
//===================================================================================//
public static string QUERY_DATA(string valueToRetrieve, string appID)
{
using (var webClient = new System.Net.WebClient())
{
var json = webClient.DownloadString("http://sfo3.hauteclaire.me/config/" + appID);
Newtonsoft.Json.Linq.JObject o = Newtonsoft.Json.Linq.JObject.Parse(json);
var value = (string)o[valueToRetrieve];
return value;
}
}
[/code]
[B]The functions work together. [/B]
[I]* The user first queries the index for ALL of the gameserver names and adds them to the dropdown list.
* The user deploys whichever gameserver they choose to deploy, and it uses the QUERY_STEAM_APPID function to retrieve the associated Steam appID.
* The appID that was retrieved is piped into the QUERY_DATA function, which then pulls the requested properties from the associated gameserver.json file.[/I]
[B]The reason why this is significant:[/B]
[I]* This means that Borealis will no longer depend on locally-stored tables of data, and instead can query the server that we host that stores all of the data regarding gameservers, deployment parameters, configuration presets, anything really. This is very cool because it means that every user who chooses to use Borealis will ALWAYS have up-to-date gameserver data[/I]
I'm finishing up the full implementation, then pruning all references to XML from the program entirely, as it is now depreciated.
[B]Due to some major ambiguity using the name "Borealis 'Game' Manager", I have had several people from the community say that it was a confusing name that could be misconstrued as a platform to compete with Steam or something of that nature, rather than gameservers. The new (and final) name is "Borealis Server Manager (BSM)"
The internal code has also become more straight-forward, simply referencing "Borealis" for the namespaces, to prevent confusion when reading the source code.
[/B]
If a moderator has the time of day to do one last thread rename accommodating the changed project name, that would be splendid.
I'm assuming the game instances run under the same user running the manager?
Would be a nice feature to have them running under different users and optionally as an interactive service.
About to give this a shot now and see how it runs.
[editline]10th February 2017[/editline]
You should really be using a .gitignore file to prevent your ./BSM/bin/debug folder from being included in commits
[editline]10th February 2017[/editline]
Also I'm really glad you have stopped using this sketchy looking file icon
[IMG]http://i.imgur.com/J3gYiVK.png[/IMG]
[QUOTE=stewsta;51802133]I'm assuming the game instances run under the same user running the manager?
Would be a nice feature to have them running under different users and optionally as an interactive service.
About to give this a shot now and see how it runs.
[editline]10th February 2017[/editline]
You should really be using a .gitignore file to prevent your ./BSM/bin/debug folder from being included in commits
[editline]10th February 2017[/editline]
Also I'm really glad you have stopped using this sketchy looking file icon
[IMG]http://i.imgur.com/J3gYiVK.png[/IMG][/QUOTE]
I'm so sorry, i'm an idiot, I forgot to push the git commits to the API to Hauteclaire's staging server, everything deployment-wise should work again. doh!
[b]EDIT[/b]
Well, I'm still an idiot, I need to make some small changes since I seem to have broken it again. Join the discord channel and private message me so we can discuss it.
[B]So, i've been going at completely re-writing the deployment code for the last 3 hours to make it more understandable and modular to work with, and I have made some major internal changes:[/B]
[B]1.[/B] The program now pulls the data all at once when you choose to deploy a server, and stores that data into an internal class (essentially global variables at the time the program deploys a server).
[B]2.[/B] The program checks the "bsm_integration" level, and chooses a switch statement to execute accordingly, which shows messages to the user about what to expect when deploying a server.
[B]3.[/B] The program checks the "steamcmd_required" flag, and chooses to either deploy a gameserver via SteamCMD, or via some other method of acquisition and deployment.
[B]4.[/B] SteamCMD is now exclusively downloaded to the current directory that BSM resides in, that way, you don't have multiple copies of it all over your system.
[B]5.[/B] SteamCMD (when needed) no longer launches itself first, then deploys a server second. The entire process is now in one sweeping motion. You choose a server to deploy, if it requires SteamCMD, it deploys it immediately and in the same command, deploys the given gameserver.
[B]6.[/B] I have been working on integrating a [I][U][B]force_install_dir[/B][/U][/I] command into the overall deployment code: If you choose nothing when it comes to the destination for the gameserver, it deploys it to the BSM directory. If you choose a directory to install the gameserver, the override kicks in, and installs the gameserver to the specified directory outside of the BSM folder. SteamCMD ignores "[B]force_install_dir ""[/B]" since it's blank, and only registers it if the user enters something at the end of it.
[B][U]The Problem:[/U][/B]
Everything is working exactly as it should, [I]EXCEPT[/I] the [I][U]force_install_dir[/U][/I] code. It works just fine if you don't enter a directory to override the install path, but if you designate a directory to manually install a gameserver into, it seems to completely ignore that and install to the BSM directory instead.
If you add a messagebox to debug what SteamCMD should be seeing, it looks like this.
[code]MessageBox.Show(string.Concat(DeploymentValues.deployment_parameters, " +force_install_dir ", "\"", DeploymentValues.deployment_directory, "\"", " +quit"));[/code]
[B]Result: [CODE]+login anonymous +app_update 4020 +force_install_dir "C:\Users\Nicole\Desktop\GMODTEST" +quit[/CODE][/B]
As you can see, this code looks like it should be working PERFECTLY, but it isn't, and that is why I am asking the community what you think is going on exactly.
[B]The Overall Server Deployment Code:[/B]
[code]
//===================================================================================//
// DEPLOY A GAMESERVER //
//===================================================================================//
public static class DeploymentValues
{
//Variables to be used during deployment:
public static string steamcmd_required { get; set; }
public static string bsm_integration { get; set; }
public static string deployment_parameters { get; set; }
public static string deployment_directory { get; set; }
}
private void btnDeployGameserver_Click(object sender, EventArgs e)
{
//btnCancelDeployGameserver.Visible = true;
lblDownloadProgressDetails.Text = "Status: Downloading " + dropdownServerSelection.Text + "...";
//Assign Static Values:
DeploymentValues.bsm_integration = ServerAPI_Classes.QUERY_DATA("bsm_integration", ServerAPI_Classes.QUERY_STEAM_APPID(dropdownServerSelection.Text));
DeploymentValues.steamcmd_required = ServerAPI_Classes.QUERY_DATA("steamcmd_required", ServerAPI_Classes.QUERY_STEAM_APPID(dropdownServerSelection.Text));
DeploymentValues.deployment_parameters = ServerAPI_Classes.QUERY_DATA("deployment_parameters", ServerAPI_Classes.QUERY_STEAM_APPID(dropdownServerSelection.Text));
if (txtboxDestinationFolder.Text == "")
{
DeploymentValues.deployment_directory = Environment.CurrentDirectory;
}
else
{
DeploymentValues.deployment_directory = txtboxDestinationFolder.Text;
}
MessageBox.Show(string.Concat(DeploymentValues.deployment_parameters, " +force_install_dir ", "\"", DeploymentValues.deployment_directory, "\"", " +quit")); ///DEBUG
//Deploy the gameserver:
switch (DeploymentValues.bsm_integration)
{
case "none":
{
switch (DeploymentValues.steamcmd_required)
{
case "True":
{
if (MetroMessageBox.Show(BorealisServerManager.ActiveForm, "Type of GameServer: [" + dropdownServerSelection.Text + "]\n" + "Deploy to: [" + DeploymentValues.deployment_directory + "]" + "\n\nWARNING: This gameserver currently has NO BGM support.\nYou can deploy it, but BGM cannot configure or control it at this time.", "Deploy GameServer?", MessageBoxButtons.YesNo, MessageBoxIcon.Stop) == DialogResult.Yes)
{
SteamCMD_Classes.DownloadSteamCMD(Environment.CurrentDirectory);
ExternalExecution_Classes.LaunchExternalProgram(Environment.CurrentDirectory + @"\steamcmd.exe", string.Concat(DeploymentValues.deployment_parameters, " +force_install_dir ", "\"", DeploymentValues.deployment_directory, "\"", " +quit"), false);
MetroMessageBox.Show(BorealisServerManager.ActiveForm, txtServerGivenName.Text + " [" + dropdownServerSelection.Text + "]" + " has been successfully deployed with default configurations!\nPlease goto the management tab to configure it.", "Complete!", MessageBoxButtons.OK, MessageBoxIcon.Question);
}
}
break;
case "False":
{
//RUN OTHER CODE TO DEPLOY THE NON-STEAMCMD GAMESERVER
}
break;
}
}
break;
case "partial":
{
switch (DeploymentValues.steamcmd_required)
{
case "True":
{
if (MetroMessageBox.Show(BorealisServerManager.ActiveForm, "Type of GameServer: [" + dropdownServerSelection.Text + "]\n" + "Deploy to: [" + DeploymentValues.deployment_directory + "]" + "\n\nWARNING: This gameserver currently has PARTIAL BGM support.\nYou can deploy it, but BGM can only configure it at this time, you have no ability to control it directly through BGM.", "Deploy GameServer?", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
{
SteamCMD_Classes.DownloadSteamCMD(Environment.CurrentDirectory);
ExternalExecution_Classes.LaunchExternalProgram(Environment.CurrentDirectory + @"\steamcmd.exe", string.Concat(DeploymentValues.deployment_parameters, " +force_install_dir ", "\"", DeploymentValues.deployment_directory, "\"", " +quit"), false);
MetroMessageBox.Show(BorealisServerManager.ActiveForm, txtServerGivenName.Text + " [" + dropdownServerSelection.Text + "]" + " has been successfully deployed with default configurations!\nPlease goto the management tab to configure it.", "Complete!", MessageBoxButtons.OK, MessageBoxIcon.Question);
}
}
break;
case "False":
{
//RUN OTHER CODE TO DEPLOY THE NON-STEAMCMD GAMESERVER
}
break;
}
}
break;
case "full":
{
switch (DeploymentValues.steamcmd_required)
{
case "True":
{
if (MetroMessageBox.Show(BorealisServerManager.ActiveForm, "Type of GameServer: [" + dropdownServerSelection.Text + "]\n" + "Deploy to: [" + DeploymentValues.deployment_directory + "]", "Deploy GameServer?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
SteamCMD_Classes.DownloadSteamCMD(Environment.CurrentDirectory);
ExternalExecution_Classes.LaunchExternalProgram(Environment.CurrentDirectory + @"\steamcmd.exe", string.Concat(DeploymentValues.deployment_parameters, " +force_install_dir ", "\"", DeploymentValues.deployment_directory, "\"", " +quit"), false);
MetroMessageBox.Show(BorealisServerManager.ActiveForm, txtServerGivenName.Text + " [" + dropdownServerSelection.Text + "]" + " has been successfully deployed with default configurations!\nPlease goto the management tab to configure it.", "Complete!", MessageBoxButtons.OK, MessageBoxIcon.Question);
}
}
break;
case "False":
{
//RUN OTHER CODE TO DEPLOY THE NON-STEAMCMD GAMESERVER
}
break;
}
}
break;
}
//Finish up the process!
//btnCancelDeployGameserver.Visible = false;
lblDownloadProgressDetails.Text = "Status: Idle";
}
[/code]
[QUOTE=WhiteWhiskers;51803085]...
[B][U]The Problem:[/U][/B]
Everything is working exactly as it should, [I]EXCEPT[/I] the [I][U]force_install_dir[/U][/I] code. It works just fine if you don't enter a directory to override the install path, but if you designate a directory to manually install a gameserver into, it seems to completely ignore that and install to the BSM directory instead.
...[/QUOTE]
A couple of things:
Might I suggest using a breakpoint in the future instead of a MessageBox? It's a lot easier to debug that way and doesn't have you add random debug code scattered around the code (assuming you're using Visual Studio obviously, which it seems you are since you seem to be using the Designer feature).
I think you should also figure out a better way of adding commits to your repo. Committing code, that doesn't work, to the master branch of a open-source repo seems like it can only lead to the trouble in the future, especially when you do nightly commits where you aren't sure what the state of the code is at that point.
It might prove beneficial to having something like feature branches where you are free to commit whatever code to them as they're WIP branches and only live for as long as that particular feature hasn't finished implementation and then you just merge feature branches into the master branch once they're done, such that the master branch is always the newest [I]working[/I] code.
Add your external dependencies using NuGet Package Manager instead of manually referencing dlls. This makes it a lot easier to share the project, as NuGet takes care of getting the correct version of the dependency and referencing it correctly, so that you don't have to worry about it (Your Newtonsoft.Json reference isn't correct, so if you clone the Github repo, it isn't possible to compile and run the project without fixing the reference manually).
Stewska mentioned it and I believe I did in the Discord once as well. Add a .gitignore to your project so that the /bin/* folders and user-specific files aren't committed to the repo. Github has some very decent default templates and I'd recommend you to use the following: [URL]https://github.com/github/gitignore/blob/master/VisualStudio.gitignore[/URL]
The +force_install_dir option needs to come before the +app_update option. So it would look like so: "+login anonymous +force_install_dir "C:\Users\Nicole\Desktop\GMODTEST" +app_update 4020 +quit" instead.
[QUOTE=Capsup;51803430]A couple of things:
Might I suggest using a breakpoint in the future instead of a MessageBox? It's a lot easier to debug that way and doesn't have you add random debug code scattered around the code (assuming you're using Visual Studio obviously, which it seems you are since you seem to be using the Designer feature).[/QUOTE]
I will keep that in mind.
[QUOTE=Capsup;51803430]
I think you should also figure out a better way of adding commits to your repo. Committing code, that doesn't work, to the master branch of a open-source repo seems like it can only lead to the trouble in the future, especially when you do nightly commits where you aren't sure what the state of the code is at that point.
It might prove beneficial to having something like feature branches where you are free to commit whatever code to them as they're WIP branches and only live for as long as that particular feature hasn't finished implementation and then you just merge feature branches into the master branch once they're done, such that the master branch is always the newest [I]working[/I] code.
[/QUOTE]
That sounds beneficial, so I will probably start doing that. It's sort of a moot point since the entire program has not even reached beta, since the other two main features have not even been implemented yet, but I may keep the nightly branches separate until I know the program is back to a working state overall, then merge them, as you suggested.
[QUOTE=Capsup;51803430]
Add your external dependencies using NuGet Package Manager instead of manually referencing dlls. This makes it a lot easier to share the project, as NuGet takes care of getting the correct version of the dependency and referencing it correctly, so that you don't have to worry about it (Your Newtonsoft.Json reference isn't correct, so if you clone the Github repo, it isn't possible to compile and run the project without fixing the reference manually).
[/QUOTE]
To actually make a point about this, the newtonsoftjson files [B][I]are[/I][/B] using NuGet to be added to the project. If you are having an issue with newtonsoft, since it is in fact using NuGet, that's beyond my control. In reference to the Bunifu Framework, it is a proprietary framework that I paid money for, and has built in DRM in the event that you try to use it in an IDE (and possibly other places), the code that you see is more so for suggestions, as compiling the code would be rather impossible since as I mentioned in the main thread, as well as in this reply, the dependency is proprietary and protected. It's a major feature of the program that helps design the user interface elements, so I have no desire to remove it from the project. The author of the framework has not released a NuGet package for BunifuUI, so I can't do anything about that either. Finally, in regards to MetroFramework, it DOES in fact have a NuGet package, but only for version 1.2. Borealis uses version 1.3, something that the author never updated the NuGet package with. When I previously attempted to standardize the project using a NuGet package for MetroFramework, it was missing properties and controls that 1.3 has no issue with. Until the author uploads a newer copy to NuGet, there's nothing I can do outside of including the dependancy in the project directly.
[QUOTE=Capsup;51803430]
Stewska mentioned it and I believe I did in the Discord once as well. Add a .gitignore to your project so that the /bin/* folders and user-specific files aren't committed to the repo. Github has some very decent default templates and I'd recommend you to use the following: [URL]https://github.com/github/gitignore/blob/master/VisualStudio.gitignore[/URL][/QUOTE]
I have gone ahead and done this, and added some extra configuration to the .gitignore file of my own. I had to flush the entire index cache from the repo and re-index everything afterwards, but everything looks to be working perfect. The repo completely ignores the /bin /obj, and other miscellaneous folders that do not need to be committed to the repo. When I make milestones, for now, I will just make small pre-release builds like I have done in the past. To make sure everything worked, I deleted the local repo and re-cloned the entire thing and immediately compiled it, and everything worked absolutely fine.
[QUOTE=Capsup;51803430]
The +force_install_dir option needs to come before the +app_update option. So it would look like so: "+login anonymous +force_install_dir "C:\Users\Nicole\Desktop\GMODTEST" +app_update 4020 +quit" instead.[/QUOTE]
I am going to look into this right now, if it was something so simple as that, I will be very happy. Due to the nature of how the parameters are stored, I may have to do some string voo-doo in order to rearrange it in the proper way.
[editline]10th February 2017[/editline]
[QUOTE=stewsta;51802133]I'm assuming the game instances run under the same user running the manager?
Would be a nice feature to have them running under different users and optionally as an interactive service.
[/QUOTE]
I will see what I can do in regards to running the program as separate users. Creating a user system would definitely complicate things as there would need to be a back-end service that handles everything that only the administrator has access to. We have suggested this as a part of the WebUI that will probably eventually be rolled out, allowing you to host it as a server of its own, that can be remotely controlled. I am not very strong in that area, so I will have to brush up on ASP.NET as well as a plethora of other web things.
Good news, thanks to a GitHub user [B]CyrilPaulus ([url]https://github.com/CyrilPaulus[/url])[/B] completely fixed the memory leak as well as the entire dashboard (minus individual server statistics), so now, it accurately pulls resource usage data every half second. :)
Here's what it looks like in action:
[video=youtube;7pl1Fp_qAAc]https://www.youtube.com/watch?v=7pl1Fp_qAAc[/video]
[editline]11th February 2017[/editline]
Going to be working on adding overall network activity to the dashboard as well.
[IMG]https://i.imgur.com/Sd33KFi.png[/IMG]
Is the CPU reported the CPU usage the SRCDS instance reports from the stats command? I've always found that to be a better report to look that than the task manager or htop.
I used this method to get the CPU usage : [url]http://stackoverflow.com/questions/9777661/returning-cpu-usage-in-wmi-using-c-sharp[/url]
It should be the same as the task manager.
Sorry, you need to Log In to post a reply to this thread.