console changes
This commit is contained in:
parent
b499fd6879
commit
fbf9183187
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NovetusLauncher
|
||||
{
|
||||
#region LocalVars
|
||||
|
|
@ -9,7 +11,8 @@ namespace NovetusLauncher
|
|||
public static string prevsplash = "";
|
||||
public static bool launcherInitState = true;
|
||||
//hack for linux. store the command line variables locally.
|
||||
public static string cmdLine = "";
|
||||
public static List<string> cmdLineArray = new List<string>();
|
||||
public static string cmdLineString = "";
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -574,7 +574,7 @@ namespace NovetusLauncher
|
|||
public void RestartApp()
|
||||
{
|
||||
var process = Process.GetCurrentProcess();
|
||||
Process.Start(Assembly.GetExecutingAssembly().Location, LocalVars.cmdLine);
|
||||
Process.Start(Assembly.GetExecutingAssembly().Location, LocalVars.cmdLineString);
|
||||
CloseEventInternal();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ namespace NovetusLauncher
|
|||
string[] argList;
|
||||
FileFormat.Config savedConfig;
|
||||
|
||||
public NovetusConsole(string[] args)
|
||||
public NovetusConsole()
|
||||
{
|
||||
ConsoleForm = new LauncherFormShared();
|
||||
argList = args;
|
||||
argList = LocalVars.cmdLineArray.ToArray();
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ namespace NovetusLauncher
|
|||
{
|
||||
//cmd mode
|
||||
savedConfig = GlobalVars.UserConfiguration;
|
||||
disableCommands = true;
|
||||
//disableCommands = true;
|
||||
bool no3d = false;
|
||||
bool nomap = false;
|
||||
|
||||
|
|
@ -487,6 +487,9 @@ namespace NovetusLauncher
|
|||
}
|
||||
ScrollToEnd();
|
||||
break;
|
||||
case string cmdArgs when cmdArgs.Contains("commandline", StringComparison.InvariantCultureIgnoreCase) == true:
|
||||
Util.ConsolePrint(LocalVars.cmdLineString, 3);
|
||||
break;
|
||||
default:
|
||||
Util.ConsolePrint("Command is either not registered or valid", 2);
|
||||
ScrollToEnd();
|
||||
|
|
|
|||
|
|
@ -81,17 +81,19 @@ namespace NovetusLauncher
|
|||
}
|
||||
}
|
||||
|
||||
foreach (string argString in args)
|
||||
{
|
||||
LocalVars.cmdLine += argString;
|
||||
LocalVars.cmdLineArray = args.ToList();
|
||||
|
||||
if (!argString.Equals(args.Last()))
|
||||
foreach (string argString in LocalVars.cmdLineArray)
|
||||
{
|
||||
LocalVars.cmdLineString += argString;
|
||||
|
||||
if (!argString.Equals(LocalVars.cmdLineArray.Last()))
|
||||
{
|
||||
LocalVars.cmdLine += " ";
|
||||
LocalVars.cmdLineString += " ";
|
||||
}
|
||||
}
|
||||
|
||||
Run(args, isSDK, state);
|
||||
Run(isSDK, state);
|
||||
}
|
||||
|
||||
static void CreateFiles()
|
||||
|
|
@ -113,7 +115,7 @@ namespace NovetusLauncher
|
|||
DiscordRPC.StartDiscord();
|
||||
}
|
||||
|
||||
static void Run(string[] args, bool sdk = false, CMDState state = CMDState.CMDOpen)
|
||||
static void Run(bool sdk = false, CMDState state = CMDState.CMDOpen)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -125,7 +127,7 @@ namespace NovetusLauncher
|
|||
{
|
||||
if (state != CMDState.CMDNone)
|
||||
{
|
||||
NovetusConsole console = new NovetusConsole(args);
|
||||
NovetusConsole console = new NovetusConsole();
|
||||
GlobalVars.consoleForm = console;
|
||||
console.Show();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue