Deprecated NovetusCMD

This commit is contained in:
Bitl 2022-09-19 10:17:06 -07:00
parent a5f25f4f60
commit b3b2dc7fb9
19 changed files with 208 additions and 99 deletions

43
Novetus/Novetus.Tools.sln Normal file
View File

@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novetus.ClientScriptTester", "Novetus.ClientScriptTester\Novetus.ClientScriptTester.csproj", "{83B08607-65B8-4F9C-8D0F-AB1C8EEFFAE0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novetus.ReleasePreparer", "Novetus.ReleasePreparer\Novetus.ReleasePreparer.csproj", "{64A99062-3C1C-4D2E-99E4-D6D92443AC98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Release|Any CPU.Build.0 = Release|Any CPU
{2070EAA6-7606-4006-A628-5705C24A3644}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2070EAA6-7606-4006-A628-5705C24A3644}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2070EAA6-7606-4006-A628-5705C24A3644}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2070EAA6-7606-4006-A628-5705C24A3644}.Release|Any CPU.Build.0 = Release|Any CPU
{83B08607-65B8-4F9C-8D0F-AB1C8EEFFAE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83B08607-65B8-4F9C-8D0F-AB1C8EEFFAE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83B08607-65B8-4F9C-8D0F-AB1C8EEFFAE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83B08607-65B8-4F9C-8D0F-AB1C8EEFFAE0}.Release|Any CPU.Build.0 = Release|Any CPU
{64A99062-3C1C-4D2E-99E4-D6D92443AC98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64A99062-3C1C-4D2E-99E4-D6D92443AC98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64A99062-3C1C-4D2E-99E4-D6D92443AC98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64A99062-3C1C-4D2E-99E4-D6D92443AC98}.Release|Any CPU.Build.0 = Release|Any CPU
{D7B467EE-A4B9-42FB-AA83-F487DA0F5CB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7B467EE-A4B9-42FB-AA83-F487DA0F5CB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7B467EE-A4B9-42FB-AA83-F487DA0F5CB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7B467EE-A4B9-42FB-AA83-F487DA0F5CB1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {66CA6CE5-670E-48AA-A2DA-9347371D4CA0}
EndGlobalSection
EndGlobal

View File

@ -1,30 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novetus.Launcher", "NovetusLauncher\Novetus.Launcher.csproj", "{F92FFBED-2767-4676-9711-BB89CDA58A43}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novetus.CMD", "NovetusCMD\Novetus.CMD.csproj", "{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novetus.URI", "NovetusURI\Novetus.URI.csproj", "{2070EAA6-7606-4006-A628-5705C24A3644}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Novetus.Core", "NovetusCore\Novetus.Core.shproj", "{DEBCC57D-9A3B-4D7C-8693-FA4AEC56C8C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novetus.ClientScriptTester", "Novetus.ClientScriptTester\Novetus.ClientScriptTester.csproj", "{83B08607-65B8-4F9C-8D0F-AB1C8EEFFAE0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novetus.ReleasePreparer", "Novetus.ReleasePreparer\Novetus.ReleasePreparer.csproj", "{64A99062-3C1C-4D2E-99E4-D6D92443AC98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novetus.Bootstrapper", "Novetus.Bootstrapper\Novetus.Bootstrapper.csproj", "{D7B467EE-A4B9-42FB-AA83-F487DA0F5CB1}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
NovetusCore\NovetusCore.projitems*{2070eaa6-7606-4006-a628-5705c24a3644}*SharedItemsImports = 4
NovetusCore\NovetusCore.projitems*{bac99c87-f6c1-4ed0-aa2e-05c6ae8979ea}*SharedItemsImports = 4
NovetusCore\NovetusCore.projitems*{d7b467ee-a4b9-42fb-aa83-f487da0f5cb1}*SharedItemsImports = 4
NovetusCore\NovetusCore.projitems*{debcc57d-9a3b-4d7c-8693-fa4aec56c8c1}*SharedItemsImports = 13
NovetusCore\NovetusCore.projitems*{f92ffbed-2767-4676-9711-bb89cda58a43}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
@ -34,10 +21,6 @@ Global
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Release|Any CPU.Build.0 = Release|Any CPU
{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Release|Any CPU.Build.0 = Release|Any CPU
{2070EAA6-7606-4006-A628-5705C24A3644}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2070EAA6-7606-4006-A628-5705C24A3644}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2070EAA6-7606-4006-A628-5705C24A3644}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -61,4 +44,10 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {66CA6CE5-670E-48AA-A2DA-9347371D4CA0}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
NovetusCore\NovetusCore.projitems*{2070eaa6-7606-4006-a628-5705c24a3644}*SharedItemsImports = 4
NovetusCore\NovetusCore.projitems*{d7b467ee-a4b9-42fb-aa83-f487da0f5cb1}*SharedItemsImports = 4
NovetusCore\NovetusCore.projitems*{debcc57d-9a3b-4d7c-8693-fa4aec56c8c1}*SharedItemsImports = 13
NovetusCore\NovetusCore.projitems*{f92ffbed-2767-4676-9711-bb89cda58a43}*SharedItemsImports = 4
EndGlobalSection
EndGlobal

View File

@ -100,7 +100,7 @@ class Downloader
{
read = DownloadFile(fileURL, name);
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -211,7 +211,7 @@ class Downloader
}
catch (Exception e)
{
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
Util.LogExceptions(e);
#endif
if (e is WebException && bytesProcessed == 0)

View File

@ -84,7 +84,7 @@ public class INIFile
return false;
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);

View File

@ -45,7 +45,7 @@ public class ClientManagement
GenerateDefaultClientInfo(Path.GetDirectoryName(clientpath));
ReadClientValues(name, initial);
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -228,7 +228,7 @@ public class ClientManagement
LoadClientValues(info, clientpath);
return info;
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -630,7 +630,7 @@ public class ClientManagement
}
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -696,7 +696,7 @@ public class ClientManagement
ApplyClientSettings(info, ClientName, GraphicsMode, MeshDetail, ShadingQuality, MaterialQuality,
AA, AASamples, Bevels, Shadows_2008, Shadows_2007, Style_2007, GFXQualityLevel, WindowResolution, FullscreenResolution, ModernResolution);
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -735,7 +735,7 @@ public class ClientManagement
fixedfile = RobloxXML.RemoveInvalidXmlChars(RobloxXML.ReplaceHexadecimalSymbols(oldfile));
doc = XDocument.Parse(fixedfile);
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -785,7 +785,7 @@ public class ClientManagement
RobloxXML.EditRenderSettings(doc, "Resolution", ModernResolution.ToString(), XMLTypes.Token);
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -805,7 +805,7 @@ public class ClientManagement
}
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -1024,19 +1024,19 @@ public class ClientManagement
}
else if (GlobalVars.UserConfiguration.FirstServerLaunch)
{
#pragma warning disable CS0219 // Variable is assigned but its value is never used
#if LAUNCHER
string hostingTips = "For your first time hosting a server, make sure your server's port forwarded (set up in your router), going through a tunnel server, or running from UPnP.\n" +
"If your port is forwarded or you are going through a tunnel server, make sure your port is set up as UDP, not TCP.\n" +
"Roblox does NOT use TCP, only UDP. However, if your server doesn't work with just UDP, feel free to set up TCP too as that might help the issue in some cases.";
#pragma warning restore CS0219 // Variable is assigned but its value is never used
#if LAUNCHER
if (!GlobalVars.isConsoleOnly)
{
MessageBox.Show(hostingTips, "Novetus - Hosting Tips", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
#elif CMD
Util.ConsolePrint(hostingTips + "\nPress any key to continue...", 4);
Console.ReadKey();
else
{
Util.ConsolePrint("Tips: " + hostingTips, 4);
}
#endif
GlobalVars.UserConfiguration.FirstServerLaunch = false;
}
@ -1099,7 +1099,7 @@ public class ClientManagement
{
#if URI
UpdateStatus(label, "The client has been detected as modified.");
#elif LAUNCHER || CMD
#elif LAUNCHER
Util.ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2);
#endif
@ -1121,7 +1121,7 @@ public class ClientManagement
GlobalVars.ValidatedExtraFiles += 1;
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -1192,7 +1192,7 @@ public class ClientManagement
{
#if URI
UpdateStatus(label, "The client has been detected as modified.");
#elif LAUNCHER || CMD
#elif LAUNCHER
Util.ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2);
#endif
@ -1245,7 +1245,7 @@ public class ClientManagement
GlobalVars.ValidatedExtraFiles = 0;
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
#else
catch (Exception)
@ -1253,7 +1253,7 @@ public class ClientManagement
{
#if URI
UpdateStatus(label, "Error: " + ex.Message);
#elif LAUNCHER || CMD
#elif LAUNCHER
Util.ConsolePrint("ERROR - Failed to launch Novetus. (Error: " + ex.Message + ")", 2);
#endif
@ -1263,7 +1263,7 @@ public class ClientManagement
MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
#endif
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
Util.LogExceptions(ex);
#endif
@ -1297,8 +1297,8 @@ public class ClientManagement
}
}
#if CMD
GlobalVars.ProcessID = client.Id;
//TODO: make a command that uses this.
#if CMD_LEGACY
NovetusFuncs.CreateTXT();
#endif
}
@ -1523,7 +1523,7 @@ public class ScriptFuncs
string result = code.Substring(pFrom, pTo - pFrom);
return result;
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -1601,7 +1601,7 @@ public class ScriptFuncs
return source;
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);

