error fixes. imporoved debug error detection.

This commit is contained in:
Bitl 2019-11-12 19:00:56 -07:00
parent c3adb0928d
commit 2ef7260714
19 changed files with 207 additions and 111 deletions

View File

@ -25,8 +25,8 @@ namespace NovetusCMD
UPnP.InitUPnP(DeviceFound,DeviceLost);
ConsolePrint("UPnP: Service initialized", 3);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to initialize UPnP. Reason - " + ex.Message, 2);
}
}
@ -41,8 +41,8 @@ namespace NovetusCMD
UPnP.StartUPnP(device,protocol,port);
ConsolePrint("UPnP: Port " + port + " opened on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to open port mapping. Reason - " + ex.Message, 2);
}
}
@ -57,8 +57,8 @@ namespace NovetusCMD
UPnP.StopUPnP(device,protocol,port);
ConsolePrint("UPnP: Port " + port + " closed on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to close port mapping. Reason - " + ex.Message, 2);
}
}
@ -75,8 +75,8 @@ namespace NovetusCMD
StartUPnP(device, Protocol.Udp, GlobalVars.WebServer_Port);
StartUPnP(device, Protocol.Tcp, GlobalVars.WebServer_Port);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to register device. Reason - " + ex.Message, 2);
}
}
@ -92,8 +92,8 @@ namespace NovetusCMD
StopUPnP(device, Protocol.Udp, GlobalVars.WebServer_Port);
StopUPnP(device, Protocol.Tcp, GlobalVars.WebServer_Port);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to disconnect device. Reason - " + ex.Message, 2);
}
}
@ -107,8 +107,8 @@ namespace NovetusCMD
GlobalVars.WebServer = new SimpleHTTPServer(GlobalVars.DataPath, GlobalVars.WebServer_Port);
ConsolePrint("WebServer: Server is running on port: " + GlobalVars.WebServer.Port.ToString(), 3);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (" + ex.Message + ")", 2);
}
}
@ -127,8 +127,8 @@ namespace NovetusCMD
ConsolePrint("WebServer: Server has stopped on port: " + GlobalVars.WebServer.Port.ToString(), 2);
GlobalVars.WebServer.Stop();
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (" + ex.Message + ")", 2);
}
}
@ -350,8 +350,8 @@ namespace NovetusCMD
client.Start();
SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Server);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
}
}

View File

@ -74,7 +74,7 @@ public class AddonLoader
installOutcome = "Addon " + openFileDialog1.SafeFileName + " installed! " + filecount + " files copied!" + Environment.NewLine + "Files added/modified:" + Environment.NewLine + Environment.NewLine + filelist;
}
}
catch (Exception ex)
catch (Exception ex) when (!Env.Debugging)
{
installOutcome = "Error when installing addon: " + ex.Message;
}

View File

@ -105,7 +105,7 @@ public class ClientScript
} else {
return "";
}
} catch (Exception) {
} catch (Exception) when (!Env.Debugging) {
return "";
}
}

View File

@ -33,9 +33,9 @@ public static class ProcessExtensions
{
try {
Process.GetProcessById(process.Id);
} catch (InvalidOperationException) {
} catch (InvalidOperationException) when (!Env.Debugging) {
return false;
} catch (ArgumentException) {
} catch (ArgumentException) when (!Env.Debugging) {
return false;
}
return true;

View File

@ -48,7 +48,7 @@ class Downloader
int read = DownloadFile(fileURL, fullpath);
downloadOutcome = "File " + outputfilename + " downloaded! " + read + " bytes written! " + downloadOutcomeAddText + downloadOutcomeException;
}
catch (Exception ex)
catch (Exception ex) when (!Env.Debugging)
{
downloadOutcome = "Error when downloading file: " + ex.Message;
}
@ -73,7 +73,7 @@ class Downloader
int read = DownloadFile(fileURL, saveFileDialog1.FileName);
downloadOutcome = "File " + Path.GetFileName(saveFileDialog1.FileName) + " downloaded! " + read + " bytes written! " + downloadOutcomeAddText + downloadOutcomeException;
}
catch (Exception ex)
catch (Exception ex) when (!Env.Debugging)
{
downloadOutcome = "Error when downloading file: " + ex.Message;
}
@ -142,7 +142,7 @@ class Downloader
}
}
}
catch (Exception e)
catch (Exception e) when (!Env.Debugging)
{
downloadOutcomeException = " Exception detected: " + e.Message;
}

