Skip to content

Commit

Permalink
Merge pull request #251 from Zacam/development
Browse files Browse the repository at this point in the history
Merge Fixes from Dev
  • Loading branch information
Zacam authored May 19, 2023
2 parents 491b57c + fac48cb commit 7604b82
Show file tree
Hide file tree
Showing 17 changed files with 673 additions and 294 deletions.
2 changes: 1 addition & 1 deletion SBRW.Launcher.Net/App/Languages/English_Texts.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion SBRW.Launcher.Net/App/Languages/English_Texts.resx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
<value>Online: {0}\n Registered: {1}</value>
</data>
<data name="MainScreen_Text_ServerStatus_Description_Unstable" xml:space="preserve">
<value>Recevied Invalid JSON Game Server Info.</value>
<value>Received Invalid JSON Game Server Info.</value>
</data>
<data name="MainScreen_Text_ServerStatus_Offline" xml:space="preserve">
<value>Server Status:\n - Offline ( OFF )</value>
Expand Down
598 changes: 410 additions & 188 deletions SBRW.Launcher.Net/App/UI_Forms/Main_Screen/Screen_Main.cs

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions SBRW.Launcher.Net/App/UI_Forms/Parent_Screen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -458,17 +458,17 @@ await Task.Run(() =>
{
try
{
if (Hashes.Hash_SHA(InformationCache.Secondary_Game_Archive_Path) == "88C886B6D131C052365C3D6D14E14F67A4E2C253")
if (Hashes.Hash_SHA(InformationCache.Secondary_Game_Archive_Path()) == "88C886B6D131C052365C3D6D14E14F67A4E2C253")
{
Save_Settings.Live_Data.Game_Archive_Location = InformationCache.Secondary_Game_Archive_Path;
Save_Settings.Live_Data.Game_Archive_Location = InformationCache.Secondary_Game_Archive_Path();
}
else if (Hashes.Hash_SHA(InformationCache.Secondary_Game_Archive_Path_Old) == "88C886B6D131C052365C3D6D14E14F67A4E2C253")
else if (Hashes.Hash_SHA(InformationCache.Secondary_Game_Archive_Path_Old()) == "88C886B6D131C052365C3D6D14E14F67A4E2C253")
{
Save_Settings.Live_Data.Game_Archive_Location = InformationCache.Secondary_Game_Archive_Path_Old;
Save_Settings.Live_Data.Game_Archive_Location = InformationCache.Secondary_Game_Archive_Path_Old();
}
else if (Hashes.Hash_SHA(InformationCache.Legacy_Game_Archive_Path) == "88C886B6D131C052365C3D6D14E14F67A4E2C253")
else if (Hashes.Hash_SHA(InformationCache.Legacy_Game_Archive_Path()) == "88C886B6D131C052365C3D6D14E14F67A4E2C253")
{
Save_Settings.Live_Data.Game_Archive_Location = InformationCache.Legacy_Game_Archive_Path;
Save_Settings.Live_Data.Game_Archive_Location = InformationCache.Legacy_Game_Archive_Path();
}
if (!string.IsNullOrWhiteSpace(Save_Settings.Live_Data.Game_Archive_Location))
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ private async void Screen_Settings_Load(object sender, EventArgs e)
NewGameFilesPath = Save_Settings.Live_Data.Game_Path;
NewLauncherPath = Locations.LauncherFolder;

CheckBox_Proxy.Checked = InformationCache.DisableProxy;
CheckBox_RPC.Checked = InformationCache.DisableDiscordRPC;
CheckBox_Alt_WebCalls.Checked = InformationCache.EnableAltWebCalls;
CheckBox_Opt_Insider.Checked = InformationCache.EnableInsiderPreview;
CheckBox_Theme_Support.Checked = InformationCache.EnableThemeSupport;
CheckBox_LZMA_Downloader.Checked = InformationCache.EnableLZMADownloader;
CheckBox_JSON_Update_Cache.Checked = InformationCache.DisableFrequencyJSONUpdate;
CheckBox_Proxy_Domain.Checked = InformationCache.EnableProxyDomain;
CheckBox_Proxy.Checked = InformationCache.DisableProxy();
CheckBox_RPC.Checked = InformationCache.DisableDiscordRPC();
CheckBox_Alt_WebCalls.Checked = InformationCache.EnableAltWebCalls();
CheckBox_Opt_Insider.Checked = InformationCache.EnableInsiderPreview();
CheckBox_Theme_Support.Checked = InformationCache.EnableThemeSupport();
CheckBox_LZMA_Downloader.Checked = InformationCache.EnableLZMADownloader();
CheckBox_JSON_Update_Cache.Checked = InformationCache.DisableFrequencyJSONUpdate();
CheckBox_Proxy_Domain.Checked = InformationCache.EnableProxyDomain();
CheckBox_Host_to_IP.Checked = !Save_Settings.Legacy_Host_To_IP();

int Proxy_Port_Convert = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,19 @@ private void Integrity()
Presence_Launcher.Status(27);
Save_Settings.Live_Data.Game_Integrity = "Good";
Save_Settings.Save();
/* @DavidCarbon OR @Zacam
* Ini File Save Error Happens Above
*/
if (Screen_Main.Screen_Instance != null)
{
Screen_Main.Screen_Instance.Button_Settings.BackgroundImage = Image_Icon.Gear;
if (Screen_Main.Screen_Instance.Button_Settings.InvokeRequired)
{
Screen_Main.Screen_Instance.Button_Settings.SafeInvokeAction(() => Screen_Main.Screen_Instance.Button_Settings.BackgroundImage = Image_Icon.Gear);
}
else
{
Screen_Main.Screen_Instance.Button_Settings.BackgroundImage = Image_Icon.Gear;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ private void SetVisuals()
Button_Save.Text = "Save Settings";
}

CheckBox_LZMA_Downloader.Checked = InformationCache.EnableLZMADownloader;
CheckBox_Alt_WebCalls.Checked = InformationCache.EnableAltWebCalls;
CheckBox_LZMA_Downloader.Checked = InformationCache.EnableLZMADownloader();
CheckBox_Alt_WebCalls.Checked = InformationCache.EnableAltWebCalls();

/*******************************/
/* Set Font /
Expand Down
14 changes: 7 additions & 7 deletions SBRW.Launcher.Net/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEv
}
}

static void Start()
static void Start(string[] args)
{
try
{
Expand All @@ -167,7 +167,7 @@ static void Start()
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
static void Main(string[] args)
{
#region Core application Settings set By the Developer
/* Application and Thread Language */
Expand Down Expand Up @@ -221,7 +221,7 @@ static void Main()
#region Application Library File Checks and Process
if (Debugger.IsAttached && !NFSW.IsRunning())
{
Start();
Start(args);
}
else
{
Expand Down Expand Up @@ -358,11 +358,11 @@ static void Main()
"SBRW.Nancy.dll - 2.0.13",
"SBRW.Nancy.Hosting.Self.dll - 2.0.11",
"SBRW.Launcher.Core.dll - 0.3.0",
"SBRW.Launcher.Core.Extra.dll - 0.3.5",
"SBRW.Launcher.Core.Extra.dll - 0.3.6",
"SBRW.Launcher.Core.Discord.dll - 0.3.0",
"SBRW.Launcher.Core.Proxy.dll - 0.3.0",
"SBRW.Launcher.Core.Theme.dll - 0.1.5",
"SBRW.Launcher.Core.Downloader.dll - 0.3.6",
"SBRW.Launcher.Core.Theme.dll - 0.2.0",
"SBRW.Launcher.Core.Downloader.dll - 0.3.7",
"SBRW.Launcher.Core.Downloader.LZMA.dll - 0.3.1"
};

Expand Down Expand Up @@ -430,7 +430,7 @@ static void Main()
}
else
{
Start();
Start(args);
}
}
else
Expand Down
12 changes: 6 additions & 6 deletions SBRW.Launcher.Net/SBRW.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net6.0-windows;net461</TargetFrameworks>
<TargetFrameworks>net461</TargetFrameworks>
<!-- NoWarn below suppresses project-wide -->
<NoWarn>$(NoWarn);NU1701;SYSLIB0006;SYSLIB0014</NoWarn>
<Nullable>enable</Nullable>
Expand All @@ -19,8 +19,8 @@
You can specify this option only for projects that target .NET Framework 4.5 or later.
<PlatformTarget>x86</PlatformTarget>-->
<Copyright>© Soapbox Race World</Copyright>
<GlobalVersion>2.2.1</GlobalVersion>
<GlobalVersion Condition=" '$(GlobalVersion)' == '' ">2.2.1.$([System.DateTime]::UtcNow.ToString(mmff))</GlobalVersion>
<GlobalVersion>2.2.2</GlobalVersion>
<GlobalVersion Condition=" '$(GlobalVersion)' == '' ">2.2.0.$([System.DateTime]::UtcNow.ToString(mmff))</GlobalVersion>
<Version>$(GlobalVersion)</Version>
<AssemblyVersion>$(GlobalVersion)</AssemblyVersion>
<FileVersion>$(GlobalVersion)</FileVersion>
Expand Down Expand Up @@ -74,11 +74,11 @@
<PackageReference Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.1.0" />
<PackageReference Include="SBRW.Launcher.Core" Version="0.3.0" />
<PackageReference Include="SBRW.Launcher.Core.Discord" Version="0.3.0" />
<PackageReference Include="SBRW.Launcher.Core.Downloader" Version="0.3.6" />
<PackageReference Include="SBRW.Launcher.Core.Downloader" Version="0.3.7" />
<PackageReference Include="SBRW.Launcher.Core.Downloader.LZMA" Version="0.3.1" />
<PackageReference Include="SBRW.Launcher.Core.Extra" Version="0.3.5" />
<PackageReference Include="SBRW.Launcher.Core.Extra" Version="0.3.6" />
<PackageReference Include="SBRW.Launcher.Core.Proxy" Version="0.3.0" />
<PackageReference Include="SBRW.Launcher.Core.Theme" Version="0.1.5" />
<PackageReference Include="SBRW.Launcher.Core.Theme" Version="0.2.0" />
<PackageReference Include="SBRW.Nancy" Version="2.0.13" />
<PackageReference Include="SBRW.Nancy.Hosting.Self" Version="2.0.11" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
Expand Down
3 changes: 2 additions & 1 deletion SBRW.Launcher.RunTime/InsiderKit/KitEnabler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public class InsiderInfo
{
/* Current month, day, year (2 digits), and letter! Ex: 12-15-20-A */
/* If a second build gets release within the same day bump letter version up (No R2 or D2)*/
private static string InsiderBuildNumber { get; set; } = "03-29-23-A";

private static string InsiderBuildNumber { get; set; } = "05-15-23-B";

public static string BuildNumberOnly()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,83 @@
using SBRW.Launcher.RunTime.LauncherCore.Logger;
using SBRW.Launcher.RunTime.LauncherCore.Global;
using SBRW.Launcher.RunTime.LauncherCore.Languages.Visual_Forms;
using SBRW.Launcher.RunTime.LauncherCore.Logger;
using System.Runtime.CompilerServices;

namespace SBRW.Launcher.RunTime.LauncherCore.FileReadWrite
{
public class File_and_Folder_Extention
public static class File_and_Folder_Extention
{
/// <summary>
///
/// </summary>
/// <param name="Folder_Size"></param>
/// <returns></returns>
public static bool GameInstall_Found(this long Folder_Size)
{
return Folder_Size.GameInstall_RU() || Folder_Size.GameInstall_DE() ||
Folder_Size.GameInstall_Default() || Folder_Size.GameInstall_ES() ||
Folder_Size.GameInstall_FR() || Folder_Size.GameInstall_TW();
}
/// <summary>
///
/// </summary>
/// <param name="Folder_Size"></param>
/// <returns></returns>
public static bool GameInstall_TW(this long Folder_Size)
{
return InformationCache.Lang.TwoLetterISOLanguageName.ToLowerInvariant().Contains("tw") && (Folder_Size >= 3226671567);
}
/// <summary>
///
/// </summary>
/// <param name="Folder_Size"></param>
/// <returns></returns>
public static bool GameInstall_FR(this long Folder_Size)
{
return InformationCache.Lang.TwoLetterISOLanguageName.ToLowerInvariant().Contains("fr") && (Folder_Size >= 3255567909);
}
/// <summary>
///
/// </summary>
/// <param name="Folder_Size"></param>
/// <returns></returns>
public static bool GameInstall_ES(this long Folder_Size)
{
return InformationCache.Lang.TwoLetterISOLanguageName.ToLowerInvariant().Contains("es") && (Folder_Size >= 3251629477);
}
/// <summary>
///
/// </summary>
/// <param name="Folder_Size"></param>
/// <returns></returns>
public static bool GameInstall_RU(this long Folder_Size)
{
return InformationCache.Lang.TwoLetterISOLanguageName.ToLowerInvariant().Contains("ru") && (Folder_Size >= 3273498661);
}
/// <summary>
///
/// </summary>
/// <param name="Folder_Size"></param>
/// <returns></returns>
public static bool GameInstall_DE(this long Folder_Size)
{
return InformationCache.Lang.TwoLetterISOLanguageName.ToLowerInvariant().Contains("de") && (Folder_Size >= 3257512293);
}
/// <summary>
///
/// </summary>
/// <param name="Folder_Size"></param>
/// <returns></returns>
public static bool GameInstall_Default(this long Folder_Size)
{
return (InformationCache.Lang.TwoLetterISOLanguageName.ToLowerInvariant().Contains("en") && (Folder_Size >= 3296810469)) || (Folder_Size >= 3296810469);
}
/// <summary>
///
/// </summary>
/// <param name="Folder_Name"></param>
/// <param name="Strings_Or_Folders"></param>
/// <returns></returns>
public static bool GetFolderExclusion(string Folder_Name, string[] Strings_Or_Folders)
{
if (string.IsNullOrWhiteSpace(Folder_Name))
Expand All @@ -25,7 +99,12 @@ public static bool GetFolderExclusion(string Folder_Name, string[] Strings_Or_Fo
return Final_Results;
}
}

/// <summary>
///
/// </summary>
/// <param name="Directory_Info"></param>
/// <param name="Recursive"></param>
/// <returns></returns>
public static long GetDirectorySize(System.IO.DirectoryInfo Directory_Info, bool Recursive = true)
{

Expand Down Expand Up @@ -68,7 +147,21 @@ public static long GetDirectorySize(System.IO.DirectoryInfo Directory_Info, bool
/* Return full Size of this Directory. */
return Start_Directory_Size;
}

/// <summary>
///
/// </summary>
/// <param name="Directory_Info"></param>
/// <param name="Recursive"></param>
/// <returns></returns>
/// <remarks>
/// Full Install - 3859168701
/// EN Install - 3859168701
/// DE Install - 3859168701
/// ES Install - 3859168701
/// FR Install - 3859168701
/// RU Install - 3859168701
/// TW Install - 3859168701
/// </remarks>
public static long GetDirectorySize_GameFiles(System.IO.DirectoryInfo Directory_Info, bool Recursive = true)
{

Expand All @@ -92,10 +185,13 @@ public static long GetDirectorySize_GameFiles(System.IO.DirectoryInfo Directory_
foreach (System.IO.FileInfo File_Info in Directory_Info.GetFiles())
{
string File_Name = File_Info.Extension.ToLowerInvariant();
if (File_Name.EndsWith(".txt", System.StringComparison.InvariantCultureIgnoreCase) ||

if (!(File_Name.EndsWith(".txt", System.StringComparison.InvariantCultureIgnoreCase) ||
File_Name.EndsWith(".dmp", System.StringComparison.InvariantCultureIgnoreCase) ||
File_Name.EndsWith(".orig", System.StringComparison.InvariantCultureIgnoreCase) ||
File_Name.EndsWith(".bak", System.StringComparison.InvariantCultureIgnoreCase))
File_Name.EndsWith(".bak", System.StringComparison.InvariantCultureIgnoreCase) ||
File_Name.EndsWith(".mods", System.StringComparison.InvariantCultureIgnoreCase) ||
File_Name.EndsWith(".asi", System.StringComparison.InvariantCultureIgnoreCase)))
{
System.Threading.Interlocked.Add(ref Start_Directory_Size, File_Info.Length);
}
Expand Down
Loading

0 comments on commit 7604b82

Please sign in to comment.