View File

@ -587,7 +587,7 @@ public class IconLoader
catch (Exception ex)
{
installOutcome = "Error when installing icon: " + ex.Message;
#if URI || LAUNCHER || CMD
#if URI || LAUNCHER || BASICLAUNCHER
Util.LogExceptions(ex);
#endif
}
@ -688,7 +688,7 @@ public class FileManagement
GlobalVars.UserConfiguration.MapPath = GlobalPaths.MapsDir + @"\\" + GlobalVars.ProgramInformation.DefaultMap;
GlobalVars.UserConfiguration.MapPathSnip = GlobalPaths.MapsDirBase + @"\\" + GlobalVars.ProgramInformation.DefaultMap;
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -942,7 +942,7 @@ public class FileManagement
Config(cfgpath, true);
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -1111,7 +1111,7 @@ public class FileManagement
GlobalVars.UserCustomization.ExtraSelectionIsHat = ValueBool(extraishat, DefaultCustomization.ExtraSelectionIsHat);
GlobalVars.UserCustomization.ShowHatsInExtra = ValueBool(showhatsonextra, DefaultCustomization.ShowHatsInExtra);
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -1234,7 +1234,7 @@ public class FileManagement
break;
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -1264,7 +1264,7 @@ public class FileManagement
goto Failure;
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -1302,7 +1302,7 @@ public class FileManagement
goto Failure;
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);