View File

@ -11,6 +11,15 @@ using System;
using System.IO;
using System.Reflection;
public static class Env
{
#if DEBUG
public static readonly bool Debugging = true;
#else
public static readonly bool Debugging = false;
#endif
}
public static class GlobalVars
{
public static readonly string RootPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

View File

@ -55,7 +55,7 @@ public class IconLoader
installOutcome = "Icon " + openFileDialog1.SafeFileName + " installed!";
}
catch (Exception ex)
catch (Exception ex) when (!Env.Debugging)
{
installOutcome = "Error when installing icon: " + ex.Message;
}

View File

@ -14,7 +14,8 @@ public static class RobloxXMLLocalizer
public enum DLType
{
//RBXL and RBXM
XML,
RBXL,
RBXM,
//Items
Hat,
Head,
@ -39,17 +40,53 @@ public static class RobloxXMLLocalizer
switch (type)
{
case DLType.XML:
case DLType.RBXL:
//backup the original copy
try
{
File.Copy(path, path.Replace(".rbxl", " BAK.rbxl"));
}
catch(Exception) when (!Env.Debugging)
{
}
//meshes
DownloadFromNodes(path, GlobalVars.Fonts);
DownloadFromNodes(path, GlobalVars.Fonts, 1, 1, 1, 1);
//skybox
DownloadFromNodes(path, GlobalVars.Sky);
DownloadFromNodes(path, GlobalVars.Sky, 0, 1, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 0, 2, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 0, 3, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 0, 4, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 0, 5, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 1, 0, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 2, 0, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 3, 0, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 4, 0, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 5, 0, 0, 0);
//decal
DownloadFromNodes(path, GlobalVars.Decal);
//texture
DownloadFromNodes(path, GlobalVars.Texture);
//tools and hopperbin
DownloadFromNodes(path, GlobalVars.Tool);
DownloadFromNodes(path, GlobalVars.HopperBin);
//sound
DownloadFromNodes(path, GlobalVars.Sound);
//gui
DownloadFromNodes(path, GlobalVars.ImageLabel);
//clothing
DownloadFromNodes(path, GlobalVars.Shirt);
DownloadFromNodes(path, GlobalVars.ShirtGraphic);
DownloadFromNodes(path, GlobalVars.Pants);
break;
case DLType.RBXM:
//meshes
DownloadFromNodes(path, GlobalVars.Fonts);
DownloadFromNodes(path, GlobalVars.Fonts, 1, 1, 1, 1);
//skybox
DownloadFromNodes(path, GlobalVars.Sky);
DownloadFromNodes(path, GlobalVars.Sky, 1, 0, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 2, 0, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 3, 0, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 4, 0, 0, 0);
DownloadFromNodes(path, GlobalVars.Sky, 5, 0, 0, 0);
//decal
DownloadFromNodes(path, GlobalVars.Decal);
//texture
@ -139,17 +176,20 @@ public static class RobloxXMLLocalizer
//do whatever with your value
string url = item3.Value;
DownloadFilesFromNode(url, outputPath, fileext);
string[] substrings = url.Split('=');
item3.Value = inGameDir + substrings[1] + fileext;
if (url.Contains('='))
{
string[] substrings = url.Split('=');
item3.Value = inGameDir + substrings[1] + fileext;
}
}
}
}
}
}
catch (Exception ex)
catch (Exception ex) when (!Env.Debugging)
{
MessageBox.Show("The download has experienced an error: " + ex.Message, "Novetus Localizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("The download has experienced an error: " + ex.Message, "Novetus Asset Localizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
finally
{
@ -171,9 +211,9 @@ public static class RobloxXMLLocalizer
{
download.InitDownload(path, fileext);
}
catch (Exception ex)
catch (Exception ex) when (!Env.Debugging)
{
MessageBox.Show("The download has experienced an error: " + ex.Message, "Novetus Localizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("The download has experienced an error: " + ex.Message, "Novetus Asset Localizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}

View File

@ -193,7 +193,7 @@ public class SecurityFuncs
{
ipAddress = wc.DownloadString("http://ipv4.icanhazip.com/");
}
catch (Exception)
catch (Exception) when (!Env.Debugging)
{
ipAddress = "localhost" + Environment.NewLine;
}

View File

@ -19,10 +19,10 @@ public static class SplashReader
try {
splash = splashes[new CryptoRandom().Next(0, splashes.Length - 1)];
} catch (Exception) {
} catch (Exception) when (!Env.Debugging) {
try {
splash = splashes[0];
} catch (Exception) {
} catch (Exception) when (!Env.Debugging) {
splash = "missingno";
return splash;
}

View File

@ -59,7 +59,7 @@ public static class TreeNodeHelper
} else {
return "";
}
} catch (Exception) {
} catch (Exception) when (!Env.Debugging) {
return "";
}
}

View File

@ -149,7 +149,7 @@ public class SimpleHTTPServer
try {
HttpListenerContext context = _listener.GetContext();
Process(context);
} catch (Exception) {
} catch (Exception) when (!Env.Debugging) {
}
}
@ -221,7 +221,7 @@ public class SimpleHTTPServer
context.Response.StatusCode = (int)HttpStatusCode.OK;
context.Response.OutputStream.Flush();
}
} catch (Exception) {
} catch (Exception) when (!Env.Debugging) {
context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
}

