winxp support

This commit is contained in:
Bitl 2020-04-06 18:23:25 -07:00
parent c3b6dc8f34
commit 4a1d34375b
21 changed files with 315 additions and 302 deletions

View File

@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>NovetusCMD</RootNamespace>
<AssemblyName>NovetusCMD</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<NoWin32Manifest>False</NoWin32Manifest>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -18,6 +18,21 @@
<WarningLevel>4</WarningLevel>
<ApplicationIcon>Resources\NovetusIcon.ico</ApplicationIcon>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
@ -51,9 +66,25 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Nat">
<HintPath>..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll</HintPath>
</Reference>
@ -66,9 +97,22 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
@ -86,6 +130,23 @@
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="..\NovetusFuncs\NovetusFuncs.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
@ -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</PostBuildEvent>
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</PostBuildEvent>
</PropertyGroup>
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</Target>
</Project>

View File

@ -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);
}
}

View File

@ -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("")]

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
</assemblyBinding>
</runtime>
</configuration>

View File

@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.9.1.8" targetFramework="net40" />
<package id="Microsoft.Bcl" version="1.1.8" targetFramework="net40" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
</packages>

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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
{

View File

@ -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)]

View File

@ -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);

View File

@ -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)

View File

@ -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;
}

View File

@ -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 + "')" : ""
);

View File

@ -212,7 +212,7 @@ public class SecurityFuncs
public static async Task<string> GetExternalIPAddressAsync()
{
var task = Task.Run(() => GetExternalIPAddress());
var task = Task.Factory.StartNew(() => GetExternalIPAddress());
return await task;
}
}

View File

@ -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;
}

View File

@ -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)

View File

@ -7,7 +7,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>NovetusLauncher</RootNamespace>
<AssemblyName>Novetus</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<AppDesignerFolder>Properties</AppDesignerFolder>
@ -55,6 +55,22 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Nat">
<HintPath>..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll</HintPath>
</Reference>
@ -67,9 +83,22 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
@ -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</PostBuildEvent>
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</PostBuildEvent>
</PropertyGroup>
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</Target>
</Project>

View File

@ -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.

View File

@ -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))
{

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
</assemblyBinding>
</runtime>
</configuration>

View File

@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.9.1.8" targetFramework="net40" />
<package id="Microsoft.Bcl" version="1.1.8" targetFramework="net40" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
</packages>