View File

@ -60,12 +60,6 @@ public static class GlobalVars
public static string PlayerTripcode = "";
#endregion
#region NovetusCMD
//only for novetuscmd. only here because of launchrbxclient >:(
public static int ProcessID = 0;
public static bool RequestToOutputInfo = false;
#endregion
#if LAUNCHER
#region Novetus Launcher
public static NovetusLauncher.NovetusConsole consoleForm = null;

View File

@ -52,7 +52,7 @@ public class NovetusFuncs
download.InitDownloadNoDialog(path);
return GlobalPaths.AssetCacheAssetsGameDir + download.fileName;
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -102,7 +102,7 @@ public class NovetusFuncs
return RobloxXML.GetURLInNodes(doc, assetCacheDef.Class, assetCacheDef.Id[0], item);
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);
@ -207,20 +207,12 @@ public class NovetusFuncs
public static void CreateTXT()
{
if (GlobalVars.RequestToOutputInfo)
{
List<string> text = new List<string>();
text.AddRange(new string[] {
"Process ID: " + (GlobalVars.ProcessID == 0 ? "N/A" : GlobalVars.ProcessID.ToString()),
"Don't copy the Process ID when sharing the server.",
"--------------------"
});
text.AddRange(LoadServerInformation());
List<string> text = new List<string>();
text.AddRange(LoadServerInformation());
string txt = GlobalPaths.BasePath + "\\" + GlobalPaths.ServerInfoFileName;
File.WriteAllLines(txt, text);
Util.ConsolePrint("Server Information sent to file " + txt, 4);
}
string txt = GlobalPaths.BasePath + "\\" + GlobalPaths.ServerInfoFileName;
File.WriteAllLines(txt, text);
Util.ConsolePrint("Server Information sent to file " + txt, 4);
}
#if LAUNCHER || URI

View File

