Skip to content

Commit

Permalink
Finish linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdaGaming committed Jan 16, 2024
1 parent 55f9d79 commit 6447cf5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,12 @@ private void StartButtonClick( object sender, EventArgs e )
arguments += $" +maxplayers {maxplayers.Value} +map {mapselect.Text} {launchParameters.Text}";

if ( isLinux )
arguments = Settings.ExeName + " " + arguments;
arguments = $"-c \"gnome-terminal --maximize -- bash -c 'cd {Path.GetDirectoryName( Settings.GamePath )}; ./{Path.GetFileName( Settings.ExeName )} {arguments}; exec bash'\"";

var proc = new ProcessStartInfo
{
UseShellExecute = false,
RedirectStandardOutput = isLinux,
WorkingDirectory = Settings.ExePath,
FileName = isLinux ? "/bin/bash" : Settings.ExeName,
Arguments = arguments
Expand Down
2 changes: 1 addition & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static void Main()
Application.SetCompatibleTextRenderingDefault(false);
if ( string.IsNullOrWhiteSpace( Properties.Settings.Default.ExeName ) || !File.Exists( Properties.Settings.Default.ExeName ) )
{
DialogResult BrowseCheck = MessageBox.Show( "Please select the server's exe file.", "Server exe file not found.", MessageBoxButtons.OK, MessageBoxIcon.Warning );
DialogResult BrowseCheck = MessageBox.Show( "Please select the server executable.", "Server executable not found.", MessageBoxButtons.OK, MessageBoxIcon.Warning );
if ( BrowseCheck == DialogResult.OK )
{
OpenFileDialog browse = new OpenFileDialog();
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Universal Source Dedicated Server Launcher
This is a replacement launcher compatible with any GoldSrc, Source, or Source 2 dedicated server that allows you to launch your servers with additional options, without having to use a command line or manually type out parameters for a shortcut.
This is a replacement launcher compatible with any GoldSrc, Source, or Source 2 dedicated server that allows you to launch your servers with additional options, without having to use a command line or manually type out parameters for a shortcut. The launcher supports Windows 7 and newer, and should also work on any Linux distro with the GNOME terminal and Mono installed, though only Linux Mint has been tested.

![](https://raw.githubusercontent.com/LambdaGaming/GMod-Server-Launcher-Console/master/reference.PNG)

Expand Down

0 comments on commit 6447cf5

Please sign in to comment.