View File

@ -48,7 +48,8 @@
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"RBXL/RBXM",
"RBXL",
"RBXM",
"Hat",
"Head",
"Face",
@ -61,7 +62,7 @@
this.comboBox1.TabIndex = 1;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// PlaceLocalizer
// AssetLocalizer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@ -71,8 +72,9 @@
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PlaceLocalizer";
this.Name = "AssetLocalizer";
this.Text = "Novetus Asset Localizer";
this.Load += new System.EventHandler(this.AssetLocalizer_Load);
this.ResumeLayout(false);
}

View File

@ -25,9 +25,9 @@ namespace NovetusLauncher
{
RobloxXMLLocalizer.LoadRBXFile(currentType);
}
catch (Exception ex)
catch (Exception ex) when (!Env.Debugging)
{
MessageBox.Show("Error: Unable to localize the asset. " + ex.Message, "Novetus Asset Localizer | Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Error: Unable to localize the asset. " + ex.Message, "Novetus Asset Localizer", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@ -35,32 +35,61 @@ namespace NovetusLauncher
{
if (comboBox1.SelectedIndex == 0)
{
currentType = RobloxXMLLocalizer.DLType.XML;
currentType = RobloxXMLLocalizer.DLType.RBXL;
}
else if (comboBox1.SelectedIndex == 1)
{
currentType = RobloxXMLLocalizer.DLType.Hat;
currentType = RobloxXMLLocalizer.DLType.RBXM;
}
else if (comboBox1.SelectedIndex == 2)
{
currentType = RobloxXMLLocalizer.DLType.Head;
currentType = RobloxXMLLocalizer.DLType.Hat;
}
else if (comboBox1.SelectedIndex == 3)
{
currentType = RobloxXMLLocalizer.DLType.Face;
currentType = RobloxXMLLocalizer.DLType.Head;
}
else if (comboBox1.SelectedIndex == 4)
{
currentType = RobloxXMLLocalizer.DLType.TShirt;
currentType = RobloxXMLLocalizer.DLType.Face;
}
else if (comboBox1.SelectedIndex == 5)
{
currentType = RobloxXMLLocalizer.DLType.Shirt;
currentType = RobloxXMLLocalizer.DLType.TShirt;
}
else if (comboBox1.SelectedIndex == 6)
{
currentType = RobloxXMLLocalizer.DLType.Shirt;
}
else if (comboBox1.SelectedIndex == 7)
{
currentType = RobloxXMLLocalizer.DLType.Pants;
}
}
private void AssetLocalizer_Load(object sender, EventArgs e)
{
comboBox1.SelectedItem = "RBXL";
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirFonts))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirFonts);
}
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirSky))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirSky);
}
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirSounds))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirSounds);
}
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirTexturesGUI))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirTexturesGUI);
}
}
}
}