@ -317,7 +317,7 @@ public class SecurityFuncs
{
ipAddress = new WebClient().DownloadString("https://ipv4.icanhazip.com/").TrimEnd();
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
Util.LogExceptions(ex);

View File

@ -400,7 +400,7 @@ public static class Util
image.SetPropertyItem(item);
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
LogExceptions(ex);
@ -501,7 +501,7 @@ public static class Util
}
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
LogExceptions(ex);
@ -544,7 +544,7 @@ public static class Util
FixedFileMove(path, finalPath, File.Exists(finalPath));
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
catch (Exception ex)
{
LogExceptions(ex);
@ -581,7 +581,7 @@ public static class Util
}
}
#if LAUNCHER || CMD || URI || BASICLAUNCHER
#if LAUNCHER || URI || BASICLAUNCHER
public static void LogExceptions(Exception ex)
{
LogPrint("EXCEPTION|MESSAGE: " + (ex.Message != null ? ex.Message.ToString() : "N/A"), 2);
@ -623,7 +623,7 @@ public static class Util
}
catch (Exception ex)
{
#if URI || LAUNCHER || CMD || BASICLAUNCHER
#if URI || LAUNCHER || BASICLAUNCHER
LogExceptions(ex);
#endif
exceptionMessage = ex.Message;

View File

@ -20,6 +20,7 @@ namespace NovetusLauncher
bool helpMode = false;
bool disableCommands = false;
string[] argList;
FileFormat.Config savedConfig;
public NovetusConsole(string[] args)
{
@ -30,7 +31,6 @@ namespace NovetusLauncher
private void NovetusConsole_Load(object sender, EventArgs e)
{
Util.ConsolePrint("Novetus version " + GlobalVars.ProgramInformation.Version + " loaded. Initializing config.", 4);
Util.ConsolePrint("Novetus path: " + GlobalPaths.BasePath, 4);
if (!File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName))
@ -58,13 +58,13 @@ namespace NovetusLauncher
if (argList.Length > 0)
{
//DO ARGS HERE
ConsoleProcessArguments(argList);
ConsoleProcessArguments();
}
}
private void ConsoleProcessArguments(string[] args)
private void ConsoleProcessArguments()
{
CommandLineArguments.Arguments ConsoleArgs = new CommandLineArguments.Arguments(args);
CommandLineArguments.Arguments ConsoleArgs = new CommandLineArguments.Arguments(argList);
if (ConsoleArgs["help"] != null)
{
@ -75,6 +75,7 @@ namespace NovetusLauncher
if (ConsoleArgs["cmdonly"] != null && ConsoleArgs["cmdmode"] != null && !helpMode)
{
//cmd mode
savedConfig = GlobalVars.UserConfiguration;
disableCommands = true;
bool no3d = false;
bool nomap = false;
@ -109,28 +110,105 @@ namespace NovetusLauncher
Util.ConsolePrint(error, 2);
}
if (ConsoleArgs["no3d"] != null)
if (ConsoleArgs["map"] != null)
{
if (loadMode == ScriptType.Server)
{
no3d = true;
Util.ConsolePrint("Novetus will now launch the server in No3D mode.", 4);
Util.ConsolePrint("Launching the server without graphics enables better performance. " +
"However, launching the server with no graphics may cause some elements in later clients may be disabled, such as Dialog boxes." +
"This feature may also make your server unstable.", 5);
}
GlobalVars.UserConfiguration.Map = ConsoleArgs["map"];
GlobalVars.UserConfiguration.MapPath = ConsoleArgs["map"];
Util.ConsolePrint("Novetus will now launch the client with the map " + GlobalVars.UserConfiguration.MapPath, 4);
}
else
{
Util.ConsolePrint("Novetus will launch the sclient with the map defined in the INI file.", 4);
}
if (ConsoleArgs["nomap"] != null)
if (ConsoleArgs["client"] != null)
{
if (loadMode == ScriptType.Studio)
{
nomap = true;
Util.ConsolePrint("Novetus will now launch Studio with no map.", 4);
}
GlobalVars.UserConfiguration.SelectedClient = ConsoleArgs["client"];
}
else
{
Util.ConsolePrint("Novetus will launch the client defined in the INI file.", 4);
}
//add more here for loadmode.
switch (loadMode)
{
case ScriptType.Client:
{
}
break;
case ScriptType.Server:
{
if (ConsoleArgs["no3d"] != null)
{
no3d = true;
Util.ConsolePrint("Novetus will now launch the server in No3D mode.", 4);
Util.ConsolePrint("Launching the server without graphics enables better performance. " +
"However, launching the server with no graphics may cause some elements in later clients may be disabled, such as Dialog boxes." +
"This feature may also make your server unstable.", 5);
}
if (ConsoleArgs["hostport"] != null)
{
GlobalVars.UserConfiguration.RobloxPort = Convert.ToInt32(ConsoleArgs["hostport"]);
}
if (ConsoleArgs["upnp"] != null)
{
GlobalVars.UserConfiguration.UPnP = Convert.ToBoolean(ConsoleArgs["upnp"]);
if (GlobalVars.UserConfiguration.UPnP)
{
Util.ConsolePrint("Novetus will now use UPnP for port forwarding.", 4);
}
else
{
Util.ConsolePrint("Novetus will not use UPnP for port forwarding. Make sure the port " + GlobalVars.UserConfiguration.RobloxPort + " is properly forwarded or you are running a LAN redirection tool.", 4);
}
}
if (ConsoleArgs["notifications"] != null)
{
GlobalVars.UserConfiguration.ShowServerNotifications = Convert.ToBoolean(ConsoleArgs["notifications"]);
if (GlobalVars.UserConfiguration.ShowServerNotifications)
{
Util.ConsolePrint("Novetus will show notifications on player join/leave.", 4);
}
else
{
Util.ConsolePrint("Novetus will not show notifications on player join/leave.", 4);
}
}
if (ConsoleArgs["maxplayers"] != null)
{
GlobalVars.UserConfiguration.PlayerLimit = Convert.ToInt32(ConsoleArgs["maxplayers"]);
}
if (ConsoleArgs["serverbrowsername"] != null)
{
GlobalVars.UserConfiguration.ServerBrowserServerName = ConsoleArgs["serverbrowsername"];
}
if (ConsoleArgs["serverbrowseraddress"] != null)
{
GlobalVars.UserConfiguration.ServerBrowserServerAddress = ConsoleArgs["serverbrowseraddress"];
}
}
break;
case ScriptType.Studio:
{
if (ConsoleArgs["nomap"] != null)
{
nomap = true;
Util.ConsolePrint("Novetus will now launch Studio with no map.", 4);
}
}
break;
default:
break;
}
}
ConsoleForm.StartGame(loadMode, no3d, nomap, true);
@ -324,7 +402,15 @@ namespace NovetusLauncher
Util.ConsolePrint("---------", 1, true);
Util.ConsolePrint("LOAD - Parameters for loading clients in NovetusCMD mode.", 5, true);
Util.ConsolePrint("---------", 1, true);
Util.ConsolePrint("- map <Map Path in Quotation Marks> | Specifies the path to a map.", 4, true);
Util.ConsolePrint("- client <Client Name in Quotation Marks> | Specifies the client for Novetus to load.", 4, true);
Util.ConsolePrint("- no3d | Server Only. Puts the server into No Graphics mode.", 4, true);
Util.ConsolePrint("- hostport <Port> | Server Only. Specifies the port the server should host on.", 4, true);
Util.ConsolePrint("- upnp <True/False> | Server Only. Toggles UPnP (Universal Plug and Play).", 4, true);
Util.ConsolePrint("- notifications <True/False> | Server Only. Toggle player join/leave notifications.", 4, true);
Util.ConsolePrint("- maxplayers <Player Count> | Server Only. Specifies the server's player count.", 4, true);
Util.ConsolePrint("- serverbrowsername <Name in Quotation Marks> | Server Only. Specifies the name the server should use on the Server Browser.", 4, true);
Util.ConsolePrint("- serverbrowseraddress <Address in Quotation Marks> | Server Only. Specifies the Master Server the server should use.", 4, true);
Util.ConsolePrint("- nomap | Studio Only. Loads Studio without a map.", 4, true);
Util.ConsolePrint(GlobalVars.Important2, 0, true, true);
ScrollToTop();
@ -386,6 +472,11 @@ namespace NovetusLauncher
private void ConsoleClose(object sender, FormClosingEventArgs e)
{
CommandLineArguments.Arguments ConsoleArgs = new CommandLineArguments.Arguments(argList);
if (ConsoleArgs["cmdonly"] != null && ConsoleArgs["cmdmode"] != null && !helpMode)
{
GlobalVars.UserConfiguration = savedConfig;
}
ConsoleForm.CloseEventInternal();
}
}

View File

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 132 KiB