From 4a1d34375b0c4e148a8ef05c8ded5b55c075bd89 Mon Sep 17 00:00:00 2001 From: Bitl Date: Mon, 6 Apr 2020 18:23:25 -0700 Subject: [PATCH] winxp support --- NovetusLauncher/NovetusCMD/NovetusCMD.csproj | 73 ++++++++- NovetusLauncher/NovetusCMD/Program.cs | 10 +- .../NovetusCMD/Properties/AssemblyInfo.cs | 10 +- NovetusLauncher/NovetusCMD/app.config | 8 +- NovetusLauncher/NovetusCMD/packages.config | 4 + NovetusLauncher/NovetusFuncs/AddonLoader.cs | 14 +- NovetusLauncher/NovetusFuncs/ClientScript.cs | 2 +- .../NovetusFuncs/CodeExtensions.cs | 32 ---- NovetusLauncher/NovetusFuncs/DiscordRpc.cs | 3 +- NovetusLauncher/NovetusFuncs/Downloader.cs | 5 +- NovetusLauncher/NovetusFuncs/GlobalVars.cs | 8 +- NovetusLauncher/NovetusFuncs/LauncherFuncs.cs | 114 ++++++------- .../NovetusFuncs/ScriptGenerator.cs | 14 +- NovetusLauncher/NovetusFuncs/SecurityFuncs.cs | 2 +- .../NovetusLauncher/MainForm.Designer.cs | 155 +++++++----------- NovetusLauncher/NovetusLauncher/MainForm.cs | 69 +++----- .../NovetusLauncher/NovetusLauncher.csproj | 41 ++++- .../Properties/AssemblyInfo.cs | 4 +- .../NovetusLauncher/URI/LoaderForm.cs | 37 +++-- NovetusLauncher/NovetusLauncher/app.config | 8 +- .../NovetusLauncher/packages.config | 4 + 21 files changed, 315 insertions(+), 302 deletions(-) diff --git a/NovetusLauncher/NovetusCMD/NovetusCMD.csproj b/NovetusLauncher/NovetusCMD/NovetusCMD.csproj index 9c565ce..c118dfd 100644 --- a/NovetusLauncher/NovetusCMD/NovetusCMD.csproj +++ b/NovetusLauncher/NovetusCMD/NovetusCMD.csproj @@ -8,7 +8,7 @@ Exe NovetusCMD NovetusCMD - v4.5 + v4.0 Properties False False @@ -18,6 +18,21 @@ 4 Resources\NovetusIcon.ico + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true x86 @@ -51,9 +66,25 @@ false + + ..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll + True + 4.0 + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + True + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + True + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + True + ..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll @@ -66,9 +97,22 @@ 3.5 + + ..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll + True + + + + ..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll + True + + + ..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll + True + @@ -86,6 +130,23 @@ + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 4.5 + true + + @@ -94,6 +155,14 @@ if not exist "%25path%25" mkdir "%25path%25" copy $(ProjectDir)$(OutDir) "%25path%25"\* del "%25path%25"\*.vshost.exe del "%25path%25"\*.vshost.exe.config -del "%25path%25"\*.vshost.exe.manifest +del "%25path%25"\*.vshost.exe.manifest +del "%25path%25"\*.xml +if not exist "%25path%25"\bin mkdir "%25path%25"\bin +move "%25path%25"\* "%25path%25"\bin + + + + + \ No newline at end of file diff --git a/NovetusLauncher/NovetusCMD/Program.cs b/NovetusLauncher/NovetusCMD/Program.cs index 74fa40f..7af8ca2 100644 --- a/NovetusLauncher/NovetusCMD/Program.cs +++ b/NovetusLauncher/NovetusCMD/Program.cs @@ -174,7 +174,7 @@ namespace NovetusCMD if (!File.Exists(clientpath)) { - ConsolePrint("ERROR 1 - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2); + ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2); GlobalVars.SelectedClient = GlobalVars.DefaultClient; } @@ -193,7 +193,7 @@ namespace NovetusCMD GlobalVars.IsSnapshot = Convert.ToBoolean(lines[5]); if (GlobalVars.IsSnapshot == true) { - var versionInfo = FileVersionInfo.GetVersionInfo(GlobalVars.BasePath + "\\Novetus.exe"); + var versionInfo = FileVersionInfo.GetVersionInfo(GlobalVars.RootPathLauncher + "\\Novetus.exe"); GlobalVars.Version = lines[6].Replace("%version%", lines[0]) .Replace("%build%", versionInfo.ProductBuildPart.ToString()) .Replace("%revision%", versionInfo.FilePrivatePart.ToString()) @@ -391,11 +391,11 @@ namespace NovetusCMD { if (!GlobalVars.FixScriptMapMode) { - args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient) + "; " + (!string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? "dofile('" + GlobalVars.AddonScriptPath + "');" : "") + quote + (no3d ? " -no3d" : ""); + args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server) + "; " + (!string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? "dofile('" + GlobalVars.AddonScriptPath + "');" : "") + quote + (no3d ? " -no3d" : ""); } else { - ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient); + ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Server); args = "-script " + quote + luafile + quote + (no3d ? " -no3d" : "") + " " + quote + mapfile + quote; } } @@ -427,7 +427,7 @@ namespace NovetusCMD } catch (Exception ex) when (!Env.Debugging) { - ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); + ConsolePrint("ERROR - Failed to launch Novetus. (" + ex.Message + ")", 2); } } diff --git a/NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs b/NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs index 121648a..bf1fab9 100644 --- a/NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs +++ b/NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs @@ -9,12 +9,12 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NovetusCMD")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyTitle("Novetus CMD")] +[assembly: AssemblyDescription("Command line utility for old ROBLOX servers.")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NovetusCMD")] -[assembly: AssemblyCopyright("Copyright 2019")] +[assembly: AssemblyCompany("Bitl")] +[assembly: AssemblyProduct("Novetus")] +[assembly: AssemblyCopyright("(c) Bitl 2018-2020. All rights to ROBLOX go to the ROBLOX Corporation.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/NovetusLauncher/NovetusCMD/app.config b/NovetusLauncher/NovetusCMD/app.config index eb92298..b684d87 100644 --- a/NovetusLauncher/NovetusCMD/app.config +++ b/NovetusLauncher/NovetusCMD/app.config @@ -1,6 +1,10 @@ - + - + + + + + diff --git a/NovetusLauncher/NovetusCMD/packages.config b/NovetusLauncher/NovetusCMD/packages.config index 08e33ab..a446064 100644 --- a/NovetusLauncher/NovetusCMD/packages.config +++ b/NovetusLauncher/NovetusCMD/packages.config @@ -1,4 +1,8 @@  + + + + \ No newline at end of file diff --git a/NovetusLauncher/NovetusFuncs/AddonLoader.cs b/NovetusLauncher/NovetusFuncs/AddonLoader.cs index e2747b8..fb0cec2 100644 --- a/NovetusLauncher/NovetusFuncs/AddonLoader.cs +++ b/NovetusLauncher/NovetusFuncs/AddonLoader.cs @@ -1,9 +1,9 @@ using System; using System.IO; using System.Windows.Forms; -using System.IO.Compression; using System.Linq; using System.Text; +using Ionic.Zip; public class AddonLoader { @@ -47,19 +47,17 @@ public class AddonLoader using (Stream str = openFileDialog1.OpenFile()) { - using (ZipArchive archive = new ZipArchive(str)) + using (var zipFile = ZipFile.Read(str)) { - filecount = archive.Entries.Count; + ZipEntry[] entries = zipFile.Entries.ToArray(); - ZipArchiveEntry[] entries = archive.Entries.Take(fileListDisplay).ToArray(); - - foreach (ZipArchiveEntry entry in entries) + foreach (ZipEntry entry in entries) { - filelistbuilder.Append(entry.FullName); + filelistbuilder.Append(entry.FileName + " ("+ entry.UncompressedSize +")"); filelistbuilder.Append(Environment.NewLine); } - archive.ExtractToDirectory(GlobalVars.BasePath, true); + zipFile.ExtractAll(GlobalVars.BasePath, ExtractExistingFileAction.OverwriteSilently); } } diff --git a/NovetusLauncher/NovetusFuncs/ClientScript.cs b/NovetusLauncher/NovetusFuncs/ClientScript.cs index e70ee18..790c1e0 100644 --- a/NovetusLauncher/NovetusFuncs/ClientScript.cs +++ b/NovetusLauncher/NovetusFuncs/ClientScript.cs @@ -123,7 +123,7 @@ public class ClientScript public static string CompileScript(string code, string tag, string endtag, string mapfile, string luafile, string rbxexe) { if (GlobalVars.FixScriptMapMode) { - ScriptGenerator.GenerateScriptForClient(GetTypeFromTag(tag, endtag), GlobalVars.SelectedClient); + ScriptGenerator.GenerateScriptForClient(GetTypeFromTag(tag, endtag)); } string extractedCode = GetArgsFromTag(code, tag, endtag); diff --git a/NovetusLauncher/NovetusFuncs/CodeExtensions.cs b/NovetusLauncher/NovetusFuncs/CodeExtensions.cs index 886fee1..dd1026c 100644 --- a/NovetusLauncher/NovetusFuncs/CodeExtensions.cs +++ b/NovetusLauncher/NovetusFuncs/CodeExtensions.cs @@ -53,38 +53,6 @@ public static class StringExtensions } } -public static class ZipArchiveExtensions -{ - public static void ExtractToDirectory(this ZipArchive archive, string destinationDirectoryName, bool overwrite) - { - if (!overwrite) - { - archive.ExtractToDirectory(destinationDirectoryName); - return; - } - - DirectoryInfo di = Directory.CreateDirectory(destinationDirectoryName); - string destinationDirectoryFullPath = di.FullName; - - foreach (ZipArchiveEntry file in archive.Entries) - { - string completeFileName = Path.GetFullPath(Path.Combine(destinationDirectoryFullPath, file.FullName)); - - if (!completeFileName.StartsWith(destinationDirectoryFullPath, StringComparison.OrdinalIgnoreCase)) - { - throw new IOException("Trying to extract file outside of destination directory. See this link for more info: https://snyk.io/research/zip-slip-vulnerability"); - } - - if (file.Name == "") - {// Assuming Empty for Directory - Directory.CreateDirectory(Path.GetDirectoryName(completeFileName)); - continue; - } - file.ExtractToFile(completeFileName, true); - } - } -} - //credit to code4life public static class ArrayHelper { diff --git a/NovetusLauncher/NovetusFuncs/DiscordRpc.cs b/NovetusLauncher/NovetusFuncs/DiscordRpc.cs index 68ec8e9..8000020 100644 --- a/NovetusLauncher/NovetusFuncs/DiscordRpc.cs +++ b/NovetusLauncher/NovetusFuncs/DiscordRpc.cs @@ -84,8 +84,7 @@ public class DiscordRpc Yes = 1, Ignore = 2 } - - [DllImport("discord-rpc", EntryPoint = "Discord_Initialize", CallingConvention = CallingConvention.Cdecl)] + [DllImport("discord-rpc", EntryPoint = "Discord_Initialize", CallingConvention = CallingConvention.Cdecl)] public static extern void Initialize(string applicationId, ref EventHandlers handlers, bool autoRegister, string optionalSteamId); [DllImport("discord-rpc", EntryPoint = "Discord_Shutdown", CallingConvention = CallingConvention.Cdecl)] diff --git a/NovetusLauncher/NovetusFuncs/Downloader.cs b/NovetusLauncher/NovetusFuncs/Downloader.cs index f36ce5c..5183213 100644 --- a/NovetusLauncher/NovetusFuncs/Downloader.cs +++ b/NovetusLauncher/NovetusFuncs/Downloader.cs @@ -96,11 +96,12 @@ class Downloader // Use a try/catch/finally block as both the WebRequest and Stream // classes throw exceptions upon error + //thanks to https://stackoverflow.com/questions/33761919/tls-1-2-in-net-framework-4-0 for the net 4.0 compatible TLS 1.1/1.2 code! try { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls - | SecurityProtocolType.Tls11 - | SecurityProtocolType.Tls12 + | (SecurityProtocolType)3072 + | (SecurityProtocolType)768 | SecurityProtocolType.Ssl3; // Create a request for the specified remote file name HttpWebRequest request = (HttpWebRequest)WebRequest.Create(remoteFilename); diff --git a/NovetusLauncher/NovetusFuncs/GlobalVars.cs b/NovetusLauncher/NovetusFuncs/GlobalVars.cs index 4831721..a9132da 100644 --- a/NovetusLauncher/NovetusFuncs/GlobalVars.cs +++ b/NovetusLauncher/NovetusFuncs/GlobalVars.cs @@ -25,9 +25,11 @@ public static class Env public static class GlobalVars { - public static readonly string RootPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + public static readonly string RootPathLauncher = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + public static readonly string BasePathLauncher = RootPathLauncher.Replace(@"\", @"\\"); + public static readonly string RootPath = Directory.GetParent(RootPathLauncher).ToString(); public static readonly string BasePath = RootPath.Replace(@"\", @"\\"); - public static readonly string DataPath = BasePath + @"\\shareddata"; + public static readonly string DataPath = BasePath + @"\\shareddata"; public static readonly string ConfigDir = BasePath + @"\\config"; public static readonly string ConfigDirData = ConfigDir + @"\\data"; public static readonly string ClientDir = BasePath + @"\\clients"; @@ -235,8 +237,6 @@ public static class GlobalVars public static bool ReShadePerformanceMode = false; //video public static int GraphicsMode = 1; - public static bool Bevels = true; - public static bool Shadows = true; public static int QualityLevel = 5; public static string MultiLine(params string[] args) diff --git a/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs b/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs index 62e1793..ceb3411 100644 --- a/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs +++ b/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs @@ -56,8 +56,6 @@ public class LauncherFuncs ini.IniWriteValue(section, "MapPathSnip", GlobalVars.MapPathSnip.ToString()); ini.IniWriteValue(section, "GraphicsMode", GlobalVars.GraphicsMode.ToString()); ini.IniWriteValue(section, "ReShade", GlobalVars.ReShade.ToString()); - ini.IniWriteValue(section, "Bevels", GlobalVars.Bevels.ToString()); - ini.IniWriteValue(section, "Shadows", GlobalVars.Shadows.ToString()); ini.IniWriteValue(section, "QualityLevel", GlobalVars.QualityLevel.ToString()); } else @@ -66,7 +64,7 @@ public class LauncherFuncs string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline9, Decryptline10, Decryptline11, Decryptline12, Decryptline13, Decryptline14, Decryptline15, - Decryptline16, Decryptline17, Decryptline18, Decryptline19, Decryptline20; + Decryptline16, Decryptline17, Decryptline20; IniFile ini = new IniFile(cfgpath); @@ -200,22 +198,6 @@ public class LauncherFuncs Decryptline17 = ini.IniReadValue(section, "ReShade"); } - Decryptline18 = ini.IniReadValue(section, "Bevels"); - - if (string.IsNullOrWhiteSpace(Decryptline18)) - { - ini.IniWriteValue(section, "Bevels", GlobalVars.Bevels.ToString()); - Decryptline18 = ini.IniReadValue(section, "Bevels"); - } - - Decryptline19 = ini.IniReadValue(section, "Shadows"); - - if (string.IsNullOrWhiteSpace(Decryptline19)) - { - ini.IniWriteValue(section, "Shadows", GlobalVars.Shadows.ToString()); - Decryptline19 = ini.IniReadValue(section, "Shadows"); - } - Decryptline20 = ini.IniReadValue(section, "QualityLevel"); if (string.IsNullOrWhiteSpace(Decryptline20)) @@ -279,10 +261,6 @@ public class LauncherFuncs GlobalVars.GraphicsMode = iline16; bool bline17 = Convert.ToBoolean(Decryptline17); GlobalVars.ReShade = bline17; - bool bline18 = Convert.ToBoolean(Decryptline18); - GlobalVars.Bevels = bline18; - bool bline19 = Convert.ToBoolean(Decryptline19); - GlobalVars.Shadows = bline19; int iline20 = Convert.ToInt32(Decryptline20); GlobalVars.QualityLevel = iline20; } @@ -690,8 +668,6 @@ public class LauncherFuncs GlobalVars.MapPathSnip = GlobalVars.MapsDirBase + @"\\" + GlobalVars.DefaultMap; GlobalVars.GraphicsMode = 1; GlobalVars.ReShade = true; - GlobalVars.Bevels = true; - GlobalVars.Shadows = true; GlobalVars.QualityLevel = 5; ResetCustomizationValues(); } @@ -949,76 +925,78 @@ public class LauncherFuncs result += "pcall(function() settings().Rendering.graphicsMode = 3 end);"; } - if (GlobalVars.Bevels == true) - { - result += " pcall(function() settings().Rendering.Bevels = 1 end);"; - } - else if (GlobalVars.Bevels == false) - { - result += " pcall(function() settings().Rendering.Bevels = 2 end);"; - } - - if (GlobalVars.Shadows == true) - { - result += " pcall(function() settings().Rendering.Shadow = 1 end);" - + " pcall(function() settings().Rendering.Shadows = true end);"; - } - else if (GlobalVars.Shadows == false) - { - result += " pcall(function() settings().Rendering.Shadow = 2 end);" - + " pcall(function() settings().Rendering.Shadows = false end);"; - } - + //default values are ultra settings int MeshDetail = 100; int ShadingQuality = 100; int QualityLevel = 19; int MaterialQuality = 3; + int AASamples = 8; + int Bevels = 1; + int Shadows_2008 = 1; + bool Shadows_2007 = true; - if (GlobalVars.QualityLevel == 1) + if (GlobalVars.QualityLevel == 1) //very low { - MeshDetail = 10; - ShadingQuality = 10; + MeshDetail = 50; + ShadingQuality = 50; QualityLevel = 1; MaterialQuality = 1; + AASamples = 1; + Bevels = 2; + Shadows_2008 = 2; + Shadows_2007 = false; } - else if (GlobalVars.QualityLevel == 2) + else if (GlobalVars.QualityLevel == 2) //low { - MeshDetail = 25; - ShadingQuality = 25; + MeshDetail = 50; + ShadingQuality = 50; QualityLevel = 5; MaterialQuality = 1; + AASamples = 1; + Bevels = 2; + Shadows_2008 = 2; + Shadows_2007 = false; } - else if (GlobalVars.QualityLevel == 3) + else if (GlobalVars.QualityLevel == 3) //medium { MeshDetail = 50; ShadingQuality = 50; QualityLevel = 10; MaterialQuality = 2; + AASamples = 4; + Bevels = 2; + Shadows_2007 = false; } - else if (GlobalVars.QualityLevel == 4) + else if (GlobalVars.QualityLevel == 4) //high { MeshDetail = 75; ShadingQuality = 75; QualityLevel = 15; + AASamples = 4; } //1 = very low, 2 = low, 3 = medium, 4 = high, 5 = ultra. - result += " pcall(function() settings().Rendering.maxMeshDetail = " + MeshDetail + " end);" - + " pcall(function() settings().Rendering.maxShadingQuality = " + ShadingQuality + " end);" - + " pcall(function() settings().Rendering.minMeshDetail = " + MeshDetail + " end);" - + " pcall(function() settings().Rendering.minShadingQuality = " + ShadingQuality + " end);" - + " pcall(function() settings().Rendering.AluminumQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.CompoundMaterialQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.CorrodedMetalQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.DiamondPlateQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.GrassQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.IceQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.PlasticQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.SlateQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.TrussDetail = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.WoodQuality = " + MaterialQuality + " end);" - + " pcall(function() settings().Rendering.QualityLevel = " + QualityLevel + " end);"; + result += " pcall(function() settings().Rendering.maxMeshDetail = " + MeshDetail.ToString() + " end);" + + " pcall(function() settings().Rendering.maxShadingQuality = " + ShadingQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.minMeshDetail = " + MeshDetail.ToString() + " end);" + + " pcall(function() settings().Rendering.minShadingQuality = " + ShadingQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.AluminumQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.CompoundMaterialQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.CorrodedMetalQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.DiamondPlateQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.GrassQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.IceQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.PlasticQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.SlateQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.TrussDetail = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.WoodQuality = " + MaterialQuality.ToString() + " end);" + + " pcall(function() settings().Rendering.Antialiasing = 1 end);" + + " pcall(function() settings().Rendering.AASamples = " + AASamples.ToString() + " end);" + + " pcall(function() settings().Rendering.Bevels = " + Bevels.ToString() + " end);" + + " pcall(function() settings().Rendering.Shadow = " + Shadows_2008.ToString() + " end);" + + " pcall(function() settings().Rendering.Shadows = " + Shadows_2007.ToString().ToLower() + " end);" + + " pcall(function() settings().Rendering.QualityLevel = " + QualityLevel.ToString() + " end);"; return result; } diff --git a/NovetusLauncher/NovetusFuncs/ScriptGenerator.cs b/NovetusLauncher/NovetusFuncs/ScriptGenerator.cs index 2bec206..9da5872 100644 --- a/NovetusLauncher/NovetusFuncs/ScriptGenerator.cs +++ b/NovetusLauncher/NovetusFuncs/ScriptGenerator.cs @@ -36,16 +36,16 @@ public class ScriptGenerator None = 5 } - public static string GetScriptFuncForType(ScriptType type, string client) + public static string GetScriptFuncForType(ScriptType type) { string rbxexe = ""; if (GlobalVars.LegacyMode == true) { - rbxexe = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\clients\\" + client + @"\\RobloxApp.exe"; + rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp.exe"; } else { - rbxexe = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\clients\\" + client + @"\\RobloxApp_client.exe"; + rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp_client.exe"; } - string md5dir = SecurityFuncs.CalculateMD5(GlobalVars.BasePath + @"\\Novetus.exe"); + string md5dir = SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location); string md5script = SecurityFuncs.CalculateMD5(GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptName + ".lua"); string md5exe = SecurityFuncs.CalculateMD5(rbxexe); string md5s = "'" + md5exe + "','" + md5dir + "','" + md5script + "'"; @@ -93,19 +93,19 @@ public class ScriptGenerator } else if (type == ScriptType.Studio) { return "Studio"; } else if (type == ScriptType.EasterEgg) { - return "Message"; + return "A message from Bitl"; } else { return ""; } } - public static void GenerateScriptForClient(ScriptType type, string client) + public static void GenerateScriptForClient(ScriptType type) { string code = GlobalVars.MultiLine( "--Load Script", //scriptcontents, LauncherFuncs.ChangeGameSettings(), "dofile('rbxasset://scripts/" + GlobalVars.ScriptName + ".lua')", - GetScriptFuncForType(type, client), + GetScriptFuncForType(type), !string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? "dofile('" + GlobalVars.AddonScriptPath + "')" : "" ); diff --git a/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs b/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs index 9ff50c6..b94606f 100644 --- a/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs +++ b/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs @@ -212,7 +212,7 @@ public class SecurityFuncs public static async Task GetExternalIPAddressAsync() { - var task = Task.Run(() => GetExternalIPAddress()); + var task = Task.Factory.StartNew(() => GetExternalIPAddress()); return await task; } } \ No newline at end of file diff --git a/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs b/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs index ec6eb9a..dd7b05e 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs @@ -65,6 +65,9 @@ namespace NovetusLauncher this.button28 = new System.Windows.Forms.Button(); this.button34 = new System.Windows.Forms.Button(); this.panel2 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.button35 = new System.Windows.Forms.Button(); this.tabControl1 = new TabControlWithoutHeader(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.label24 = new System.Windows.Forms.Label(); @@ -122,9 +125,8 @@ namespace NovetusLauncher this.richTextBox2 = new System.Windows.Forms.RichTextBox(); this.tabPage5 = new System.Windows.Forms.TabPage(); this.panel5 = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); this.comboBox2 = new System.Windows.Forms.ComboBox(); - this.checkBox9 = new System.Windows.Forms.CheckBox(); - this.checkBox8 = new System.Windows.Forms.CheckBox(); this.label31 = new System.Windows.Forms.Label(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.checkBox2 = new System.Windows.Forms.CheckBox(); @@ -144,13 +146,11 @@ namespace NovetusLauncher this.label18 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); - this.panel3 = new System.Windows.Forms.Panel(); - this.panel4 = new System.Windows.Forms.Panel(); - this.button35 = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); @@ -164,8 +164,6 @@ namespace NovetusLauncher this.tabPage8.SuspendLayout(); this.tabPage5.SuspendLayout(); this.panel5.SuspendLayout(); - this.panel3.SuspendLayout(); - this.panel4.SuspendLayout(); this.SuspendLayout(); // // button25 @@ -456,6 +454,47 @@ namespace NovetusLauncher this.panel2.Size = new System.Drawing.Size(646, 311); this.panel2.TabIndex = 61; // + // panel3 + // + this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.panel3.Controls.Add(this.pictureBox2); + this.panel3.Controls.Add(this.textBox2); + this.panel3.Controls.Add(this.textBox5); + this.panel3.Controls.Add(this.button4); + this.panel3.Controls.Add(this.label16); + this.panel3.Controls.Add(this.label15); + this.panel3.Controls.Add(this.label12); + this.panel3.Controls.Add(this.label13); + this.panel3.Location = new System.Drawing.Point(1, 4); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(229, 69); + this.panel3.TabIndex = 62; + // + // panel4 + // + this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.panel4.Controls.Add(this.button35); + this.panel4.Controls.Add(this.button34); + this.panel4.Controls.Add(this.button21); + this.panel4.Controls.Add(this.button8); + this.panel4.Controls.Add(this.button3); + this.panel4.Controls.Add(this.button25); + this.panel4.Location = new System.Drawing.Point(236, 41); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(501, 32); + this.panel4.TabIndex = 63; + // + // button35 + // + this.button35.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button35.Location = new System.Drawing.Point(113, 3); + this.button35.Name = "button35"; + this.button35.Size = new System.Drawing.Size(41, 20); + this.button35.TabIndex = 61; + this.button35.Text = "Studio"; + this.button35.UseVisualStyleBackColor = true; + this.button35.Click += new System.EventHandler(this.button35_Click); + // // tabControl1 // this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; @@ -1119,8 +1158,6 @@ namespace NovetusLauncher // this.panel5.Controls.Add(this.label3); this.panel5.Controls.Add(this.comboBox2); - this.panel5.Controls.Add(this.checkBox9); - this.panel5.Controls.Add(this.checkBox8); this.panel5.Controls.Add(this.label31); this.panel5.Controls.Add(this.comboBox1); this.panel5.Controls.Add(this.checkBox2); @@ -1138,6 +1175,19 @@ namespace NovetusLauncher this.panel5.Size = new System.Drawing.Size(200, 259); this.panel5.TabIndex = 68; // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.ForeColor = System.Drawing.Color.Red; + this.label3.Location = new System.Drawing.Point(3, 158); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(191, 45); + this.label3.TabIndex = 74; + this.label3.Text = "NOTE: Some video settings may require multiple client restarts or may require man" + + "ual application by opening the Tools>Settings dialog in Studio and then closing " + + "it."; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // comboBox2 // this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -1154,32 +1204,6 @@ namespace NovetusLauncher this.comboBox2.TabIndex = 73; this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged); // - // checkBox9 - // - this.checkBox9.AutoSize = true; - this.checkBox9.Checked = true; - this.checkBox9.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox9.Location = new System.Drawing.Point(67, 157); - this.checkBox9.Name = "checkBox9"; - this.checkBox9.Size = new System.Drawing.Size(70, 17); - this.checkBox9.TabIndex = 71; - this.checkBox9.Text = "Shadows"; - this.checkBox9.UseVisualStyleBackColor = true; - this.checkBox9.CheckedChanged += new System.EventHandler(this.checkBox9_CheckedChanged); - // - // checkBox8 - // - this.checkBox8.AutoSize = true; - this.checkBox8.Checked = true; - this.checkBox8.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox8.Location = new System.Drawing.Point(3, 157); - this.checkBox8.Name = "checkBox8"; - this.checkBox8.Size = new System.Drawing.Size(58, 17); - this.checkBox8.TabIndex = 70; - this.checkBox8.Text = "Bevels"; - this.checkBox8.UseVisualStyleBackColor = true; - this.checkBox8.CheckedChanged += new System.EventHandler(this.checkBox8_CheckedChanged); - // // label31 // this.label31.AutoSize = true; @@ -1379,57 +1403,6 @@ namespace NovetusLauncher this.label7.Text = "PROJECT STARLIGHT"; this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter; // - // panel3 - // - this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.panel3.Controls.Add(this.pictureBox2); - this.panel3.Controls.Add(this.textBox2); - this.panel3.Controls.Add(this.textBox5); - this.panel3.Controls.Add(this.button4); - this.panel3.Controls.Add(this.label16); - this.panel3.Controls.Add(this.label15); - this.panel3.Controls.Add(this.label12); - this.panel3.Controls.Add(this.label13); - this.panel3.Location = new System.Drawing.Point(1, 4); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(229, 69); - this.panel3.TabIndex = 62; - // - // panel4 - // - this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.panel4.Controls.Add(this.button35); - this.panel4.Controls.Add(this.button34); - this.panel4.Controls.Add(this.button21); - this.panel4.Controls.Add(this.button8); - this.panel4.Controls.Add(this.button3); - this.panel4.Controls.Add(this.button25); - this.panel4.Location = new System.Drawing.Point(236, 41); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(501, 32); - this.panel4.TabIndex = 63; - // - // button35 - // - this.button35.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button35.Location = new System.Drawing.Point(113, 3); - this.button35.Name = "button35"; - this.button35.Size = new System.Drawing.Size(41, 20); - this.button35.TabIndex = 61; - this.button35.Text = "Studio"; - this.button35.UseVisualStyleBackColor = true; - this.button35.Click += new System.EventHandler(this.button35_Click); - // - // label3 - // - this.label3.ForeColor = System.Drawing.Color.Red; - this.label3.Location = new System.Drawing.Point(3, 177); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(191, 27); - this.label3.TabIndex = 74; - this.label3.Text = "NOTE: Some video settings may require multiple client restarts. "; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1456,6 +1429,9 @@ namespace NovetusLauncher ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.panel1.ResumeLayout(false); this.panel2.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel4.ResumeLayout(false); this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); @@ -1474,9 +1450,6 @@ namespace NovetusLauncher this.tabPage5.ResumeLayout(false); this.panel5.ResumeLayout(false); this.panel5.PerformLayout(); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.panel4.ResumeLayout(false); this.ResumeLayout(false); } @@ -1588,8 +1561,6 @@ namespace NovetusLauncher private System.Windows.Forms.Panel panel5; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.Label label31; - private System.Windows.Forms.CheckBox checkBox9; - private System.Windows.Forms.CheckBox checkBox8; private System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.Label label3; } diff --git a/NovetusLauncher/NovetusLauncher/MainForm.cs b/NovetusLauncher/NovetusLauncher/MainForm.cs index 1ac6015..edf34b1 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm.cs @@ -439,7 +439,7 @@ namespace NovetusLauncher } else { - ConsolePrint("ERROR 4 - changelog.txt not found.", 2); + ConsolePrint("ERROR - changelog.txt not found.", 2); } if (File.Exists("credits.txt")) @@ -559,9 +559,6 @@ namespace NovetusLauncher comboBox1.SelectedIndex = 1; } - checkBox8.Checked = GlobalVars.Bevels; - checkBox9.Checked = GlobalVars.Shadows; - if (GlobalVars.QualityLevel == 1) { comboBox2.SelectedIndex = 0; @@ -605,7 +602,7 @@ namespace NovetusLauncher if (!File.Exists(clientpath)) { - ConsolePrint("ERROR 1 - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2); + ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2); MessageBox.Show("No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.","Novetus - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error); GlobalVars.SelectedClient = GlobalVars.DefaultClient; } @@ -914,11 +911,11 @@ namespace NovetusLauncher { if (!GlobalVars.FixScriptMapMode) { - args = "-script " + quote + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client, GlobalVars.SelectedClient) + quote; + args = "-script " + quote + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client) + quote; } else { - ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Client, GlobalVars.SelectedClient); + ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Client); args = "-script " + quote + luafile + quote; } } @@ -941,13 +938,13 @@ namespace NovetusLauncher } else { - ConsolePrint("ERROR 4 - Failed to launch Novetus. (The client has been detected as modified.)", 2); + ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2); MessageBox.Show("Failed to launch Novetus. (Error: The client has been detected as modified.)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { - ConsolePrint("ERROR 4 - Failed to launch Novetus. (The client has been detected as modified.)", 2); + ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2); MessageBox.Show("Failed to launch Novetus. (Error: The client has been detected as modified.)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -963,7 +960,7 @@ namespace NovetusLauncher } catch (Exception ex) when (!Env.Debugging) { - ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); + ConsolePrint("ERROR - Failed to launch Novetus. (" + ex.Message + ")", 2); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1002,11 +999,11 @@ namespace NovetusLauncher { if (!GlobalVars.FixScriptMapMode) { - args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Solo, GlobalVars.SelectedClient) + quote; + args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Solo) + quote; } else { - ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Solo, GlobalVars.SelectedClient); + ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Solo); args = "-script " + quote + luafile + quote + " " + quote + mapfile + quote; } } @@ -1030,7 +1027,7 @@ namespace NovetusLauncher } catch (Exception ex) when (!Env.Debugging) { - ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); + ConsolePrint("ERROR - Failed to launch Novetus. (" + ex.Message + ")", 2); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1046,11 +1043,11 @@ namespace NovetusLauncher { if (!GlobalVars.FixScriptMapMode) { - args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient) + "; " + (!string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? LauncherFuncs.ChangeGameSettings() + " dofile('" + GlobalVars.AddonScriptPath + "');" : "") + quote + (no3d ? " -no3d" : ""); + args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server) + "; " + (!string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? LauncherFuncs.ChangeGameSettings() + " dofile('" + GlobalVars.AddonScriptPath + "');" : "") + quote + (no3d ? " -no3d" : ""); } else { - ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient); + ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Server); args = "-script " + quote + luafile + quote + (no3d ? " -no3d" : "") + " " + quote + mapfile + quote; } } @@ -1081,7 +1078,7 @@ namespace NovetusLauncher } catch (Exception ex) when (!Env.Debugging) { - ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); + ConsolePrint("ERROR - Failed to launch Novetus. (" + ex.Message + ")", 2); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1106,11 +1103,11 @@ namespace NovetusLauncher { if (!GlobalVars.FixScriptMapMode) { - args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Studio, GlobalVars.SelectedClient) + quote; + args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Studio) + quote; } else { - ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Studio, GlobalVars.SelectedClient); + ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Studio); args = "-script " + quote + luafile + quote + " " + quote + mapfile + quote; } } @@ -1134,7 +1131,7 @@ namespace NovetusLauncher } catch (Exception ex) when (!Env.Debugging) { - ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); + ConsolePrint("ERROR - Failed to launch Novetus. (" + ex.Message + ")", 2); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1496,13 +1493,13 @@ namespace NovetusLauncher } catch (Exception ex) when (!Env.Debugging) { - ConsolePrint("ERROR 5 - Failed to register. (" + ex.Message + ")", 2); + ConsolePrint("ERROR - Failed to register. (" + ex.Message + ")", 2); MessageBox.Show("Failed to register. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { - ConsolePrint("ERROR 5 - Failed to register. (Did not run as Administrator)", 2); + ConsolePrint("ERROR - Failed to register. (Did not run as Administrator)", 2); MessageBox.Show("Failed to register. (Error: Did not run as Administrator)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1752,11 +1749,11 @@ namespace NovetusLauncher { if (!GlobalVars.FixScriptMapMode) { - args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.EasterEgg, GlobalVars.SelectedClient) + quote; + args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.EasterEgg) + quote; } else { - ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.EasterEgg, GlobalVars.SelectedClient); + ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.EasterEgg); args = "-script " + quote + luafile + quote + " " + quote + mapfile + quote; } } @@ -1780,7 +1777,7 @@ namespace NovetusLauncher } catch (Exception ex) when (!Env.Debugging) { - ConsolePrint("ERROR 2 - Failed to launch Easter Egg. (" + ex.Message + ")", 2); + ConsolePrint("ERROR - Failed to launch Easter Egg. (" + ex.Message + ")", 2); MessageBox.Show("Failed to launch Easter Egg. (Error: " + ex.Message + ")", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1843,30 +1840,6 @@ namespace NovetusLauncher } } - private void checkBox8_CheckedChanged(object sender, EventArgs e) - { - if (checkBox8.Checked == true) - { - GlobalVars.Bevels = true; - } - else if (checkBox8.Checked == false) - { - GlobalVars.Bevels = false; - } - } - - private void checkBox9_CheckedChanged(object sender, EventArgs e) - { - if (checkBox9.Checked == true) - { - GlobalVars.Shadows = true; - } - else if (checkBox9.Checked == false) - { - GlobalVars.Shadows = false; - } - } - private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox2.SelectedIndex == 0) diff --git a/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj b/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj index 9213d83..4f7549b 100644 --- a/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj +++ b/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj @@ -7,7 +7,7 @@ WinExe NovetusLauncher Novetus - v4.5 + v4.0 Properties @@ -55,6 +55,22 @@ false + + ..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll + True + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + True + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + True + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + True + ..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll @@ -67,9 +83,22 @@ 3.5 + + ..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll + True + + + + ..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll + True + + + ..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll + True + @@ -205,6 +234,14 @@ if not exist "%25path%25" mkdir "%25path%25" copy $(ProjectDir)$(OutDir) "%25path%25"\* del "%25path%25"\*.vshost.exe del "%25path%25"\*.vshost.exe.config -del "%25path%25"\*.vshost.exe.manifest +del "%25path%25"\*.vshost.exe.manifest +del "%25path%25"\*.xml +if not exist "%25path%25"\bin mkdir "%25path%25"\bin +move "%25path%25"\* "%25path%25"\bin + + + + + \ No newline at end of file diff --git a/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs b/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs index ef2ce25..6c4b44b 100644 --- a/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs +++ b/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs @@ -8,11 +8,11 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle ("Novetus")] -[assembly: AssemblyDescription ("Launcher for old ROBLOX clients")] +[assembly: AssemblyDescription("Launcher for old ROBLOX clients.")] [assembly: AssemblyConfiguration ("")] [assembly: AssemblyCompany ("Bitl")] [assembly: AssemblyProduct ("Novetus")] -[assembly: AssemblyCopyright ("(c) Bitl 2018-2019. All rights to ROBLOX go to the ROBLOX Corporation")] +[assembly: AssemblyCopyright("(c) Bitl 2018-2020. All rights to ROBLOX go to the ROBLOX Corporation.")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] // This sets the default COM visibility of types in the assembly to invisible. diff --git a/NovetusLauncher/NovetusLauncher/URI/LoaderForm.cs b/NovetusLauncher/NovetusLauncher/URI/LoaderForm.cs index 5d16e5e..063b50f 100644 --- a/NovetusLauncher/NovetusLauncher/URI/LoaderForm.cs +++ b/NovetusLauncher/NovetusLauncher/URI/LoaderForm.cs @@ -96,16 +96,19 @@ namespace NovetusLauncher void StartDiscord() { - handlers = new DiscordRpc.EventHandlers(); - handlers.readyCallback = ReadyCallback; - handlers.disconnectedCallback += DisconnectedCallback; - handlers.errorCallback += ErrorCallback; - handlers.joinCallback += JoinCallback; - handlers.spectateCallback += SpectateCallback; - handlers.requestCallback += RequestCallback; - DiscordRpc.Initialize(GlobalVars.appid, ref handlers, true, ""); + if (GlobalVars.DiscordPresence) + { + handlers = new DiscordRpc.EventHandlers(); + handlers.readyCallback = ReadyCallback; + handlers.disconnectedCallback += DisconnectedCallback; + handlers.errorCallback += ErrorCallback; + handlers.joinCallback += JoinCallback; + handlers.spectateCallback += SpectateCallback; + handlers.requestCallback += RequestCallback; + DiscordRpc.Initialize(GlobalVars.appid, ref handlers, true, ""); - LauncherFuncs.UpdateRichPresence(LauncherFuncs.LauncherState.LoadingURI, "", true); + LauncherFuncs.UpdateRichPresence(LauncherFuncs.LauncherState.LoadingURI, "", true); + } } void StartGame() @@ -119,7 +122,7 @@ namespace NovetusLauncher GlobalVars.SelectedClient = client; GlobalVars.IP = ip; GlobalVars.RobloxPort = Convert.ToInt32(port); - ReadClientValues(client); + ReadClientValues(GlobalVars.SelectedClient); string luafile = ""; if (!GlobalVars.FixScriptMapMode) { @@ -132,11 +135,11 @@ namespace NovetusLauncher string rbxexe = ""; if (GlobalVars.LegacyMode == true) { - rbxexe = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\clients\\" + client + @"\\RobloxApp.exe"; + rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp.exe"; } else { - rbxexe = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\clients\\" + client + @"\\RobloxApp_client.exe"; + rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp_client.exe"; } string quote = "\""; string args = ""; @@ -144,11 +147,11 @@ namespace NovetusLauncher { if (!GlobalVars.FixScriptMapMode) { - args = "-script " + quote + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client, client) + quote; + args = "-script " + quote + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client) + quote; } else { - ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Client, client); + ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Client); args = "-script " + quote + luafile + quote; } } @@ -162,9 +165,9 @@ namespace NovetusLauncher { if (GlobalVars.AlreadyHasSecurity != true) { - if (SecurityFuncs.checkClientMD5(client) == true) + if (SecurityFuncs.checkClientMD5(GlobalVars.SelectedClient) == true) { - if (SecurityFuncs.checkScriptMD5(client) == true) + if (SecurityFuncs.checkScriptMD5(GlobalVars.SelectedClient) == true) { LaunchClient(rbxexe,args); } @@ -234,7 +237,7 @@ namespace NovetusLauncher void ReadClientValues(string ClientName) { - string clientpath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\clients\\" + ClientName + "\\clientinfo.nov"; + string clientpath = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + "\\clientinfo.nov"; if (!File.Exists(clientpath)) { diff --git a/NovetusLauncher/NovetusLauncher/app.config b/NovetusLauncher/NovetusLauncher/app.config index eb92298..b684d87 100644 --- a/NovetusLauncher/NovetusLauncher/app.config +++ b/NovetusLauncher/NovetusLauncher/app.config @@ -1,6 +1,10 @@ - + - + + + + + diff --git a/NovetusLauncher/NovetusLauncher/packages.config b/NovetusLauncher/NovetusLauncher/packages.config index 08e33ab..a446064 100644 --- a/NovetusLauncher/NovetusLauncher/packages.config +++ b/NovetusLauncher/NovetusLauncher/packages.config @@ -1,4 +1,8 @@  + + + + \ No newline at end of file