View File

@ -174,7 +174,7 @@ namespace NovetusLauncher
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\icons\\" + GlobalVars.PlayerName + ".png");
pictureBox10.Image = icon1;
}
catch (Exception)
catch (Exception) when (!Env.Debugging)
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\NoExtra.png");
pictureBox10.Image = icon1;
@ -431,8 +431,8 @@ namespace NovetusLauncher
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
}
catch(Exception)
{
catch(Exception) when (!Env.Debugging)
{
if (Directory.Exists(GlobalVars.hatdir))
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
@ -1086,8 +1086,8 @@ namespace NovetusLauncher
client.StartInfo.Arguments = args;
client.Start();
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@ -1135,8 +1135,8 @@ namespace NovetusLauncher
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = false;
}
catch(Exception)
{
catch(Exception) when (!Env.Debugging)
{
if (Directory.Exists(GlobalVars.hatdir))
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
@ -1162,8 +1162,8 @@ namespace NovetusLauncher
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = false;
}
catch(Exception)
{
catch(Exception) when (!Env.Debugging)
{
if (Directory.Exists(GlobalVars.hatdir))
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
@ -1187,8 +1187,8 @@ namespace NovetusLauncher
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = false;
}
catch(Exception)
{
catch(Exception) when (!Env.Debugging)
{
if (Directory.Exists(GlobalVars.hatdir))
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
@ -1254,8 +1254,8 @@ namespace NovetusLauncher
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = false;
}
catch(Exception)
{
catch(Exception) when (!Env.Debugging)
{
if (Directory.Exists(GlobalVars.hatdir))
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
@ -1274,7 +1274,7 @@ namespace NovetusLauncher
{
icon.LoadImage();
}
catch (Exception)
catch (Exception) when (!Env.Debugging)
{
}
@ -1288,7 +1288,7 @@ namespace NovetusLauncher
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\icons\\" + GlobalVars.PlayerName + ".png");
pictureBox10.Image = icon1;
}
catch (Exception)
catch (Exception) when (!Env.Debugging)
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\NoExtra.png");
pictureBox10.Image = icon1;
@ -1383,7 +1383,7 @@ namespace NovetusLauncher
GlobalVars.CharacterID = "";
}
}
catch(Exception ex)
catch(Exception ex) when (!Env.Debugging)
{
MessageBox.Show("Could not generate charapp. Error: " + ex.Message);
textBox1.Text = "";

View File

@ -55,7 +55,7 @@ namespace NovetusLauncher
string helptext = "In order for the item to work in Novetus, you'll need to find an icon for your item (it must be a .png file), then name it the same name as your item.\n\nIf you want to create a local (offline) item, you'll have to download the meshes/textures from the links in the rbxm file, then replace the links in the file pointing to where they are using rbxasset://. Look at the directory in the 'shareddata/charcustom' folder that best suits your item type, then look at the rbxm for any one of the items. If you get a corrupted file, change the URL using the drop down box.";
download.InitDownload((!GlobalVars.DisabledHelp) ? helptext : "");
}
catch (Exception ex)
catch (Exception ex) when (!Env.Debugging)
{
MessageBox.Show("Error: Unable to download the file. " +ex.Message, "Novetus Item SDK | Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@ -76,8 +76,8 @@ namespace NovetusLauncher
}
}
}
catch(Exception)
{
catch(Exception) when (!Env.Debugging)
{
MessageBox.Show("Error: Unable to download the file. Try using a different file name or ID.","Novetus Item SDK | Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@ -118,7 +118,7 @@ namespace NovetusLauncher
LauncherFuncs.ReadConfigValues(cfgpath);
}
comboBox1.SelectedIndex = 0;
comboBox1.SelectedItem = "http://www.roblox.com/";
isWebSite = false;
if (GlobalVars.DisabledHelp == true)

View File

@ -124,8 +124,8 @@ namespace NovetusLauncher
LaunchClient(rbxexe,args);
}
}
catch (Exception)
{
catch (Exception) when (!Env.Debugging)
{
label1.Text = "The client has been detected as modified.";
}
}

View File

@ -48,8 +48,8 @@ namespace NovetusLauncher
UPnP.InitUPnP(DeviceFound,DeviceLost);
ConsolePrint("UPnP: Service initialized", 3);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to initialize UPnP. Reason - " + ex.Message, 2);
}
}
@ -64,8 +64,8 @@ namespace NovetusLauncher
UPnP.StartUPnP(device,protocol,port);
ConsolePrint("UPnP: Port " + port + " opened on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to open port mapping. Reason - " + ex.Message, 2);
}
}
@ -80,8 +80,8 @@ namespace NovetusLauncher
UPnP.StopUPnP(device,protocol,port);
ConsolePrint("UPnP: Port " + port + " closed on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to close port mapping. Reason - " + ex.Message, 2);
}
}
@ -98,8 +98,8 @@ namespace NovetusLauncher
StartUPnP(device, Protocol.Udp, GlobalVars.WebServer_Port);
StartUPnP(device, Protocol.Tcp, GlobalVars.WebServer_Port);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to register device. Reason - " + ex.Message, 2);
}
}
@ -115,8 +115,8 @@ namespace NovetusLauncher
StopUPnP(device, Protocol.Udp, GlobalVars.WebServer_Port);
StopUPnP(device, Protocol.Tcp, GlobalVars.WebServer_Port);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("UPnP: Unable to disconnect device. Reason - " + ex.Message, 2);
}
}
@ -176,8 +176,8 @@ namespace NovetusLauncher
GlobalVars.WebServer = new SimpleHTTPServer(GlobalVars.DataPath, GlobalVars.WebServer_Port);
ConsolePrint("WebServer: Server is running on port: " + GlobalVars.WebServer.Port.ToString(), 3);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (" + ex.Message + ")", 2);
label17.Visible = false;
}
@ -198,8 +198,8 @@ namespace NovetusLauncher
ConsolePrint("WebServer: Server has stopped on port: " + GlobalVars.WebServer.Port.ToString(), 2);
GlobalVars.WebServer.Stop();
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (" + ex.Message + ")", 2);
}
}
@ -831,8 +831,8 @@ namespace NovetusLauncher
OpenClient(rbxexe,args);
}
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@ -921,8 +921,8 @@ namespace NovetusLauncher
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In " + GlobalVars.SelectedClient + " Solo Game";
DiscordRpc.UpdatePresence(ref GlobalVars.presence);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@ -987,8 +987,8 @@ namespace NovetusLauncher
client.Start();
SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Server);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@ -1057,8 +1057,8 @@ namespace NovetusLauncher
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In " + GlobalVars.SelectedClient + " Studio";
DiscordRpc.UpdatePresence(ref GlobalVars.presence);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@ -1170,7 +1170,15 @@ namespace NovetusLauncher
{
LoadItemSDK();
}
else if (string.Compare(command,"charcustom",true, CultureInfo.InvariantCulture) == 0)
else if (string.Compare(command, "assetlocalizer", true, CultureInfo.InvariantCulture) == 0)
{
LoadAssetLocalizer();
}
else if (string.Compare(command, "sdk assetlocalizer", true, CultureInfo.InvariantCulture) == 0)
{
LoadAssetLocalizer();
}
else if (string.Compare(command,"charcustom",true, CultureInfo.InvariantCulture) == 0)
{
CharacterCustomization cc = new CharacterCustomization();
cc.Show();
@ -1210,8 +1218,8 @@ namespace NovetusLauncher
StopWebServer();
StartWebServer();
}
catch(Exception ex)
{
catch(Exception ex) when (!Env.Debugging)
{
ConsolePrint("WebServer: Cannot restart web server. (" + ex.Message + ")", 2);
}
}
@ -1245,8 +1253,8 @@ namespace NovetusLauncher
StopWebServer();
StartWebServer();
}
catch(Exception ex)
{
catch(Exception ex) when (!Env.Debugging)
{
ConsolePrint("WebServer: Cannot restart web server. (" + ex.Message + ")", 2);
}
}
@ -1276,6 +1284,13 @@ namespace NovetusLauncher
ConsolePrint("Novetus Client SDK Loaded.", 4);
}
void LoadAssetLocalizer()
{
AssetLocalizer al = new AssetLocalizer();
al.Show();
ConsolePrint("Novetus Asset Localizer Loaded.", 4);
}
void LoadLauncher()
{
NovetusSDK im = new NovetusSDK();
@ -1300,7 +1315,8 @@ namespace NovetusLauncher
ConsolePrint("-- sdk | Launches the Novetus SDK Launcher", 4);
ConsolePrint("= clientinfo | Launches the Novetus Client SDK", 4);
ConsolePrint("= itemmaker | Launches the Novetus Item SDK", 4);
}
ConsolePrint("= assetlocalizer | Launches the Novetus Asset Localizer", 4);
}
else if (page == 3)
{
ConsolePrint("Help: webserver", 3);
@ -1323,7 +1339,8 @@ namespace NovetusLauncher
ConsolePrint("-- sdk | Launches the Novetus SDK Launcher", 4);
ConsolePrint("-- clientinfo | Launches the Novetus Client SDK", 4);
ConsolePrint("-- itemmaker | Launches the Novetus Item SDK", 4);
ConsolePrint("---------", 1);
ConsolePrint("-- assetlocalizer | Launches the Novetus Asset Localizer", 4);
ConsolePrint("---------", 1);
ConsolePrint("= config", 3);
ConsolePrint("-- save | Saves the config file", 4);
ConsolePrint("-- load | Reloads the config file", 4);
@ -1348,8 +1365,8 @@ namespace NovetusLauncher
ConsolePrint("URI Successfully Installed!", 3);
DialogResult result1 = MessageBox.Show("URI Successfully Installed!","Novetus - Install URI", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
catch (Exception ex) when (!Env.Debugging)
{
ConsolePrint("ERROR 5 - Failed to install URI. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to install URI. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@ -1446,7 +1463,6 @@ namespace NovetusLauncher
void Button6Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("If you want to install a place into a folder, add the name of the folder as a prefix with a '-' seperator to your map's name. (Ex. [2008 - ]Thrillvile) If you want to put your place in the roor maps folder, remove ANY prefix in the map's name if it has any. Maps won't load in the root folder if they have a prefix. Maps with a prefix that's different from the folder's name will not load as well.","Novetus - Open Maps Folder", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
if (result == DialogResult.Cancel)
return;
@ -1495,7 +1511,7 @@ namespace NovetusLauncher
ConsolePrint("AddonLoader - " + addon.getInstallOutcome(), 3);
}
}
catch (Exception)
catch (Exception) when (!Env.Debugging)
{
if (!string.IsNullOrWhiteSpace(addon.getInstallOutcome()))
{

View File

@ -47,7 +47,7 @@
//
// label1
//
this.label1.Location = new System.Drawing.Point(12, 194);
this.label1.Location = new System.Drawing.Point(12, 168);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(260, 16);
this.label1.TabIndex = 12;
@ -73,7 +73,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(284, 219);
this.ClientSize = new System.Drawing.Size(284, 193);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox2);