diff --git a/Novetus/NovetusCore/Classes/INIFile.cs b/Novetus/NovetusCore/Classes/INIFile.cs index 80e1ca8..b0dcd09 100644 --- a/Novetus/NovetusCore/Classes/INIFile.cs +++ b/Novetus/NovetusCore/Classes/INIFile.cs @@ -92,6 +92,33 @@ namespace Novetus.Core return false; } } + + public string IniGetKey(string SearchString) + { + try + { + if (File.Exists(path)) + { + string[] lines = File.ReadAllLines(path); + + foreach (string line in lines) + { + if (line.Contains(SearchString)) + { + string Key = line.Replace(line.After("="), "").Replace("=", ""); + return Key; + } + } + } + + return ""; + } + catch (Exception ex) + { + Util.LogExceptions(ex); + return ""; + } + } } #endregion } diff --git a/Novetus/NovetusCore/Classes/Script.cs b/Novetus/NovetusCore/Classes/Script.cs index f22b543..ee0d47b 100644 --- a/Novetus/NovetusCore/Classes/Script.cs +++ b/Novetus/NovetusCore/Classes/Script.cs @@ -223,6 +223,9 @@ error: foreach (CompilerError error in result.Errors) { + if (error.IsWarning) + continue; + ErrorHandler(error, filePath); } diff --git a/Novetus/NovetusCore/Classes/WebProxy.cs b/Novetus/NovetusCore/Classes/WebProxy.cs index 0e95d08..26cb5e2 100644 --- a/Novetus/NovetusCore/Classes/WebProxy.cs +++ b/Novetus/NovetusCore/Classes/WebProxy.cs @@ -245,33 +245,39 @@ namespace Novetus.Core public void Stop() { - if (!Server.ProxyRunning) + try { - Util.ConsolePrint("The web proxy is already turned off.", 2); - return; - } - - Util.ConsolePrint("Web Proxy stopping on port " + GlobalVars.WebProxyPort, 3); - Server.BeforeRequest -= new AsyncEventHandler(OnRequest); - Server.Stop(); - - foreach (IExtension extension in Manager.GetExtensionList().ToArray()) - { - try + if (!Server.ProxyRunning) { - IWebProxyExtension webProxyExtension = extension as IWebProxyExtension; - if (webProxyExtension != null) + Util.ConsolePrint("The web proxy is already turned off.", 2); + return; + } + + Util.ConsolePrint("Web Proxy stopping on port " + GlobalVars.WebProxyPort, 3); + Server.BeforeRequest -= new AsyncEventHandler(OnRequest); + Server.Stop(); + + foreach (IExtension extension in Manager.GetExtensionList().ToArray()) + { + try + { + IWebProxyExtension webProxyExtension = extension as IWebProxyExtension; + if (webProxyExtension != null) + { + webProxyExtension.OnProxyStopped(); + } + } + catch (Exception) { - webProxyExtension.OnProxyStopped(); } } - catch (Exception) - { - } - } - Manager.UnloadExtensions(); - Manager.GetExtensionList().Clear(); + Manager.UnloadExtensions(); + Manager.GetExtensionList().Clear(); + } + catch + { + } } } } diff --git a/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs b/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs index 59a4baf..234bec6 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs @@ -1508,14 +1508,14 @@ namespace Novetus.Core } //MessageBox.Show(lineCount + "\n" + fileCount); - - if (lineCount != fileCount) + // commenting this because frankly the CreateInitialFileList thread should be called upon inital bootup of novetus. + /*if (lineCount != fileCount) { Util.ConsolePrint("WARNING - Initial File List is not relevant to file path. Regenerating.", 5); Thread t = new Thread(CreateInitialFileList); t.IsBackground = true; t.Start(); - } + }*/ } } diff --git a/Novetus/NovetusLauncher/Classes/Launcher/ModManager.cs b/Novetus/NovetusLauncher/Classes/Launcher/ModManager.cs index 498b709..93699e3 100644 --- a/Novetus/NovetusLauncher/Classes/Launcher/ModManager.cs +++ b/Novetus/NovetusLauncher/Classes/Launcher/ModManager.cs @@ -217,7 +217,7 @@ public class ModManager tokenSource.Cancel(); } - public async Task CreateModPackage(string[] filesToPackage, string modName) + public async Task CreateModPackage(string[] filesToPackage, string modName, string modAuthor, string modDesc) { if (globalMode == ModMode.ModInstallation) return; @@ -226,7 +226,24 @@ public class ModManager { try { - string outputSavePath = Path.GetDirectoryName(saveFileDialog1.FileName) + @"\" + modName; + string outputPath = Path.GetDirectoryName(saveFileDialog1.FileName); + string fullModName = modAuthor + " - " + modName; + string outputSavePath = outputPath + @"\" + fullModName; + + if (!Directory.Exists(outputSavePath)) + { + Directory.CreateDirectory(outputSavePath); + } + + List info = new List(); + info.Add(modDesc); + info.Add("FILE PATHS:"); + foreach (string filepath in filesToPackage) + { + info.Add(filepath.Replace(GlobalPaths.RootPath, "")); + } + + File.WriteAllLines(outputSavePath + @"\" + fullModName + "_info.txt", info.ToArray()); int filecount = 0; @@ -271,6 +288,7 @@ public class ModManager Directory.Delete(outputSavePath, true); + //don't include the info file. installOutcome = filecount + " files have been successfully moved and compressed into " + outputSavePath + ".zip!"; } catch (Exception ex) diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs index 854ecae..987e9fc 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs @@ -192,13 +192,7 @@ namespace NovetusLauncher } if (GlobalVars.UserConfiguration.WebProxyEnabled) { - try - { - GlobalVars.Proxy.Stop(); - } - catch - { - } + GlobalVars.Proxy.Stop(); } if (!GlobalVars.AppClosed) diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylish.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylish.cs index 81849fe..e3bb689 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylish.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylish.cs @@ -63,8 +63,7 @@ namespace NovetusLauncher launcherFormStylishInterface1.readmeBox.Text = File.ReadAllText(GlobalPaths.RootPath + "\\README-AND-CREDITS.TXT"); } - launcherFormStylishInterface1.versionLabel.Content = Application.ProductVersion; - launcherFormStylishInterface1.versionNovetusLabel.Content = launcherFormStylishInterface1.launcherForm.GetProductVersion(); + launcherFormStylishInterface1.versionLabel.Content = launcherFormStylishInterface1.launcherForm.GetProductVersion(); ReadConfigValues(true); diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml index c8ab22d..531f209 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml @@ -854,11 +854,9 @@