From 1328efd755ba4024b0ff669b7e9b7bb37305b7de Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Mon, 12 Feb 2024 18:16:04 -0800 Subject: [PATCH 01/21] Switch to GameCollector package for IPlatform.GetGames() Also add RobotCache platform, upgrade dependencies --- .../DataConversionTool.csproj | 8 +- .../GameLauncher_Console/Dock.cs | 28 +- .../GameLauncher_Console/GameData.cs | 23 +- .../GameLauncher_Console.csproj | 57 ++-- .../GameLauncher_Console/Platform.cs | 37 ++- .../GameLauncher_Console/Platforms/Amazon.cs | 33 +- .../GameLauncher_Console/Platforms/Arc.cs | 32 +- .../Platforms/Battlenet.cs | 32 +- .../Platforms/Bethesda.cs | 33 +- .../GameLauncher_Console/Platforms/BigFish.cs | 31 +- .../GameLauncher_Console/Platforms/Custom.cs | 9 +- .../GameLauncher_Console/Platforms/EA.cs | 31 +- .../GameLauncher_Console/Platforms/Epic.cs | 38 ++- .../GameLauncher_Console/Platforms/GOG.cs | 26 +- .../Platforms/GameJolt.cs | 26 +- .../GameLauncher_Console/Platforms/Humble.cs | 27 +- .../Platforms/IGClient.cs | 29 +- .../GameLauncher_Console/Platforms/Itch.cs | 22 +- .../GameLauncher_Console/Platforms/Legacy.cs | 33 +- .../Platforms/Microsoft.cs | 46 ++- .../GameLauncher_Console/Platforms/Oculus.cs | 304 ++++++++++-------- .../GameLauncher_Console/Platforms/Paradox.cs | 31 +- .../GameLauncher_Console/Platforms/Plarium.cs | 40 ++- .../GameLauncher_Console/Platforms/Riot.cs | 28 +- .../Platforms/RobotCache.cs | 79 +++++ .../Platforms/Rockstar.cs | 28 +- .../GameLauncher_Console/Platforms/Steam.cs | 35 +- .../GameLauncher_Console/Platforms/Ubisoft.cs | 28 +- .../Platforms/Wargaming.cs | 33 +- .../Properties/AssemblyInfo.cs | 6 +- .../GameLauncher_Console/Resources/30.ico | Bin 0 -> 72113 bytes GameLauncher_Console/UnitTest/UnitTest.csproj | 14 +- .../PureOrigin.API.Tests.csproj | 2 +- .../Src/PureOrigin.API/PureOrigin.API.csproj | 2 +- README.md | 1 + 35 files changed, 861 insertions(+), 371 deletions(-) create mode 100644 GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs create mode 100644 GameLauncher_Console/GameLauncher_Console/Resources/30.ico diff --git a/GameLauncher_Console/DataConversionTool/DataConversionTool.csproj b/GameLauncher_Console/DataConversionTool/DataConversionTool.csproj index e303b90..787c59c 100644 --- a/GameLauncher_Console/DataConversionTool/DataConversionTool.csproj +++ b/GameLauncher_Console/DataConversionTool/DataConversionTool.csproj @@ -1,15 +1,15 @@  - net7.0-windows10.0.17763.0 + net8.0-windows10.0.17763.0 AnyCPU Exe false DataConversionTool.Program - 1.2.0.0 - 1.2.0.0 + 1.4.0.0 + 1.4.0.0 - + all diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index d1a4410..6dc8fa0 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -75,9 +75,9 @@ public class CDock { // 0|-------|---------|---------|---------|---------|---------|---------|---------|80 " This program will scan your system for installed video games and display", - " them as a list. The following platforms are supported:", - " *Amazon *BattleNet *BigFish *EA *Epic *GameJolt *GOG *Humble *Indiegala *itch", - " *Legacy *Oculus *Paradox *Plarium *Riot *Rockstar *Steam *Ubisoft *Wargaming", + " them as a list. The following platforms are supported: *Amazon *BattleNet", + " *BigFish *EA *Epic *GameJolt *GOG *Humble *Indiegala *itch *Legacy *Oculus", + " *Paradox *Plarium *Riot *RobotCache *Rockstar *Steam *Ubisoft *Wargaming", "", " The games list and configuration are stored in .json files in the same folder", " as this program. You can manually add games by placing a shortcut (.lnk) in", @@ -97,8 +97,8 @@ public CDock() public void MainLoop(string[] args) { CPlatform platforms = new(); - platforms.AddSupportedPlatform(new PlatformAmazon()); - platforms.AddSupportedPlatform(new PlatformArc()); + platforms.AddSupportedPlatform(new PlatformAmazon()); + platforms.AddSupportedPlatform(new PlatformArc()); platforms.AddSupportedPlatform(new PlatformBattlenet()); //platforms.AddSupportedPlatform(new PlatformBethesda()); // deprecated May 2022 platforms.AddSupportedPlatform(new PlatformBigFish()); @@ -111,17 +111,18 @@ public void MainLoop(string[] args) platforms.AddSupportedPlatform(new PlatformIGClient()); platforms.AddSupportedPlatform(new PlatformItch()); platforms.AddSupportedPlatform(new PlatformLegacy()); + platforms.AddSupportedPlatform(new PlatformMicrosoft()); platforms.AddSupportedPlatform(new PlatformOculus()); platforms.AddSupportedPlatform(new PlatformParadox()); platforms.AddSupportedPlatform(new PlatformPlarium()); platforms.AddSupportedPlatform(new PlatformRiot()); + platforms.AddSupportedPlatform(new PlatformRobotCache()); platforms.AddSupportedPlatform(new PlatformRockstar()); platforms.AddSupportedPlatform(new PlatformSteam()); platforms.AddSupportedPlatform(new PlatformUbisoft()); platforms.AddSupportedPlatform(new PlatformWargaming()); #if DEBUG - platforms.AddSupportedPlatform(new PlatformMicrosoft()); // an experiment for now - //platforms.AddSupportedPlatform(new PlatformMisc()); // another experiment + //platforms.AddSupportedPlatform(new PlatformMisc()); // an experiment #endif bool import, parseError = false; import = CJsonWrapper.ImportFromINI(out CConfig.ConfigVolatile cfgv, out CConfig.Hotkeys keys, out CConfig.Colours cols); @@ -950,6 +951,9 @@ from part in newTags.Split('|') case GamePlatform.Humble: // avif (AV1) won't be supported until we finish switch to a cross-platform graphics library //DownloadCustomImage(selectedGame.Title, PlatformHumble.GetIconUrl(selectedGame), true); break; + case GamePlatform.RobotCache: + //DownloadCustomImage(selectedGame.Title, PlatformRobotCache.GetIconUrl(selectedGame), true); + break; default: break; } @@ -1043,6 +1047,9 @@ from part in newTags.Split('|') case GamePlatform.Humble: PlatformHumble.Launch(); break; + case GamePlatform.RobotCache: + PlatformRobotCache.Launch(); + break; default: break; } @@ -1419,6 +1426,10 @@ private bool InstallGame(CGame game, CConfig.Colours cols) //if (InputInstall(game.Title, cols)) return (PlatformHumble.InstallGame(game) != 0); // [Doesn't currently show not-installed games] //return false; + case GamePlatform.RobotCache: + if (InputInstall(game.Title, cols)) + return (PlatformRobotCache.InstallGame(game) != 0); // [Doesn't currently show not-installed games???] + return false; default: //SetFgColour(cols.errorCC, cols.errorLtCC); CLogger.LogWarn("Install not supported for this platform."); @@ -1574,6 +1585,9 @@ private bool StartGame(CGame game) case GamePlatform.Humble: PlatformHumble.StartGame(game); break; + case GamePlatform.RobotCache: + PlatformRobotCache.StartGame(game); + break; default: CLogger.LogInfo($"Launch: {game.Launch}"); if (OperatingSystem.IsWindows()) diff --git a/GameLauncher_Console/GameLauncher_Console/GameData.cs b/GameLauncher_Console/GameLauncher_Console/GameData.cs index 3ee0762..a1f4211 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameData.cs +++ b/GameLauncher_Console/GameLauncher_Console/GameData.cs @@ -1,8 +1,8 @@ -using Logger; +using GameFinder.Common; +using Logger; using System; using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Linq; using System.Linq.Expressions; using System.Reflection; @@ -82,11 +82,13 @@ public enum GamePlatform GameJolt = 28, [Description("Humble App")] Humble = 29, - [Description("Miscellaneous")] - Misc = 30 + [Description("RobotCache")] + RobotCache = 30, + //[Description("Miscellaneous")] + //Misc = 31, } - public enum Match + public enum Match { [Description("No matches found")] NoMatches = 0, @@ -132,6 +134,9 @@ public struct Sorter /// public struct ImportGameData { + public string m_strPlatform; + public GameData m_gameData; + /* public string m_strID; public string m_strTitle; public string m_strLaunch; @@ -146,9 +151,14 @@ public struct ImportGameData public DateTime m_dateLastRun; public ushort m_rating; public uint m_numRuns; + */ - public ImportGameData(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, string strAlias, bool bInstalled, string strPlatform, bool bFavourite = false, bool bHidden = false, List tags = default, DateTime dateLastRun = default, ushort rating = 0, uint numRuns = 0) + public ImportGameData(string strPlatform, GameData gameData) + //public ImportGameData(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, string strAlias, bool bInstalled, string strPlatform, bool bFavourite = false, bool bHidden = false, List tags = default, DateTime dateLastRun = default, ushort rating = 0, uint numRuns = 0) { + m_strPlatform = strPlatform; + m_gameData = gameData; + /* m_strID = strID; m_strTitle = strTitle; m_strLaunch = strLaunch; @@ -163,6 +173,7 @@ public ImportGameData(string strID, string strTitle, string strLaunch, string st m_dateLastRun = dateLastRun; m_rating = rating; m_numRuns = numRuns; + */ } } diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index a6eb737..58bf845 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -1,6 +1,6 @@ - net7.0-windows10.0.17763.0 + net8.0-windows10.0.17763.0 true false true @@ -28,7 +28,7 @@ false true 0 - 1.2.0.0 + 1.4.0.0 false true false @@ -52,9 +52,9 @@ app.manifest false - 1.2.0.0 - 1.2.0.0 - 1.2.0 + 1.4.0.0 + 1.4.0.0 + 1.4.0 bin\ https://github.com/Solaire/GLC gamehub.png @@ -62,7 +62,7 @@ https://github.com/Solaire/GLC LICENSE $(Version) - Copyright © 2022 GLC contributors + Copyright © 2024 GLC contributors Video game registry key scanner and launcher GLC (GameLauncher Console) @@ -132,25 +132,44 @@ - - + + + + + + + + + + + + + + + + + + + + + - + all - - - - + + + + - - - - - - + + + + + + diff --git a/GameLauncher_Console/GameLauncher_Console/Platform.cs b/GameLauncher_Console/GameLauncher_Console/Platform.cs index e4a1074..53f40ea 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platform.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platform.cs @@ -39,7 +39,7 @@ public class CPlatform { private readonly List _platforms; - /* + /* /// /// Enumerator containing currently supported game platforms /// [Unlike CGameData.GamePlatform, this does not include Custom, All, Hidden, Search, New, NotInstalled categories] @@ -91,21 +91,23 @@ public enum Platform [Description("Riot Client")] Riot = 20, [Description("Game Jolt Client")] - Misc = 21, + GameJolt = 21, [Description("Humble App")] - Misc = 22, - [Description("Miscellaneous")] - Misc = 23 + Humble = 22, + [Description("RobotCache")] + RobotCache = 23, + //[Description("Miscellaneous")] + //Misc = 24, } */ - #region Query definitions + #region Query definitions - /// - /// Retrieve the platform information from the database - /// Also returns the game count for each platform - /// - public class CQryReadPlatforms : CSqlQry + /// + /// Retrieve the platform information from the database + /// Also returns the game count for each platform + /// + public class CQryReadPlatforms : CSqlQry { public CQryReadPlatforms() : base( @@ -227,9 +229,18 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) CLogger.LogInfo("Looking for {0} games...", platform.Description); platform.GetGames(gameDataList, bExpensiveIcons); } - foreach (ImportGameData data in gameDataList) + foreach (var data in gameDataList) { - tempGameSet.InsertGame(data.m_strID, data.m_strTitle, data.m_strLaunch, data.m_strIcon, data.m_strUninstall, data.m_bInstalled, false, true, false, data.m_strAlias, data.m_strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(data.m_gameData.GameId, + data.m_gameData.GameName, + data.m_gameData.Launch == default ? data.m_gameData.LaunchUrl : (string.IsNullOrEmpty(data.m_gameData.LaunchArgs) ? data.m_gameData.Launch.GetFullPath() : data.m_gameData.Launch.GetFullPath() + " " + data.m_gameData.LaunchArgs), + data.m_gameData.Icon == default ? "" : data.m_gameData.Icon.GetFullPath(), + data.m_gameData.Uninstall == default ? data.m_gameData.UninstallUrl : (string.IsNullOrEmpty(data.m_gameData.UninstallArgs) ? data.m_gameData.Uninstall.GetFullPath() : data.m_gameData.Uninstall.GetFullPath() + " " + data.m_gameData.UninstallArgs), + data.m_gameData.IsInstalled, + false, true, false, + GetAlias(data.m_gameData.GameName), + data.m_strPlatform, + new List(), DateTime.MinValue, 0, 0, 0f); } } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs index 85b6deb..7e5cb37 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs @@ -1,16 +1,15 @@ -using Logger; -using Microsoft.Win32; +using GameCollector.StoreHandlers.Amazon; +using GameFinder.RegistryUtils; +using Logger; using System; using System.Collections.Generic; using System.Data.SQLite; using System.Diagnostics; using System.IO; using System.Runtime.Versioning; -using System.Text.Json; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CJsonWrapper; -using static GameLauncher_Console.CRegScanner; using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -102,8 +101,25 @@ enum AzUskRating [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - List azIds = new(); string strPlatform = GetPlatformString(ENUM); + + var realFileSystem = FileSystem.Shared; + var windowsRegistry = WindowsRegistry.Shared; + + AmazonHandler handler = new(windowsRegistry, realFileSystem); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + List azIds = new(); // Get installed games string db = Path.Combine(GetFolderPath(SpecialFolder.LocalApplicationData), AMAZON_DB); @@ -234,6 +250,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa CLogger.LogDebug($"- *{strTitle}"); // TODO: metadata + */ /* string strDescription = rdr.GetString(0); string strPublisher = rdr.GetString(3); @@ -264,7 +281,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } DateTime releaseDate = rdr.GetDateTime(10); */ - + /* gameDataList.Add(new ImportGameData(strID, strTitle, "", "", "", "", false, strPlatform)); // Use ProductIconUrl to download not-installed icons @@ -284,6 +301,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } + */ + CLogger.LogDebug("-------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs index 46af68b..d1bb1a8 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs @@ -1,13 +1,12 @@ -using Logger; -using Microsoft.Win32; +using GameCollector.StoreHandlers.Arc; +using GameFinder.RegistryUtils; +using Logger; using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CRegScanner; -//using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -68,10 +67,24 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - List keyList = new(); - string strPlatform = GetPlatformString(ENUM); - //string arcFolder = Path.Combine(GetFolderPath(SpecialFolder.ApplicationData), "Arc"); // AppData\Roaming + string strPlatform = GetPlatformString(ENUM); + + ArcHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + /* + List keyList = new(); + //string arcFolder = Path.Combine(GetFolderPath(SpecialFolder.ApplicationData), "Arc"); // AppData\Roaming + string launcherPath = ""; using (RegistryKey launcherKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, @@ -86,6 +99,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } */ + /* using (RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(Path.Combine(ARC_REG, ARC_GAMES), RegistryKeyPermissionCheck.ReadSubTree)) // HKLM32 { @@ -153,6 +167,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa new ImportGameData(strID, strTitle, strLaunch, strLaunch, "", strAlias, bInstalled, strPlatform)); } } + */ + CLogger.LogDebug("------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs index 01c7f93..45a4b1b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs @@ -1,16 +1,13 @@ -using Logger; +using GameCollector.StoreHandlers.BattleNet; +using GameFinder.RegistryUtils; +using Logger; using ProtoBuf; using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; -using System.Linq; using System.Runtime.Versioning; -using System.Text.Json; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CJsonWrapper; -//using static GameLauncher_Console.CRegScanner; -using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -69,6 +66,20 @@ public static void StartGame(CGame game) public void GetGames(List gameDataList, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); + + BattleNetHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* string cfgFile = Path.Combine(GetFolderPath(SpecialFolder.ApplicationData), BATTLE_NET_CFG); string dbFile = Path.Combine(GetFolderPath(SpecialFolder.CommonApplicationData), BATTLE_NET_DB); string dataPath = Path.Combine(GetFolderPath(SpecialFolder.CommonApplicationData), BATTLE_NET_DATA); @@ -122,6 +133,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string lang = pi.Settings.selectedTextLanguage; if (string.IsNullOrEmpty(lang)) lang = BATTLE_NET_LANGDEF; + */ /* string timestamp = ""; foreach (BnetProductConfig pc in db.productConfigs) @@ -133,6 +145,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } */ + /* if (allConfig.TryGetProperty("shared_container_default_subfolder", out JsonElement sub)) { @@ -168,6 +181,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa strTitle = name.GetString(); } break; + */ /* // TODO: metadata description if (itemProp.Name.Equals("program_associations") && @@ -176,6 +190,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa strDescription = descr.GetString(); } */ + /* } } } @@ -238,7 +253,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } - + */ /* List keyList; @@ -286,6 +301,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } */ + CLogger.LogDebug("--------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs index 267bd6b..859b36d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs @@ -1,12 +1,10 @@ -using Logger; -using Microsoft.Win32; +//using GameFinder.Deprecated; +//using GameFinder.StoreHandlers.BethNet; +using Logger; using System; using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CRegScanner; namespace GameLauncher_Console { @@ -76,10 +74,24 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - List keyList; - string strPlatform = GetPlatformString(ENUM); + /* + string strPlatform = GetPlatformString(ENUM); + + BethNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + */ - /* + /* + List keyList; string launcherPath = ""; using (RegistryKey launcherKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, @@ -94,6 +106,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } */ + /* using (RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(UNINSTALL_REG, RegistryKeyPermissionCheck.ReadSubTree)) // HKLM32 { @@ -135,7 +148,9 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa new ImportGameData(strID, strTitle, strLaunch, strIconPath, strUninstall, strAlias, true, strPlatform)); } } - CLogger.LogDebug("------------------------"); + */ + + CLogger.LogDebug("------------------------"); } public static string GetIconUrl(CGame _) => throw new NotImplementedException(); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs index f2d3a38..986f03f 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs @@ -1,15 +1,16 @@ -using HtmlAgilityPack; +using GameCollector.StoreHandlers.BigFish; +using GameFinder.RegistryUtils; +using HtmlAgilityPack; using Logger; using Microsoft.Win32; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Net; using System.Runtime.Versioning; -using System.Xml; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CRegScanner; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -38,8 +39,8 @@ public static void Launch() { if (OperatingSystem.IsWindows()) { - using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, - RegistryView.Registry32).OpenSubKey(BIGFISH_REG, RegistryKeyPermissionCheck.ReadSubTree); // HKLM32 + using RegistryKey key = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, + Microsoft.Win32.RegistryView.Registry32).OpenSubKey(BIGFISH_REG, RegistryKeyPermissionCheck.ReadSubTree); // HKLM32 string launcherPath = Path.Combine(GetRegStrVal(key, "InstallationPath"), "bfgclient.exe"); if (File.Exists(launcherPath)) Process.Start(launcherPath); @@ -76,8 +77,22 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - List keyList; - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); + + BigFishHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + List keyList; using (RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(BIGFISH_GAMES, RegistryKeyPermissionCheck.ReadSubTree)) // HKLM32 @@ -218,6 +233,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } + */ + CLogger.LogDebug("------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs index 4faf7ac..8f7aac4 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs @@ -1,4 +1,5 @@ -using Logger; +using GameFinder.Common; +using Logger; using System; using System.Collections.Generic; using System.Diagnostics; @@ -63,9 +64,10 @@ public void GetGames(ref CTempGameSet tempGameSet) [SupportedOSPlatform("windows")] private static void FindCustomLinkFiles(ref CTempGameSet tempGameSet) { - List fileList = Directory.EnumerateFiles(Path.Combine(CDock.currentPath, CUSTOM_GAME_FOLDER), "*", SearchOption.TopDirectoryOnly).Where(s => s.EndsWith(".lnk")).ToList(); + string strPlatform = GetPlatformString(ENUM); - string strPlatform = GetPlatformString(ENUM); + List fileList = Directory.EnumerateFiles(Path.Combine(CDock.currentPath, CUSTOM_GAME_FOLDER), "*", SearchOption.TopDirectoryOnly).Where(s => s.EndsWith(".lnk")).ToList(); + foreach (string file in fileList) { string strPathOnly = Path.GetDirectoryName(file); @@ -97,6 +99,7 @@ private static void FindCustomLinkFiles(ref CTempGameSet tempGameSet) private static void FindCustomBinaries(ref CTempGameSet tempGameSet) { string strPlatform = GetPlatformString(ENUM); + List fileList = Directory.EnumerateFiles(Path.Combine(CDock.currentPath, CUSTOM_GAME_FOLDER), "*", SearchOption.AllDirectories).Where(s => s.EndsWith(".exe")).ToList(); // Big Fish Games may use .bfg for executables diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index 2af0537..f0486fc 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -1,5 +1,8 @@ -using Logger; -using Microsoft.Win32; +using GameFinder.RegistryUtils; +using GameFinder.StoreHandlers.EADesktop; +using GameFinder.StoreHandlers.EADesktop.Crypto; +using GameFinder.StoreHandlers.EADesktop.Crypto.Windows; +using Logger; using PureOrigin.API; using SHA3.Net; using System; @@ -17,13 +20,10 @@ using System.Security; using System.Security.Cryptography; using System.Text; -using System.Text.Json; using System.Threading.Tasks; using System.Xml; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CJsonWrapper; -using static GameLauncher_Console.CRegScanner; -using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -111,10 +111,24 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - bool dbGameFound = false; - List ownedGames = new(); string strPlatform = GetPlatformString(ENUM); + EADesktopHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, new HardwareInfoProvider()); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + bool dbGameFound = false; + List ownedGames = new(); + // Get all owned games via API if (!(bool)CConfig.GetConfigBool(CConfig.CFG_INSTONLY)) @@ -406,6 +420,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } + */ CLogger.LogDebug("----------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index 3cda57e..91c0fdf 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -1,16 +1,19 @@ -using Logger; +using GameFinder.RegistryUtils; +using GameFinder.StoreHandlers.EGS; +using Logger; using System; using System.Buffers; using System.Buffers.Text; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using System.Text; using System.Text.Json; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; -using static GameLauncher_Console.CRegScanner; using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -199,16 +202,31 @@ public static int UninstallGame(CGame game) */ rootDir.Delete(true); return 1; - } - } + } + } } - return 0; - } + return 0; + } - public void GetGames(List gameDataList, bool expensiveIcons = false) + [SupportedOSPlatform("windows")] + public void GetGames(List gameDataList, bool expensiveIcons = false) { - List epicIds = new(); - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); + + EGSHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + List epicIds = new(); string dir = Path.Combine(GetFolderPath(SpecialFolder.CommonApplicationData), EPIC_ITEMS); if (!Directory.Exists(dir)) { @@ -293,6 +311,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa File.WriteAllBytes($"tmp_{_name}_catalog.txt", byteSpan.ToArray()); #endif */ + /* OperationStatus status = Base64.DecodeFromUtf8InPlace(byteSpan, out int numBytes); if (status == OperationStatus.Done) { @@ -491,6 +510,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } + */ CLogger.LogDebug("--------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index 708e6d2..8ab5e77 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -1,5 +1,6 @@ -using Logger; -using Microsoft.Win32; +using GameFinder.RegistryUtils; +using GameFinder.StoreHandlers.GOG; +using Logger; using System; using System.Collections.Generic; using System.Data.SQLite; @@ -10,8 +11,8 @@ using System.Threading; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; -using static GameLauncher_Console.CRegScanner; using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -116,6 +117,18 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { string strPlatform = GetPlatformString(ENUM); + GOGHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + /* productId from ProductAuthorizations productId, installationPath from InstalledBaseProducts @@ -126,6 +139,7 @@ productId from ProductAuthorizations limitedDetailsId, releaseDate from Details */ + /* // Get installed games string db = Path.Combine(GetFolderPath(SpecialFolder.CommonApplicationData), GOG_DB); if (!File.Exists(db)) @@ -271,7 +285,8 @@ productId from ProductAuthorizations } } } - + + */ // TODO: metadata release date // Details table only applies to installed GOG games /* @@ -289,6 +304,7 @@ productId from ProductAuthorizations } } */ + /* gameDataList.Add(new ImportGameData(strID, strTitle, strLaunch, strIconPath, "", strAlias, true, strPlatform, bHidden:hidden, tags:tagList, dateLastRun:lastRun, rating:userRating)); } @@ -352,6 +368,8 @@ productId from ProductAuthorizations { CLogger.LogError(e, string.Format("Malformed {0} database output!", _name.ToUpper())); } + */ + CLogger.LogDebug("-------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs index 6982718..89eb8ca 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs @@ -1,16 +1,18 @@ -using Logger; +using GameCollector.StoreHandlers.GameJolt; +using GameFinder.RegistryUtils; +using Logger; using Microsoft.Win32; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; using System.Runtime.Versioning; using System.Text.Json; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; using static GameLauncher_Console.CRegScanner; using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -36,8 +38,8 @@ public static void Launch() { if (OperatingSystem.IsWindows()) { - using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, - RegistryView.Registry64).OpenSubKey(Path.Combine(UNINSTALL_REG, GAMEJOLT_REG), RegistryKeyPermissionCheck.ReadSubTree); // HKCU64 + using RegistryKey key = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.CurrentUser, + Microsoft.Win32.RegistryView.Registry64).OpenSubKey(Path.Combine(UNINSTALL_REG, GAMEJOLT_REG), RegistryKeyPermissionCheck.ReadSubTree); // HKCU64 if (key == null) { CLogger.LogInfo("{0} client not found in the registry.", _name.ToUpper()); @@ -83,6 +85,19 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { string strPlatform = GetPlatformString(ENUM); + GameJoltHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64).OpenSubKey(Path.Combine(UNINSTALL_REG, GAMEJOLT_REG), RegistryKeyPermissionCheck.ReadSubTree); // HKCU64 if (key == null) @@ -159,16 +174,19 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa new ImportGameData("gamejolt_" + strID, strTitle, strLaunch, strLaunch, "", strAlias, true, strPlatform)); // Use website to download missing icons + */ /* objProps.TryGetProperty("thumbnail_media_item", out JsonElement thumb); string imgUrl = GetStringProperty(thumb, "img_url"); if (!string.IsNullOrEmpty(imgUrl)) CDock.DownloadCustomImage(strTitle, imgUrl); */ + /* } } } } + */ CLogger.LogDebug("------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs index b8591ef..21c1158 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs @@ -1,4 +1,6 @@ -using Logger; +using GameCollector.StoreHandlers.Humble; +using GameFinder.RegistryUtils; +using Logger; using Microsoft.Win32; using System; using System.Collections.Generic; @@ -10,6 +12,7 @@ using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; using static GameLauncher_Console.CRegScanner; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -99,7 +102,21 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); + + HumbleHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* string configPath = Path.Combine(GetFolderPath(SpecialFolder.ApplicationData), HUMBLE_CONFIG); // AppData\Roaming if (File.Exists(configPath)) { @@ -107,10 +124,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa if (!string.IsNullOrEmpty(strDocumentData)) { using JsonDocument document = JsonDocument.Parse(@strDocumentData, jsonTrailingCommas); + */ /* document.RootElement.TryGetProperty("settings", out JsonElement settings); string loc = GetStringProperty(settings, "downloadLocation"); */ + /* document.RootElement.TryGetProperty("user", out JsonElement user); bool bHasHgc = GetBoolProperty(user, "owns_active_content"); bool bIsPaused = GetBoolProperty(user, "is_paused"); @@ -191,6 +210,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa CLogger.LogDebug($"- *{strTitle}"); gameDataList.Add( new ImportGameData(strID, strTitle, "", "", "", "", false, strPlatform)); + */ // Use website to download missing icons // avif (AV1) won't be supported until we finish switch to a cross-platform graphics library @@ -199,6 +219,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa if (!(string.IsNullOrEmpty(imgUrl) || (bool)(CConfig.GetConfigBool(CConfig.CFG_IMGDOWN)))) CDock.DownloadCustomImage(strTitle, imgUrl); */ + /* } else // installed { @@ -228,6 +249,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } + */ + CLogger.LogDebug("------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs index 211c00c..31d9874 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs @@ -1,4 +1,6 @@ -using Logger; +using GameCollector.StoreHandlers.IGClient; +using GameFinder.RegistryUtils; +using Logger; using Microsoft.Win32; using System; using System.Collections.Generic; @@ -9,6 +11,7 @@ using static GameLauncher_Console.CJsonWrapper; using static GameLauncher_Console.CRegScanner; using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -35,8 +38,8 @@ public static void Launch() { if (OperatingSystem.IsWindows()) { - using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, - RegistryView.Registry64).OpenSubKey(IG_REG, RegistryKeyPermissionCheck.ReadSubTree); // HKLM64 + using RegistryKey key = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, + Microsoft.Win32.RegistryView.Registry64).OpenSubKey(IG_REG, RegistryKeyPermissionCheck.ReadSubTree); // HKLM64 Process igcProcess = new(); string launcherPath = Path.Combine(GetRegStrVal(key, GAME_INSTALL_LOCATION), "IGClient.exe"); if (File.Exists(launcherPath)) @@ -73,9 +76,23 @@ public static void StartGame(CGame game) public void GetGames(List gameDataList, bool expensiveIcons = false) { - List igcIds = new(); string strPlatform = GetPlatformString(ENUM); + IGClientHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + List igcIds = new(); + // Get installed games string file = Path.Combine(GetFolderPath(SpecialFolder.ApplicationData), IG_JSON); if (!File.Exists(file)) @@ -203,10 +220,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa if (!(bool)(CConfig.GetConfigBool(CConfig.CFG_IMGDOWN))) { string devName = GetStringProperty(prod, "prod_dev_namespace"); + */ /* string cover = GetStringProperty(prod, "prod_dev_cover"); string iconWideUrl = $"https://www.indiegalacdn.com/imgs/devs/{devName}/products/{strID}/prodcover/{cover}"; */ + /* string image = GetStringProperty(prod, "prod_dev_image"); if (!string.IsNullOrEmpty(devName) && !string.IsNullOrEmpty(image)) { @@ -226,6 +245,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } + */ + CLogger.LogDebug("--------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs index bb8c44a..779ceea 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs @@ -1,15 +1,16 @@ -using Logger; +using GameCollector.StoreHandlers.Itch; +using GameFinder.RegistryUtils; +using Logger; using Microsoft.Win32; using System; using System.Collections.Generic; using System.Data.SQLite; using System.Diagnostics; using System.IO; -using System.Text.Json; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CJsonWrapper; using static GameLauncher_Console.CRegScanner; using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -104,6 +105,19 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { string strPlatform = GetPlatformString(ENUM); + ItchHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* // Get installed games string db = Path.Combine(GetFolderPath(SpecialFolder.ApplicationData), ITCH_DB); if (!File.Exists(db)) @@ -199,6 +213,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { CLogger.LogError(e, string.Format("Malformed {0} database output!", _name.ToUpper())); } + */ + CLogger.LogDebug("-------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs index c9b0f93..be9159f 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs @@ -1,16 +1,18 @@ -using Logger; +using GameCollector.StoreHandlers.Legacy; +using GameFinder.RegistryUtils; +using Logger; using Microsoft.Win32; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; using System.Runtime.Versioning; using System.Text.Json; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; using static GameLauncher_Console.CRegScanner; using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -37,8 +39,8 @@ public static void Launch() { if (OperatingSystem.IsWindows()) { - using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, - RegistryView.Registry64).OpenSubKey(LEG_REG, RegistryKeyPermissionCheck.ReadSubTree); // HKLM64 + using RegistryKey key = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, + Microsoft.Win32.RegistryView.Registry64).OpenSubKey(LEG_REG, RegistryKeyPermissionCheck.ReadSubTree); // HKLM64 Process legacyProcess = new(); string launcherPath = Path.Combine(Path.GetDirectoryName(GetRegStrVal(key, GAME_DISPLAY_ICON)), "Legacy Games Launcher.exe"); if (File.Exists(launcherPath)) @@ -76,9 +78,23 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - List keyList = new(); + string strPlatform = GetPlatformString(ENUM); + + LegacyHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + List keyList = new(); List instDirs = new(); - string strPlatform = GetPlatformString(ENUM); // Get installed games using (RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, @@ -140,7 +156,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa if (!(string.IsNullOrEmpty(strLaunch))) gameDataList.Add( new ImportGameData(strID, strTitle, strLaunch, strIconPath, strUninstall, strAlias, true, strPlatform)); - + */ /* // Use website to download missing icons if (!(bool)(CConfig.GetConfigBool(CConfig.CFG_IMGDOWN))) @@ -183,6 +199,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } */ + /* } } @@ -266,6 +283,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } + */ + CLogger.LogDebug("--------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index e7f4125..be57747 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -1,34 +1,11 @@ -//using HtmlAgilityPack; +using GameFinder.StoreHandlers.Xbox; using Logger; -//using Microsoft.Web.WebView2; -using Microsoft.Win32; using System; using System.Collections.Generic; -//using System.Collections.ObjectModel; using System.Diagnostics; -using System.IO; using System.Runtime.Versioning; -/* -using System.Management.Automation; // PowerShell Reference Assemblies -using System.Net; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security.Principal; -using System.Text; -using System.Text.Json; -using System.Threading.Tasks; -using System.Windows.Forms; -*/ -using System.Xml; -/* -//using Windows.Management.Deployment; // PackageManager [won't work unless this is a UWP or MSIX-packaged app?] -using XboxWebApi.Authentication; -using XboxWebApi.Authentication.Model; -*/ using static GameLauncher_Console.CGameData; -//using static GameLauncher_Console.CJsonWrapper; -using static GameLauncher_Console.CRegScanner; -//using static GameLauncher_Console.CWebStuff; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -82,12 +59,24 @@ public static void StartGame(CGame game) else Process.Start(game.Launch); } - - [SupportedOSPlatform("windows")] + [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); + + XboxHandler handler = new(FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + /* // Registry + URI method List appList = new(); @@ -304,6 +293,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa gameDataList.Add(new ImportGameData(strID, strTitle, strLaunch, strIconPath, null, strAlias, true, strPlatform)); } } + */ // TODO?: PowerShell Reference Assemblies method /* diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs index a76b9e4..6083081 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs @@ -1,22 +1,17 @@ -using Logger; -using Microsoft.Win32; +using GameCollector.StoreHandlers.Oculus; +using GameFinder.RegistryUtils; +using Logger; using System; using System.Collections.Generic; using System.Data.SQLite; using System.Diagnostics; -using System.Globalization; using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Net; using System.Runtime.Versioning; using System.ServiceProcess; using System.Text; -using System.Text.Json; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CJsonWrapper; -using static GameLauncher_Console.CRegScanner; using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -73,14 +68,16 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { string strPlatform = GetPlatformString(ENUM); + /* // Stop service (otherwise database is locked) + ServiceController sc = new("OVRService"); - //bool restartSvc = false; + bool restartSvc = false; try { if (sc.Status.Equals(ServiceControllerStatus.Running) || sc.Status.Equals(ServiceControllerStatus.StartPending)) { - //restartSvc = true; + restartSvc = true; sc.Stop(); sc.WaitForStatus(ServiceControllerStatus.Stopped); } @@ -89,7 +86,21 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { CLogger.LogError(e); } + */ + OculusHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* List libPaths = new(); Dictionary exePaths = new(); string db = Path.Combine(GetFolderPath(SpecialFolder.ApplicationData), OCULUS_DB); @@ -162,35 +173,37 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa using SQLiteConnection con = new($"Data Source={db}"); con.Open(); + */ - // Get the user ID to check entitlements for expired trials - /* - using (SQLiteCommand cmdU = new("SELECT hashkey, value FROM Objects WHERE typename = 'User'", con)) - { - using SQLiteDataReader rdrU = cmdU.ExecuteReader(); - while (rdrU.Read()) - { - byte[] valU = new byte[rdrU.GetBytes(1, 0, null, 0, int.MaxValue) - 1]; - rdrU.GetBytes(1, 0, valU, 0, valU.Length); - string strValU = Encoding.Default.GetString(valU); + // Get the user ID to check entitlements for expired trials + /* + using (SQLiteCommand cmdU = new("SELECT hashkey, value FROM Objects WHERE typename = 'User'", con)) + { + using SQLiteDataReader rdrU = cmdU.ExecuteReader(); + while (rdrU.Read()) + { + byte[] valU = new byte[rdrU.GetBytes(1, 0, null, 0, int.MaxValue) - 1]; + rdrU.GetBytes(1, 0, valU, 0, valU.Length); + string strValU = Encoding.Default.GetString(valU); - string alias = ParseBlob(strValU, "alias", "app_entitlements"); - if (string.IsNullOrEmpty(userName) || userName.Equals("skipped")) - { - if (ulong.TryParse(rdrU.GetString(0), out userId)) - { - userName = alias; - break; - } - } - else if (userName.Equals(alias, CDock.IGNORE_CASE)) + string alias = ParseBlob(strValU, "alias", "app_entitlements"); + if (string.IsNullOrEmpty(userName) || userName.Equals("skipped")) + { + if (ulong.TryParse(rdrU.GetString(0), out userId)) { - ulong.TryParse(rdrU.GetString(0), out userId); - break; + userName = alias; + break; } - } - } - */ + } + else if (userName.Equals(alias, CDock.IGNORE_CASE)) + { + ulong.TryParse(rdrU.GetString(0), out userId); + break; + } + } + } + */ + /* using SQLiteCommand cmd = new("SELECT hashkey, value FROM Objects WHERE typename = 'Application'", con); using SQLiteDataReader rdr = cmd.ExecuteReader(); @@ -204,11 +217,13 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strAlias = ""; string url = ""; - /* - string exePath = "", exePath2d = "", exeParams = "", exeParams2d = ""; - string state = "", time = ""; - bool isInstalled = false; - */ + */ + /* + string exePath = "", exePath2d = "", exeParams = "", exeParams2d = ""; + string state = "", time = ""; + bool isInstalled = false; + */ + /* bool isInstalled = true; if (ulong.TryParse(rdr.GetString(0), out ulong id)) @@ -229,18 +244,19 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa strTitle = ParseBlob(strVal, "display_name", "display_short_description"); if (!string.IsNullOrEmpty(name) && string.IsNullOrEmpty(strTitle)) strTitle = ti.ToTitleCase(name.Replace('-', ' ')); - - //TODO: metadata - /* - strDescription = ParseBlob(strVal, "display_short_description", "genres"); - string strGenres = ParseBlob(strVal, "genres", "grouping", 1); - string[] genreArray = strGenres.Split('\0', StringSplitOptions.RemoveEmptyEntries); - foreach (string genre in genreArray) - { - genres.Add(genre[0..^1]); - } - */ - + */ + + //TODO: metadata + /* + strDescription = ParseBlob(strVal, "display_short_description", "genres"); + string strGenres = ParseBlob(strVal, "genres", "grouping", 1); + string[] genreArray = strGenres.Split('\0', StringSplitOptions.RemoveEmptyEntries); + foreach (string genre in genreArray) + { + genres.Add(genre[0..^1]); + } + */ + /* using (SQLiteCommand cmd2 = new($"SELECT value FROM Objects WHERE hashkey = '{assets}'", con)) { using SQLiteDataReader rdr2 = cmd2.ExecuteReader(); @@ -252,49 +268,50 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa url = ParseBlob(strVal2, "uri", "version_code", strStart1: "size"); } } + */ + // The exe's can be gotten from the .json files, which we have to get anyway to figure out the install path + /* + using (SQLiteCommand cmd3 = new($"SELECT value FROM Objects WHERE hashkey = '{bin}'", con)) + { + using SQLiteDataReader rdr3 = cmd3.ExecuteReader(); + while (rdr3.Read()) + { + byte[] val3 = new byte[rdr3.GetBytes(0, 0, null, 0, int.MaxValue) - 1]; + rdr3.GetBytes(0, 0, val3, 0, val3.Length); + string strVal3 = Encoding.Default.GetString(val3); + exePath = ParseBlob(strVal3, "launch_file", "launch_file_2d"); + exePath2d = ParseBlob(strVal3, "launch_file_2d", "launch_parameters"); + exeParams = ParseBlob(strVal3, "launch_parameters", "launch_parameters_2d"); + exeParams2d = ParseBlob(strVal3, "launch_parameters_2d", "manifest_signature"); + } + } - // The exe's can be gotten from the .json files, which we have to get anyway to figure out the install path - /* - using (SQLiteCommand cmd3 = new($"SELECT value FROM Objects WHERE hashkey = '{bin}'", con)) - { - using SQLiteDataReader rdr3 = cmd3.ExecuteReader(); - while (rdr3.Read()) - { - byte[] val3 = new byte[rdr3.GetBytes(0, 0, null, 0, int.MaxValue) - 1]; - rdr3.GetBytes(0, 0, val3, 0, val3.Length); - string strVal3 = Encoding.Default.GetString(val3); - exePath = ParseBlob(strVal3, "launch_file", "launch_file_2d"); - exePath2d = ParseBlob(strVal3, "launch_file_2d", "launch_parameters"); - exeParams = ParseBlob(strVal3, "launch_parameters", "launch_parameters_2d"); - exeParams2d = ParseBlob(strVal3, "launch_parameters_2d", "manifest_signature"); - } - } - - if (userId > 0) - { - // TODO: If this is an expired trial, count it as not-installed - using SQLiteCommand cmd5 = new($"SELECT value FROM Objects WHERE hashkey = '{userId}:{id}'", con); - using SQLiteDataReader rdr5 = cmd5.ExecuteReader(); - while (rdr5.Read()) - { - byte[] val5 = new byte[rdr5.GetBytes(0, 0, null, 0, int.MaxValue) - 1]; - rdr5.GetBytes(0, 0, val5, 0, val5.Length); - string strVal5 = Encoding.Default.GetString(val5); - state = ParseBlob(strVal5, "active_state", "expiration_time"); - if (state.Equals("PERMANENT")) - isInstalled = true; - else - { - time = ParseBlob(strVal5, "expiration_time", "grant_reason"); - CLogger.LogDebug($"expiry: {state} {time}"); - //if (!...expired) - isInstalled = true; - } - } - } + if (userId > 0) + { + // TODO: If this is an expired trial, count it as not-installed + using SQLiteCommand cmd5 = new($"SELECT value FROM Objects WHERE hashkey = '{userId}:{id}'", con); + using SQLiteDataReader rdr5 = cmd5.ExecuteReader(); + while (rdr5.Read()) + { + byte[] val5 = new byte[rdr5.GetBytes(0, 0, null, 0, int.MaxValue) - 1]; + rdr5.GetBytes(0, 0, val5, 0, val5.Length); + string strVal5 = Encoding.Default.GetString(val5); + state = ParseBlob(strVal5, "active_state", "expiration_time"); + if (state.Equals("PERMANENT")) + isInstalled = true; else + { + time = ParseBlob(strVal5, "expiration_time", "grant_reason"); + CLogger.LogDebug($"expiry: {state} {time}"); + //if (!...expired) isInstalled = true; - */ + } + } + } + else + isInstalled = true; + */ + /* if (exePaths.ContainsKey(id)) { @@ -311,65 +328,66 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { CLogger.LogDebug($"- *{strTitle}"); gameDataList.Add(new ImportGameData(strID, strTitle, "", "", "", "", false, strPlatform)); + */ + /* + if (expensiveIcons && !string.IsNullOrEmpty(url)) + { + // Download missing icons + // Downloading zip doesn't work anymore; now gives 403 error - /* - if (expensiveIcons && !string.IsNullOrEmpty(url)) - { - // Download missing icons - // Downloading zip doesn't work anymore; now gives 403 error - - string imgfile = Path.Combine(CDock.currentPath, CDock.IMAGE_FOLDER_NAME, - string.Concat(strTitle.Split(Path.GetInvalidFileNameChars()))); - bool iconFound = false; - foreach (string ext in CDock.supportedImages) - { - if (File.Exists(imgfile + "." + ext)) - { - iconFound = true; - break; - } - } - if (iconFound) - continue; + string imgfile = Path.Combine(CDock.currentPath, CDock.IMAGE_FOLDER_NAME, + string.Concat(strTitle.Split(Path.GetInvalidFileNameChars()))); + bool iconFound = false; + foreach (string ext in CDock.supportedImages) + { + if (File.Exists(imgfile + "." + ext)) + { + iconFound = true; + break; + } + } + if (iconFound) + continue; - string zipfile = $"tmp_{_name}_{id}.zip"; - try - { + string zipfile = $"tmp_{_name}_{id}.zip"; + try + { #if DEBUG - // Don't re-download if file exists - if (!File.Exists(zipfile)) - { + // Don't re-download if file exists + if (!File.Exists(zipfile)) + { #endif - using WebClient client = new(); - client.DownloadFile(url, zipfile); + using WebClient client = new(); + client.DownloadFile(url, zipfile); #if DEBUG - } + } #endif - if (File.Exists(zipfile)) + if (File.Exists(zipfile)) + { + using ZipArchive archive = ZipFile.OpenRead(zipfile); + foreach (ZipArchiveEntry entry in archive.Entries) + { + foreach (string ext in CDock.supportedImages) + { + if (entry.Name.Equals("cover_square_image." + ext, CDock.IGNORE_CASE)) { - using ZipArchive archive = ZipFile.OpenRead(zipfile); - foreach (ZipArchiveEntry entry in archive.Entries) - { - foreach (string ext in CDock.supportedImages) - { - if (entry.Name.Equals("cover_square_image." + ext, CDock.IGNORE_CASE)) - { - entry.ExtractToFile(imgfile + "." + ext, true); - break; - } - } - } -#if !DEBUG - File.Delete(zipfile); -#endif + entry.ExtractToFile(imgfile + "." + ext, true); + break; } } - catch (Exception e) - { - CLogger.LogError(e, string.Format("Malformed {0} zip file!", _name.ToUpper())); - } } - */ +#if !DEBUG + File.Delete(zipfile); +#endif + } + } + catch (Exception e) + { + CLogger.LogError(e, string.Format("Malformed {0} zip file!", _name.ToUpper())); + } + } + */ + /* } } con.Close(); @@ -378,6 +396,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { CLogger.LogError(e, string.Format("Malformed {0} database output!", _name.ToUpper())); } + */ + //if (restartSvc) // sc.Start(); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs index b393c8c..ce8338b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs @@ -1,15 +1,14 @@ -using Logger; +using GameCollector.StoreHandlers.Paradox; +using GameFinder.RegistryUtils; +using Logger; using Microsoft.Win32; using System; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Text.Json; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CJsonWrapper; using static GameLauncher_Console.CRegScanner; -using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -36,8 +35,8 @@ public static void Launch() { if (OperatingSystem.IsWindows()) { - using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, - RegistryView.Registry32).OpenSubKey(PARADOX_REG, RegistryKeyPermissionCheck.ReadSubTree); // HKLM32 + using RegistryKey key = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, + Microsoft.Win32.RegistryView.Registry32).OpenSubKey(PARADOX_REG, RegistryKeyPermissionCheck.ReadSubTree); // HKLM32 string launcherPath = Path.Combine(GetRegStrVal(key, PARADOX_PATH), "\\Paradox Launcher.exe"); if (File.Exists(launcherPath)) Process.Start(launcherPath); @@ -73,9 +72,23 @@ public static void StartGame(CGame game) public void GetGames(List gameDataList, bool expensiveIcons = false) { - List dirs = new(); string strPlatform = GetPlatformString(ENUM); + ParadoxHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + List dirs = new(); + // Get installed games if (OperatingSystem.IsWindows()) { @@ -187,6 +200,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } } + */ + CLogger.LogDebug("--------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs index 8b273b2..f5250c6 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs @@ -1,16 +1,12 @@ -using Logger; +using GameCollector.StoreHandlers.Plarium; +using GameFinder.RegistryUtils; +using Logger; using System; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; -using System.IO; using System.Runtime.Versioning; -using System.Text.Json; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CGameFinder; -using static GameLauncher_Console.CJsonWrapper; -//using static GameLauncher_Console.CRegScanner; -using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -65,10 +61,24 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - bool error = false; - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); + + PlariumHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + bool error = false; + string file = Path.Combine(GetFolderPath(SpecialFolder.LocalApplicationData), PLARIUM_DB); - /* string launcherPath = ""; int? lang = 1; @@ -85,8 +95,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } */ - - if (!File.Exists(file)) + /* + if (!File.Exists(file)) { file = Path.Combine(GetFolderPath(SpecialFolder.LocalApplicationData), "Plarium", PLARIUM_DB); if (!File.Exists(file)) @@ -177,10 +187,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa // Use website to download missing icons // Webp won't be supported until we finish switch to a cross-platform graphics library + */ /* if (expensiveIcons && !(bool)(CConfig.GetConfigBool(CConfig.CFG_IMGDOWN))) CDock.DownloadCustomImage(strTitle, GetIconUrl(strTitle)); */ + /* } } } @@ -199,6 +211,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa CLogger.LogInfo("Malformed {0} file: {1}", _name.ToUpper(), file); return; } + */ + CLogger.LogDebug("------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs index c8791df..03733e6 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs @@ -1,14 +1,12 @@ -using Logger; +using GameCollector.StoreHandlers.Riot; +using GameFinder.RegistryUtils; +using Logger; using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.Runtime.Versioning; -using System.Text.Json; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CGameFinder; -using static GameLauncher_Console.CJsonWrapper; -using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -62,7 +60,21 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); + + RiotHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* string dataPath = Path.Combine(GetFolderPath(SpecialFolder.CommonApplicationData), RIOT_FOLDER); try @@ -137,6 +149,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { CLogger.LogError(e); } + */ + CLogger.LogDebug("------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs new file mode 100644 index 0000000..984158c --- /dev/null +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs @@ -0,0 +1,79 @@ +using GameCollector.StoreHandlers.RobotCache; +using Logger; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Runtime.Versioning; +using static GameLauncher_Console.CGameData; +using FileSystem = NexusMods.Paths.FileSystem; + +namespace GameLauncher_Console +{ + // RobotCache games + // [installed games only] + public class PlatformRobotCache : IPlatform + { + public const GamePlatform ENUM = GamePlatform.RobotCache; + public const string PROTOCOL = "robotcache://"; + + private static readonly string _name = Enum.GetName(typeof(GamePlatform), ENUM); + + GamePlatform IPlatform.Enum => ENUM; + + string IPlatform.Name => _name; + + string IPlatform.Description => GetPlatformString(ENUM); + + public static void Launch() + { + if (OperatingSystem.IsWindows()) + CDock.StartShellExecute(PROTOCOL); + else + Process.Start(PROTOCOL); + } + + // return value + // -1 = not implemented + // 0 = failure + // 1 = success + public static int InstallGame(CGame game) + { + //CDock.DeleteCustomImage(game.Title, false); + Launch(); + return -1; + } + + public static void StartGame(CGame game) + { + CLogger.LogInfo($"Launch: {game.Launch}"); + if (OperatingSystem.IsWindows()) + CDock.StartShellExecute(game.Launch); + else + Process.Start(game.Launch); + } + + [SupportedOSPlatform("windows")] + public void GetGames(List gameDataList, bool expensiveIcons = false) + { + string strPlatform = GetPlatformString(ENUM); + + RobotCacheHandler handler = new(FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + CLogger.LogDebug("------------------------"); + } + + public static string GetIconUrl(CGame _) => throw new NotImplementedException(); + + public static string GetGameID(string key) => key; + } +} \ No newline at end of file diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs index b6d53fb..55ddce8 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs @@ -1,12 +1,12 @@ -using Logger; -using Microsoft.Win32; +using GameCollector.StoreHandlers.Rockstar; +using GameFinder.RegistryUtils; +using Logger; using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CRegScanner; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -61,8 +61,22 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - List keyList; - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); + + RockstarHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + List keyList; string launcherPath = ""; using (RegistryKey launcherKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, @@ -112,6 +126,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa new ImportGameData(strID, strTitle, strLaunch, strLaunch, strUninstall, strAlias, true, strPlatform)); } } + */ + CLogger.LogDebug("------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 4a8cd34..405c056 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -1,18 +1,18 @@ -using HtmlAgilityPack; +using GameFinder.RegistryUtils; +using GameFinder.StoreHandlers.Steam; +using HtmlAgilityPack; using Logger; -using Microsoft.Win32; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.Versioning; -using System.Net; using System.Text; using System.Text.Json; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; -using static GameLauncher_Console.CRegScanner; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -79,9 +79,23 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - string strInstallPath = ""; + string strPlatform = GetPlatformString(ENUM); + + SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, null); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + string strInstallPath = ""; string strClientPath = ""; - string strPlatform = GetPlatformString(ENUM); using (RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(STEAM_REG, RegistryKeyPermissionCheck.ReadSubTree)) // HKLM32 @@ -231,10 +245,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } } i++; + */ /* if (i > nLibs) CLogger.LogDebug("---------------------"); */ + /* } // Get not-installed games @@ -314,6 +330,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa try { string url = string.Format("https://steamcommunity.com/profiles/{0}/games/?tab=all", userId); + */ /* #if DEBUG // Don't re-download if file exists @@ -330,6 +347,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa doc.Load(tmpfile); #else */ + /* HtmlWeb web = new() { UseCookies = true @@ -395,10 +413,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { CLogger.LogError(e); } + */ CLogger.LogDebug("---------------------"); - } - } + // } + //} } /* diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs index 614f48e..b3c9e1f 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs @@ -1,12 +1,12 @@ -using Logger; -using Microsoft.Win32; +using GameCollector.StoreHandlers.Ubisoft; +using GameFinder.RegistryUtils; +using Logger; using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CRegScanner; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -69,11 +69,25 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - List keyList; + string strPlatform = GetPlatformString(ENUM); + + UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + List keyList; List uplayIds = new(); List uplayIcons = new(); string launcherPath = ""; - string strPlatform = GetPlatformString(ENUM); using (RegistryKey launcherKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(Path.Combine(UNINSTALL_REG, UPLAY_UNREG), RegistryKeyPermissionCheck.ReadSubTree)) // HKLM32 @@ -224,6 +238,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa CLogger.LogError(e, string.Format("Malformed {0} file: {1}", _name.ToUpper(), uplayCfgFile)); } } + */ + CLogger.LogDebug("-----------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs index 29bd44d..b49cb03 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs @@ -1,15 +1,12 @@ -using Logger; -using Microsoft.Win32; +using GameCollector.StoreHandlers.WargamingNet; +using GameFinder.RegistryUtils; +using Logger; using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.Runtime.Versioning; -using System.Xml; using static GameLauncher_Console.CGameData; -using static GameLauncher_Console.CGameFinder; -using static GameLauncher_Console.CRegScanner; -using static System.Environment; +using FileSystem = NexusMods.Paths.FileSystem; namespace GameLauncher_Console { @@ -61,9 +58,24 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - Dictionary installDict = new(); + string strPlatform = GetPlatformString(ENUM); + + WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + else + CLogger.LogWarn(game.AsT1.Message); + } + + /* + Dictionary installDict = new(); List keyList; - string strPlatform = GetPlatformString(ENUM); + */ /* string launcherPath = ""; @@ -81,6 +93,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa launcherPath = launcherPath.Substring(0, pathIndex); } */ + /* string dataPath = Path.Combine(GetFolderPath(SpecialFolder.CommonApplicationData), WARGAMING_DATA); try @@ -207,6 +220,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa CLogger.LogError(e); } } + */ + CLogger.LogDebug("------------------------"); } diff --git a/GameLauncher_Console/GameLauncher_Console/Properties/AssemblyInfo.cs b/GameLauncher_Console/GameLauncher_Console/Properties/AssemblyInfo.cs index 5f78b57..fade803 100644 --- a/GameLauncher_Console/GameLauncher_Console/Properties/AssemblyInfo.cs +++ b/GameLauncher_Console/GameLauncher_Console/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Solaire")] [assembly: AssemblyProduct("GameLauncher Console")] -[assembly: AssemblyCopyright("Copyright © 2022 GLC contributors")] +[assembly: AssemblyCopyright("Copyright © 2024 GLC contributors")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.3.1.0")] -[assembly: AssemblyFileVersion("1.3.1.0")] +[assembly: AssemblyVersion("1.4.0.0")] +[assembly: AssemblyFileVersion("1.4.0.0")] diff --git a/GameLauncher_Console/GameLauncher_Console/Resources/30.ico b/GameLauncher_Console/GameLauncher_Console/Resources/30.ico new file mode 100644 index 0000000000000000000000000000000000000000..2c05331ac6ea6be79b80dd7d16caa42777220e4c GIT binary patch literal 72113 zcmeFYby!tR_dh&@O?L_$kPvAQkQNZ>Jfw6v zJ8v_i0nmT}04FDa=$AnO4gh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(*RN>v9g6kF^Y8LYg_71; zmfmk|6@2A*AM@8Oyq@GVp5dL#q`)-z`h8b=o2)f&^S+5XLC^;U5e_?CCq3lxZ{m7; z7kcZ>Cj45qBg7Rny7Ymtj@h{n8}q{*Q$4@Ffp`r;U%iRm>V+y4Zl`&>9JH=pt^0Se zZ_0Px&r_ADUt|AREL;B7FZ}(sL06$qMfn9R9!{Z_6Msz&T2|J8XYAQ8WqRVzTu(HY z@0hbEc};LZh*e4YTK$F{zWNQ>!PfGUINwc&K}VFm*hai}e()>aVV-ygY2aP-v2cn1 z_qMzE_q;8q!D;dL)yKF-;(FKjR$*b`faZ$rW6EOP+_M9g6ehXPYmAr7YfSMqC@PS; zdDRsqbN{10-z)dd)qPYI?FEBgx))oYT#+gj}fZ=dcp8@b%H1%LINAR{J&54gAScxLReg6aGCFk4G4W?`et zbUeLadl~jJJ;ZgjJjAeo`$=>A?y*uCyK=G?u{0ameb^Ob!FFtFd=>Qd1=tXNL|)0W z%+%h9*)N&Gcn;DnZhG?kwcj-e?ZN-}?nLBb`D=6t{I?eAVb&8kxakZT175qFcH@-rXb3 z?W-3}`QfZ6#EjKvhX^*M>_9{Kuc$(Pe;4w6>8@VG?BLVyft(_oKbK$H#uaN$VZQDP zTKp686|u&=aF)1Ya9_jAWpC+K@o74pRh#vE= zXM5kpBRjJ~U3|s0(Ap^f@6srnXw2WI5gZeSK31N;%I();{-y*hlO3_%PF}4i&x>?jeNdjLF7{b$(~ccoJyvw^dmx$oZ+RQu_WuEX8jflJ literal 0 HcmV?d00001 diff --git a/GameLauncher_Console/UnitTest/UnitTest.csproj b/GameLauncher_Console/UnitTest/UnitTest.csproj index 355b146..f8492c3 100644 --- a/GameLauncher_Console/UnitTest/UnitTest.csproj +++ b/GameLauncher_Console/UnitTest/UnitTest.csproj @@ -1,15 +1,15 @@  - net7.0-windows10.0.17763.0 + net8.0-windows10.0.17763.0 AnyCPU Exe false - - - - + + + + all @@ -18,7 +18,7 @@ xcopy /s /e /y "$(SolutionDir)GameLauncher_Console\Database\*.*" "$(ProjectDir)$(OutDir)." - 1.2.0.0 - 1.2.0.0 + 1.4.0.0 + 1.4.0.0 \ No newline at end of file diff --git a/PureOrigin.API/Src/PureOrigin.API.Tests/PureOrigin.API.Tests.csproj b/PureOrigin.API/Src/PureOrigin.API.Tests/PureOrigin.API.Tests.csproj index 8d47db1..6ace142 100644 --- a/PureOrigin.API/Src/PureOrigin.API.Tests/PureOrigin.API.Tests.csproj +++ b/PureOrigin.API/Src/PureOrigin.API.Tests/PureOrigin.API.Tests.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 diff --git a/PureOrigin.API/Src/PureOrigin.API/PureOrigin.API.csproj b/PureOrigin.API/Src/PureOrigin.API/PureOrigin.API.csproj index 706160c..338ce31 100644 --- a/PureOrigin.API/Src/PureOrigin.API/PureOrigin.API.csproj +++ b/PureOrigin.API/Src/PureOrigin.API/PureOrigin.API.csproj @@ -10,7 +10,7 @@ - + diff --git a/README.md b/README.md index f0c5c49..48c6a6b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ This is a simple Windows console program that will scan the system for video gam - Paradox Launcher; - Plarium Play; - Riot Client; +- RobotCache; - Rockstar Games Launcher; - Steam; - Ubisoft Connect [formerly Uplay]; From bffa0af77d1e001b1151389f7e8a03a44c3e212a Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Tue, 13 Feb 2024 12:00:49 -0800 Subject: [PATCH 02/21] Use local GameCollector --- GameLauncher_Console/GameLauncher_Console.sln | 363 ++++++++++++++++++ .../GameLauncher_Console.csproj | 24 ++ 2 files changed, 387 insertions(+) diff --git a/GameLauncher_Console/GameLauncher_Console.sln b/GameLauncher_Console/GameLauncher_Console.sln index 7cffd15..f8788b9 100644 --- a/GameLauncher_Console/GameLauncher_Console.sln +++ b/GameLauncher_Console/GameLauncher_Console.sln @@ -30,6 +30,141 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PureOrigin.API", "..\PureOr EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PureOrigin.API.Tests", "..\PureOrigin.API\Src\PureOrigin.API.Tests\PureOrigin.API.Tests.csproj", "{AFD1FA2C-F2BF-43D3-91FB-225BF1021543}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GameCollector", "GameCollector", "{37826248-39D5-4E1F-B920-37C49D9CD519}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solutionItems", ".solutionItems", "{87C3DD03-31FE-4D00-B7BF-D492D6299427}" +ProjectSection(SolutionItems) = preProject + ..\..\GameCollector\.editorconfig = ..\..\GameCollector\.editorconfig + ..\..\GameCollector\.gitattributes = ..\..\GameCollector\.gitattributes + ..\..\GameCollector\.gitignore = ..\..\GameCollector\.gitignore + ..\..\GameCollector\CHANGELOG.md = ..\..\GameCollector\CHANGELOG.md + ..\..\GameCollector\LICENSE = ..\..\GameCollector\LICENSE + ..\..\GameCollector\README.md = ..\..\GameCollector\README.md + ..\..\GameCollector\CONTRIBUTING.md = ..\..\GameCollector\CONTRIBUTING.md + ..\..\GameCollector\renovate.json = ..\..\GameCollector\renovate.json + ..\..\GameCollector\codecov.yml = ..\..\GameCollector\codecov.yml + ..\..\GameCollector\Directory.Build.props = ..\..\GameCollector\Directory.Build.props + ..\..\GameCollector\Directory.Build.targets = ..\..\GameCollector\Directory.Build.targets + ..\..\GameCollector\Directory.Packages.props = ..\..\GameCollector\Directory.Packages.props +EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.RegistryUtils", "..\..\GameCollector\src\GameFinder.RegistryUtils\GameFinder.RegistryUtils.csproj", "{BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Steam", "..\..\GameCollector\src\GameFinder.StoreHandlers.Steam\GameFinder.StoreHandlers.Steam.csproj", "{3CADF882-5158-4D2E-B15C-D54F5FE89B30}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.GOG", "..\..\GameCollector\src\GameFinder.StoreHandlers.GOG\GameFinder.StoreHandlers.GOG.csproj", "{6F00D927-358E-41A4-8DDF-471B1514128B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.EGS", "..\..\GameCollector\src\GameFinder.StoreHandlers.EGS\GameFinder.StoreHandlers.EGS.csproj", "{58A62CC7-4A61-4218-9F93-CE85FDF00E15}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StoreHandlers", "StoreHandlers", "{B765999C-AB3D-495F-9F5E-9108F2D4FE33}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Example", "..\..\GameCollector\other\GameFinder.Example\GameFinder.Example.csproj", "{DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Origin", "..\..\GameCollector\src\GameFinder.StoreHandlers.Origin\GameFinder.StoreHandlers.Origin.csproj", "{82126DC0-0DF8-4430-9DB7-7326A0192E48}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Common", "..\..\GameCollector\src\GameFinder.Common\GameFinder.Common.csproj", "{4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Benchmarks", "..\..\GameCollector\other\GameFinder.Benchmarks\GameFinder.Benchmarks.csproj", "{E91CA2ED-F46D-484B-8759-E7ADED282647}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Common.Tests", "..\..\GameCollector\tests\GameFinder.Common.Tests\GameFinder.Common.Tests.csproj", "{17A107B4-38CF-469F-AE09-AA5795734D48}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21}" + ProjectSection(SolutionItems) = preProject + ..\..\GameCollector\src\Directory.Build.props = ..\..\GameCollector\src\Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9C6671E1-A94D-4C76-9F61-78B491A62408}" + ProjectSection(SolutionItems) = preProject + ..\..\GameCollector\tests\Directory.Build.props = ..\..\GameCollector\tests\Directory.Build.props + ..\..\GameCollector\tests\Directory.Build.targets = ..\..\GameCollector\tests\Directory.Build.targets + ..\..\GameCollector\tests\NexusMods.Paths.TestingHelpers.props = ..\..\GameCollector\tests\NexusMods.Paths.TestingHelpers.props + ..\..\GameCollector\tests\SharedAssemblyAttributes.cs = ..\..\GameCollector\tests\SharedAssemblyAttributes.cs + ..\..\GameCollector\tests\SharedUsings.cs = ..\..\GameCollector\tests\SharedUsings.cs + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "other", "other", "{7EA29B58-0E2E-4714-81AC-1F86FE253664}" + ProjectSection(SolutionItems) = preProject + ..\..\GameCollector\other\Directory.Build.props = ..\..\GameCollector\other\Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{41011D08-70EF-410D-83E7-7BEAF795494E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.RegistryUtils.Tests", "..\..\GameCollector\tests\GameFinder.RegistryUtils.Tests\GameFinder.RegistryUtils.Tests.csproj", "{EAE6E28E-DDA5-417D-985F-57B8ADCCA981}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.EGS.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.EGS.Tests\GameFinder.StoreHandlers.EGS.Tests.csproj", "{CCC94557-9698-4468-AAE6-69CB28C676E2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.GOG.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.GOG.Tests\GameFinder.StoreHandlers.GOG.Tests.csproj", "{37E8F2F8-FED5-4722-934F-621C4CE085F4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Origin.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.Origin.Tests\GameFinder.StoreHandlers.Origin.Tests.csproj", "{18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Steam.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.Steam.Tests\GameFinder.StoreHandlers.Steam.Tests.csproj", "{0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtils", "..\..\GameCollector\tests\TestUtils\TestUtils.csproj", "{C26BCA96-CF68-41F5-AC55-B24EF0545E4A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.EADesktop", "..\..\GameCollector\src\GameFinder.StoreHandlers.EADesktop\GameFinder.StoreHandlers.EADesktop.csproj", "{F7807045-BAA2-46F6-81A6-0127FA662AC8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.EADesktop.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.EADesktop.Tests\GameFinder.StoreHandlers.EADesktop.Tests.csproj", "{519FD898-CFD1-4093-833F-510BE8BD9379}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wine", "Wine", "{21F0CD9E-DC99-49E5-B451-A8A111664E6E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Wine", "..\..\GameCollector\src\GameFinder.Wine\GameFinder.Wine.csproj", "{F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Wine.Tests", "..\..\GameCollector\tests\GameFinder.Wine.Tests\GameFinder.Wine.Tests.csproj", "{C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Xbox", "..\..\GameCollector\src\GameFinder.StoreHandlers.Xbox\GameFinder.StoreHandlers.Xbox.csproj", "{2F75FCA7-DCE5-4162-B2AE-24994D14FC03}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Xbox.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.Xbox.Tests\GameFinder.StoreHandlers.Xbox.Tests.csproj", "{7D04AF8D-E8AE-44DB-AB36-5452594DC789}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder", "..\..\GameCollector\src\GameFinder\GameFinder.csproj", "{8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.Common", "..\..\GameCollector\src\GameCollector.Common\GameCollector.Common.csproj", "{C1BA59AD-3143-4102-96F0-07D745198398}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.SQLiteUtils", "..\..\GameCollector\src\GameCollector.SQLiteUtils\GameCollector.SQLiteUtils.csproj", "{B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.YamlUtils", "..\..\GameCollector\src\GameCollector.YamlUtils\GameCollector.YamlUtils.csproj", "{FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Amazon", "..\..\GameCollector\src\GameCollector.StoreHandlers.Amazon\GameCollector.StoreHandlers.Amazon.csproj", "{158A060B-0036-4CE0-8C4B-CDD2F876A1ED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Arc", "..\..\GameCollector\src\GameCollector.StoreHandlers.Arc\GameCollector.StoreHandlers.Arc.csproj", "{F411D87A-7833-44F4-9B41-814C50292CAE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.BattleNet", "..\..\GameCollector\src\GameCollector.StoreHandlers.BattleNet\GameCollector.StoreHandlers.BattleNet.csproj", "{82823466-00E1-4D38-8CEF-1E7955B4C5A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.BigFish", "..\..\GameCollector\src\GameCollector.StoreHandlers.BigFish\GameCollector.StoreHandlers.BigFish.csproj", "{FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.GameJolt", "..\..\GameCollector\src\GameCollector.StoreHandlers.GameJolt\GameCollector.StoreHandlers.GameJolt.csproj", "{FAEE9122-5E0D-4246-A9FC-A346295A82FD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Humble", "..\..\GameCollector\src\GameCollector.StoreHandlers.Humble\GameCollector.StoreHandlers.Humble.csproj", "{5074B706-14AD-4104-A2DA-EBBD36B19255}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.IGClient", "..\..\GameCollector\src\GameCollector.StoreHandlers.IGClient\GameCollector.StoreHandlers.IGClient.csproj", "{06AA6AE5-2FAC-4761-9D44-CA11A3912256}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Itch", "..\..\GameCollector\src\GameCollector.StoreHandlers.Itch\GameCollector.StoreHandlers.Itch.csproj", "{C8DE7215-67F5-494E-B7AB-088270CB28C3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Legacy", "..\..\GameCollector\src\GameCollector.StoreHandlers.Legacy\GameCollector.StoreHandlers.Legacy.csproj", "{64EA04B2-A7A7-4184-AB99-180F084033BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Oculus", "..\..\GameCollector\src\GameCollector.StoreHandlers.Oculus\GameCollector.StoreHandlers.Oculus.csproj", "{487FD285-16EB-46AD-AF82-9F058D2A4141}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Paradox", "..\..\GameCollector\src\GameCollector.StoreHandlers.Paradox\GameCollector.StoreHandlers.Paradox.csproj", "{DD16375A-6112-49F4-A4D3-9B1524B952B3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Plarium", "..\..\GameCollector\src\GameCollector.StoreHandlers.Plarium\GameCollector.StoreHandlers.Plarium.csproj", "{6147F764-C8B3-4D80-9311-52974100B916}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Riot", "..\..\GameCollector\src\GameCollector.StoreHandlers.Riot\GameCollector.StoreHandlers.Riot.csproj", "{0E5D8910-979B-46B8-B32F-12298707F892}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.RobotCache", "..\..\GameCollector\src\GameCollector.StoreHandlers.RobotCache\GameCollector.StoreHandlers.RobotCache.csproj", "{7D1B9F43-C54A-4903-9839-AAE845A41592}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Rockstar", "..\..\GameCollector\src\GameCollector.StoreHandlers.Rockstar\GameCollector.StoreHandlers.Rockstar.csproj", "{67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Ubisoft", "..\..\GameCollector\src\GameCollector.StoreHandlers.Ubisoft\GameCollector.StoreHandlers.Ubisoft.csproj", "{E939182C-42EC-474A-952C-064FE757CDCA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.WargamingNet", "..\..\GameCollector\src\GameCollector.StoreHandlers.WargamingNet\GameCollector.StoreHandlers.WargamingNet.csproj", "{6368DFB4-1E79-4D24-9603-17449F0C2F71}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EmuHandlers", "EmuHandlers", "{1F5F230D-146C-4794-A2E6-F9C13279D721}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.EmuHandlers.Dolphin", "..\..\GameCollector\src\GameCollector.EmuHandlers.Dolphin\GameCollector.EmuHandlers.Dolphin.csproj", "{6173D1F4-48C2-4B14-B907-C7A746CF081D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.EmuHandlers.MAME", "..\..\GameCollector\src\GameCollector.EmuHandlers.MAME\GameCollector.EmuHandlers.MAME.csproj", "{EA0A79A3-639B-4983-A28F-1D07EC1113C7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataHandlers", "DataHandlers", "{82816E34-196A-4304-8A28-BF22FA937DF0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -56,6 +191,182 @@ Global {AFD1FA2C-F2BF-43D3-91FB-225BF1021543}.Debug|Any CPU.Build.0 = Debug|Any CPU {AFD1FA2C-F2BF-43D3-91FB-225BF1021543}.Release|Any CPU.ActiveCfg = Release|Any CPU {AFD1FA2C-F2BF-43D3-91FB-225BF1021543}.Release|Any CPU.Build.0 = Release|Any CPU + {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}.Release|Any CPU.Build.0 = Release|Any CPU + {3CADF882-5158-4D2E-B15C-D54F5FE89B30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CADF882-5158-4D2E-B15C-D54F5FE89B30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CADF882-5158-4D2E-B15C-D54F5FE89B30}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CADF882-5158-4D2E-B15C-D54F5FE89B30}.Release|Any CPU.Build.0 = Release|Any CPU + {6F00D927-358E-41A4-8DDF-471B1514128B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F00D927-358E-41A4-8DDF-471B1514128B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F00D927-358E-41A4-8DDF-471B1514128B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F00D927-358E-41A4-8DDF-471B1514128B}.Release|Any CPU.Build.0 = Release|Any CPU + {58A62CC7-4A61-4218-9F93-CE85FDF00E15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58A62CC7-4A61-4218-9F93-CE85FDF00E15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58A62CC7-4A61-4218-9F93-CE85FDF00E15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58A62CC7-4A61-4218-9F93-CE85FDF00E15}.Release|Any CPU.Build.0 = Release|Any CPU + {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}.Release|Any CPU.Build.0 = Release|Any CPU + {82126DC0-0DF8-4430-9DB7-7326A0192E48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82126DC0-0DF8-4430-9DB7-7326A0192E48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82126DC0-0DF8-4430-9DB7-7326A0192E48}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82126DC0-0DF8-4430-9DB7-7326A0192E48}.Release|Any CPU.Build.0 = Release|Any CPU + {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}.Release|Any CPU.Build.0 = Release|Any CPU + {E91CA2ED-F46D-484B-8759-E7ADED282647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E91CA2ED-F46D-484B-8759-E7ADED282647}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E91CA2ED-F46D-484B-8759-E7ADED282647}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E91CA2ED-F46D-484B-8759-E7ADED282647}.Release|Any CPU.Build.0 = Release|Any CPU + {17A107B4-38CF-469F-AE09-AA5795734D48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17A107B4-38CF-469F-AE09-AA5795734D48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17A107B4-38CF-469F-AE09-AA5795734D48}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17A107B4-38CF-469F-AE09-AA5795734D48}.Release|Any CPU.Build.0 = Release|Any CPU + {EAE6E28E-DDA5-417D-985F-57B8ADCCA981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAE6E28E-DDA5-417D-985F-57B8ADCCA981}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAE6E28E-DDA5-417D-985F-57B8ADCCA981}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAE6E28E-DDA5-417D-985F-57B8ADCCA981}.Release|Any CPU.Build.0 = Release|Any CPU + {CCC94557-9698-4468-AAE6-69CB28C676E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCC94557-9698-4468-AAE6-69CB28C676E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCC94557-9698-4468-AAE6-69CB28C676E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCC94557-9698-4468-AAE6-69CB28C676E2}.Release|Any CPU.Build.0 = Release|Any CPU + {37E8F2F8-FED5-4722-934F-621C4CE085F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37E8F2F8-FED5-4722-934F-621C4CE085F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37E8F2F8-FED5-4722-934F-621C4CE085F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37E8F2F8-FED5-4722-934F-621C4CE085F4}.Release|Any CPU.Build.0 = Release|Any CPU + {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}.Release|Any CPU.Build.0 = Release|Any CPU + {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}.Release|Any CPU.Build.0 = Release|Any CPU + {C26BCA96-CF68-41F5-AC55-B24EF0545E4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C26BCA96-CF68-41F5-AC55-B24EF0545E4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C26BCA96-CF68-41F5-AC55-B24EF0545E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C26BCA96-CF68-41F5-AC55-B24EF0545E4A}.Release|Any CPU.Build.0 = Release|Any CPU + {F7807045-BAA2-46F6-81A6-0127FA662AC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7807045-BAA2-46F6-81A6-0127FA662AC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7807045-BAA2-46F6-81A6-0127FA662AC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7807045-BAA2-46F6-81A6-0127FA662AC8}.Release|Any CPU.Build.0 = Release|Any CPU + {519FD898-CFD1-4093-833F-510BE8BD9379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {519FD898-CFD1-4093-833F-510BE8BD9379}.Debug|Any CPU.Build.0 = Debug|Any CPU + {519FD898-CFD1-4093-833F-510BE8BD9379}.Release|Any CPU.ActiveCfg = Release|Any CPU + {519FD898-CFD1-4093-833F-510BE8BD9379}.Release|Any CPU.Build.0 = Release|Any CPU + {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}.Release|Any CPU.Build.0 = Release|Any CPU + {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}.Release|Any CPU.Build.0 = Release|Any CPU + {2F75FCA7-DCE5-4162-B2AE-24994D14FC03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F75FCA7-DCE5-4162-B2AE-24994D14FC03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F75FCA7-DCE5-4162-B2AE-24994D14FC03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F75FCA7-DCE5-4162-B2AE-24994D14FC03}.Release|Any CPU.Build.0 = Release|Any CPU + {7D04AF8D-E8AE-44DB-AB36-5452594DC789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D04AF8D-E8AE-44DB-AB36-5452594DC789}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D04AF8D-E8AE-44DB-AB36-5452594DC789}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D04AF8D-E8AE-44DB-AB36-5452594DC789}.Release|Any CPU.Build.0 = Release|Any CPU + {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}.Release|Any CPU.Build.0 = Release|Any CPU + {C1BA59AD-3143-4102-96F0-07D745198398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1BA59AD-3143-4102-96F0-07D745198398}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1BA59AD-3143-4102-96F0-07D745198398}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1BA59AD-3143-4102-96F0-07D745198398}.Release|Any CPU.Build.0 = Release|Any CPU + {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}.Release|Any CPU.Build.0 = Release|Any CPU + {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}.Release|Any CPU.Build.0 = Release|Any CPU + {158A060B-0036-4CE0-8C4B-CDD2F876A1ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {158A060B-0036-4CE0-8C4B-CDD2F876A1ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {158A060B-0036-4CE0-8C4B-CDD2F876A1ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {158A060B-0036-4CE0-8C4B-CDD2F876A1ED}.Release|Any CPU.Build.0 = Release|Any CPU + {F411D87A-7833-44F4-9B41-814C50292CAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F411D87A-7833-44F4-9B41-814C50292CAE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F411D87A-7833-44F4-9B41-814C50292CAE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F411D87A-7833-44F4-9B41-814C50292CAE}.Release|Any CPU.Build.0 = Release|Any CPU + {82823466-00E1-4D38-8CEF-1E7955B4C5A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82823466-00E1-4D38-8CEF-1E7955B4C5A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82823466-00E1-4D38-8CEF-1E7955B4C5A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82823466-00E1-4D38-8CEF-1E7955B4C5A4}.Release|Any CPU.Build.0 = Release|Any CPU + {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}.Release|Any CPU.Build.0 = Release|Any CPU + {FAEE9122-5E0D-4246-A9FC-A346295A82FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FAEE9122-5E0D-4246-A9FC-A346295A82FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FAEE9122-5E0D-4246-A9FC-A346295A82FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FAEE9122-5E0D-4246-A9FC-A346295A82FD}.Release|Any CPU.Build.0 = Release|Any CPU + {5074B706-14AD-4104-A2DA-EBBD36B19255}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5074B706-14AD-4104-A2DA-EBBD36B19255}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5074B706-14AD-4104-A2DA-EBBD36B19255}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5074B706-14AD-4104-A2DA-EBBD36B19255}.Release|Any CPU.Build.0 = Release|Any CPU + {06AA6AE5-2FAC-4761-9D44-CA11A3912256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06AA6AE5-2FAC-4761-9D44-CA11A3912256}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06AA6AE5-2FAC-4761-9D44-CA11A3912256}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06AA6AE5-2FAC-4761-9D44-CA11A3912256}.Release|Any CPU.Build.0 = Release|Any CPU + {C8DE7215-67F5-494E-B7AB-088270CB28C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8DE7215-67F5-494E-B7AB-088270CB28C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8DE7215-67F5-494E-B7AB-088270CB28C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8DE7215-67F5-494E-B7AB-088270CB28C3}.Release|Any CPU.Build.0 = Release|Any CPU + {64EA04B2-A7A7-4184-AB99-180F084033BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64EA04B2-A7A7-4184-AB99-180F084033BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64EA04B2-A7A7-4184-AB99-180F084033BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64EA04B2-A7A7-4184-AB99-180F084033BC}.Release|Any CPU.Build.0 = Release|Any CPU + {487FD285-16EB-46AD-AF82-9F058D2A4141}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {487FD285-16EB-46AD-AF82-9F058D2A4141}.Debug|Any CPU.Build.0 = Debug|Any CPU + {487FD285-16EB-46AD-AF82-9F058D2A4141}.Release|Any CPU.ActiveCfg = Release|Any CPU + {487FD285-16EB-46AD-AF82-9F058D2A4141}.Release|Any CPU.Build.0 = Release|Any CPU + {DD16375A-6112-49F4-A4D3-9B1524B952B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD16375A-6112-49F4-A4D3-9B1524B952B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD16375A-6112-49F4-A4D3-9B1524B952B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD16375A-6112-49F4-A4D3-9B1524B952B3}.Release|Any CPU.Build.0 = Release|Any CPU + {6147F764-C8B3-4D80-9311-52974100B916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6147F764-C8B3-4D80-9311-52974100B916}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6147F764-C8B3-4D80-9311-52974100B916}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6147F764-C8B3-4D80-9311-52974100B916}.Release|Any CPU.Build.0 = Release|Any CPU + {0E5D8910-979B-46B8-B32F-12298707F892}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E5D8910-979B-46B8-B32F-12298707F892}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E5D8910-979B-46B8-B32F-12298707F892}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E5D8910-979B-46B8-B32F-12298707F892}.Release|Any CPU.Build.0 = Release|Any CPU + {7D1B9F43-C54A-4903-9839-AAE845A41592}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D1B9F43-C54A-4903-9839-AAE845A41592}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D1B9F43-C54A-4903-9839-AAE845A41592}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D1B9F43-C54A-4903-9839-AAE845A41592}.Release|Any CPU.Build.0 = Release|Any CPU + {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}.Release|Any CPU.Build.0 = Release|Any CPU + {E939182C-42EC-474A-952C-064FE757CDCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E939182C-42EC-474A-952C-064FE757CDCA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E939182C-42EC-474A-952C-064FE757CDCA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E939182C-42EC-474A-952C-064FE757CDCA}.Release|Any CPU.Build.0 = Release|Any CPU + {6368DFB4-1E79-4D24-9603-17449F0C2F71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6368DFB4-1E79-4D24-9603-17449F0C2F71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6368DFB4-1E79-4D24-9603-17449F0C2F71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6368DFB4-1E79-4D24-9603-17449F0C2F71}.Release|Any CPU.Build.0 = Release|Any CPU + {6173D1F4-48C2-4B14-B907-C7A746CF081D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6173D1F4-48C2-4B14-B907-C7A746CF081D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6173D1F4-48C2-4B14-B907-C7A746CF081D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6173D1F4-48C2-4B14-B907-C7A746CF081D}.Release|Any CPU.Build.0 = Release|Any CPU + {EA0A79A3-639B-4983-A28F-1D07EC1113C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA0A79A3-639B-4983-A28F-1D07EC1113C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA0A79A3-639B-4983-A28F-1D07EC1113C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA0A79A3-639B-4983-A28F-1D07EC1113C7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -63,6 +374,58 @@ Global GlobalSection(NestedProjects) = preSolution {D149C871-27ED-4307-BE1F-E5FB55C2BB45} = {EF2BF649-24D0-4307-9D49-4FA96259C214} {AFD1FA2C-F2BF-43D3-91FB-225BF1021543} = {EF2BF649-24D0-4307-9D49-4FA96259C214} + {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF} = {41011D08-70EF-410D-83E7-7BEAF795494E} + {3CADF882-5158-4D2E-B15C-D54F5FE89B30} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {6F00D927-358E-41A4-8DDF-471B1514128B} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {58A62CC7-4A61-4218-9F93-CE85FDF00E15} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {B765999C-AB3D-495F-9F5E-9108F2D4FE33} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} + {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53} = {7EA29B58-0E2E-4714-81AC-1F86FE253664} + {82126DC0-0DF8-4430-9DB7-7326A0192E48} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD} = {41011D08-70EF-410D-83E7-7BEAF795494E} + {E91CA2ED-F46D-484B-8759-E7ADED282647} = {7EA29B58-0E2E-4714-81AC-1F86FE253664} + {17A107B4-38CF-469F-AE09-AA5795734D48} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} = {37826248-39D5-4E1F-B920-37C49D9CD519} + {9C6671E1-A94D-4C76-9F61-78B491A62408} = {37826248-39D5-4E1F-B920-37C49D9CD519} + {7EA29B58-0E2E-4714-81AC-1F86FE253664} = {37826248-39D5-4E1F-B920-37C49D9CD519} + {41011D08-70EF-410D-83E7-7BEAF795494E} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} + {EAE6E28E-DDA5-417D-985F-57B8ADCCA981} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {CCC94557-9698-4468-AAE6-69CB28C676E2} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {37E8F2F8-FED5-4722-934F-621C4CE085F4} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {C26BCA96-CF68-41F5-AC55-B24EF0545E4A} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {F7807045-BAA2-46F6-81A6-0127FA662AC8} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {519FD898-CFD1-4093-833F-510BE8BD9379} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {21F0CD9E-DC99-49E5-B451-A8A111664E6E} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} + {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5} = {21F0CD9E-DC99-49E5-B451-A8A111664E6E} + {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {2F75FCA7-DCE5-4162-B2AE-24994D14FC03} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {7D04AF8D-E8AE-44DB-AB36-5452594DC789} = {9C6671E1-A94D-4C76-9F61-78B491A62408} + {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} + {C1BA59AD-3143-4102-96F0-07D745198398} = {41011D08-70EF-410D-83E7-7BEAF795494E} + {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C} = {41011D08-70EF-410D-83E7-7BEAF795494E} + {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD} = {41011D08-70EF-410D-83E7-7BEAF795494E} + {158A060B-0036-4CE0-8C4B-CDD2F876A1ED} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {F411D87A-7833-44F4-9B41-814C50292CAE} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {82823466-00E1-4D38-8CEF-1E7955B4C5A4} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {FAEE9122-5E0D-4246-A9FC-A346295A82FD} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {5074B706-14AD-4104-A2DA-EBBD36B19255} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {06AA6AE5-2FAC-4761-9D44-CA11A3912256} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {C8DE7215-67F5-494E-B7AB-088270CB28C3} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {64EA04B2-A7A7-4184-AB99-180F084033BC} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {487FD285-16EB-46AD-AF82-9F058D2A4141} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {DD16375A-6112-49F4-A4D3-9B1524B952B3} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {6147F764-C8B3-4D80-9311-52974100B916} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {0E5D8910-979B-46B8-B32F-12298707F892} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {7D1B9F43-C54A-4903-9839-AAE845A41592} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {E939182C-42EC-474A-952C-064FE757CDCA} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {6368DFB4-1E79-4D24-9603-17449F0C2F71} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} + {1F5F230D-146C-4794-A2E6-F9C13279D721} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} + {6173D1F4-48C2-4B14-B907-C7A746CF081D} = {1F5F230D-146C-4794-A2E6-F9C13279D721} + {EA0A79A3-639B-4983-A28F-1D07EC1113C7} = {1F5F230D-146C-4794-A2E6-F9C13279D721} + {82816E34-196A-4304-8A28-BF22FA937DF0} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {90858D12-1823-4AAB-91A4-04758C95F911} diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index 58bf845..0323bf1 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -132,6 +132,29 @@ + + + + + + + + + + + + + + + + + + + + + + + From b476ec44dbc6384e1ca4b300ff3cd6bc4a32415c Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Tue, 13 Feb 2024 12:05:50 -0800 Subject: [PATCH 03/21] Roll back System.Data.SQLite (see Nutzzz/GameCollector#14), update other dependencies --- .../GameLauncher_Console/GameLauncher_Console.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index 58bf845..ba061cb 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -159,17 +159,17 @@ all - - + + - + - + From 2010948ec2db3c014abd80149ea303a31380cbed Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Wed, 14 Feb 2024 13:12:42 -0800 Subject: [PATCH 04/21] Update GameCollector to 4.2.0.4 --- .../GameLauncher_Console.csproj | 38 +++++++++---------- .../GameLauncher_Console/Platforms/EA.cs | 6 +-- .../GameLauncher_Console/Platforms/Epic.cs | 2 +- .../GameLauncher_Console/Platforms/GOG.cs | 2 +- .../Platforms/Microsoft.cs | 2 +- .../GameLauncher_Console/Platforms/Steam.cs | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index ba061cb..6728471 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -132,25 +132,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index f0486fc..3af682c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -1,7 +1,7 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.EADesktop; -using GameFinder.StoreHandlers.EADesktop.Crypto; -using GameFinder.StoreHandlers.EADesktop.Crypto.Windows; +using GameCollector.StoreHandlers.EADesktop; +using GameCollector.StoreHandlers.EADesktop.Crypto; +using GameCollector.StoreHandlers.EADesktop.Crypto.Windows; using Logger; using PureOrigin.API; using SHA3.Net; diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index 91c0fdf..03dc767 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.EGS; +using GameCollector.StoreHandlers.EGS; using Logger; using System; using System.Buffers; diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index 8ab5e77..708f906 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.GOG; +using GameCollector.StoreHandlers.GOG; using Logger; using System; using System.Collections.Generic; diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index be57747..89437ff 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -1,4 +1,4 @@ -using GameFinder.StoreHandlers.Xbox; +using GameCollector.StoreHandlers.Xbox; using Logger; using System; using System.Collections.Generic; diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 405c056..8dd6fd3 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.Steam; +using GameCollector.StoreHandlers.Steam; using HtmlAgilityPack; using Logger; using System; From 39a85ec91c3b1553cd995d1e329b04927f0ca4a7 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Wed, 14 Feb 2024 13:15:42 -0800 Subject: [PATCH 05/21] Add IconUrl from GameCollector metadata to get auto-download of CustomImages working again --- .../GameLauncher_Console/Config.cs | 5 ++ .../GameLauncher_Console/ConsoleHelper.cs | 7 ++ .../GameLauncher_Console/Dock.cs | 37 +++++--- .../GameLauncher_Console/GameData.cs | 67 ++++++++++++--- .../GameLauncher_Console/JsonWrapper.cs | 10 ++- .../GameLauncher_Console/Platform.cs | 85 +++++++++++++++++-- .../GameLauncher_Console/Platforms/Custom.cs | 4 +- 7 files changed, 184 insertions(+), 31 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/Config.cs b/GameLauncher_Console/GameLauncher_Console/Config.cs index 3547659..6eb446d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Config.cs +++ b/GameLauncher_Console/GameLauncher_Console/Config.cs @@ -110,7 +110,10 @@ public struct Hotkeys public ConsoleKey tagsCK2; public ConsoleKey downloadCK1; public ConsoleKey downloadCK2; + public ConsoleKey allimgCK1; + public ConsoleKey allimgCK2; } + public struct Colours { public ConsoleColor bgCC; @@ -273,6 +276,8 @@ public struct Colours public const string CFG_KEYRATEDN2 = "key_rating_down_2"; public const string CFG_KEYDLIMG1 = "key_download_image_1"; public const string CFG_KEYDLIMG2 = "key_download_image_2"; + public const string CFG_KEYDLALL1 = "key_download_all_images_1"; + public const string CFG_KEYDLALL2 = "key_download_all_images_2"; public const string CFG_PATHLEG = "path_legendary_exe"; public const string CFG_TXTMAINT = "text_main_menu_title"; public const string CFG_TXTCFGT = "text_settings_title"; diff --git a/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs b/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs index da97e4b..7c3344a 100644 --- a/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs +++ b/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs @@ -164,6 +164,7 @@ public CConsoleHelper(int nColumnCount, int nSpacing, int nPaging) //, ConsoleSt /// public enum DockSelection { + cSel_downloadAll = -26, cSel_Tags = -25, cSel_raiseRating = -24, cSel_lowerRating = -23, @@ -841,6 +842,9 @@ public int HandleNavigationMenu(int nStartY, int nStopY, CConfig.ConfigVolatile else if (key == keys.scanCK1 || key == keys.scanCK2) return (int)DockSelection.cSel_Rescan; // Rescan the registry and the 'CustomGames' folder for new games + else if (key == keys.allimgCK1 || key == keys.allimgCK2) + return (int)DockSelection.cSel_downloadAll; // Rescan the registry and the 'CustomGames' folder for new games + } while (key != keys.selectCK1 && key != keys.selectCK2); return (int)DockSelection.cSel_Default; @@ -963,6 +967,9 @@ public int HandleInsertMenu(int nStartY, int nStopY, CConfig.ConfigVolatile cfgv else if (strInput.Equals("/icon", CDock.IGNORE_CASE)) return (int)DockSelection.cSel_Image; + else if (strInput.Equals("/allicon", CDock.IGNORE_CASE)) + return (int)DockSelection.cSel_downloadAll; + else if (strInput.Equals("/sort", CDock.IGNORE_CASE)) return (int)DockSelection.cSel_Sort; diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index 6dc8fa0..74a87d2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -97,18 +97,18 @@ public CDock() public void MainLoop(string[] args) { CPlatform platforms = new(); - platforms.AddSupportedPlatform(new PlatformAmazon()); - platforms.AddSupportedPlatform(new PlatformArc()); + platforms.AddSupportedPlatform(new PlatformAmazon()); + platforms.AddSupportedPlatform(new PlatformArc()); platforms.AddSupportedPlatform(new PlatformBattlenet()); //platforms.AddSupportedPlatform(new PlatformBethesda()); // deprecated May 2022 platforms.AddSupportedPlatform(new PlatformBigFish()); //platforms.AddSupportedPlatform(new PlatformCustom()); // See CPlatform.ScanGames() platforms.AddSupportedPlatform(new PlatformEA()); platforms.AddSupportedPlatform(new PlatformEpic()); - platforms.AddSupportedPlatform(new PlatformGameJolt()); - platforms.AddSupportedPlatform(new PlatformGOG()); - platforms.AddSupportedPlatform(new PlatformHumble()); - platforms.AddSupportedPlatform(new PlatformIGClient()); + platforms.AddSupportedPlatform(new PlatformGameJolt()); + platforms.AddSupportedPlatform(new PlatformGOG()); + platforms.AddSupportedPlatform(new PlatformHumble()); + platforms.AddSupportedPlatform(new PlatformIGClient()); platforms.AddSupportedPlatform(new PlatformItch()); platforms.AddSupportedPlatform(new PlatformLegacy()); platforms.AddSupportedPlatform(new PlatformMicrosoft()); @@ -161,9 +161,7 @@ public void MainLoop(string[] args) noInteractive = true; else if (gameSearch[0].Equals('s') || gameSearch[0].Equals('S')) { - CLogger.LogInfo("Scanning for games..."); - Console.Write("Scanning for games"); // ScanGames() will append a dot for each platform - platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), false); + platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), bFirstScan: false); return; } else if (gameSearch[0].Equals('c') || gameSearch[0].Equals('C')) @@ -412,9 +410,7 @@ public void MainLoop(string[] args) CLogger.LogError(e); } Console.ResetColor(); - CLogger.LogInfo("Scanning for games..."); - Console.Write("Scanning for games"); // ScanGames() will add dots for each platform - platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), false); + platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), bFirstScan: false); continue; case CConsoleHelper.DockSelection.cSel_Input: // Toggle arrows/typing input @@ -959,6 +955,19 @@ from part in newTags.Split('|') } continue; + case CConsoleHelper.DockSelection.cSel_downloadAll: // Download images + try + { + Console.SetCursorPosition(0, Console.WindowHeight - INPUT_BOTTOM_CUSHION); + } + catch (Exception e) + { + CLogger.LogError(e); + } + Console.ResetColor(); + platforms.DownloadAllImages(bFirstScan: false); + continue; + default: break; } @@ -1820,6 +1829,10 @@ private void DisplayHelp(int height, CConfig.Colours cols) " Download Image: " + CConsoleHelper.OutputKeys(CConfig.ShortenKeyName(CConfig.GetConfigString(CConfig.CFG_KEYDLIMG1)), CConfig.ShortenKeyName(CConfig.GetConfigString(CConfig.CFG_KEYDLIMG2)), "[", "]", " | ", "N/A", 8)); + WriteWithBreak(ref line, height, cols.entryCC, cols.entryLtCC, cols.titleCC, cols.titleLtCC, + " Download All Images: " + + CConsoleHelper.OutputKeys(CConfig.ShortenKeyName(CConfig.GetConfigString(CConfig.CFG_KEYDLALL1)), + CConfig.ShortenKeyName(CConfig.GetConfigString(CConfig.CFG_KEYDLALL2)), "[", "]", " | ", "N/A", 8)); if (!(bool)CConfig.GetConfigBool(CConfig.CFG_NOQUIT)) WriteWithBreak(ref line, height, cols.entryCC, cols.entryLtCC, cols.titleCC, cols.titleLtCC, " Quit: " + diff --git a/GameLauncher_Console/GameLauncher_Console/GameData.cs b/GameLauncher_Console/GameLauncher_Console/GameData.cs index a1f4211..8d97785 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameData.cs +++ b/GameLauncher_Console/GameLauncher_Console/GameData.cs @@ -140,7 +140,9 @@ public struct ImportGameData public string m_strID; public string m_strTitle; public string m_strLaunch; + public string m_strLaunchUrl; public string m_strIcon; + public string m_strIconUrl; public string m_strUninstall; public string m_strAlias; public bool m_bInstalled; @@ -154,7 +156,7 @@ public struct ImportGameData */ public ImportGameData(string strPlatform, GameData gameData) - //public ImportGameData(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, string strAlias, bool bInstalled, string strPlatform, bool bFavourite = false, bool bHidden = false, List tags = default, DateTime dateLastRun = default, ushort rating = 0, uint numRuns = 0) + //public ImportGameData(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, string strAlias, bool bInstalled, string strPlatform, bool bFavourite = false, bool bHidden = false, List tags = default, DateTime dateLastRun = default, ushort rating = 0, uint numRuns = 0) { m_strPlatform = strPlatform; m_gameData = gameData; @@ -162,7 +164,9 @@ public ImportGameData(string strPlatform, GameData gameData) m_strID = strID; m_strTitle = strTitle; m_strLaunch = strLaunch; + m_strLaunchUrl = strLaunchUrl; m_strIcon = strIconPath; + m_strIconUrl = strIconUrl; m_strUninstall = strUninstall; m_strAlias = strAlias; m_bInstalled = bInstalled; @@ -185,7 +189,9 @@ public class CGame private readonly string m_strID; private readonly string m_strTitle; private readonly string m_strLaunch; + private readonly string m_strLaunchUrl; private readonly string m_strIcon; + private readonly string m_strIconUrl; private readonly string m_strUninstall; private bool m_bIsInstalled; private bool m_bIsFavourite; @@ -205,7 +211,9 @@ public class CGame /// Unique ID for the game /// Title of the game /// Game's launch command + /// Game's launch command via launcher /// Path to game's icon + /// Game's downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -218,12 +226,14 @@ public class CGame /// User rating (0-5) /// Number of game launches /// Game's frequency counter - protected CGame(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + protected CGame(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) { m_strID = strID; m_strTitle = strTitle; m_strLaunch = strLaunch; + m_strLaunchUrl = strLaunchUrl; m_strIcon = strIconPath; + m_strIconUrl = strIconUrl; m_strUninstall = strUninstall; m_bIsInstalled = bIsInstalled; m_bIsFavourite = bIsFavourite; @@ -291,6 +301,17 @@ public string Launch } } + /// + /// Launch url getter + /// + public string LaunchUrl + { + get + { + return m_strLaunchUrl; + } + } + /// /// Icon getter /// @@ -302,6 +323,17 @@ public string Icon } } + /// + /// Downloadable icon getter + /// + public string IconUrl + { + get + { + return m_strIconUrl; + } + } + /// /// Uninstaller command getter /// @@ -564,7 +596,9 @@ private class CGameInstance : CGame /// Unique ID of the game /// Title of the game /// Game's launch command + /// Game's launch command via launcher /// Path to game's icon + /// Game's downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -577,8 +611,8 @@ private class CGameInstance : CGame /// User rating (0-5) /// Number of game launches /// Game's frequency counter - public CGameInstance(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) - : base(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount) + public CGameInstance(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + : base(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount) { } @@ -604,7 +638,9 @@ public CTempGameSet() /// Game unique ID /// Game title /// Game launch command + /// Game launch command via launcher /// Path to game's icon + /// Game downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -617,7 +653,7 @@ public CTempGameSet() /// User rating (0-5) /// Number of game launches /// Game's frequency counter - public void InsertGame(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, string strPlatform, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + public void InsertGame(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, string strPlatform, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) { GamePlatform platformEnum; // If platform is incorrect or unsupported, default to unknown. @@ -626,7 +662,7 @@ public void InsertGame(string strID, string strTitle, string strLaunch, string s if (platformEnum < 0) platformEnum = GamePlatform.Unknown; - this.Add(CreateGameInstance(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount)); + this.Add(CreateGameInstance(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount)); } } @@ -636,7 +672,9 @@ public void InsertGame(string strID, string strTitle, string strLaunch, string s /// Unique ID of the game /// Title of the game /// Game's launch command + /// Game's launch command via launcher /// Path to game's icon + /// Game's downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -650,9 +688,9 @@ public void InsertGame(string strID, string strTitle, string strLaunch, string s /// Number of game launches /// Game's frequency counter /// Instance of CGame - private static CGame CreateGameInstance(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + private static CGame CreateGameInstance(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) { - return new CGameInstance(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount); + return new CGameInstance(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount); } private static readonly Dictionary> m_gameDictionary = new(); @@ -689,7 +727,12 @@ public static HashSet GetPlatformGameList(GamePlatform platformEnum) return m_notInstalled; else - return m_gameDictionary[platformEnum]; + { + if (m_gameDictionary.ContainsKey(platformEnum)) + return m_gameDictionary[platformEnum]; + else + return new(); + } } /// @@ -918,7 +961,9 @@ public static List GetPlatformTitles(GamePlatform platformEnum) /// Unique ID of the game /// Title of the game /// Game's launch command + /// Game's launch command via launcher /// Path to game's icon + /// Game's downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -931,7 +976,7 @@ public static List GetPlatformTitles(GamePlatform platformEnum) /// User rating (0-5) /// Number of game launches /// Game's frequency counter - public static void AddGame(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, string strPlatform, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + public static void AddGame(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, string strPlatform, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) { GamePlatform platformEnum; // If platform is incorrect or unsupported, default to unknown. @@ -944,7 +989,7 @@ public static void AddGame(string strID, string strTitle, string strLaunch, stri if (!m_gameDictionary.ContainsKey(platformEnum)) m_gameDictionary[platformEnum] = new HashSet(); - CGame game = CreateGameInstance(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount); + CGame game = CreateGameInstance(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount); m_gameDictionary[platformEnum].Add(game); if (game.IsFavourite) diff --git a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs index c35e2bb..96d01d0 100644 --- a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs +++ b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs @@ -50,7 +50,9 @@ public static class CJsonWrapper private const string GAMES_ARRAY_ID = "id"; private const string GAMES_ARRAY_TITLE = "title"; private const string GAMES_ARRAY_LAUNCH = "launch"; + private const string GAMES_ARRAY_LAUNCHURL = "launchurl"; private const string GAMES_ARRAY_ICON = "icon"; + private const string GAMES_ARRAY_ICONURL = "iconurl"; private const string GAMES_ARRAY_UNINSTALLER = "uninstaller"; private const string GAMES_ARRAY_PLATFORM = "platform"; private const string GAMES_ARRAY_INSTALLED = "installed"; @@ -413,7 +415,9 @@ private static bool ImportGames(string file, ref int nGameCount, ref Version ver continue; string strLaunch = GetStringProperty(jElement, GAMES_ARRAY_LAUNCH); + string strLaunchUrl = GetStringProperty(jElement, GAMES_ARRAY_LAUNCHURL); string strIconPath = GetStringProperty(jElement, GAMES_ARRAY_ICON); + string strIconUrl = GetStringProperty(jElement, GAMES_ARRAY_ICONURL); string strUninstall = GetStringProperty(jElement, GAMES_ARRAY_UNINSTALLER); bool bIsInstalled = GetBoolProperty(jElement, GAMES_ARRAY_INSTALLED); bool bIsFavourite = GetBoolProperty(jElement, GAMES_ARRAY_FAVOURITE); @@ -426,7 +430,7 @@ private static bool ImportGames(string file, ref int nGameCount, ref Version ver ushort rating = GetUShortProperty(jElement, GAMES_ARRAY_RATING); double fOccurCount = GetDoubleProperty(jElement, GAMES_ARRAY_FREQUENCY); - AddGame(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, strPlatform, new List(), dateLastRun, rating, (uint)numRuns, fOccurCount); + AddGame(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, strPlatform, new List(), dateLastRun, rating, (uint)numRuns, fOccurCount); nGameCount++; } SortGames(sortMethod, faveSort, instSort, ignoreArticle); @@ -652,6 +656,8 @@ private static bool TranslateConfig(ref CConfig.Hotkeys hotkeys, ref CConfig.Col Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYRATEDN2), true, out hotkeys.ratingDownCK2); Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYDLIMG1), true, out hotkeys.downloadCK1); Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYDLIMG2), true, out hotkeys.downloadCK2); + Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYDLALL1), true, out hotkeys.allimgCK1); + Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYDLALL2), true, out hotkeys.allimgCK2); } catch (Exception e) { @@ -1150,6 +1156,8 @@ private static void SetKeyDefaults(bool force) SetDefaultVal(CConfig.CFG_KEYRATEDN2, force); SetDefaultVal(CConfig.CFG_KEYDLIMG1, force); SetDefaultVal(CConfig.CFG_KEYDLIMG2, force); + SetDefaultVal(CConfig.CFG_KEYDLALL1, force); + SetDefaultVal(CConfig.CFG_KEYDLALL2, force); } /// diff --git a/GameLauncher_Console/GameLauncher_Console/Platform.cs b/GameLauncher_Console/GameLauncher_Console/Platform.cs index 53f40ea..bc5c433 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platform.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platform.cs @@ -220,21 +220,42 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) { CTempGameSet tempGameSet = new(); CLogger.LogDebug("-----------------------"); + CLogger.LogInfo("Scanning for games..."); + //if (bFirstScan) + Console.Write("Scanning for games"); // add dots for each platform + List gameDataList = new(); + var cursor = Console.CursorLeft; if (!bOnlyCustom) { foreach (IPlatform platform in _platforms) { - Console.Write("."); + //if (bFirstScan) + { + Console.Write($". [{platform.Description}]"); + cursor++; + } + //else + // Console.Write("."); CLogger.LogInfo("Looking for {0} games...", platform.Description); + platform.GetGames(gameDataList, bExpensiveIcons); + + //if (bFirstScan) + { + Console.SetCursorPosition(cursor, Console.CursorTop); + Console.Write(new string(' ', 3 + platform.Description.Length)); + Console.SetCursorPosition(cursor, Console.CursorTop); + } } foreach (var data in gameDataList) { tempGameSet.InsertGame(data.m_gameData.GameId, data.m_gameData.GameName, data.m_gameData.Launch == default ? data.m_gameData.LaunchUrl : (string.IsNullOrEmpty(data.m_gameData.LaunchArgs) ? data.m_gameData.Launch.GetFullPath() : data.m_gameData.Launch.GetFullPath() + " " + data.m_gameData.LaunchArgs), + data.m_gameData.LaunchUrl, data.m_gameData.Icon == default ? "" : data.m_gameData.Icon.GetFullPath(), + data.m_gameData.Metadata == default ? "" : data.m_gameData.Metadata.TryGetValue("IconUrl", out var urls) && urls.Count > 0 ? urls[0] : (data.m_gameData.Metadata.TryGetValue("ImageUrl", out urls) && urls.Count > 0 ? urls[0] : ""), data.m_gameData.Uninstall == default ? data.m_gameData.UninstallUrl : (string.IsNullOrEmpty(data.m_gameData.UninstallArgs) ? data.m_gameData.Uninstall.GetFullPath() : data.m_gameData.Uninstall.GetFullPath() + " " + data.m_gameData.UninstallArgs), data.m_gameData.IsInstalled, false, true, false, @@ -244,17 +265,71 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) } } - PlatformCustom custom = new(); + //if (bFirstScan) + { + Console.Write($". [{GetPlatformString(GamePlatform.Custom)}]"); + Console.SetCursorPosition(0, Console.CursorTop); + } + //else + // Console.Write("."); - Console.Write("."); - CLogger.LogInfo("Looking for {0} games...", GetPlatformString(GamePlatform.Custom)); + CLogger.LogInfo("Looking for {0}...", GetPlatformString(GamePlatform.Custom)); + + PlatformCustom custom = new(); custom.GetGames(ref tempGameSet); MergeGameSets(tempGameSet); if (bFirstScan) SortGames((int)CConsoleHelper.SortMethod.cSort_Alpha, false, (bool)CConfig.GetConfigBool(CConfig.CFG_USEINST), true); CLogger.LogDebug("-----------------------"); - Console.WriteLine(); ExportGames(GetPlatformGameList(GamePlatform.All).ToList()); + Console.SetCursorPosition(0, Console.CursorTop); + Console.Write(new string(' ', 21 + _platforms.Count + GetPlatformString(GamePlatform.Custom).Length)); + + if (!(bool)CConfig.GetConfigBool(CConfig.CFG_IMGDOWN)) + { + Console.SetCursorPosition(0, Console.CursorTop); + DownloadAllImages(bFirstScan); + } + Console.WriteLine(); + } + + /// + /// Download all images for games + /// + public void DownloadAllImages(bool bFirstScan = false) + { + CLogger.LogDebug("-----------------------"); + CLogger.LogInfo("Downloading images..."); + //if (!bFirstScan) + Console.Write("Downloading images"); // add dots for each platform + + var cursor = Console.CursorLeft; + foreach (IPlatform platform in _platforms) + { + //if (bFirstScan) + { + Console.Write($". [{platform.Description}]"); + cursor++; + } + //else + // Console.Write("."); + + CLogger.LogInfo("Looking for {0} images...", platform.Description); + foreach (var game in GetPlatformGameList(platform.Enum)) + { + CDock.DownloadCustomImage(game.Title, game.IconUrl, overwrite: false); + } + + //if (bFirstScan) + { + Console.SetCursorPosition(cursor, Console.CursorTop); + Console.Write(new string(' ', 3 + platform.Description.Length)); + Console.SetCursorPosition(cursor, Console.CursorTop); + } + } + Console.SetCursorPosition(0, Console.CursorTop); + Console.Write(new string(' ', 21 + _platforms.Count + _platforms.Last().Description.Length)); + CLogger.LogDebug("-----------------------"); } /// diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs index 8f7aac4..4b37f23 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs @@ -88,7 +88,7 @@ private static void FindCustomLinkFiles(ref CTempGameSet tempGameSet) string strAlias = GetAlias(strTitle); if (strAlias.Equals(strTitle, CDock.IGNORE_CASE)) strAlias = ""; - tempGameSet.InsertGame(strID, strTitle, strLaunch, strLaunch, strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); } } } @@ -115,7 +115,7 @@ private static void FindCustomBinaries(ref CTempGameSet tempGameSet) string strAlias = GetAlias(strTitle); if (strAlias.Equals(strTitle, CDock.IGNORE_CASE)) strAlias = ""; - tempGameSet.InsertGame(strID, strTitle, strLaunch, strLaunch, strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); } } } From b2d5ca732ef891e5d690ad3857abdbb6d80c44fd Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Thu, 15 Feb 2024 11:49:00 -0800 Subject: [PATCH 06/21] Add argument names to boolean arguments --- .../GameLauncher_Console/ConsoleHelper.cs | 26 +- .../GameLauncher_Console/ConsoleImage.cs | 2 +- .../GameLauncher_Console/Dock.cs | 258 +++++++++--------- .../GameLauncher_Console/Extensions.cs | 2 +- .../GameLauncher_Console/GameData.cs | 120 ++++---- .../GameLauncher_Console/JsonWrapper.cs | 9 +- .../GameLauncher_Console/Logger.cs | 10 +- .../GameLauncher_Console/Platform.cs | 34 +-- .../GameLauncher_Console/Platforms/Amazon.cs | 2 +- .../GameLauncher_Console/Platforms/Arc.cs | 2 +- .../Platforms/Battlenet.cs | 2 +- .../Platforms/Bethesda.cs | 2 +- .../GameLauncher_Console/Platforms/BigFish.cs | 2 +- .../GameLauncher_Console/Platforms/Custom.cs | 4 +- .../GameLauncher_Console/Platforms/EA.cs | 4 +- .../GameLauncher_Console/Platforms/Epic.cs | 2 +- .../GameLauncher_Console/Platforms/GOG.cs | 2 +- .../GameLauncher_Console/Platforms/Humble.cs | 2 +- .../Platforms/IGClient.cs | 2 +- .../GameLauncher_Console/Platforms/Itch.cs | 2 +- .../GameLauncher_Console/Platforms/Legacy.cs | 2 +- .../Platforms/Microsoft.cs | 2 +- .../GameLauncher_Console/Platforms/Oculus.cs | 2 +- .../GameLauncher_Console/Platforms/Paradox.cs | 2 +- .../GameLauncher_Console/Platforms/Plarium.cs | 2 +- .../GameLauncher_Console/Platforms/Riot.cs | 2 +- .../Platforms/RobotCache.cs | 2 +- .../Platforms/Rockstar.cs | 2 +- .../GameLauncher_Console/Platforms/Steam.cs | 2 +- .../GameLauncher_Console/Platforms/Ubisoft.cs | 2 +- .../Platforms/Wargaming.cs | 2 +- .../GameLauncher_Console/SqlDB.cs | 4 +- 32 files changed, 258 insertions(+), 257 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs b/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs index 7c3344a..43e6688 100644 --- a/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs +++ b/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs @@ -270,14 +270,14 @@ public int DisplayCfg(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfig { if (m_ConsoleState == ConsoleState.cState_Insert) { - code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, true, false, ref game, options.ToArray()); + code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: true, browse: false, ref game, options.ToArray()); if (code > -1) CDock.m_nCurrentSelection = code; CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection); } else //if (m_ConsoleState == ConsoleState.cState_Navigate) { - code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, true, false, ref game, options.ToArray()); + code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: true, browse: false, ref game, options.ToArray()); CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection); if (options.Count < 2) CDock.m_nCurrentSelection = -1; @@ -413,14 +413,14 @@ public int DisplayFS(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfig. { if (m_ConsoleState == ConsoleState.cState_Insert) { - code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, false, true, ref game, options.ToArray()); + code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: false, browse: true, ref game, options.ToArray()); if (code > -1) CDock.m_nCurrentSelection = code; CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection); } else //if (m_ConsoleState == ConsoleState.cState_Navigate) { - code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, false, true, ref game, options.ToArray()); + code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: false, browse: true, ref game, options.ToArray()); CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection); if (options.Count < 2) CDock.m_nCurrentSelection = -1; @@ -502,8 +502,8 @@ public int DisplayMenu(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfi Console.Clear(); DrawMenuTitle(cols); - if (IsSelectionValid(CDock.m_nSelectedPlatform, options.Length)) DrawInstruct(cols, true); - else DrawInstruct(cols, false); + if (IsSelectionValid(CDock.m_nSelectedPlatform, options.Length)) DrawInstruct(cols, subMenu: true); + else DrawInstruct(cols, subMenu: false); int nStartY = Console.CursorTop + CDock.INSTRUCT_CUSHION; int nStopY = CDock.INPUT_BOTTOM_CUSHION + CDock.INPUT_ITEM_CUSHION; @@ -511,12 +511,12 @@ public int DisplayMenu(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfi { if (m_ConsoleState == ConsoleState.cState_Insert) { - code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, false, false, ref game, options); + code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: false, browse: false, ref game, options); CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection); } else //if (m_ConsoleState == ConsoleState.cState_Navigate) { - code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, false, false, ref game, options); + code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: false, browse: false, ref game, options); CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection); } if (code == (int)DockSelection.cSel_Exit || @@ -667,10 +667,10 @@ public int HandleNavigationMenu(int nStartY, int nStopY, CConfig.ConfigVolatile { CGame selectedGame = GetPlatformGame((GamePlatform)CDock.m_nSelectedPlatform, CDock.m_nCurrentSelection); if (selectedGame != null) - CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, CDock.sizeImage, CDock.locImage, imageColour); + CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, CDock.sizeImage, CDock.locImage, imageColour); } else - CConsoleImage.ShowImage(CDock.m_nCurrentSelection, options[CDock.m_nCurrentSelection], options[CDock.m_nCurrentSelection], true, CDock.sizeImage, CDock.locImage, imageColour); + CConsoleImage.ShowImage(CDock.m_nCurrentSelection, options[CDock.m_nCurrentSelection], options[CDock.m_nCurrentSelection], bPlatform: true, CDock.sizeImage, CDock.locImage, imageColour); } }); } @@ -1089,10 +1089,10 @@ public void DrawIcon(int nY, int nItem, string strItem, ConsoleColor? iconColour if (CDock.m_nSelectedPlatform > -1) { CGame selectedGame = GetPlatformGame((GamePlatform)CDock.m_nSelectedPlatform, nItem); - CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, CDock.sizeIcon, iconPosition, iconColour); + CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, CDock.sizeIcon, iconPosition, iconColour); } else - CConsoleImage.ShowImage(CDock.m_nCurrentSelection, strItem, strItem, true, CDock.sizeIcon, iconPosition, iconColour); + CConsoleImage.ShowImage(CDock.m_nCurrentSelection, strItem, strItem, bPlatform: true, CDock.sizeIcon, iconPosition, iconColour); }); } @@ -1447,7 +1447,7 @@ public static void MakeShortcut(string title, string path, string icon, string l // save it IPersistFile file = (IPersistFile)link; if (Directory.Exists(location)) - file.Save(Path.Combine(location, title + ".LNK"), false); + file.Save(Path.Combine(location, title + ".LNK"), fRemember: false); } catch (Exception e) { diff --git a/GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs b/GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs index 72398d3..7f56ed1 100644 --- a/GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs +++ b/GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs @@ -182,7 +182,7 @@ public static Size GetConsoleFontSize() } ConsoleFontInfo cfi = new(); - if (!GetCurrentConsoleFont(outHandle, false, cfi)) + if (!GetCurrentConsoleFont(outHandle, bMaximumWindow: false, cfi)) { throw new InvalidOperationException("Unable to get font information."); } diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index 74a87d2..32aa21d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -57,12 +57,12 @@ public class CDock public static int m_nCurrentSelection = 0; public static readonly string currentPath = Path.GetDirectoryName(AppContext.BaseDirectory); - public static readonly string title = Assembly.GetExecutingAssembly().GetCustomAttribute().Title; - //public static readonly string product = Assembly.GetExecutingAssembly().GetCustomAttribute().Product; - public static readonly string version = Assembly.GetEntryAssembly().GetName().Version.ToString(); - public static readonly string description = Assembly.GetExecutingAssembly().GetCustomAttribute().Description; + public static readonly string title = Assembly.GetExecutingAssembly().GetCustomAttribute().Title; + //public static readonly string product = Assembly.GetExecutingAssembly().GetCustomAttribute().Product; + public static readonly string version = Assembly.GetEntryAssembly().GetName().Version.ToString(); + public static readonly string description = Assembly.GetExecutingAssembly().GetCustomAttribute().Description; - public static readonly List supportedImages = new() { "ICO", "PNG", "JPG", "JPE", "JPEG", "GIF", "BMP", "TIF", "TIFF", "EPR", "EPRT", "EXI", "EXIF" }; + public static readonly List supportedImages = new() { "ICO", "PNG", "JPG", "JPE", "JPEG", "GIF", "BMP", "TIF", "TIFF", "EPR", "EPRT", "EXI", "EXIF" }; public static bool noInteractive = false; public static Size sizeIcon; public static Size sizeImage; @@ -112,7 +112,7 @@ public void MainLoop(string[] args) platforms.AddSupportedPlatform(new PlatformItch()); platforms.AddSupportedPlatform(new PlatformLegacy()); platforms.AddSupportedPlatform(new PlatformMicrosoft()); - platforms.AddSupportedPlatform(new PlatformOculus()); + platforms.AddSupportedPlatform(new PlatformOculus()); platforms.AddSupportedPlatform(new PlatformParadox()); platforms.AddSupportedPlatform(new PlatformPlarium()); platforms.AddSupportedPlatform(new PlatformRiot()); @@ -186,7 +186,7 @@ public void MainLoop(string[] args) { if (OperatingSystem.IsWindows()) { - if (PathEnvironmentUpdate.Add(currentPath, false)) + if (PathEnvironmentUpdate.Add(currentPath, allUsers: false)) { CLogger.LogInfo("Added program location to PATH."); Console.WriteLine("Added {0}.exe location to your PATH environment variable.", filename); @@ -673,7 +673,7 @@ public void MainLoop(string[] args) } else { - m_nSelectedPlatform = GetPlatformEnum(platformList[m_nCurrentSelection], true); + m_nSelectedPlatform = GetPlatformEnum(platformList[m_nCurrentSelection], bStripStr: true); m_nSelectedGame = -1; m_nCurrentSelection = 0; } @@ -875,82 +875,82 @@ from part in newTags.Split('|') switch ((GamePlatform)m_nSelectedPlatform) { case GamePlatform.Steam: - DownloadCustomImage(selectedGame.Title, PlatformSteam.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformSteam.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.GOG: - DownloadCustomImage(selectedGame.Title, PlatformGOG.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformGOG.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Ubisoft: - //DownloadCustomImage(selectedGame.Title, PlatformUbisoft.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformUbisoft.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.EA: - DownloadCustomImage(selectedGame.Title, PlatformEA.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformEA.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Epic: - DownloadCustomImage(selectedGame.Title, PlatformEpic.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformEpic.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Bethesda: - //DownloadCustomImage(selectedGame.Title, PlatformBethesda.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformBethesda.GetIconUrl(selectedGame), overwrite: true); //SetFgColour(cols.errorCC, cols.errorLtCC); CLogger.LogWarn("Bethesda Launcher was deprecated May 2022"); Console.WriteLine("ERROR: Bethesda Launcher was deprecated in May 2022!"); //Console.ResetColor(); break; case GamePlatform.Battlenet: - //DownloadCustomImage(selectedGame.Title, PlatformBattlenet.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformBattlenet.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Rockstar: - DownloadCustomImage(selectedGame.Title, PlatformRockstar.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformRockstar.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Amazon: - DownloadCustomImage(selectedGame.Title, PlatformAmazon.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformAmazon.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.BigFish: - DownloadCustomImage(selectedGame.Title, PlatformBigFish.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformBigFish.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Arc: - //DownloadCustomImage(selectedGame.Title, PlatformArc.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformArc.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Itch: - DownloadCustomImage(selectedGame.Title, PlatformItch.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformItch.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Paradox: - //DownloadCustomImage(selectedGame.Title, PlatformParadox.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformParadox.GetIconUrl(selectedGame), overwrite: true); break; - case GamePlatform.Plarium: // Webp won't be supported until we finish switch to a cross-platform graphics library - //DownloadCustomImage(selectedGame.Title, PlatformPlarium.GetIconUrl(selectedGame), true); + case GamePlatform.Plarium: // Webp won't be supported until we finish switch to a cross-platform graphics library + //DownloadCustomImage(selectedGame.Title, PlatformPlarium.GetIconUrl(selectedGame), overwrite: true); break; - case GamePlatform.Twitch: // deprecated, never implemented + case GamePlatform.Twitch: // deprecated, never implemented break; case GamePlatform.Wargaming: - //DownloadCustomImage(selectedGame.Title, PlatformWargaming.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformWargaming.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.IGClient: - DownloadCustomImage(selectedGame.Title, PlatformIGClient.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformIGClient.GetIconUrl(selectedGame), overwrite: true); break; - case GamePlatform.Microsoft: // TODO? - //DownloadCustomImage(selectedGame.Title, PlatformMicrosoft.GetIconUrl(selectedGame), true); + case GamePlatform.Microsoft: // TODO? + //DownloadCustomImage(selectedGame.Title, PlatformMicrosoft.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Oculus: //PlatformOculus.DownloadCustomImage(selectedGame); // Download and extract from zip file - DownloadCustomImage(selectedGame.Title, PlatformOculus.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformOculus.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Legacy: - //DownloadCustomImage(selectedGame.Title, PlatformLegacy.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformLegacy.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Riot: - //DownloadCustomImage(selectedGame.Title, PlatformRiot.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformRiot.GetIconUrl(selectedGame), overwrite: true); break; - case GamePlatform.GameJolt: - DownloadCustomImage(selectedGame.Title, PlatformGameJolt.GetIconUrl(selectedGame), true); - break; - case GamePlatform.Humble: // avif (AV1) won't be supported until we finish switch to a cross-platform graphics library - //DownloadCustomImage(selectedGame.Title, PlatformHumble.GetIconUrl(selectedGame), true); - break; - case GamePlatform.RobotCache: - //DownloadCustomImage(selectedGame.Title, PlatformRobotCache.GetIconUrl(selectedGame), true); - break; - default: + case GamePlatform.GameJolt: + DownloadCustomImage(selectedGame.Title, PlatformGameJolt.GetIconUrl(selectedGame), overwrite: true); + break; + case GamePlatform.Humble: // avif (AV1) won't be supported until we finish switch to a cross-platform graphics library + //DownloadCustomImage(selectedGame.Title, PlatformHumble.GetIconUrl(selectedGame), overwrite: true); + break; + case GamePlatform.RobotCache: + //DownloadCustomImage(selectedGame.Title, PlatformRobotCache.GetIconUrl(selectedGame), overwrite: true); + break; + default: break; } continue; @@ -965,7 +965,9 @@ from part in newTags.Split('|') CLogger.LogError(e); } Console.ResetColor(); - platforms.DownloadAllImages(bFirstScan: false); + CLogger.LogInfo("Downloading images..."); + Console.Write("Downloading images"); // DownloadAllImages() will add dots for each platform + platforms.DownloadAllImages(); continue; default: @@ -1029,7 +1031,7 @@ from part in newTags.Split('|') case GamePlatform.Plarium: PlatformPlarium.Launch(); break; - case GamePlatform.Twitch: // deprecated, never implemented + case GamePlatform.Twitch: // deprecated, never implemented break; case GamePlatform.Wargaming: PlatformWargaming.Launch(); @@ -1037,7 +1039,7 @@ from part in newTags.Split('|') case GamePlatform.IGClient: PlatformIGClient.Launch(); break; - case GamePlatform.Microsoft: // TODO? + case GamePlatform.Microsoft: // TODO? if (OperatingSystem.IsWindows()) PlatformMicrosoft.Launch(); break; @@ -1050,16 +1052,16 @@ from part in newTags.Split('|') case GamePlatform.Riot: PlatformRiot.Launch(); break; - case GamePlatform.GameJolt: - PlatformGameJolt.Launch(); - break; - case GamePlatform.Humble: - PlatformHumble.Launch(); - break; - case GamePlatform.RobotCache: - PlatformRobotCache.Launch(); - break; - default: + case GamePlatform.GameJolt: + PlatformGameJolt.Launch(); + break; + case GamePlatform.Humble: + PlatformHumble.Launch(); + break; + case GamePlatform.RobotCache: + PlatformRobotCache.Launch(); + break; + default: break; } } @@ -1095,27 +1097,27 @@ from part in newTags.Split('|') { if (noInteractive) { - SetFgColour(cols.errorCC, cols.errorLtCC); - CLogger.LogWarn("Remove game from file."); - Console.WriteLine("{0} will be removed from the list.", selectedGame.Title); - Console.ResetColor(); - RemoveGame(selectedGame); + SetFgColour(cols.errorCC, cols.errorLtCC); + CLogger.LogWarn("Remove game from file."); + Console.WriteLine("{0} will be removed from the list.", selectedGame.Title); + Console.ResetColor(); + RemoveGame(selectedGame); } else { - //string answer = InputPrompt(string.Format("{0} not found! Remove from list? [y/n] >>> ", selectedGame.Title), cols); - //ClearInputLine(cols); - SetFgColour(cols.inputCC, cols.inputLtCC); - Console.Write("{0} not found! Remove from list? [y/n] >>> ", selectedGame.Title); - string answer = Console.ReadLine(); - if (answer[0] == 'Y' || answer[0] == 'y') - { - CLogger.LogWarn("Remove game from file."); - RemoveGame(selectedGame); - } - Console.ResetColor(); - } - } + //string answer = InputPrompt(string.Format("{0} not found! Remove from list? [y/n] >>> ", selectedGame.Title), cols); + //ClearInputLine(cols); + SetFgColour(cols.inputCC, cols.inputLtCC); + Console.Write("{0} not found! Remove from list? [y/n] >>> ", selectedGame.Title); + string answer = Console.ReadLine(); + if (answer[0] == 'Y' || answer[0] == 'y') + { + CLogger.LogWarn("Remove game from file."); + RemoveGame(selectedGame); + } + Console.ResetColor(); + } + } #else // DEBUG MODE // Make sure we've written to configuration file *before* this point, as we're setting overrides to CConfig.config below @@ -1150,7 +1152,7 @@ from part in newTags.Split('|') if (cfgv.imageBorder) { CConsoleImage.ShowImageBorder(sizeImage, locImage, IMG_BORDER_X_CUSHION, IMG_BORDER_Y_CUSHION); - CConsoleImage.ShowImage(m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, sizeImage, locImage, CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light ? cols.bgLtCC : cols.bgCC); + CConsoleImage.ShowImage(m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, sizeImage, locImage, CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light ? cols.bgLtCC : cols.bgCC); int ww = Console.WindowWidth; int y = 10; if (ww > 62) @@ -1161,7 +1163,7 @@ from part in newTags.Split('|') Console.SetCursorPosition(ww, y); } else - CConsoleImage.ShowImage(m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, sizeImage, locImage, CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light ? cols.bgLtCC : cols.bgCC); + CConsoleImage.ShowImage(m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, sizeImage, locImage, CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light ? cols.bgLtCC : cols.bgCC); } Console.ReadLine(); #endif @@ -1176,7 +1178,7 @@ from part in newTags.Split('|') else { RemoveGame(selectedGame); - platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), false); + platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), bFirstScan: false); m_nCurrentSelection--; if (GetPlatformGameList((GamePlatform)m_nSelectedPlatform).ToList().Count < 1) m_nSelectedPlatform = -1; @@ -1214,14 +1216,14 @@ private void MenuSwitchboard(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, if ((bool)CConfig.GetConfigBool(CConfig.CFG_USEALL)) m_nSelectedPlatform = (int)GamePlatform.All; else if (!(platformList.Contains(GetPlatformString(GamePlatform.Favourites))) && - platformList.Count < 3) // if there's only one platform + All, then choose All + platformList.Count < 3) // if there's only one platform + All, then choose All { CLogger.LogDebug("Only one valid platform found."); m_nSelectedPlatform = (int)GamePlatform.All; } } - if (setup) // show setting menu + if (setup) // show setting menu { ushort oldImgSize = cfgv.imageSize; cfgv.imageSize = 0; @@ -1244,7 +1246,7 @@ private void MenuSwitchboard(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, m_nSelectedPlatform = -1; setup = false; } - else if (browse && OperatingSystem.IsWindows()) // show filesystem browser + else if (browse && OperatingSystem.IsWindows()) // show filesystem browser { string oldPath = path; ushort oldImgSize = cfgv.imageSize; @@ -1301,9 +1303,9 @@ private void MenuSwitchboard(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, browse = false; } } - else if (m_nSelectedPlatform < 0) // show main menu (platform list) + else if (m_nSelectedPlatform < 0) // show main menu (platform list) nSelectionCode = m_dockConsole.DisplayMenu(cfgv, keys, cols, ref gameSearch, platformList.ToArray()); - else if (m_nSelectedGame < 0) // show game list + else if (m_nSelectedGame < 0) // show game list nSelectionCode = m_dockConsole.DisplayMenu(cfgv, keys, cols, ref gameSearch, GetPlatformTitles((GamePlatform)m_nSelectedPlatform).ToArray()); } @@ -1568,7 +1570,7 @@ private bool StartGame(CGame game) case GamePlatform.Plarium: PlatformPlarium.StartGame(game); break; - case GamePlatform.Twitch: // deprecated, never implemented + case GamePlatform.Twitch: // deprecated, never implemented break; case GamePlatform.Wargaming: PlatformWargaming.StartGame(game); @@ -1576,7 +1578,7 @@ private bool StartGame(CGame game) case GamePlatform.IGClient: PlatformIGClient.StartGame(game); break; - case GamePlatform.Microsoft: // TODO? + case GamePlatform.Microsoft: // TODO? PlatformMicrosoft.StartGame(game); break; case GamePlatform.Oculus: @@ -1588,16 +1590,16 @@ private bool StartGame(CGame game) case GamePlatform.Riot: PlatformRiot.StartGame(game); break; - case GamePlatform.GameJolt: - PlatformGameJolt.StartGame(game); - break; - case GamePlatform.Humble: - PlatformHumble.StartGame(game); - break; - case GamePlatform.RobotCache: - PlatformRobotCache.StartGame(game); - break; - default: + case GamePlatform.GameJolt: + PlatformGameJolt.StartGame(game); + break; + case GamePlatform.Humble: + PlatformHumble.StartGame(game); + break; + case GamePlatform.RobotCache: + PlatformRobotCache.StartGame(game); + break; + default: CLogger.LogInfo($"Launch: {game.Launch}"); if (OperatingSystem.IsWindows()) _ = StartShellExecute(game.Launch); @@ -1988,10 +1990,10 @@ public static string InputPassword(string prompt, CConfig.Colours cols) if (inp.Key == ConsoleKey.Enter) break; else if (inp.Key == ConsoleKey.Escape) - { + { pwd = ""; break; - } + } else if (inp.Key == ConsoleKey.Backspace) { if (pwd.Length > 0) @@ -2031,11 +2033,11 @@ public static void ClearInputLine(CConfig.Colours cols) } } - /// - /// Clear image with appropriate light or dark mode - /// - [SupportedOSPlatform("windows")] - public static void ClearColour(ConsoleColor bgDark, ConsoleColor bgLight) + /// + /// Clear image with appropriate light or dark mode + /// + [SupportedOSPlatform("windows")] + public static void ClearColour(ConsoleColor bgDark, ConsoleColor bgLight) { if (CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light && bgLight > (ConsoleColor)(-1)) CConsoleImage.ClearImage(sizeImage, locImage, bgLight); @@ -2059,7 +2061,7 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s CLogger.LogInfo($"Parent process: {parentName}"); /* if (parentName.Equals("explorer") && !(bool)CConfig.GetConfigBool(CConfig.CFG_USECMD)) - { + { MessageBox.Show("ERROR: Interactive mode is disabled."); // Show usage hint in Message Box? Or just pause before closing? } else @@ -2092,8 +2094,8 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s } else if (!((bool)CConfig.GetConfigBool(CConfig.CFG_USECMD))) { - if (parentName.Equals("tcc") && // many keys won't work with combination of ConEmu64 + Take Command (tcc) - parentParentName.Equals("ConEmuC64")) // (though tcc is fine otherwise) + if (parentName.Equals("tcc") && // many keys won't work with combination of ConEmu64 + Take Command (tcc) + parentParentName.Equals("ConEmuC64")) // (though tcc is fine otherwise) { if (!(bool)CConfig.GetConfigBool(CConfig.CFG_USECMD) || (!cfgv.typingInput && @@ -2110,7 +2112,7 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s } } - else if (parentParentName.Equals("FireCMD")) // Displays menus, but colours aren't displayed, making navigation mode nigh useless + else if (parentParentName.Equals("FireCMD")) // Displays menus, but colours aren't displayed, making navigation mode nigh useless { if (!(bool)CConfig.GetConfigBool(CConfig.CFG_USETYPE)) { @@ -2152,13 +2154,13 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s { // check for known non-conhost terminal hosts (images not supported) if (((ushort)CConfig.GetConfigNum(CConfig.CFG_IMGSIZE) > 0 || (ushort)CConfig.GetConfigNum(CConfig.CFG_ICONSIZE) > 0) && - (parentParentName.Equals("WindowsTerminal") || // Windows Terminal - parentParentName.StartsWith("ServiceHub.Host.CLR") || // Visual Studio - parentParentName.Equals("Code") || // Visual Studio Code - parentParentName.Equals("Hyper") || // Hyper - parentParentName.Equals("tcmd") || // Take Command - parentParentName.Equals("bash") || // Cygwin Terminal (mintty), though this one may give false negatives (MSYS in - parentParentName.Equals("Console"))) // Console2 or ConsoleZ + (parentParentName.Equals("WindowsTerminal") || // Windows Terminal + parentParentName.StartsWith("ServiceHub.Host.CLR") || // Visual Studio + parentParentName.Equals("Code") || // Visual Studio Code + parentParentName.Equals("Hyper") || // Hyper + parentParentName.Equals("tcmd") || // Take Command + parentParentName.Equals("bash") || // Cygwin Terminal (mintty), though this one may give false negatives (MSYS in + parentParentName.Equals("Console"))) // Console2 or ConsoleZ { //TODO: Show this warning only once? @@ -2179,7 +2181,7 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s /* CConsoleImage.CONSOLE_FONT_INFO_EX currentFont = new CConsoleImage.CONSOLE_FONT_INFO_EX(); - CConsoleImage.GetCurrentConsoleFontEx(CConsoleImage.GetStdHandle(CConsoleImage.STD_OUTPUT_HANDLE), false, currentFont); + CConsoleImage.GetCurrentConsoleFontEx(CConsoleImage.GetStdHandle(CConsoleImage.STD_OUTPUT_HANDLE), bMaximumWindow: false, currentFont); if (currentFont.FaceName.Equals("Terminal")) { //SetFgColour(cols.errorCC, cols.errorLtCC); @@ -2199,7 +2201,7 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s } public static bool DownloadCustomImage(string title, string url, bool overwrite = false) - { + { if (!string.IsNullOrEmpty(url)) { string ext = Path.GetExtension(url); @@ -2209,7 +2211,7 @@ public static bool DownloadCustomImage(string title, string url, bool overwrite string.Concat(title.Split(Path.GetInvalidFileNameChars())) + ext); if (overwrite) - BackupCustomImage(title, false); + BackupCustomImage(title, restore: false); if (!File.Exists(iconFile)) { @@ -2234,18 +2236,18 @@ public static bool DownloadCustomImage(string title, string url, bool overwrite if (File.Exists(iconFile)) { if (overwrite) - DeleteCustomImage(title, true); + DeleteCustomImage(title, justBackups: true); return true; } else if (overwrite) - BackupCustomImage(title, true); + BackupCustomImage(title, restore: true); } } return false; } public static void DeleteCustomImage(string title, bool justBackups = false) - { + { foreach (string ext in supportedImages) { string iconFile = Path.Combine(currentPath, IMAGE_FOLDER_NAME, @@ -2290,7 +2292,7 @@ public static void BackupCustomImage(string title, bool restore = false) if (File.Exists(iconFileBak)) { CLogger.LogDebug("Restoring \"{0}\"", iconFile); - File.Move(iconFileBak, iconFile, true); + File.Move(iconFileBak, iconFile, overwrite: true); } break; } @@ -2299,7 +2301,7 @@ public static void BackupCustomImage(string title, bool restore = false) if (File.Exists(iconFile)) { CLogger.LogDebug("Backing up \"{0}\"", iconFile); - File.Move(iconFile, iconFileBak, true); + File.Move(iconFile, iconFileBak, overwrite: true); } } } @@ -2313,10 +2315,10 @@ public static void BackupCustomImage(string title, bool restore = false) [SupportedOSPlatform("windows")] public static Guid GetGuid() { - using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, - RegistryView.Registry64).OpenSubKey("SOFTWARE\\Microsoft\\Cryptography", RegistryKeyPermissionCheck.ReadSubTree); // HKLM64 - return Guid.Parse((string)key.GetValue("MachineGuid")); - } + using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, + RegistryView.Registry64).OpenSubKey("SOFTWARE\\Microsoft\\Cryptography", RegistryKeyPermissionCheck.ReadSubTree); // HKLM64 + return Guid.Parse((string)key.GetValue("MachineGuid")); + } [SupportedOSPlatform("windows")] public static Process StartShellExecute(string file) @@ -2458,9 +2460,9 @@ internal class StartupInfo public short wShowWindow; public short cbReserved2; public IntPtr lpReserved2 = IntPtr.Zero; - public SafeFileHandle hStdInput = new(IntPtr.Zero, false); - public SafeFileHandle hStdOutput = new(IntPtr.Zero, false); - public SafeFileHandle hStdError = new(IntPtr.Zero, false); + public SafeFileHandle hStdInput = new(IntPtr.Zero, ownsHandle: false); + public SafeFileHandle hStdOutput = new(IntPtr.Zero, ownsHandle: false); + public SafeFileHandle hStdError = new(IntPtr.Zero, ownsHandle: false); public StartupInfo() { @@ -2495,7 +2497,7 @@ public void Dispose() internal class SecurityAttributes { public int nLength = 12; - public SafeLocalMemHandle lpSecurityDescriptor = new SafeLocalMemHandle(IntPtr.Zero, false); + public SafeLocalMemHandle lpSecurityDescriptor = new SafeLocalMemHandle(IntPtr.Zero, ownsHandle: false); public bool bInheritHandle; } @@ -2528,7 +2530,7 @@ protected override bool ReleaseHandle() /// A utility class to minimise/restore/maximise windows. /// public struct WindowMessage - { + { public const int SW_HIDE = 0; public const int SW_NORMAL = 1; public const int SW_SHOWMINIMIZED = 2; @@ -2580,7 +2582,7 @@ public static bool Add(string inPath, bool allUsers) } else { - envKey = Registry.CurrentUser.OpenSubKey("Environment", true); + envKey = Registry.CurrentUser.OpenSubKey("Environment", writable: true); string profile = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); if (inPath.Length > profile.Length && inPath.Substring(0, profile.Length).Equals(profile)) diff --git a/GameLauncher_Console/GameLauncher_Console/Extensions.cs b/GameLauncher_Console/GameLauncher_Console/Extensions.cs index 3854fdd..116c25a 100644 --- a/GameLauncher_Console/GameLauncher_Console/Extensions.cs +++ b/GameLauncher_Console/GameLauncher_Console/Extensions.cs @@ -89,7 +89,7 @@ public static string GetDescription(this T source) FieldInfo field = source.GetType().GetField(source.ToString()); DescriptionAttribute[] attr = (DescriptionAttribute[])field.GetCustomAttributes( - typeof(DescriptionAttribute), false); + typeof(DescriptionAttribute), inherit: false); if (attr != null && attr.Length > 0) return attr[0].Description; } diff --git a/GameLauncher_Console/GameLauncher_Console/GameData.cs b/GameLauncher_Console/GameLauncher_Console/GameData.cs index 8d97785..756f324 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameData.cs +++ b/GameLauncher_Console/GameLauncher_Console/GameData.cs @@ -78,17 +78,17 @@ public enum GamePlatform Legacy = 26, [Description("Riot Client")] Riot = 27, - [Description("Game Jolt Client")] - GameJolt = 28, - [Description("Humble App")] - Humble = 29, - [Description("RobotCache")] - RobotCache = 30, - //[Description("Miscellaneous")] - //Misc = 31, - } - - public enum Match + [Description("Game Jolt Client")] + GameJolt = 28, + [Description("Humble App")] + Humble = 29, + [Description("RobotCache")] + RobotCache = 30, + //[Description("Miscellaneous")] + //Misc = 31, + } + + public enum Match { [Description("No matches found")] NoMatches = 0, @@ -109,11 +109,11 @@ public enum Match } public struct Sorter - { + { public CConsoleHelper.SortMethod method; public string columnName; public bool isAscending; - } + } public static readonly List _articles = new() { @@ -127,7 +127,7 @@ public struct Sorter "Der", "Das", //, "Die" [English word] // German definite "Ein", "Eine" // German indefinite */ - }; + }; /// /// Collect data from the registry or filesystem @@ -174,7 +174,7 @@ public ImportGameData(string strPlatform, GameData gameData) m_bFavourite = bFavourite; m_bHidden = bHidden; m_tags = tags ?? new List(); - m_dateLastRun = dateLastRun; + m_dateLastRun = dateLastRun; m_rating = rating; m_numRuns = numRuns; */ @@ -465,9 +465,9 @@ from part in tags.Split('|') } public void ClearTags() - { + { m_tags = new List(); - } + } /// /// LastRunDate getter @@ -498,7 +498,7 @@ public ushort Rating return m_rating; } set - { + { if (value >= 0 && value <= 5) m_rating = value; } @@ -657,7 +657,7 @@ public void InsertGame(string strID, string strTitle, string strLaunch, string s { GamePlatform platformEnum; // If platform is incorrect or unsupported, default to unknown. - //if (!Enum.TryParse(strPlatform, true, out GamePlatform platformEnum)) + //if (!Enum.TryParse(strPlatform, ignoreCase: true, out GamePlatform platformEnum)) platformEnum = (GamePlatform)GetPlatformEnum(strPlatform); if (platformEnum < 0) platformEnum = GamePlatform.Unknown; @@ -817,7 +817,7 @@ public static int GetPlatformEnum(string strPlatformName) { CLogger.LogError(e); } - if (Enum.TryParse(strPlatformName, true, out GamePlatform platformEnum)) + if (Enum.TryParse(strPlatformName, ignoreCase: true, out GamePlatform platformEnum)) return (int)platformEnum; return -1; } @@ -841,7 +841,7 @@ public static int GetPlatformEnum(string strPlatformName, bool bStripStr) public static Dictionary GetPlatforms() { Dictionary platformDict = new() - { + { { GetPlatformString(GamePlatform.Search), m_searchResults.Count }, { GetPlatformString(GamePlatform.Favourites), m_favourites.Count }, { GetPlatformString(GamePlatform.New), m_newGames.Count }, @@ -980,7 +980,7 @@ public static void AddGame(string strID, string strTitle, string strLaunch, stri { GamePlatform platformEnum; // If platform is incorrect or unsupported, default to unknown. - //if (!Enum.TryParse(strPlatform, true, out GamePlatform platformEnum)) + //if (!Enum.TryParse(strPlatform, ignoreCase: true, out GamePlatform platformEnum)) platformEnum = (GamePlatform)GetPlatformEnum(strPlatform); if (platformEnum < 0) platformEnum = GamePlatform.Unknown; @@ -1170,7 +1170,7 @@ public static void RemoveGame(CGame game) } public static void ClearNewGames() - { + { m_newGames.Clear(); foreach (CGame game in m_allGames) { @@ -1245,11 +1245,11 @@ public static void SortGames(CConsoleHelper.SortMethod sortMethod, bool faveSort SortGameSet(ref temp, sortMethod, faveSort, instSort, ignoreArticle); m_gameDictionary[pair.Key] = temp; } - SortGameSet(ref m_favourites, sortMethod, false, instSort, ignoreArticle); + SortGameSet(ref m_favourites, sortMethod, faveSort: false, instSort, ignoreArticle); SortGameSet(ref m_newGames, sortMethod, faveSort, instSort, ignoreArticle); SortGameSet(ref m_allGames, sortMethod, faveSort, instSort, ignoreArticle); SortGameSet(ref m_hidden, sortMethod, faveSort, instSort, ignoreArticle); - SortGameSet(ref m_notInstalled, sortMethod, faveSort, false, ignoreArticle); + SortGameSet(ref m_notInstalled, sortMethod, faveSort, instSort: false, ignoreArticle); } /// @@ -1362,7 +1362,7 @@ public static string GetDescription(this T source) FieldInfo field = source.GetType().GetField(source.ToString()); DescriptionAttribute[] attr = (DescriptionAttribute[])field.GetCustomAttributes( - typeof(DescriptionAttribute), false); + typeof(DescriptionAttribute), inherit: false); if (attr != null && attr.Length > 0) return attr[0].Description; } @@ -1410,36 +1410,36 @@ public static string GetAlias(string title) return alias; } - /// - /// Remove Unicode characters from a string - /// - /// A string - /// simplified string - public static string StripUnicode(string s) - { - StringBuilder sb = new(s.Length); - foreach (char c in s) - { - if (c >= 127) - continue; - if (c < 32) - continue; - if (c == '%') - continue; - if (c == '?') - continue; - sb.Append(c); - } - - return sb.ToString(); - } - - /// - /// Return set of games from a fuzzy match - /// - /// dictionary of titles with confidence levels - /// String to match - public static Dictionary FindMatchingTitles(string match) + /// + /// Remove Unicode characters from a string + /// + /// A string + /// simplified string + public static string StripUnicode(string s) + { + StringBuilder sb = new(s.Length); + foreach (char c in s) + { + if (c >= 127) + continue; + if (c < 32) + continue; + if (c == '%') + continue; + if (c == '?') + continue; + sb.Append(c); + } + + return sb.ToString(); + } + + /// + /// Return set of games from a fuzzy match + /// + /// dictionary of titles with confidence levels + /// String to match + public static Dictionary FindMatchingTitles(string match) { return FindMatchingTitles(match, 0); } @@ -1477,7 +1477,7 @@ public static Dictionary FindMatchingTitles(string match, int max) { i++; m_searchResults.Add(game); - outDict.Add(game.Title, (int)Match.ExactTitle); // full confidence + outDict.Add(game.Title, (int)Match.ExactTitle); // full confidence if (max > 0 && i >= max) break; } else if (game.Alias.Equals(match) || @@ -1485,7 +1485,7 @@ public static Dictionary FindMatchingTitles(string match, int max) { i++; m_searchResults.Add(game); - outDict.Add(game.Title, (int)Match.ExactAlias); // very high confidence + outDict.Add(game.Title, (int)Match.ExactAlias); // very high confidence if (max > 0 && i >= max) break; } else if (shortTitle.StartsWith(match) || @@ -1493,14 +1493,14 @@ public static Dictionary FindMatchingTitles(string match, int max) { i++; m_searchResults.Add(game); - outDict.Add(game.Title, (int)Match.BeginTitle); // medium confidence + outDict.Add(game.Title, (int)Match.BeginTitle); // medium confidence if (max > 0 && i >= max) break; } else if (game.Alias.StartsWith(match)) { i++; m_searchResults.Add(game); - outDict.Add(game.Title, (int)Match.BeginAlias); // medium confidence + outDict.Add(game.Title, (int)Match.BeginAlias); // medium confidence if (max > 0 && i >= max) break; } else if ((fullTitle.Contains("- ") && diff --git a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs index 96d01d0..d5ee6bb 100644 --- a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs +++ b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs @@ -188,8 +188,7 @@ public static bool ImportFromJSON(CPlatform platforms, out List matches) if (nGameCount < 1) { CLogger.LogInfo("{0} is empty, corrupt, or outdated. Scanning for games...", _game_json_file); - Console.Write("Scanning for games"); // ScanGames() will add dots for each platform - platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), true); + platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), bFirstScan: true); } return !parseError; @@ -584,7 +583,7 @@ private static bool TranslateConfig(ref CConfig.Hotkeys hotkeys, ref CConfig.Col CLogger.LogError(e); Console.WriteLine($"ERROR: Bad colour value. Resetting defaults..."); parseError = true; - SetConfigDefaults(false, false, false, false, false, true, false, false); + SetConfigDefaults(forceAll: false, boolOnly: false, listOnly: false, numOnly: false, longOnly: false, colourOnly: true, keyOnly: false, textOnly: false); } try { @@ -664,7 +663,7 @@ private static bool TranslateConfig(ref CConfig.Hotkeys hotkeys, ref CConfig.Col CLogger.LogError(e); Console.WriteLine($"ERROR: Bad hotkey value. Resetting defaults..."); parseError = true; - SetConfigDefaults(false, false, false, false, false, false, true, false); + SetConfigDefaults(forceAll: false, boolOnly: false, listOnly: false, numOnly: false, longOnly: false, colourOnly: false, keyOnly: true, textOnly: false); } return !parseError; } @@ -983,7 +982,7 @@ private static void SetConfigDefaults(bool forceAll, bool boolOnly, bool listOnl /// private static void SetConfigDefaults(bool forceAll) { - SetConfigDefaults(forceAll, false, false, false, false, false, false, false); + SetConfigDefaults(forceAll, boolOnly: false, listOnly: false, numOnly: false, longOnly: false, colourOnly: false, keyOnly: false, textOnly: false); } /// diff --git a/GameLauncher_Console/GameLauncher_Console/Logger.cs b/GameLauncher_Console/GameLauncher_Console/Logger.cs index 1885666..4081a9b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Logger.cs +++ b/GameLauncher_Console/GameLauncher_Console/Logger.cs @@ -48,7 +48,7 @@ public static void Configure(string strPathToLog) m_strFilePath = strPathToLog; try { - using StreamWriter writer = new(m_strFilePath, true); + using StreamWriter writer = new(m_strFilePath, append: true); writer.WriteLine("_____S_T_A_R_T_E_D_____"); writer.Close(); } @@ -59,7 +59,7 @@ public static void Configure(string strPathToLog) // Try to create a file and write the starting line try { - using StreamWriter writer = new(strPathToLog, true); + using StreamWriter writer = new(strPathToLog, append: true); writer.WriteLine("_____S_T_A_R_T_E_D_____"); writer.Close(); } @@ -110,7 +110,7 @@ public static void LogInfo(string strMessage, params object[] list) try { - using StreamWriter writer = new(m_strFilePath, true); + using StreamWriter writer = new(m_strFilePath, append: true); string strDateTime = DateTime.Now.ToString(); string msg = string.Format(strMessage, list); string line = string.Format("{0} : {1}", strDateTime, msg); @@ -148,7 +148,7 @@ public static void LogError(Exception ex, string strMessage = null) try { - using StreamWriter writer = new(m_strFilePath, true); + using StreamWriter writer = new(m_strFilePath, append: true); string strDateTime = DateTime.Now.ToString(); string msg = string.Format("ERROR: {0} | {1} {2} | {3}", ex.Message, ex.Source, ex.StackTrace, strMessage ?? ""); string line = string.Format("{0} : {1}", strDateTime, msg); @@ -172,7 +172,7 @@ private static void LogFatal(Exception ex) try { - using StreamWriter writer = new(m_strFilePath, true); + using StreamWriter writer = new(m_strFilePath, append: true); string strDateTime = DateTime.Now.ToString(); string msg = string.Format("FATAL ERROR: {0} | {1} {2}", ex.Message, ex.Source, ex.StackTrace); string line = string.Format("{0} : {1}", strDateTime, msg); diff --git a/GameLauncher_Console/GameLauncher_Console/Platform.cs b/GameLauncher_Console/GameLauncher_Console/Platform.cs index bc5c433..f0b5898 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platform.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platform.cs @@ -174,9 +174,9 @@ public string Description /// Container for a single platform /// public struct PlatformObject - { + { public PlatformObject(int platformID, string name, int gameCount, string description) - { + { PlatformID = platformID; Name = name; GameCount = gameCount; @@ -209,9 +209,9 @@ public CPlatform() } public void AddSupportedPlatform(IPlatform platform) - { + { _platforms.Add(platform); - } + } /// /// Scan the registry and filesystem for games, add new games to memory and export into JSON document @@ -252,13 +252,13 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) { tempGameSet.InsertGame(data.m_gameData.GameId, data.m_gameData.GameName, - data.m_gameData.Launch == default ? data.m_gameData.LaunchUrl : (string.IsNullOrEmpty(data.m_gameData.LaunchArgs) ? data.m_gameData.Launch.GetFullPath() : data.m_gameData.Launch.GetFullPath() + " " + data.m_gameData.LaunchArgs), + data.m_gameData.Launch == default ? data.m_gameData.LaunchUrl : (string.IsNullOrEmpty(data.m_gameData.LaunchArgs) ? data.m_gameData.Launch.GetFullPath() : data.m_gameData.Launch.GetFullPath() + " " + data.m_gameData.LaunchArgs), data.m_gameData.LaunchUrl, data.m_gameData.Icon == default ? "" : data.m_gameData.Icon.GetFullPath(), data.m_gameData.Metadata == default ? "" : data.m_gameData.Metadata.TryGetValue("IconUrl", out var urls) && urls.Count > 0 ? urls[0] : (data.m_gameData.Metadata.TryGetValue("ImageUrl", out urls) && urls.Count > 0 ? urls[0] : ""), data.m_gameData.Uninstall == default ? data.m_gameData.UninstallUrl : (string.IsNullOrEmpty(data.m_gameData.UninstallArgs) ? data.m_gameData.Uninstall.GetFullPath() : data.m_gameData.Uninstall.GetFullPath() + " " + data.m_gameData.UninstallArgs), data.m_gameData.IsInstalled, - false, true, false, + bIsFavourite: false, bIsNew: true, bIsHidden: false, GetAlias(data.m_gameData.GameName), data.m_strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); @@ -274,12 +274,12 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) // Console.Write("."); CLogger.LogInfo("Looking for {0}...", GetPlatformString(GamePlatform.Custom)); - + PlatformCustom custom = new(); custom.GetGames(ref tempGameSet); MergeGameSets(tempGameSet); if (bFirstScan) - SortGames((int)CConsoleHelper.SortMethod.cSort_Alpha, false, (bool)CConfig.GetConfigBool(CConfig.CFG_USEINST), true); + SortGames((int)CConsoleHelper.SortMethod.cSort_Alpha, faveSort: false, (bool)CConfig.GetConfigBool(CConfig.CFG_USEINST), ignoreArticle: true); CLogger.LogDebug("-----------------------"); ExportGames(GetPlatformGameList(GamePlatform.All).ToList()); Console.SetCursorPosition(0, Console.CursorTop); @@ -337,18 +337,18 @@ public void DownloadAllImages(bool bFirstScan = false) /// /// List of PlatformObjects public static DictionaryGetPlatforms() - { + { Dictionary platforms = new(); m_qryRead.MakeFieldsNull(); if(m_qryRead.Select() == SQLiteErrorCode.Ok) - { + { do { platforms[m_qryRead.Name] = new PlatformObject(m_qryRead); } while(m_qryRead.Fetch()); - } + } return platforms; - } + } /// /// Insert specified platform into the database @@ -356,12 +356,12 @@ public static DictionaryGetPlatforms() /// The PlatformObject to insert /// True on insert success, otherwise false public static bool InsertPlatform(PlatformObject platform) - { + { m_qryWrite.MakeFieldsNull(); m_qryWrite.Name = platform.Name; m_qryWrite.Description = platform.Description; return m_qryWrite.Insert() == SQLiteErrorCode.Ok; - } + } /// /// Insert specified platform into the database @@ -383,7 +383,7 @@ public static bool InsertPlatform(string title, string description) /// The PlatformObject to write /// True on update success, otherwise false public static bool UpdatePlatform(PlatformObject platform) - { + { m_qryWrite.MakeFieldsNull(); m_qryWrite.PlatformID = platform.PlatformID; m_qryWrite.Name = platform.Name; @@ -397,10 +397,10 @@ public static bool UpdatePlatform(PlatformObject platform) /// The platformID to delete /// True on delete success, otherwise false public static bool RemovePlatform(int platformID) - { + { m_qryWrite.MakeFieldsNull(); m_qryWrite.PlatformID = platformID; return m_qryWrite.Delete() == SQLiteErrorCode.Ok; } - } + } } \ No newline at end of file diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs index 7e5cb37..b43e557 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs @@ -48,7 +48,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) _ = CDock.StartShellExecute(START_GAME + GetGameID(game.ID)); else diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs index d1bb1a8..12078d7 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs @@ -50,7 +50,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs index 45a4b1b..4121744 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs @@ -48,7 +48,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs index 859b36d..5251c0c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs @@ -51,7 +51,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs index 986f03f..2014548 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs @@ -60,7 +60,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs index 4b37f23..40a579e 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs @@ -88,7 +88,7 @@ private static void FindCustomLinkFiles(ref CTempGameSet tempGameSet) string strAlias = GetAlias(strTitle); if (strAlias.Equals(strTitle, CDock.IGNORE_CASE)) strAlias = ""; - tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, bIsInstalled: true, bIsFavourite: false, bIsNew: true, bIsHidden: false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); } } } @@ -115,7 +115,7 @@ private static void FindCustomBinaries(ref CTempGameSet tempGameSet) string strAlias = GetAlias(strTitle); if (strAlias.Equals(strTitle, CDock.IGNORE_CASE)) strAlias = ""; - tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, bIsInstalled: true, bIsFavourite: false, bIsNew: true, bIsHidden: false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); } } } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index 3af682c..cbe6836 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -88,7 +88,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); /* if (OperatingSystem.IsWindows()) @@ -240,7 +240,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } if (string.IsNullOrEmpty(strTitle)) { - TextInfo ti = new CultureInfo("en-US", false).TextInfo; + TextInfo ti = new CultureInfo("en-US", useUserOverride: false).TextInfo; strTitle = ti.ToTitleCase(slug.Replace("-", " ")); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index 03dc767..ca389b5 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -54,7 +54,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); //bool useEGL = (bool)CConfig.GetConfigBool(CConfig.CFG_USEEGL); bool useLeg = (bool)CConfig.GetConfigBool(CConfig.CFG_USELEG); string pathLeg = CConfig.GetConfigString(CConfig.CFG_PATHLEG); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index 708f906..807ff32 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -72,7 +72,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) _ = CDock.StartShellExecute(INSTALL_GAME + GetGameID(game.ID)); else diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs index 21c1158..d6dbc3c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs @@ -63,7 +63,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) { try diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs index 31d9874..78a4324 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs @@ -60,7 +60,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs index 779ceea..613be73 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs @@ -65,7 +65,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) { try diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs index be9159f..2f6ef15 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs @@ -61,7 +61,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index 89437ff..2bf5d4d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -46,7 +46,7 @@ public class PlatformMicrosoft : IPlatform [SupportedOSPlatform("windows")] public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs index 6083081..a73f1fb 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs @@ -49,7 +49,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs index ce8338b..1810e8d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs @@ -56,7 +56,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs index f5250c6..db76da6 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs @@ -44,7 +44,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs index 03733e6..caae658 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs @@ -43,7 +43,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs index 984158c..7980f26 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs @@ -38,7 +38,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs index 55ddce8..d8b6fd0 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs @@ -44,7 +44,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 8dd6fd3..91fb279 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -59,7 +59,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) _ = CDock.StartShellExecute(INSTALL_GAME + GetGameID(game.ID)); else diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs index b3c9e1f..baf28a5 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs @@ -46,7 +46,7 @@ public static int InstallGame(CGame game) // Some games don't provide a valid ID if (game.ID.StartsWith(UPLAY_PREFIX)) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) CDock.StartShellExecute(START_GAME + GetGameID(game.ID)); else diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs index b49cb03..b463a9c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs @@ -41,7 +41,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/SqlDB.cs b/GameLauncher_Console/GameLauncher_Console/SqlDB.cs index c9197ac..ff3f13b 100644 --- a/GameLauncher_Console/GameLauncher_Console/SqlDB.cs +++ b/GameLauncher_Console/GameLauncher_Console/SqlDB.cs @@ -518,14 +518,14 @@ protected virtual string PrepareAdvancedWhereStatement() //while(-1 < vMask && vMask < whereCondition.Length) while(true) { - fMask = whereCondition.IndexOf(M_FIELD_MASK, fMask, false); + fMask = whereCondition.IndexOf(M_FIELD_MASK, fMask, ignoreCase: false); if(fMask == -1) { break; } whereCondition.Replace(M_FIELD_MASK, m_sqlRow[columnIndex].Column, fMask, 1); - vMask = whereCondition.IndexOf(M_VALUE_MASK, fMask, false); + vMask = whereCondition.IndexOf(M_VALUE_MASK, fMask, ignoreCase: false); if (vMask == -1) { break; From 350fa12e5858108fbecbfe5e30e8e0530a38ab4e Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Thu, 15 Feb 2024 23:45:02 -0800 Subject: [PATCH 07/21] Update GameCollector to 4.2.0.5 --- .../GameLauncher_Console.csproj | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index 3e16277..56fad3f 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -155,25 +155,25 @@ @@ -185,7 +185,7 @@ - + From dfdcd29efd0dcc6237a23557f46ee9cbb42d4800 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Fri, 16 Feb 2024 00:33:34 -0800 Subject: [PATCH 08/21] Don't include DLC --- .../GameLauncher_Console/Platforms/Amazon.cs | 7 +++-- .../GameLauncher_Console/Platforms/Arc.cs | 7 +++-- .../Platforms/Battlenet.cs | 7 +++-- .../Platforms/Bethesda.cs | 7 +++-- .../GameLauncher_Console/Platforms/BigFish.cs | 7 +++-- .../GameLauncher_Console/Platforms/EA.cs | 7 +++-- .../GameLauncher_Console/Platforms/Epic.cs | 7 +++-- .../GameLauncher_Console/Platforms/GOG.cs | 7 +++-- .../Platforms/GameJolt.cs | 7 +++-- .../GameLauncher_Console/Platforms/Humble.cs | 7 +++-- .../Platforms/IGClient.cs | 13 ++++++--- .../GameLauncher_Console/Platforms/Itch.cs | 13 ++++++--- .../GameLauncher_Console/Platforms/Legacy.cs | 7 +++-- .../Platforms/Microsoft.cs | 7 +++-- .../GameLauncher_Console/Platforms/Oculus.cs | 7 +++-- .../GameLauncher_Console/Platforms/Paradox.cs | 9 ++++-- .../GameLauncher_Console/Platforms/Plarium.cs | 7 +++-- .../GameLauncher_Console/Platforms/Riot.cs | 7 +++-- .../Platforms/RobotCache.cs | 7 +++-- .../Platforms/Rockstar.cs | 7 +++-- .../GameLauncher_Console/Platforms/Steam.cs | 7 +++-- .../GameLauncher_Console/Platforms/Ubisoft.cs | 27 +++++++++-------- .../Platforms/Wargaming.cs | 29 ++++++++++--------- 23 files changed, 146 insertions(+), 71 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs index b43e557..dd23d58 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs @@ -111,8 +111,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs index 12078d7..a774311 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs @@ -74,8 +74,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs index 4121744..19b964a 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs @@ -72,8 +72,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs index 5251c0c..511cc94 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs @@ -82,8 +82,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs index 2014548..56850c7 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs @@ -84,8 +84,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index cbe6836..e362afb 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -118,8 +118,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index ca389b5..2a99e10 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -218,8 +218,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index 807ff32..db69229 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -122,8 +122,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs index 89eb8ca..22f332c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs @@ -90,8 +90,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs index d6dbc3c..3b8e706 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs @@ -109,8 +109,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs index 78a4324..5f73868 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using System.Text.Json; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; @@ -74,17 +75,21 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } + //[SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) - { + { string strPlatform = GetPlatformString(ENUM); - IGClientHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + IGClientHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); foreach (var game in handler.FindAllGames()) { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs index 613be73..e6a7084 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs @@ -7,6 +7,7 @@ using System.Data.SQLite; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CRegScanner; using static System.Environment; @@ -101,17 +102,21 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } + //[SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) - { + { string strPlatform = GetPlatformString(ENUM); - ItchHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + ItchHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); foreach (var game in handler.FindAllGames()) { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs index 2f6ef15..b452e6b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs @@ -85,8 +85,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index 2bf5d4d..538dee2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -69,8 +69,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs index a73f1fb..d0f0522 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs @@ -93,8 +93,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs index 1810e8d..8ca71d2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CRegScanner; using FileSystem = NexusMods.Paths.FileSystem; @@ -70,6 +71,7 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } + [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); @@ -79,8 +81,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs index db76da6..432e034 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs @@ -68,8 +68,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs index caae658..60a26c1 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs @@ -67,8 +67,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs index 7980f26..6017546 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs @@ -62,8 +62,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs index d8b6fd0..a4bfebc 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs @@ -68,8 +68,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 91fb279..320e6c0 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -86,8 +86,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs index baf28a5..d308c54 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs @@ -69,19 +69,22 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); - UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) - { - if (game.IsT0) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } - else - CLogger.LogWarn(game.AsT1.Message); - } + UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + } + else + CLogger.LogWarn(game.AsT1.Message); + } /* List keyList; diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs index b463a9c..b69d9bc 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs @@ -58,22 +58,25 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); - WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) - { - if (game.IsT0) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } - else - CLogger.LogWarn(game.AsT1.Message); - } + WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + } + else + CLogger.LogWarn(game.AsT1.Message); + } /* - Dictionary installDict = new(); + Dictionary installDict = new(); List keyList; */ /* From 86948ce40b5bfd5af15fc73337676498a8473b80 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Fri, 16 Feb 2024 00:35:17 -0800 Subject: [PATCH 09/21] Update GameCollector to 4.2.0.5 --- .../GameLauncher_Console.csproj | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index 6728471..1deefd1 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -132,25 +132,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -161,7 +161,7 @@ - + From 11a181c50da96b22967aaaf825cc72eab15dfdf0 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Tue, 5 Mar 2024 12:42:57 -0800 Subject: [PATCH 10/21] Add Steam API key Also move GetLogin() from EA platform to Dock so Steam can use it for the API key prompt --- .../GameLauncher_Console/App.config | 3 + .../GameLauncher_Console/Config.cs | 1 + .../GameLauncher_Console/Dock.cs | 89 +++++++++++- .../GameLauncher_Console/JsonWrapper.cs | 1 + .../GameLauncher_Console/Platforms/EA.cs | 129 ++++++------------ .../GameLauncher_Console/Platforms/Steam.cs | 5 +- .../Properties/Settings.Designer.cs | 14 +- .../Properties/Settings.settings | 3 + 8 files changed, 153 insertions(+), 92 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/App.config b/GameLauncher_Console/GameLauncher_Console/App.config index 98d3ba0..543f0fa 100644 --- a/GameLauncher_Console/GameLauncher_Console/App.config +++ b/GameLauncher_Console/GameLauncher_Console/App.config @@ -176,6 +176,9 @@ 0 + + + diff --git a/GameLauncher_Console/GameLauncher_Console/Config.cs b/GameLauncher_Console/GameLauncher_Console/Config.cs index 6eb446d..e0d86de 100644 --- a/GameLauncher_Console/GameLauncher_Console/Config.cs +++ b/GameLauncher_Console/GameLauncher_Console/Config.cs @@ -183,6 +183,7 @@ public struct Colours public const string CFG_IMGPOS = "num_selected_image_y_location_percent"; public const string CFG_COLSIZE = "num_grid_text_min_column_characters"; public const string CFG_STEAMID = "num_steam_id"; + public const string CFG_STEAMAPI = "text_steam_apikey"; public const string CFG_OCULUSID = "text_oculus_username"; public const string CFG_ORIGINID = "text_ea_email"; public const string CFG_ORIGINPW = "base64_ea_password"; diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index 32aa21d..241a7e9 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -16,6 +16,11 @@ //using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using System.Security.Cryptography; +using System.Security; + +using System.Text; + //using System.Security; //using System.Security.Permissions; //using System.Text; @@ -2312,7 +2317,89 @@ public static void BackupCustomImage(string title, bool restore = false) } } - [SupportedOSPlatform("windows")] +#nullable enable + public static bool GetPassword(string prompt, string config, out SecureString? password) + { + password = new(); + try + { + string? encrypted = CConfig.GetConfigString(config); + if (!string.IsNullOrEmpty(encrypted)) + { + Span byteSpan = Convert.FromBase64String(encrypted); + if (OperatingSystem.IsWindows()) + { + Array.ForEach(Encoding.UTF8.GetString(ProtectedData.Unprotect(byteSpan.ToArray(), null, DataProtectionScope.CurrentUser)).ToArray(), password.AppendChar); + } + else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password + Array.ForEach(Encoding.UTF8.GetString(byteSpan).ToArray(), password.AppendChar); + password.MakeReadOnly(); + } + + if (string.IsNullOrEmpty(encrypted)) + { + string? strPwd = InputPassword(prompt + " >>> ", new()); + if (!string.IsNullOrEmpty(strPwd)) + { + Span byteSpan = new(); + if (OperatingSystem.IsWindows()) + byteSpan = ProtectedData.Protect(Encoding.UTF8.GetBytes(strPwd), null, DataProtectionScope.CurrentUser); + else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password + byteSpan = Encoding.UTF8.GetBytes(strPwd); + password = new NetworkCredential("", strPwd).SecurePassword; + password.MakeReadOnly(); + encrypted = Convert.ToBase64String(byteSpan); + CConfig.SetConfigValue(config, encrypted); + byteSpan = null; + } + strPwd = null; + ClearInputLine(new()); + } + encrypted = null; + if (password.Length > 0) + return true; + } + catch (Exception e) + { + CLogger.LogError(e); + } + + return false; + } + + public static bool GetLogin(string prompt, string config, out string? input, bool email = false) + { + input = CConfig.GetConfigString(config); + try + { + if (string.IsNullOrEmpty(input)) + { + input = InputPrompt(prompt + " >>> ", new()); + ClearInputLine(new()); + } + + if (string.IsNullOrEmpty(input)) + CConfig.SetConfigValue(config, "skipped"); + else if (email && (!input.Contains('@') || !input.Contains('.'))) + CConfig.SetConfigValue(config, "invalid"); + else + { + CConfig.SetConfigValue(config, input); + ClearInputLine(new()); + } + if (!string.IsNullOrEmpty(input)) + return true; + } + catch (Exception e) + { + CLogger.LogError(e); + } + + return false; + } +#nullable disable + + [SupportedOSPlatform("windows")] public static Guid GetGuid() { using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, diff --git a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs index d5ee6bb..b8eac2f 100644 --- a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs +++ b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs @@ -1165,6 +1165,7 @@ private static void SetKeyDefaults(bool force) private static void SetTextDefaults(bool force) { SetDefaultVal(CConfig.CFG_PATHLEG, force); + SetDefaultVal(CConfig.CFG_STEAMAPI, force); SetDefaultVal(CConfig.CFG_OCULUSID, force); SetDefaultVal(CConfig.CFG_ORIGINID, force); SetDefaultVal(CConfig.CFG_ORIGINPW, force); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index e362afb..0da7c1c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -1,27 +1,26 @@ using GameFinder.RegistryUtils; using GameCollector.StoreHandlers.EADesktop; -using GameCollector.StoreHandlers.EADesktop.Crypto; using GameCollector.StoreHandlers.EADesktop.Crypto.Windows; using Logger; -using PureOrigin.API; -using SHA3.Net; +//using PureOrigin.API; +//using SHA3.Net; using System; -using System.Buffers; +//using System.Buffers; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; +//using System.Globalization; using System.IO; -using System.Linq; -using System.Management; -using System.Net; -using System.Net.Http; -using System.Runtime.InteropServices; +//using System.Linq; +//using System.Management; +//using System.Net; +//using System.Net.Http; +//using System.Runtime.InteropServices; using System.Runtime.Versioning; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using System.Xml; +//using System.Security; +//using System.Security.Cryptography; +//using System.Text; +//using System.Threading.Tasks; +//using System.Xml; using static GameLauncher_Console.CGameData; using FileSystem = NexusMods.Paths.FileSystem; @@ -66,7 +65,7 @@ public class PlatformEA : IPlatform private static readonly string _name = Enum.GetName(typeof(GamePlatform), ENUM); private static readonly string _hwfile = string.Format("{0}_hwinfo.txt", _name); - private readonly static byte[] _ea_iv = { 0x84, 0xef, 0xc4, 0xb8, 0x36, 0x11, 0x9c, 0x20, 0x41, 0x93, 0x98, 0xc3, 0xf3, 0xf2, 0xbc, 0xef, }; + private readonly static byte[] _ea_iv = [0x84, 0xef, 0xc4, 0xb8, 0x36, 0x11, 0x9c, 0x20, 0x41, 0x93, 0x98, 0xc3, 0xf3, 0xf2, 0xbc, 0xef,]; GamePlatform IPlatform.Enum => ENUM; @@ -136,7 +135,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa if (!(bool)CConfig.GetConfigBool(CConfig.CFG_INSTONLY)) { - if (GetLogin(out string email, out SecureString password) && (!email.Equals("skipped") && !email.Equals("invalid") && !password.Equals(null) && password.Length > 0)) + if (CDock.GetLogin(_name + " e-mail", CConfig.CFG_ORIGINID, out string? email, true) && (!email.Equals("skipped") && !email.Equals("invalid")) + && (CDock.GetPassword(_name + " password", CConfig.CFG_ORIGINPW, out SecureString? password) && !password.Equals(null) && password.Length > 0)) { ownedGames = GetOwnedGames(email, password).Result; password.Dispose(); @@ -430,7 +430,9 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa public static string GetIconUrl(CGame game) { - if (GetLogin(out string email, out SecureString password) && (!email.Equals("skipped") && !email.Equals("invalid") && !password.Equals(null) && password.Length > 0)) + /* + if (CDock.GetLogin(_name + " e-mail", CConfig.CFG_ORIGINID, out string? email, true) && (!email.Equals("skipped") && !email.Equals("invalid")) + && (CDock.GetPassword(_name + " password", CConfig.CFG_ORIGINPW, out SecureString? password) && !password.Equals(null) && password.Length > 0)) { List games = GetOwnedGames(email, password, GetGameID(game.ID)).Result; password.Dispose(); @@ -450,6 +452,7 @@ public static string GetIconUrl(CGame game) } } } + */ return ""; } @@ -468,71 +471,7 @@ public static string GetGameID(string key) return key; } - private static bool GetLogin(out string email, out SecureString password) - { - email = CConfig.GetConfigString(CConfig.CFG_ORIGINID); - password = new(); - try - { - string encrypted = CConfig.GetConfigString(CConfig.CFG_ORIGINPW); - if (!string.IsNullOrEmpty(encrypted)) - { - Span byteSpan = Convert.FromBase64String(encrypted); - if (OperatingSystem.IsWindows()) - { - Array.ForEach(Encoding.UTF8.GetString(ProtectedData.Unprotect(byteSpan.ToArray(), null, DataProtectionScope.CurrentUser)).ToArray(), password.AppendChar); - } - else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password - Array.ForEach(Encoding.UTF8.GetString(byteSpan).ToArray(), password.AppendChar); - password.MakeReadOnly(); - } - - if (string.IsNullOrEmpty(email)) - { - email = CDock.InputPrompt(_name + " e-mail >>> ", new()); - CDock.ClearInputLine(new()); - } - - if (string.IsNullOrEmpty(email)) - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, "skipped"); - else if (!email.Contains('@') || !email.Contains('.')) - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, "invalid"); - else - { - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, email); - - if (string.IsNullOrEmpty(encrypted)) - { - string strPwd = CDock.InputPassword(_name + " password >>> ", new()); - if (!string.IsNullOrEmpty(strPwd)) - { - Span byteSpan = new(); - if (OperatingSystem.IsWindows()) - byteSpan = ProtectedData.Protect(Encoding.UTF8.GetBytes(strPwd), null, DataProtectionScope.CurrentUser); - else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password - byteSpan = Encoding.UTF8.GetBytes(strPwd); - password = new NetworkCredential("", strPwd).SecurePassword; - password.MakeReadOnly(); - encrypted = Convert.ToBase64String(byteSpan); - CConfig.SetConfigValue(CConfig.CFG_ORIGINPW, encrypted); - byteSpan = null; - } - strPwd = null; - CDock.ClearInputLine(new()); - } - } - encrypted = null; - if (!string.IsNullOrEmpty(email) && password.Length > 0) - return true; - } - catch (Exception e) - { - CLogger.LogError(e); - } - - return false; - } - + /* [SupportedOSPlatform("windows")] private static string GetWMIValue(string property, string path) { @@ -639,7 +578,9 @@ private static bool DecryptISFile(string dbFile, string hwInfo, out string decry decryptedText = ""; return false; } + */ + /* private static async Task> GetOwnedGames(string email, SecureString password, string id = "") { List games = new(); @@ -669,7 +610,7 @@ private static async Task> GetOwnedGames(string email, SecureStri locale = originApi.InternalUser.Locale; // "en_US" if (string.IsNullOrEmpty(locale)) locale = EA_LANGDEF; - + */ /* OriginUser user = await originApi.GetUserAsync(userid); CLogger.LogDebug("persona: {0}, name: {1}, avatar: {2}", user.PersonaId.ToString(), user.Username, await user.GetAvatarUrlAsync()); @@ -689,6 +630,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogDebug(" {0} 1 content:\n{1}", _name, content); } */ + /* #if DEBUG // Don't re-download if file exists string tmpfile = $"tmp_{_name}_api.xml"; @@ -727,7 +669,7 @@ private static async Task> GetOwnedGames(string email, SecureStri if (!success) return new(); - + */ /* //rand.Next(1, 5); HttpRequestMessage request3 = BaseAPIManager.CreateRequest(HttpMethod.Get, $"https://api1.origin.com/ecommerce2/entitlements/{userid}/associations/pending"); @@ -740,6 +682,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogDebug(" {0} 3 content:\n{1}", _name, content3); } */ + /* XmlNodeList gameList = doc.DocumentElement.SelectNodes("/entitlements/entitlement"); if (gameList == null || gameList.Count <= 0) @@ -759,12 +702,13 @@ private static async Task> GetOwnedGames(string email, SecureStri try { strID = game.SelectSingleNode("offerId").InnerText; // if found later, we'll use softwareId instead of offerId + */ /* // we're now looking for softwareId instead of offerId if (!string.IsNullOrEmpty(id) && !strID.Equals(id)) // used when looking for a particular game ID continue; */ - + /* // skip DLCs //if (!game.SelectSingleNode("originDisplayType").InnerText.Equals("Full Game")) // DLCs will be "Expansion" or "Addon" if (!game.SelectSingleNode("entitlementTag").InnerText.Equals("ORIGIN_DOWNLOAD")) // DLCs will be XPACK{#}_ACCESS @@ -843,7 +787,7 @@ private static async Task> GetOwnedGames(string email, SecureStri } } } - + */ /* //rand.Next(1, 5); HttpRequestMessage request5 = BaseAPIManager.CreateRequest(HttpMethod.Get, $"https://api4.origin.com/ecommerce2/offerUpdatedDate?offerIds={game}"); @@ -856,7 +800,7 @@ private static async Task> GetOwnedGames(string email, SecureStri //CLogger.LogDebug(" {0} 5 content:\n{1}", _name, content5); } */ - + /* //CLogger.LogDebug($"- id:{strID} | title:{strTitle} | lastRun:{lastRun}"); games.Add(new string[] { strID, strTitle, strDescription, lastRun, iconUrl }); } @@ -865,7 +809,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogError(e, string.Format("API error for {0} owned games.", _name.ToUpper())); } } - + */ /* //rand.Next(1, 5); string file = $"supercat-PCWIN_MAC-{country}-{locale}.json.gz"; @@ -882,12 +826,16 @@ private static async Task> GetOwnedGames(string email, SecureStri } } */ + /* return games; } return new(); } + */ + + /* #nullable enable [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern bool GetVolumeInformationW( @@ -899,9 +847,11 @@ private static extern bool GetVolumeInformationW( out uint lpFileSystemFlags, StringBuilder? lpFileSystemNameBuffer, int nFileSystemNameSize); + */ } #nullable restore + /* public class OriginResponse { public class Entitlement @@ -922,4 +872,5 @@ public class OriginEntitlement public List entitlements; } } + */ } \ No newline at end of file diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 320e6c0..38369a9 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -13,6 +13,7 @@ using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; using FileSystem = NexusMods.Paths.FileSystem; +using System.Security; namespace GameLauncher_Console { @@ -81,7 +82,9 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { string strPlatform = GetPlatformString(ENUM); - SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, null); + _ = CDock.GetLogin(_name + " API key ", CConfig.CFG_STEAMAPI, out string? apiKey, false) && (!apiKey.Equals("skipped")); + + SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, apiKey); foreach (var game in handler.FindAllGames()) { if (game.IsT0) diff --git a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs index 0fb96bf..23b579b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs +++ b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace GameLauncher_Console.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -505,6 +505,18 @@ public int num_steam_id { } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string text_steam_apikey { + get { + return ((string)(this["text_steam_apikey"])); + } + set { + this["text_steam_apikey"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] diff --git a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings index 15acf1c..c1b6668 100644 --- a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings +++ b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings @@ -122,6 +122,9 @@ 0 + + + From 669fc2a18cba77bb435aa62f675a1ec589c1ae2d Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Wed, 6 Mar 2024 15:24:46 -0800 Subject: [PATCH 11/21] Use GameCollector's baseOnly parameter rather than checking for null BaseGame --- .../GameLauncher_Console/Platforms/Amazon.cs | 9 +++------ .../GameLauncher_Console/Platforms/Arc.cs | 9 +++------ .../GameLauncher_Console/Platforms/Battlenet.cs | 9 +++------ .../GameLauncher_Console/Platforms/Bethesda.cs | 9 +++------ .../GameLauncher_Console/Platforms/BigFish.cs | 9 +++------ .../GameLauncher_Console/Platforms/EA.cs | 9 +++------ .../GameLauncher_Console/Platforms/Epic.cs | 9 +++------ .../GameLauncher_Console/Platforms/GOG.cs | 9 +++------ .../GameLauncher_Console/Platforms/GameJolt.cs | 9 +++------ .../GameLauncher_Console/Platforms/Humble.cs | 9 +++------ .../GameLauncher_Console/Platforms/IGClient.cs | 9 +++------ .../GameLauncher_Console/Platforms/Itch.cs | 9 +++------ .../GameLauncher_Console/Platforms/Legacy.cs | 9 +++------ .../GameLauncher_Console/Platforms/Microsoft.cs | 9 +++------ .../GameLauncher_Console/Platforms/Oculus.cs | 9 +++------ .../GameLauncher_Console/Platforms/Paradox.cs | 9 +++------ .../GameLauncher_Console/Platforms/Plarium.cs | 9 +++------ .../GameLauncher_Console/Platforms/Riot.cs | 9 +++------ .../GameLauncher_Console/Platforms/RobotCache.cs | 9 +++------ .../GameLauncher_Console/Platforms/Rockstar.cs | 9 +++------ .../GameLauncher_Console/Platforms/Steam.cs | 9 +++------ .../GameLauncher_Console/Platforms/Ubisoft.cs | 2 +- .../GameLauncher_Console/Platforms/Wargaming.cs | 2 +- 23 files changed, 65 insertions(+), 128 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs index dd23d58..05b3c17 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs @@ -107,15 +107,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa var windowsRegistry = WindowsRegistry.Shared; AmazonHandler handler = new(windowsRegistry, realFileSystem); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs index a774311..178b747 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs @@ -70,15 +70,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); ArcHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs index 19b964a..34db814 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs @@ -68,15 +68,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); BattleNetHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs index 511cc94..37147c4 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs @@ -78,15 +78,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); BethNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs index 56850c7..9def500 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs @@ -80,15 +80,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); BigFishHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index 0da7c1c..f76acb5 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -113,15 +113,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); EADesktopHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, new HardwareInfoProvider()); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index 2a99e10..02d7b7f 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -214,15 +214,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); EGSHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index db69229..efd51cf 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -118,15 +118,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); GOGHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs index 22f332c..c036c05 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs @@ -86,15 +86,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); GameJoltHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs index 3b8e706..8d57a0f 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs @@ -105,15 +105,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); HumbleHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs index 5f73868..10a9512 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs @@ -81,15 +81,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); IGClientHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs index e6a7084..0308acd 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs @@ -108,15 +108,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); ItchHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs index b452e6b..aae1f65 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs @@ -81,15 +81,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); LegacyHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index 538dee2..05196ca 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -65,15 +65,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); XboxHandler handler = new(FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs index d0f0522..9f0e13a 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs @@ -89,15 +89,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa */ OculusHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs index 8ca71d2..e2d519b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs @@ -77,15 +77,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); ParadoxHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs index 432e034..964d179 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs @@ -64,15 +64,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); PlariumHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs index 60a26c1..bbab841 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs @@ -63,15 +63,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); RiotHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs index 6017546..b9e3930 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs @@ -58,15 +58,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); RobotCacheHandler handler = new(FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs index a4bfebc..dfef6f8 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs @@ -64,15 +64,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); RockstarHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 38369a9..617ccd8 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -85,15 +85,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa _ = CDock.GetLogin(_name + " API key ", CConfig.CFG_STEAMAPI, out string? apiKey, false) && (!apiKey.Equals("skipped")); SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, apiKey); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs index d308c54..4f9bc67 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs @@ -72,7 +72,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs index b69d9bc..43dc5ed 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs @@ -61,7 +61,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa string strPlatform = GetPlatformString(ENUM); WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(baseOnly: true)) { if (game.IsT0) { From 2825dbac695327fb596d1fbc32eda05960f22386 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Wed, 14 Feb 2024 13:15:42 -0800 Subject: [PATCH 12/21] Add IconUrl from GameCollector metadata to get auto-download of CustomImages working again --- .../GameLauncher_Console/Config.cs | 5 ++ .../GameLauncher_Console/ConsoleHelper.cs | 7 ++ .../GameLauncher_Console/Dock.cs | 37 +++++--- .../GameLauncher_Console/GameData.cs | 67 ++++++++++++--- .../GameLauncher_Console/JsonWrapper.cs | 10 ++- .../GameLauncher_Console/Platform.cs | 85 +++++++++++++++++-- .../GameLauncher_Console/Platforms/Custom.cs | 4 +- 7 files changed, 184 insertions(+), 31 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/Config.cs b/GameLauncher_Console/GameLauncher_Console/Config.cs index 3547659..6eb446d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Config.cs +++ b/GameLauncher_Console/GameLauncher_Console/Config.cs @@ -110,7 +110,10 @@ public struct Hotkeys public ConsoleKey tagsCK2; public ConsoleKey downloadCK1; public ConsoleKey downloadCK2; + public ConsoleKey allimgCK1; + public ConsoleKey allimgCK2; } + public struct Colours { public ConsoleColor bgCC; @@ -273,6 +276,8 @@ public struct Colours public const string CFG_KEYRATEDN2 = "key_rating_down_2"; public const string CFG_KEYDLIMG1 = "key_download_image_1"; public const string CFG_KEYDLIMG2 = "key_download_image_2"; + public const string CFG_KEYDLALL1 = "key_download_all_images_1"; + public const string CFG_KEYDLALL2 = "key_download_all_images_2"; public const string CFG_PATHLEG = "path_legendary_exe"; public const string CFG_TXTMAINT = "text_main_menu_title"; public const string CFG_TXTCFGT = "text_settings_title"; diff --git a/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs b/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs index da97e4b..7c3344a 100644 --- a/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs +++ b/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs @@ -164,6 +164,7 @@ public CConsoleHelper(int nColumnCount, int nSpacing, int nPaging) //, ConsoleSt /// public enum DockSelection { + cSel_downloadAll = -26, cSel_Tags = -25, cSel_raiseRating = -24, cSel_lowerRating = -23, @@ -841,6 +842,9 @@ public int HandleNavigationMenu(int nStartY, int nStopY, CConfig.ConfigVolatile else if (key == keys.scanCK1 || key == keys.scanCK2) return (int)DockSelection.cSel_Rescan; // Rescan the registry and the 'CustomGames' folder for new games + else if (key == keys.allimgCK1 || key == keys.allimgCK2) + return (int)DockSelection.cSel_downloadAll; // Rescan the registry and the 'CustomGames' folder for new games + } while (key != keys.selectCK1 && key != keys.selectCK2); return (int)DockSelection.cSel_Default; @@ -963,6 +967,9 @@ public int HandleInsertMenu(int nStartY, int nStopY, CConfig.ConfigVolatile cfgv else if (strInput.Equals("/icon", CDock.IGNORE_CASE)) return (int)DockSelection.cSel_Image; + else if (strInput.Equals("/allicon", CDock.IGNORE_CASE)) + return (int)DockSelection.cSel_downloadAll; + else if (strInput.Equals("/sort", CDock.IGNORE_CASE)) return (int)DockSelection.cSel_Sort; diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index 6dc8fa0..74a87d2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -97,18 +97,18 @@ public CDock() public void MainLoop(string[] args) { CPlatform platforms = new(); - platforms.AddSupportedPlatform(new PlatformAmazon()); - platforms.AddSupportedPlatform(new PlatformArc()); + platforms.AddSupportedPlatform(new PlatformAmazon()); + platforms.AddSupportedPlatform(new PlatformArc()); platforms.AddSupportedPlatform(new PlatformBattlenet()); //platforms.AddSupportedPlatform(new PlatformBethesda()); // deprecated May 2022 platforms.AddSupportedPlatform(new PlatformBigFish()); //platforms.AddSupportedPlatform(new PlatformCustom()); // See CPlatform.ScanGames() platforms.AddSupportedPlatform(new PlatformEA()); platforms.AddSupportedPlatform(new PlatformEpic()); - platforms.AddSupportedPlatform(new PlatformGameJolt()); - platforms.AddSupportedPlatform(new PlatformGOG()); - platforms.AddSupportedPlatform(new PlatformHumble()); - platforms.AddSupportedPlatform(new PlatformIGClient()); + platforms.AddSupportedPlatform(new PlatformGameJolt()); + platforms.AddSupportedPlatform(new PlatformGOG()); + platforms.AddSupportedPlatform(new PlatformHumble()); + platforms.AddSupportedPlatform(new PlatformIGClient()); platforms.AddSupportedPlatform(new PlatformItch()); platforms.AddSupportedPlatform(new PlatformLegacy()); platforms.AddSupportedPlatform(new PlatformMicrosoft()); @@ -161,9 +161,7 @@ public void MainLoop(string[] args) noInteractive = true; else if (gameSearch[0].Equals('s') || gameSearch[0].Equals('S')) { - CLogger.LogInfo("Scanning for games..."); - Console.Write("Scanning for games"); // ScanGames() will append a dot for each platform - platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), false); + platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), bFirstScan: false); return; } else if (gameSearch[0].Equals('c') || gameSearch[0].Equals('C')) @@ -412,9 +410,7 @@ public void MainLoop(string[] args) CLogger.LogError(e); } Console.ResetColor(); - CLogger.LogInfo("Scanning for games..."); - Console.Write("Scanning for games"); // ScanGames() will add dots for each platform - platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), false); + platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), bFirstScan: false); continue; case CConsoleHelper.DockSelection.cSel_Input: // Toggle arrows/typing input @@ -959,6 +955,19 @@ from part in newTags.Split('|') } continue; + case CConsoleHelper.DockSelection.cSel_downloadAll: // Download images + try + { + Console.SetCursorPosition(0, Console.WindowHeight - INPUT_BOTTOM_CUSHION); + } + catch (Exception e) + { + CLogger.LogError(e); + } + Console.ResetColor(); + platforms.DownloadAllImages(bFirstScan: false); + continue; + default: break; } @@ -1820,6 +1829,10 @@ private void DisplayHelp(int height, CConfig.Colours cols) " Download Image: " + CConsoleHelper.OutputKeys(CConfig.ShortenKeyName(CConfig.GetConfigString(CConfig.CFG_KEYDLIMG1)), CConfig.ShortenKeyName(CConfig.GetConfigString(CConfig.CFG_KEYDLIMG2)), "[", "]", " | ", "N/A", 8)); + WriteWithBreak(ref line, height, cols.entryCC, cols.entryLtCC, cols.titleCC, cols.titleLtCC, + " Download All Images: " + + CConsoleHelper.OutputKeys(CConfig.ShortenKeyName(CConfig.GetConfigString(CConfig.CFG_KEYDLALL1)), + CConfig.ShortenKeyName(CConfig.GetConfigString(CConfig.CFG_KEYDLALL2)), "[", "]", " | ", "N/A", 8)); if (!(bool)CConfig.GetConfigBool(CConfig.CFG_NOQUIT)) WriteWithBreak(ref line, height, cols.entryCC, cols.entryLtCC, cols.titleCC, cols.titleLtCC, " Quit: " + diff --git a/GameLauncher_Console/GameLauncher_Console/GameData.cs b/GameLauncher_Console/GameLauncher_Console/GameData.cs index a1f4211..8d97785 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameData.cs +++ b/GameLauncher_Console/GameLauncher_Console/GameData.cs @@ -140,7 +140,9 @@ public struct ImportGameData public string m_strID; public string m_strTitle; public string m_strLaunch; + public string m_strLaunchUrl; public string m_strIcon; + public string m_strIconUrl; public string m_strUninstall; public string m_strAlias; public bool m_bInstalled; @@ -154,7 +156,7 @@ public struct ImportGameData */ public ImportGameData(string strPlatform, GameData gameData) - //public ImportGameData(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, string strAlias, bool bInstalled, string strPlatform, bool bFavourite = false, bool bHidden = false, List tags = default, DateTime dateLastRun = default, ushort rating = 0, uint numRuns = 0) + //public ImportGameData(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, string strAlias, bool bInstalled, string strPlatform, bool bFavourite = false, bool bHidden = false, List tags = default, DateTime dateLastRun = default, ushort rating = 0, uint numRuns = 0) { m_strPlatform = strPlatform; m_gameData = gameData; @@ -162,7 +164,9 @@ public ImportGameData(string strPlatform, GameData gameData) m_strID = strID; m_strTitle = strTitle; m_strLaunch = strLaunch; + m_strLaunchUrl = strLaunchUrl; m_strIcon = strIconPath; + m_strIconUrl = strIconUrl; m_strUninstall = strUninstall; m_strAlias = strAlias; m_bInstalled = bInstalled; @@ -185,7 +189,9 @@ public class CGame private readonly string m_strID; private readonly string m_strTitle; private readonly string m_strLaunch; + private readonly string m_strLaunchUrl; private readonly string m_strIcon; + private readonly string m_strIconUrl; private readonly string m_strUninstall; private bool m_bIsInstalled; private bool m_bIsFavourite; @@ -205,7 +211,9 @@ public class CGame /// Unique ID for the game /// Title of the game /// Game's launch command + /// Game's launch command via launcher /// Path to game's icon + /// Game's downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -218,12 +226,14 @@ public class CGame /// User rating (0-5) /// Number of game launches /// Game's frequency counter - protected CGame(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + protected CGame(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) { m_strID = strID; m_strTitle = strTitle; m_strLaunch = strLaunch; + m_strLaunchUrl = strLaunchUrl; m_strIcon = strIconPath; + m_strIconUrl = strIconUrl; m_strUninstall = strUninstall; m_bIsInstalled = bIsInstalled; m_bIsFavourite = bIsFavourite; @@ -291,6 +301,17 @@ public string Launch } } + /// + /// Launch url getter + /// + public string LaunchUrl + { + get + { + return m_strLaunchUrl; + } + } + /// /// Icon getter /// @@ -302,6 +323,17 @@ public string Icon } } + /// + /// Downloadable icon getter + /// + public string IconUrl + { + get + { + return m_strIconUrl; + } + } + /// /// Uninstaller command getter /// @@ -564,7 +596,9 @@ private class CGameInstance : CGame /// Unique ID of the game /// Title of the game /// Game's launch command + /// Game's launch command via launcher /// Path to game's icon + /// Game's downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -577,8 +611,8 @@ private class CGameInstance : CGame /// User rating (0-5) /// Number of game launches /// Game's frequency counter - public CGameInstance(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) - : base(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount) + public CGameInstance(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + : base(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount) { } @@ -604,7 +638,9 @@ public CTempGameSet() /// Game unique ID /// Game title /// Game launch command + /// Game launch command via launcher /// Path to game's icon + /// Game downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -617,7 +653,7 @@ public CTempGameSet() /// User rating (0-5) /// Number of game launches /// Game's frequency counter - public void InsertGame(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, string strPlatform, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + public void InsertGame(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, string strPlatform, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) { GamePlatform platformEnum; // If platform is incorrect or unsupported, default to unknown. @@ -626,7 +662,7 @@ public void InsertGame(string strID, string strTitle, string strLaunch, string s if (platformEnum < 0) platformEnum = GamePlatform.Unknown; - this.Add(CreateGameInstance(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount)); + this.Add(CreateGameInstance(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount)); } } @@ -636,7 +672,9 @@ public void InsertGame(string strID, string strTitle, string strLaunch, string s /// Unique ID of the game /// Title of the game /// Game's launch command + /// Game's launch command via launcher /// Path to game's icon + /// Game's downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -650,9 +688,9 @@ public void InsertGame(string strID, string strTitle, string strLaunch, string s /// Number of game launches /// Game's frequency counter /// Instance of CGame - private static CGame CreateGameInstance(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + private static CGame CreateGameInstance(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, GamePlatform platformEnum, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) { - return new CGameInstance(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount); + return new CGameInstance(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount); } private static readonly Dictionary> m_gameDictionary = new(); @@ -689,7 +727,12 @@ public static HashSet GetPlatformGameList(GamePlatform platformEnum) return m_notInstalled; else - return m_gameDictionary[platformEnum]; + { + if (m_gameDictionary.ContainsKey(platformEnum)) + return m_gameDictionary[platformEnum]; + else + return new(); + } } /// @@ -918,7 +961,9 @@ public static List GetPlatformTitles(GamePlatform platformEnum) /// Unique ID of the game /// Title of the game /// Game's launch command + /// Game's launch command via launcher /// Path to game's icon + /// Game's downloadable icon /// Path to game's uninstaller /// Flag indicating if the game is installed /// Flag indicating if the game is in the favourite tab @@ -931,7 +976,7 @@ public static List GetPlatformTitles(GamePlatform platformEnum) /// User rating (0-5) /// Number of game launches /// Game's frequency counter - public static void AddGame(string strID, string strTitle, string strLaunch, string strIconPath, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, string strPlatform, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) + public static void AddGame(string strID, string strTitle, string strLaunch, string strLaunchUrl, string strIconPath, string strIconUrl, string strUninstall, bool bIsInstalled, bool bIsFavourite, bool bIsNew, bool bIsHidden, string strAlias, string strPlatform, List tags, DateTime dateLastRun, ushort rating, uint numRuns, double fOccurCount) { GamePlatform platformEnum; // If platform is incorrect or unsupported, default to unknown. @@ -944,7 +989,7 @@ public static void AddGame(string strID, string strTitle, string strLaunch, stri if (!m_gameDictionary.ContainsKey(platformEnum)) m_gameDictionary[platformEnum] = new HashSet(); - CGame game = CreateGameInstance(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount); + CGame game = CreateGameInstance(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, platformEnum, tags, dateLastRun, rating, numRuns, fOccurCount); m_gameDictionary[platformEnum].Add(game); if (game.IsFavourite) diff --git a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs index c35e2bb..96d01d0 100644 --- a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs +++ b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs @@ -50,7 +50,9 @@ public static class CJsonWrapper private const string GAMES_ARRAY_ID = "id"; private const string GAMES_ARRAY_TITLE = "title"; private const string GAMES_ARRAY_LAUNCH = "launch"; + private const string GAMES_ARRAY_LAUNCHURL = "launchurl"; private const string GAMES_ARRAY_ICON = "icon"; + private const string GAMES_ARRAY_ICONURL = "iconurl"; private const string GAMES_ARRAY_UNINSTALLER = "uninstaller"; private const string GAMES_ARRAY_PLATFORM = "platform"; private const string GAMES_ARRAY_INSTALLED = "installed"; @@ -413,7 +415,9 @@ private static bool ImportGames(string file, ref int nGameCount, ref Version ver continue; string strLaunch = GetStringProperty(jElement, GAMES_ARRAY_LAUNCH); + string strLaunchUrl = GetStringProperty(jElement, GAMES_ARRAY_LAUNCHURL); string strIconPath = GetStringProperty(jElement, GAMES_ARRAY_ICON); + string strIconUrl = GetStringProperty(jElement, GAMES_ARRAY_ICONURL); string strUninstall = GetStringProperty(jElement, GAMES_ARRAY_UNINSTALLER); bool bIsInstalled = GetBoolProperty(jElement, GAMES_ARRAY_INSTALLED); bool bIsFavourite = GetBoolProperty(jElement, GAMES_ARRAY_FAVOURITE); @@ -426,7 +430,7 @@ private static bool ImportGames(string file, ref int nGameCount, ref Version ver ushort rating = GetUShortProperty(jElement, GAMES_ARRAY_RATING); double fOccurCount = GetDoubleProperty(jElement, GAMES_ARRAY_FREQUENCY); - AddGame(strID, strTitle, strLaunch, strIconPath, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, strPlatform, new List(), dateLastRun, rating, (uint)numRuns, fOccurCount); + AddGame(strID, strTitle, strLaunch, strLaunchUrl, strIconPath, strIconUrl, strUninstall, bIsInstalled, bIsFavourite, bIsNew, bIsHidden, strAlias, strPlatform, new List(), dateLastRun, rating, (uint)numRuns, fOccurCount); nGameCount++; } SortGames(sortMethod, faveSort, instSort, ignoreArticle); @@ -652,6 +656,8 @@ private static bool TranslateConfig(ref CConfig.Hotkeys hotkeys, ref CConfig.Col Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYRATEDN2), true, out hotkeys.ratingDownCK2); Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYDLIMG1), true, out hotkeys.downloadCK1); Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYDLIMG2), true, out hotkeys.downloadCK2); + Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYDLALL1), true, out hotkeys.allimgCK1); + Enum.TryParse(CConfig.GetConfigString(CConfig.CFG_KEYDLALL2), true, out hotkeys.allimgCK2); } catch (Exception e) { @@ -1150,6 +1156,8 @@ private static void SetKeyDefaults(bool force) SetDefaultVal(CConfig.CFG_KEYRATEDN2, force); SetDefaultVal(CConfig.CFG_KEYDLIMG1, force); SetDefaultVal(CConfig.CFG_KEYDLIMG2, force); + SetDefaultVal(CConfig.CFG_KEYDLALL1, force); + SetDefaultVal(CConfig.CFG_KEYDLALL2, force); } /// diff --git a/GameLauncher_Console/GameLauncher_Console/Platform.cs b/GameLauncher_Console/GameLauncher_Console/Platform.cs index 53f40ea..bc5c433 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platform.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platform.cs @@ -220,21 +220,42 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) { CTempGameSet tempGameSet = new(); CLogger.LogDebug("-----------------------"); + CLogger.LogInfo("Scanning for games..."); + //if (bFirstScan) + Console.Write("Scanning for games"); // add dots for each platform + List gameDataList = new(); + var cursor = Console.CursorLeft; if (!bOnlyCustom) { foreach (IPlatform platform in _platforms) { - Console.Write("."); + //if (bFirstScan) + { + Console.Write($". [{platform.Description}]"); + cursor++; + } + //else + // Console.Write("."); CLogger.LogInfo("Looking for {0} games...", platform.Description); + platform.GetGames(gameDataList, bExpensiveIcons); + + //if (bFirstScan) + { + Console.SetCursorPosition(cursor, Console.CursorTop); + Console.Write(new string(' ', 3 + platform.Description.Length)); + Console.SetCursorPosition(cursor, Console.CursorTop); + } } foreach (var data in gameDataList) { tempGameSet.InsertGame(data.m_gameData.GameId, data.m_gameData.GameName, data.m_gameData.Launch == default ? data.m_gameData.LaunchUrl : (string.IsNullOrEmpty(data.m_gameData.LaunchArgs) ? data.m_gameData.Launch.GetFullPath() : data.m_gameData.Launch.GetFullPath() + " " + data.m_gameData.LaunchArgs), + data.m_gameData.LaunchUrl, data.m_gameData.Icon == default ? "" : data.m_gameData.Icon.GetFullPath(), + data.m_gameData.Metadata == default ? "" : data.m_gameData.Metadata.TryGetValue("IconUrl", out var urls) && urls.Count > 0 ? urls[0] : (data.m_gameData.Metadata.TryGetValue("ImageUrl", out urls) && urls.Count > 0 ? urls[0] : ""), data.m_gameData.Uninstall == default ? data.m_gameData.UninstallUrl : (string.IsNullOrEmpty(data.m_gameData.UninstallArgs) ? data.m_gameData.Uninstall.GetFullPath() : data.m_gameData.Uninstall.GetFullPath() + " " + data.m_gameData.UninstallArgs), data.m_gameData.IsInstalled, false, true, false, @@ -244,17 +265,71 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) } } - PlatformCustom custom = new(); + //if (bFirstScan) + { + Console.Write($". [{GetPlatformString(GamePlatform.Custom)}]"); + Console.SetCursorPosition(0, Console.CursorTop); + } + //else + // Console.Write("."); - Console.Write("."); - CLogger.LogInfo("Looking for {0} games...", GetPlatformString(GamePlatform.Custom)); + CLogger.LogInfo("Looking for {0}...", GetPlatformString(GamePlatform.Custom)); + + PlatformCustom custom = new(); custom.GetGames(ref tempGameSet); MergeGameSets(tempGameSet); if (bFirstScan) SortGames((int)CConsoleHelper.SortMethod.cSort_Alpha, false, (bool)CConfig.GetConfigBool(CConfig.CFG_USEINST), true); CLogger.LogDebug("-----------------------"); - Console.WriteLine(); ExportGames(GetPlatformGameList(GamePlatform.All).ToList()); + Console.SetCursorPosition(0, Console.CursorTop); + Console.Write(new string(' ', 21 + _platforms.Count + GetPlatformString(GamePlatform.Custom).Length)); + + if (!(bool)CConfig.GetConfigBool(CConfig.CFG_IMGDOWN)) + { + Console.SetCursorPosition(0, Console.CursorTop); + DownloadAllImages(bFirstScan); + } + Console.WriteLine(); + } + + /// + /// Download all images for games + /// + public void DownloadAllImages(bool bFirstScan = false) + { + CLogger.LogDebug("-----------------------"); + CLogger.LogInfo("Downloading images..."); + //if (!bFirstScan) + Console.Write("Downloading images"); // add dots for each platform + + var cursor = Console.CursorLeft; + foreach (IPlatform platform in _platforms) + { + //if (bFirstScan) + { + Console.Write($". [{platform.Description}]"); + cursor++; + } + //else + // Console.Write("."); + + CLogger.LogInfo("Looking for {0} images...", platform.Description); + foreach (var game in GetPlatformGameList(platform.Enum)) + { + CDock.DownloadCustomImage(game.Title, game.IconUrl, overwrite: false); + } + + //if (bFirstScan) + { + Console.SetCursorPosition(cursor, Console.CursorTop); + Console.Write(new string(' ', 3 + platform.Description.Length)); + Console.SetCursorPosition(cursor, Console.CursorTop); + } + } + Console.SetCursorPosition(0, Console.CursorTop); + Console.Write(new string(' ', 21 + _platforms.Count + _platforms.Last().Description.Length)); + CLogger.LogDebug("-----------------------"); } /// diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs index 8f7aac4..4b37f23 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs @@ -88,7 +88,7 @@ private static void FindCustomLinkFiles(ref CTempGameSet tempGameSet) string strAlias = GetAlias(strTitle); if (strAlias.Equals(strTitle, CDock.IGNORE_CASE)) strAlias = ""; - tempGameSet.InsertGame(strID, strTitle, strLaunch, strLaunch, strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); } } } @@ -115,7 +115,7 @@ private static void FindCustomBinaries(ref CTempGameSet tempGameSet) string strAlias = GetAlias(strTitle); if (strAlias.Equals(strTitle, CDock.IGNORE_CASE)) strAlias = ""; - tempGameSet.InsertGame(strID, strTitle, strLaunch, strLaunch, strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); } } } From 170377c38b6ef66a59fb4db09d5e223a878a12d6 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Fri, 16 Feb 2024 00:33:34 -0800 Subject: [PATCH 13/21] Don't include DLC --- .../GameLauncher_Console/Platforms/Amazon.cs | 7 +++-- .../GameLauncher_Console/Platforms/Arc.cs | 7 +++-- .../Platforms/Battlenet.cs | 7 +++-- .../Platforms/Bethesda.cs | 7 +++-- .../GameLauncher_Console/Platforms/BigFish.cs | 7 +++-- .../GameLauncher_Console/Platforms/EA.cs | 7 +++-- .../GameLauncher_Console/Platforms/Epic.cs | 7 +++-- .../GameLauncher_Console/Platforms/GOG.cs | 7 +++-- .../Platforms/GameJolt.cs | 7 +++-- .../GameLauncher_Console/Platforms/Humble.cs | 7 +++-- .../Platforms/IGClient.cs | 13 ++++++--- .../GameLauncher_Console/Platforms/Itch.cs | 13 ++++++--- .../GameLauncher_Console/Platforms/Legacy.cs | 7 +++-- .../Platforms/Microsoft.cs | 7 +++-- .../GameLauncher_Console/Platforms/Oculus.cs | 7 +++-- .../GameLauncher_Console/Platforms/Paradox.cs | 9 ++++-- .../GameLauncher_Console/Platforms/Plarium.cs | 7 +++-- .../GameLauncher_Console/Platforms/Riot.cs | 7 +++-- .../Platforms/RobotCache.cs | 7 +++-- .../Platforms/Rockstar.cs | 7 +++-- .../GameLauncher_Console/Platforms/Steam.cs | 7 +++-- .../GameLauncher_Console/Platforms/Ubisoft.cs | 27 +++++++++-------- .../Platforms/Wargaming.cs | 29 ++++++++++--------- 23 files changed, 146 insertions(+), 71 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs index b43e557..dd23d58 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs @@ -111,8 +111,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs index 12078d7..a774311 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs @@ -74,8 +74,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs index 4121744..19b964a 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs @@ -72,8 +72,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs index 5251c0c..511cc94 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs @@ -82,8 +82,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs index 2014548..56850c7 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs @@ -84,8 +84,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index 010eb02..e876027 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -118,8 +118,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index 82e852e..f0c5d16 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -218,8 +218,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index 7952fa5..3094c9e 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -122,8 +122,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs index 89eb8ca..22f332c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs @@ -90,8 +90,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs index d6dbc3c..3b8e706 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs @@ -109,8 +109,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs index 78a4324..5f73868 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using System.Text.Json; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; @@ -74,17 +75,21 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } + //[SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) - { + { string strPlatform = GetPlatformString(ENUM); - IGClientHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + IGClientHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); foreach (var game in handler.FindAllGames()) { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs index 613be73..e6a7084 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs @@ -7,6 +7,7 @@ using System.Data.SQLite; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CRegScanner; using static System.Environment; @@ -101,17 +102,21 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } + //[SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) - { + { string strPlatform = GetPlatformString(ENUM); - ItchHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); + ItchHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); foreach (var game in handler.FindAllGames()) { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs index 2f6ef15..b452e6b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs @@ -85,8 +85,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index a8ad6e3..7ff21f1 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -69,8 +69,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs index a73f1fb..d0f0522 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs @@ -93,8 +93,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs index 1810e8d..8ca71d2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CRegScanner; using FileSystem = NexusMods.Paths.FileSystem; @@ -70,6 +71,7 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } + [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); @@ -79,8 +81,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs index db76da6..432e034 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs @@ -68,8 +68,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs index caae658..60a26c1 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs @@ -67,8 +67,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs index 7980f26..6017546 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs @@ -62,8 +62,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs index d8b6fd0..a4bfebc 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs @@ -68,8 +68,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 590157b..5a4a0e8 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -86,8 +86,11 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { if (game.IsT0) { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs index baf28a5..d308c54 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs @@ -69,19 +69,22 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); - UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) - { - if (game.IsT0) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } - else - CLogger.LogWarn(game.AsT1.Message); - } + UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + } + else + CLogger.LogWarn(game.AsT1.Message); + } /* List keyList; diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs index b463a9c..b69d9bc 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs @@ -58,22 +58,25 @@ public static void StartGame(CGame game) [SupportedOSPlatform("windows")] public void GetGames(List gameDataList, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); - WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) - { - if (game.IsT0) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } - else - CLogger.LogWarn(game.AsT1.Message); - } + WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames()) + { + if (game.IsT0) + { + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + } + else + CLogger.LogWarn(game.AsT1.Message); + } /* - Dictionary installDict = new(); + Dictionary installDict = new(); List keyList; */ /* From 07d1fa08c56297a22bbf1f9cce00611f1485e15c Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Thu, 15 Feb 2024 11:49:00 -0800 Subject: [PATCH 14/21] Add argument names to boolean arguments --- .../GameLauncher_Console/ConsoleHelper.cs | 26 +- .../GameLauncher_Console/ConsoleImage.cs | 2 +- .../GameLauncher_Console/Dock.cs | 258 +++++++++--------- .../GameLauncher_Console/Extensions.cs | 2 +- .../GameLauncher_Console/GameData.cs | 120 ++++---- .../GameLauncher_Console/JsonWrapper.cs | 9 +- .../GameLauncher_Console/Logger.cs | 10 +- .../GameLauncher_Console/Platform.cs | 34 +-- .../GameLauncher_Console/Platforms/Amazon.cs | 2 +- .../GameLauncher_Console/Platforms/Arc.cs | 2 +- .../Platforms/Battlenet.cs | 2 +- .../Platforms/Bethesda.cs | 2 +- .../GameLauncher_Console/Platforms/BigFish.cs | 2 +- .../GameLauncher_Console/Platforms/Custom.cs | 4 +- .../GameLauncher_Console/Platforms/EA.cs | 4 +- .../GameLauncher_Console/Platforms/Epic.cs | 2 +- .../GameLauncher_Console/Platforms/GOG.cs | 2 +- .../GameLauncher_Console/Platforms/Humble.cs | 2 +- .../Platforms/IGClient.cs | 2 +- .../GameLauncher_Console/Platforms/Itch.cs | 2 +- .../GameLauncher_Console/Platforms/Legacy.cs | 2 +- .../Platforms/Microsoft.cs | 2 +- .../GameLauncher_Console/Platforms/Oculus.cs | 2 +- .../GameLauncher_Console/Platforms/Paradox.cs | 2 +- .../GameLauncher_Console/Platforms/Plarium.cs | 2 +- .../GameLauncher_Console/Platforms/Riot.cs | 2 +- .../Platforms/RobotCache.cs | 2 +- .../Platforms/Rockstar.cs | 2 +- .../GameLauncher_Console/Platforms/Steam.cs | 2 +- .../GameLauncher_Console/Platforms/Ubisoft.cs | 2 +- .../Platforms/Wargaming.cs | 2 +- .../GameLauncher_Console/SqlDB.cs | 4 +- 32 files changed, 258 insertions(+), 257 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs b/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs index 7c3344a..43e6688 100644 --- a/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs +++ b/GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs @@ -270,14 +270,14 @@ public int DisplayCfg(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfig { if (m_ConsoleState == ConsoleState.cState_Insert) { - code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, true, false, ref game, options.ToArray()); + code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: true, browse: false, ref game, options.ToArray()); if (code > -1) CDock.m_nCurrentSelection = code; CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection); } else //if (m_ConsoleState == ConsoleState.cState_Navigate) { - code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, true, false, ref game, options.ToArray()); + code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: true, browse: false, ref game, options.ToArray()); CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection); if (options.Count < 2) CDock.m_nCurrentSelection = -1; @@ -413,14 +413,14 @@ public int DisplayFS(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfig. { if (m_ConsoleState == ConsoleState.cState_Insert) { - code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, false, true, ref game, options.ToArray()); + code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: false, browse: true, ref game, options.ToArray()); if (code > -1) CDock.m_nCurrentSelection = code; CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection); } else //if (m_ConsoleState == ConsoleState.cState_Navigate) { - code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, false, true, ref game, options.ToArray()); + code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: false, browse: true, ref game, options.ToArray()); CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection); if (options.Count < 2) CDock.m_nCurrentSelection = -1; @@ -502,8 +502,8 @@ public int DisplayMenu(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfi Console.Clear(); DrawMenuTitle(cols); - if (IsSelectionValid(CDock.m_nSelectedPlatform, options.Length)) DrawInstruct(cols, true); - else DrawInstruct(cols, false); + if (IsSelectionValid(CDock.m_nSelectedPlatform, options.Length)) DrawInstruct(cols, subMenu: true); + else DrawInstruct(cols, subMenu: false); int nStartY = Console.CursorTop + CDock.INSTRUCT_CUSHION; int nStopY = CDock.INPUT_BOTTOM_CUSHION + CDock.INPUT_ITEM_CUSHION; @@ -511,12 +511,12 @@ public int DisplayMenu(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfi { if (m_ConsoleState == ConsoleState.cState_Insert) { - code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, false, false, ref game, options); + code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: false, browse: false, ref game, options); CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection); } else //if (m_ConsoleState == ConsoleState.cState_Navigate) { - code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, false, false, ref game, options); + code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: false, browse: false, ref game, options); CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection); } if (code == (int)DockSelection.cSel_Exit || @@ -667,10 +667,10 @@ public int HandleNavigationMenu(int nStartY, int nStopY, CConfig.ConfigVolatile { CGame selectedGame = GetPlatformGame((GamePlatform)CDock.m_nSelectedPlatform, CDock.m_nCurrentSelection); if (selectedGame != null) - CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, CDock.sizeImage, CDock.locImage, imageColour); + CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, CDock.sizeImage, CDock.locImage, imageColour); } else - CConsoleImage.ShowImage(CDock.m_nCurrentSelection, options[CDock.m_nCurrentSelection], options[CDock.m_nCurrentSelection], true, CDock.sizeImage, CDock.locImage, imageColour); + CConsoleImage.ShowImage(CDock.m_nCurrentSelection, options[CDock.m_nCurrentSelection], options[CDock.m_nCurrentSelection], bPlatform: true, CDock.sizeImage, CDock.locImage, imageColour); } }); } @@ -1089,10 +1089,10 @@ public void DrawIcon(int nY, int nItem, string strItem, ConsoleColor? iconColour if (CDock.m_nSelectedPlatform > -1) { CGame selectedGame = GetPlatformGame((GamePlatform)CDock.m_nSelectedPlatform, nItem); - CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, CDock.sizeIcon, iconPosition, iconColour); + CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, CDock.sizeIcon, iconPosition, iconColour); } else - CConsoleImage.ShowImage(CDock.m_nCurrentSelection, strItem, strItem, true, CDock.sizeIcon, iconPosition, iconColour); + CConsoleImage.ShowImage(CDock.m_nCurrentSelection, strItem, strItem, bPlatform: true, CDock.sizeIcon, iconPosition, iconColour); }); } @@ -1447,7 +1447,7 @@ public static void MakeShortcut(string title, string path, string icon, string l // save it IPersistFile file = (IPersistFile)link; if (Directory.Exists(location)) - file.Save(Path.Combine(location, title + ".LNK"), false); + file.Save(Path.Combine(location, title + ".LNK"), fRemember: false); } catch (Exception e) { diff --git a/GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs b/GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs index 72398d3..7f56ed1 100644 --- a/GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs +++ b/GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs @@ -182,7 +182,7 @@ public static Size GetConsoleFontSize() } ConsoleFontInfo cfi = new(); - if (!GetCurrentConsoleFont(outHandle, false, cfi)) + if (!GetCurrentConsoleFont(outHandle, bMaximumWindow: false, cfi)) { throw new InvalidOperationException("Unable to get font information."); } diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index 74a87d2..32aa21d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -57,12 +57,12 @@ public class CDock public static int m_nCurrentSelection = 0; public static readonly string currentPath = Path.GetDirectoryName(AppContext.BaseDirectory); - public static readonly string title = Assembly.GetExecutingAssembly().GetCustomAttribute().Title; - //public static readonly string product = Assembly.GetExecutingAssembly().GetCustomAttribute().Product; - public static readonly string version = Assembly.GetEntryAssembly().GetName().Version.ToString(); - public static readonly string description = Assembly.GetExecutingAssembly().GetCustomAttribute().Description; + public static readonly string title = Assembly.GetExecutingAssembly().GetCustomAttribute().Title; + //public static readonly string product = Assembly.GetExecutingAssembly().GetCustomAttribute().Product; + public static readonly string version = Assembly.GetEntryAssembly().GetName().Version.ToString(); + public static readonly string description = Assembly.GetExecutingAssembly().GetCustomAttribute().Description; - public static readonly List supportedImages = new() { "ICO", "PNG", "JPG", "JPE", "JPEG", "GIF", "BMP", "TIF", "TIFF", "EPR", "EPRT", "EXI", "EXIF" }; + public static readonly List supportedImages = new() { "ICO", "PNG", "JPG", "JPE", "JPEG", "GIF", "BMP", "TIF", "TIFF", "EPR", "EPRT", "EXI", "EXIF" }; public static bool noInteractive = false; public static Size sizeIcon; public static Size sizeImage; @@ -112,7 +112,7 @@ public void MainLoop(string[] args) platforms.AddSupportedPlatform(new PlatformItch()); platforms.AddSupportedPlatform(new PlatformLegacy()); platforms.AddSupportedPlatform(new PlatformMicrosoft()); - platforms.AddSupportedPlatform(new PlatformOculus()); + platforms.AddSupportedPlatform(new PlatformOculus()); platforms.AddSupportedPlatform(new PlatformParadox()); platforms.AddSupportedPlatform(new PlatformPlarium()); platforms.AddSupportedPlatform(new PlatformRiot()); @@ -186,7 +186,7 @@ public void MainLoop(string[] args) { if (OperatingSystem.IsWindows()) { - if (PathEnvironmentUpdate.Add(currentPath, false)) + if (PathEnvironmentUpdate.Add(currentPath, allUsers: false)) { CLogger.LogInfo("Added program location to PATH."); Console.WriteLine("Added {0}.exe location to your PATH environment variable.", filename); @@ -673,7 +673,7 @@ public void MainLoop(string[] args) } else { - m_nSelectedPlatform = GetPlatformEnum(platformList[m_nCurrentSelection], true); + m_nSelectedPlatform = GetPlatformEnum(platformList[m_nCurrentSelection], bStripStr: true); m_nSelectedGame = -1; m_nCurrentSelection = 0; } @@ -875,82 +875,82 @@ from part in newTags.Split('|') switch ((GamePlatform)m_nSelectedPlatform) { case GamePlatform.Steam: - DownloadCustomImage(selectedGame.Title, PlatformSteam.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformSteam.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.GOG: - DownloadCustomImage(selectedGame.Title, PlatformGOG.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformGOG.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Ubisoft: - //DownloadCustomImage(selectedGame.Title, PlatformUbisoft.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformUbisoft.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.EA: - DownloadCustomImage(selectedGame.Title, PlatformEA.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformEA.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Epic: - DownloadCustomImage(selectedGame.Title, PlatformEpic.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformEpic.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Bethesda: - //DownloadCustomImage(selectedGame.Title, PlatformBethesda.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformBethesda.GetIconUrl(selectedGame), overwrite: true); //SetFgColour(cols.errorCC, cols.errorLtCC); CLogger.LogWarn("Bethesda Launcher was deprecated May 2022"); Console.WriteLine("ERROR: Bethesda Launcher was deprecated in May 2022!"); //Console.ResetColor(); break; case GamePlatform.Battlenet: - //DownloadCustomImage(selectedGame.Title, PlatformBattlenet.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformBattlenet.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Rockstar: - DownloadCustomImage(selectedGame.Title, PlatformRockstar.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformRockstar.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Amazon: - DownloadCustomImage(selectedGame.Title, PlatformAmazon.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformAmazon.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.BigFish: - DownloadCustomImage(selectedGame.Title, PlatformBigFish.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformBigFish.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Arc: - //DownloadCustomImage(selectedGame.Title, PlatformArc.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformArc.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Itch: - DownloadCustomImage(selectedGame.Title, PlatformItch.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformItch.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Paradox: - //DownloadCustomImage(selectedGame.Title, PlatformParadox.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformParadox.GetIconUrl(selectedGame), overwrite: true); break; - case GamePlatform.Plarium: // Webp won't be supported until we finish switch to a cross-platform graphics library - //DownloadCustomImage(selectedGame.Title, PlatformPlarium.GetIconUrl(selectedGame), true); + case GamePlatform.Plarium: // Webp won't be supported until we finish switch to a cross-platform graphics library + //DownloadCustomImage(selectedGame.Title, PlatformPlarium.GetIconUrl(selectedGame), overwrite: true); break; - case GamePlatform.Twitch: // deprecated, never implemented + case GamePlatform.Twitch: // deprecated, never implemented break; case GamePlatform.Wargaming: - //DownloadCustomImage(selectedGame.Title, PlatformWargaming.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformWargaming.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.IGClient: - DownloadCustomImage(selectedGame.Title, PlatformIGClient.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformIGClient.GetIconUrl(selectedGame), overwrite: true); break; - case GamePlatform.Microsoft: // TODO? - //DownloadCustomImage(selectedGame.Title, PlatformMicrosoft.GetIconUrl(selectedGame), true); + case GamePlatform.Microsoft: // TODO? + //DownloadCustomImage(selectedGame.Title, PlatformMicrosoft.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Oculus: //PlatformOculus.DownloadCustomImage(selectedGame); // Download and extract from zip file - DownloadCustomImage(selectedGame.Title, PlatformOculus.GetIconUrl(selectedGame), true); + DownloadCustomImage(selectedGame.Title, PlatformOculus.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Legacy: - //DownloadCustomImage(selectedGame.Title, PlatformLegacy.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformLegacy.GetIconUrl(selectedGame), overwrite: true); break; case GamePlatform.Riot: - //DownloadCustomImage(selectedGame.Title, PlatformRiot.GetIconUrl(selectedGame), true); + //DownloadCustomImage(selectedGame.Title, PlatformRiot.GetIconUrl(selectedGame), overwrite: true); break; - case GamePlatform.GameJolt: - DownloadCustomImage(selectedGame.Title, PlatformGameJolt.GetIconUrl(selectedGame), true); - break; - case GamePlatform.Humble: // avif (AV1) won't be supported until we finish switch to a cross-platform graphics library - //DownloadCustomImage(selectedGame.Title, PlatformHumble.GetIconUrl(selectedGame), true); - break; - case GamePlatform.RobotCache: - //DownloadCustomImage(selectedGame.Title, PlatformRobotCache.GetIconUrl(selectedGame), true); - break; - default: + case GamePlatform.GameJolt: + DownloadCustomImage(selectedGame.Title, PlatformGameJolt.GetIconUrl(selectedGame), overwrite: true); + break; + case GamePlatform.Humble: // avif (AV1) won't be supported until we finish switch to a cross-platform graphics library + //DownloadCustomImage(selectedGame.Title, PlatformHumble.GetIconUrl(selectedGame), overwrite: true); + break; + case GamePlatform.RobotCache: + //DownloadCustomImage(selectedGame.Title, PlatformRobotCache.GetIconUrl(selectedGame), overwrite: true); + break; + default: break; } continue; @@ -965,7 +965,9 @@ from part in newTags.Split('|') CLogger.LogError(e); } Console.ResetColor(); - platforms.DownloadAllImages(bFirstScan: false); + CLogger.LogInfo("Downloading images..."); + Console.Write("Downloading images"); // DownloadAllImages() will add dots for each platform + platforms.DownloadAllImages(); continue; default: @@ -1029,7 +1031,7 @@ from part in newTags.Split('|') case GamePlatform.Plarium: PlatformPlarium.Launch(); break; - case GamePlatform.Twitch: // deprecated, never implemented + case GamePlatform.Twitch: // deprecated, never implemented break; case GamePlatform.Wargaming: PlatformWargaming.Launch(); @@ -1037,7 +1039,7 @@ from part in newTags.Split('|') case GamePlatform.IGClient: PlatformIGClient.Launch(); break; - case GamePlatform.Microsoft: // TODO? + case GamePlatform.Microsoft: // TODO? if (OperatingSystem.IsWindows()) PlatformMicrosoft.Launch(); break; @@ -1050,16 +1052,16 @@ from part in newTags.Split('|') case GamePlatform.Riot: PlatformRiot.Launch(); break; - case GamePlatform.GameJolt: - PlatformGameJolt.Launch(); - break; - case GamePlatform.Humble: - PlatformHumble.Launch(); - break; - case GamePlatform.RobotCache: - PlatformRobotCache.Launch(); - break; - default: + case GamePlatform.GameJolt: + PlatformGameJolt.Launch(); + break; + case GamePlatform.Humble: + PlatformHumble.Launch(); + break; + case GamePlatform.RobotCache: + PlatformRobotCache.Launch(); + break; + default: break; } } @@ -1095,27 +1097,27 @@ from part in newTags.Split('|') { if (noInteractive) { - SetFgColour(cols.errorCC, cols.errorLtCC); - CLogger.LogWarn("Remove game from file."); - Console.WriteLine("{0} will be removed from the list.", selectedGame.Title); - Console.ResetColor(); - RemoveGame(selectedGame); + SetFgColour(cols.errorCC, cols.errorLtCC); + CLogger.LogWarn("Remove game from file."); + Console.WriteLine("{0} will be removed from the list.", selectedGame.Title); + Console.ResetColor(); + RemoveGame(selectedGame); } else { - //string answer = InputPrompt(string.Format("{0} not found! Remove from list? [y/n] >>> ", selectedGame.Title), cols); - //ClearInputLine(cols); - SetFgColour(cols.inputCC, cols.inputLtCC); - Console.Write("{0} not found! Remove from list? [y/n] >>> ", selectedGame.Title); - string answer = Console.ReadLine(); - if (answer[0] == 'Y' || answer[0] == 'y') - { - CLogger.LogWarn("Remove game from file."); - RemoveGame(selectedGame); - } - Console.ResetColor(); - } - } + //string answer = InputPrompt(string.Format("{0} not found! Remove from list? [y/n] >>> ", selectedGame.Title), cols); + //ClearInputLine(cols); + SetFgColour(cols.inputCC, cols.inputLtCC); + Console.Write("{0} not found! Remove from list? [y/n] >>> ", selectedGame.Title); + string answer = Console.ReadLine(); + if (answer[0] == 'Y' || answer[0] == 'y') + { + CLogger.LogWarn("Remove game from file."); + RemoveGame(selectedGame); + } + Console.ResetColor(); + } + } #else // DEBUG MODE // Make sure we've written to configuration file *before* this point, as we're setting overrides to CConfig.config below @@ -1150,7 +1152,7 @@ from part in newTags.Split('|') if (cfgv.imageBorder) { CConsoleImage.ShowImageBorder(sizeImage, locImage, IMG_BORDER_X_CUSHION, IMG_BORDER_Y_CUSHION); - CConsoleImage.ShowImage(m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, sizeImage, locImage, CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light ? cols.bgLtCC : cols.bgCC); + CConsoleImage.ShowImage(m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, sizeImage, locImage, CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light ? cols.bgLtCC : cols.bgCC); int ww = Console.WindowWidth; int y = 10; if (ww > 62) @@ -1161,7 +1163,7 @@ from part in newTags.Split('|') Console.SetCursorPosition(ww, y); } else - CConsoleImage.ShowImage(m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, sizeImage, locImage, CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light ? cols.bgLtCC : cols.bgCC); + CConsoleImage.ShowImage(m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, sizeImage, locImage, CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light ? cols.bgLtCC : cols.bgCC); } Console.ReadLine(); #endif @@ -1176,7 +1178,7 @@ from part in newTags.Split('|') else { RemoveGame(selectedGame); - platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), false); + platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), bFirstScan: false); m_nCurrentSelection--; if (GetPlatformGameList((GamePlatform)m_nSelectedPlatform).ToList().Count < 1) m_nSelectedPlatform = -1; @@ -1214,14 +1216,14 @@ private void MenuSwitchboard(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, if ((bool)CConfig.GetConfigBool(CConfig.CFG_USEALL)) m_nSelectedPlatform = (int)GamePlatform.All; else if (!(platformList.Contains(GetPlatformString(GamePlatform.Favourites))) && - platformList.Count < 3) // if there's only one platform + All, then choose All + platformList.Count < 3) // if there's only one platform + All, then choose All { CLogger.LogDebug("Only one valid platform found."); m_nSelectedPlatform = (int)GamePlatform.All; } } - if (setup) // show setting menu + if (setup) // show setting menu { ushort oldImgSize = cfgv.imageSize; cfgv.imageSize = 0; @@ -1244,7 +1246,7 @@ private void MenuSwitchboard(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, m_nSelectedPlatform = -1; setup = false; } - else if (browse && OperatingSystem.IsWindows()) // show filesystem browser + else if (browse && OperatingSystem.IsWindows()) // show filesystem browser { string oldPath = path; ushort oldImgSize = cfgv.imageSize; @@ -1301,9 +1303,9 @@ private void MenuSwitchboard(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, browse = false; } } - else if (m_nSelectedPlatform < 0) // show main menu (platform list) + else if (m_nSelectedPlatform < 0) // show main menu (platform list) nSelectionCode = m_dockConsole.DisplayMenu(cfgv, keys, cols, ref gameSearch, platformList.ToArray()); - else if (m_nSelectedGame < 0) // show game list + else if (m_nSelectedGame < 0) // show game list nSelectionCode = m_dockConsole.DisplayMenu(cfgv, keys, cols, ref gameSearch, GetPlatformTitles((GamePlatform)m_nSelectedPlatform).ToArray()); } @@ -1568,7 +1570,7 @@ private bool StartGame(CGame game) case GamePlatform.Plarium: PlatformPlarium.StartGame(game); break; - case GamePlatform.Twitch: // deprecated, never implemented + case GamePlatform.Twitch: // deprecated, never implemented break; case GamePlatform.Wargaming: PlatformWargaming.StartGame(game); @@ -1576,7 +1578,7 @@ private bool StartGame(CGame game) case GamePlatform.IGClient: PlatformIGClient.StartGame(game); break; - case GamePlatform.Microsoft: // TODO? + case GamePlatform.Microsoft: // TODO? PlatformMicrosoft.StartGame(game); break; case GamePlatform.Oculus: @@ -1588,16 +1590,16 @@ private bool StartGame(CGame game) case GamePlatform.Riot: PlatformRiot.StartGame(game); break; - case GamePlatform.GameJolt: - PlatformGameJolt.StartGame(game); - break; - case GamePlatform.Humble: - PlatformHumble.StartGame(game); - break; - case GamePlatform.RobotCache: - PlatformRobotCache.StartGame(game); - break; - default: + case GamePlatform.GameJolt: + PlatformGameJolt.StartGame(game); + break; + case GamePlatform.Humble: + PlatformHumble.StartGame(game); + break; + case GamePlatform.RobotCache: + PlatformRobotCache.StartGame(game); + break; + default: CLogger.LogInfo($"Launch: {game.Launch}"); if (OperatingSystem.IsWindows()) _ = StartShellExecute(game.Launch); @@ -1988,10 +1990,10 @@ public static string InputPassword(string prompt, CConfig.Colours cols) if (inp.Key == ConsoleKey.Enter) break; else if (inp.Key == ConsoleKey.Escape) - { + { pwd = ""; break; - } + } else if (inp.Key == ConsoleKey.Backspace) { if (pwd.Length > 0) @@ -2031,11 +2033,11 @@ public static void ClearInputLine(CConfig.Colours cols) } } - /// - /// Clear image with appropriate light or dark mode - /// - [SupportedOSPlatform("windows")] - public static void ClearColour(ConsoleColor bgDark, ConsoleColor bgLight) + /// + /// Clear image with appropriate light or dark mode + /// + [SupportedOSPlatform("windows")] + public static void ClearColour(ConsoleColor bgDark, ConsoleColor bgLight) { if (CConsoleHelper.m_LightMode == CConsoleHelper.LightMode.cColour_Light && bgLight > (ConsoleColor)(-1)) CConsoleImage.ClearImage(sizeImage, locImage, bgLight); @@ -2059,7 +2061,7 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s CLogger.LogInfo($"Parent process: {parentName}"); /* if (parentName.Equals("explorer") && !(bool)CConfig.GetConfigBool(CConfig.CFG_USECMD)) - { + { MessageBox.Show("ERROR: Interactive mode is disabled."); // Show usage hint in Message Box? Or just pause before closing? } else @@ -2092,8 +2094,8 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s } else if (!((bool)CConfig.GetConfigBool(CConfig.CFG_USECMD))) { - if (parentName.Equals("tcc") && // many keys won't work with combination of ConEmu64 + Take Command (tcc) - parentParentName.Equals("ConEmuC64")) // (though tcc is fine otherwise) + if (parentName.Equals("tcc") && // many keys won't work with combination of ConEmu64 + Take Command (tcc) + parentParentName.Equals("ConEmuC64")) // (though tcc is fine otherwise) { if (!(bool)CConfig.GetConfigBool(CConfig.CFG_USECMD) || (!cfgv.typingInput && @@ -2110,7 +2112,7 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s } } - else if (parentParentName.Equals("FireCMD")) // Displays menus, but colours aren't displayed, making navigation mode nigh useless + else if (parentParentName.Equals("FireCMD")) // Displays menus, but colours aren't displayed, making navigation mode nigh useless { if (!(bool)CConfig.GetConfigBool(CConfig.CFG_USETYPE)) { @@ -2152,13 +2154,13 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s { // check for known non-conhost terminal hosts (images not supported) if (((ushort)CConfig.GetConfigNum(CConfig.CFG_IMGSIZE) > 0 || (ushort)CConfig.GetConfigNum(CConfig.CFG_ICONSIZE) > 0) && - (parentParentName.Equals("WindowsTerminal") || // Windows Terminal - parentParentName.StartsWith("ServiceHub.Host.CLR") || // Visual Studio - parentParentName.Equals("Code") || // Visual Studio Code - parentParentName.Equals("Hyper") || // Hyper - parentParentName.Equals("tcmd") || // Take Command - parentParentName.Equals("bash") || // Cygwin Terminal (mintty), though this one may give false negatives (MSYS in - parentParentName.Equals("Console"))) // Console2 or ConsoleZ + (parentParentName.Equals("WindowsTerminal") || // Windows Terminal + parentParentName.StartsWith("ServiceHub.Host.CLR") || // Visual Studio + parentParentName.Equals("Code") || // Visual Studio Code + parentParentName.Equals("Hyper") || // Hyper + parentParentName.Equals("tcmd") || // Take Command + parentParentName.Equals("bash") || // Cygwin Terminal (mintty), though this one may give false negatives (MSYS in + parentParentName.Equals("Console"))) // Console2 or ConsoleZ { //TODO: Show this warning only once? @@ -2179,7 +2181,7 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s /* CConsoleImage.CONSOLE_FONT_INFO_EX currentFont = new CConsoleImage.CONSOLE_FONT_INFO_EX(); - CConsoleImage.GetCurrentConsoleFontEx(CConsoleImage.GetStdHandle(CConsoleImage.STD_OUTPUT_HANDLE), false, currentFont); + CConsoleImage.GetCurrentConsoleFontEx(CConsoleImage.GetStdHandle(CConsoleImage.STD_OUTPUT_HANDLE), bMaximumWindow: false, currentFont); if (currentFont.FaceName.Equals("Terminal")) { //SetFgColour(cols.errorCC, cols.errorLtCC); @@ -2199,7 +2201,7 @@ public static void CheckShellCapabilities(ref CConfig.ConfigVolatile cfgv, out s } public static bool DownloadCustomImage(string title, string url, bool overwrite = false) - { + { if (!string.IsNullOrEmpty(url)) { string ext = Path.GetExtension(url); @@ -2209,7 +2211,7 @@ public static bool DownloadCustomImage(string title, string url, bool overwrite string.Concat(title.Split(Path.GetInvalidFileNameChars())) + ext); if (overwrite) - BackupCustomImage(title, false); + BackupCustomImage(title, restore: false); if (!File.Exists(iconFile)) { @@ -2234,18 +2236,18 @@ public static bool DownloadCustomImage(string title, string url, bool overwrite if (File.Exists(iconFile)) { if (overwrite) - DeleteCustomImage(title, true); + DeleteCustomImage(title, justBackups: true); return true; } else if (overwrite) - BackupCustomImage(title, true); + BackupCustomImage(title, restore: true); } } return false; } public static void DeleteCustomImage(string title, bool justBackups = false) - { + { foreach (string ext in supportedImages) { string iconFile = Path.Combine(currentPath, IMAGE_FOLDER_NAME, @@ -2290,7 +2292,7 @@ public static void BackupCustomImage(string title, bool restore = false) if (File.Exists(iconFileBak)) { CLogger.LogDebug("Restoring \"{0}\"", iconFile); - File.Move(iconFileBak, iconFile, true); + File.Move(iconFileBak, iconFile, overwrite: true); } break; } @@ -2299,7 +2301,7 @@ public static void BackupCustomImage(string title, bool restore = false) if (File.Exists(iconFile)) { CLogger.LogDebug("Backing up \"{0}\"", iconFile); - File.Move(iconFile, iconFileBak, true); + File.Move(iconFile, iconFileBak, overwrite: true); } } } @@ -2313,10 +2315,10 @@ public static void BackupCustomImage(string title, bool restore = false) [SupportedOSPlatform("windows")] public static Guid GetGuid() { - using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, - RegistryView.Registry64).OpenSubKey("SOFTWARE\\Microsoft\\Cryptography", RegistryKeyPermissionCheck.ReadSubTree); // HKLM64 - return Guid.Parse((string)key.GetValue("MachineGuid")); - } + using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, + RegistryView.Registry64).OpenSubKey("SOFTWARE\\Microsoft\\Cryptography", RegistryKeyPermissionCheck.ReadSubTree); // HKLM64 + return Guid.Parse((string)key.GetValue("MachineGuid")); + } [SupportedOSPlatform("windows")] public static Process StartShellExecute(string file) @@ -2458,9 +2460,9 @@ internal class StartupInfo public short wShowWindow; public short cbReserved2; public IntPtr lpReserved2 = IntPtr.Zero; - public SafeFileHandle hStdInput = new(IntPtr.Zero, false); - public SafeFileHandle hStdOutput = new(IntPtr.Zero, false); - public SafeFileHandle hStdError = new(IntPtr.Zero, false); + public SafeFileHandle hStdInput = new(IntPtr.Zero, ownsHandle: false); + public SafeFileHandle hStdOutput = new(IntPtr.Zero, ownsHandle: false); + public SafeFileHandle hStdError = new(IntPtr.Zero, ownsHandle: false); public StartupInfo() { @@ -2495,7 +2497,7 @@ public void Dispose() internal class SecurityAttributes { public int nLength = 12; - public SafeLocalMemHandle lpSecurityDescriptor = new SafeLocalMemHandle(IntPtr.Zero, false); + public SafeLocalMemHandle lpSecurityDescriptor = new SafeLocalMemHandle(IntPtr.Zero, ownsHandle: false); public bool bInheritHandle; } @@ -2528,7 +2530,7 @@ protected override bool ReleaseHandle() /// A utility class to minimise/restore/maximise windows. /// public struct WindowMessage - { + { public const int SW_HIDE = 0; public const int SW_NORMAL = 1; public const int SW_SHOWMINIMIZED = 2; @@ -2580,7 +2582,7 @@ public static bool Add(string inPath, bool allUsers) } else { - envKey = Registry.CurrentUser.OpenSubKey("Environment", true); + envKey = Registry.CurrentUser.OpenSubKey("Environment", writable: true); string profile = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); if (inPath.Length > profile.Length && inPath.Substring(0, profile.Length).Equals(profile)) diff --git a/GameLauncher_Console/GameLauncher_Console/Extensions.cs b/GameLauncher_Console/GameLauncher_Console/Extensions.cs index 3854fdd..116c25a 100644 --- a/GameLauncher_Console/GameLauncher_Console/Extensions.cs +++ b/GameLauncher_Console/GameLauncher_Console/Extensions.cs @@ -89,7 +89,7 @@ public static string GetDescription(this T source) FieldInfo field = source.GetType().GetField(source.ToString()); DescriptionAttribute[] attr = (DescriptionAttribute[])field.GetCustomAttributes( - typeof(DescriptionAttribute), false); + typeof(DescriptionAttribute), inherit: false); if (attr != null && attr.Length > 0) return attr[0].Description; } diff --git a/GameLauncher_Console/GameLauncher_Console/GameData.cs b/GameLauncher_Console/GameLauncher_Console/GameData.cs index 8d97785..756f324 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameData.cs +++ b/GameLauncher_Console/GameLauncher_Console/GameData.cs @@ -78,17 +78,17 @@ public enum GamePlatform Legacy = 26, [Description("Riot Client")] Riot = 27, - [Description("Game Jolt Client")] - GameJolt = 28, - [Description("Humble App")] - Humble = 29, - [Description("RobotCache")] - RobotCache = 30, - //[Description("Miscellaneous")] - //Misc = 31, - } - - public enum Match + [Description("Game Jolt Client")] + GameJolt = 28, + [Description("Humble App")] + Humble = 29, + [Description("RobotCache")] + RobotCache = 30, + //[Description("Miscellaneous")] + //Misc = 31, + } + + public enum Match { [Description("No matches found")] NoMatches = 0, @@ -109,11 +109,11 @@ public enum Match } public struct Sorter - { + { public CConsoleHelper.SortMethod method; public string columnName; public bool isAscending; - } + } public static readonly List _articles = new() { @@ -127,7 +127,7 @@ public struct Sorter "Der", "Das", //, "Die" [English word] // German definite "Ein", "Eine" // German indefinite */ - }; + }; /// /// Collect data from the registry or filesystem @@ -174,7 +174,7 @@ public ImportGameData(string strPlatform, GameData gameData) m_bFavourite = bFavourite; m_bHidden = bHidden; m_tags = tags ?? new List(); - m_dateLastRun = dateLastRun; + m_dateLastRun = dateLastRun; m_rating = rating; m_numRuns = numRuns; */ @@ -465,9 +465,9 @@ from part in tags.Split('|') } public void ClearTags() - { + { m_tags = new List(); - } + } /// /// LastRunDate getter @@ -498,7 +498,7 @@ public ushort Rating return m_rating; } set - { + { if (value >= 0 && value <= 5) m_rating = value; } @@ -657,7 +657,7 @@ public void InsertGame(string strID, string strTitle, string strLaunch, string s { GamePlatform platformEnum; // If platform is incorrect or unsupported, default to unknown. - //if (!Enum.TryParse(strPlatform, true, out GamePlatform platformEnum)) + //if (!Enum.TryParse(strPlatform, ignoreCase: true, out GamePlatform platformEnum)) platformEnum = (GamePlatform)GetPlatformEnum(strPlatform); if (platformEnum < 0) platformEnum = GamePlatform.Unknown; @@ -817,7 +817,7 @@ public static int GetPlatformEnum(string strPlatformName) { CLogger.LogError(e); } - if (Enum.TryParse(strPlatformName, true, out GamePlatform platformEnum)) + if (Enum.TryParse(strPlatformName, ignoreCase: true, out GamePlatform platformEnum)) return (int)platformEnum; return -1; } @@ -841,7 +841,7 @@ public static int GetPlatformEnum(string strPlatformName, bool bStripStr) public static Dictionary GetPlatforms() { Dictionary platformDict = new() - { + { { GetPlatformString(GamePlatform.Search), m_searchResults.Count }, { GetPlatformString(GamePlatform.Favourites), m_favourites.Count }, { GetPlatformString(GamePlatform.New), m_newGames.Count }, @@ -980,7 +980,7 @@ public static void AddGame(string strID, string strTitle, string strLaunch, stri { GamePlatform platformEnum; // If platform is incorrect or unsupported, default to unknown. - //if (!Enum.TryParse(strPlatform, true, out GamePlatform platformEnum)) + //if (!Enum.TryParse(strPlatform, ignoreCase: true, out GamePlatform platformEnum)) platformEnum = (GamePlatform)GetPlatformEnum(strPlatform); if (platformEnum < 0) platformEnum = GamePlatform.Unknown; @@ -1170,7 +1170,7 @@ public static void RemoveGame(CGame game) } public static void ClearNewGames() - { + { m_newGames.Clear(); foreach (CGame game in m_allGames) { @@ -1245,11 +1245,11 @@ public static void SortGames(CConsoleHelper.SortMethod sortMethod, bool faveSort SortGameSet(ref temp, sortMethod, faveSort, instSort, ignoreArticle); m_gameDictionary[pair.Key] = temp; } - SortGameSet(ref m_favourites, sortMethod, false, instSort, ignoreArticle); + SortGameSet(ref m_favourites, sortMethod, faveSort: false, instSort, ignoreArticle); SortGameSet(ref m_newGames, sortMethod, faveSort, instSort, ignoreArticle); SortGameSet(ref m_allGames, sortMethod, faveSort, instSort, ignoreArticle); SortGameSet(ref m_hidden, sortMethod, faveSort, instSort, ignoreArticle); - SortGameSet(ref m_notInstalled, sortMethod, faveSort, false, ignoreArticle); + SortGameSet(ref m_notInstalled, sortMethod, faveSort, instSort: false, ignoreArticle); } /// @@ -1362,7 +1362,7 @@ public static string GetDescription(this T source) FieldInfo field = source.GetType().GetField(source.ToString()); DescriptionAttribute[] attr = (DescriptionAttribute[])field.GetCustomAttributes( - typeof(DescriptionAttribute), false); + typeof(DescriptionAttribute), inherit: false); if (attr != null && attr.Length > 0) return attr[0].Description; } @@ -1410,36 +1410,36 @@ public static string GetAlias(string title) return alias; } - /// - /// Remove Unicode characters from a string - /// - /// A string - /// simplified string - public static string StripUnicode(string s) - { - StringBuilder sb = new(s.Length); - foreach (char c in s) - { - if (c >= 127) - continue; - if (c < 32) - continue; - if (c == '%') - continue; - if (c == '?') - continue; - sb.Append(c); - } - - return sb.ToString(); - } - - /// - /// Return set of games from a fuzzy match - /// - /// dictionary of titles with confidence levels - /// String to match - public static Dictionary FindMatchingTitles(string match) + /// + /// Remove Unicode characters from a string + /// + /// A string + /// simplified string + public static string StripUnicode(string s) + { + StringBuilder sb = new(s.Length); + foreach (char c in s) + { + if (c >= 127) + continue; + if (c < 32) + continue; + if (c == '%') + continue; + if (c == '?') + continue; + sb.Append(c); + } + + return sb.ToString(); + } + + /// + /// Return set of games from a fuzzy match + /// + /// dictionary of titles with confidence levels + /// String to match + public static Dictionary FindMatchingTitles(string match) { return FindMatchingTitles(match, 0); } @@ -1477,7 +1477,7 @@ public static Dictionary FindMatchingTitles(string match, int max) { i++; m_searchResults.Add(game); - outDict.Add(game.Title, (int)Match.ExactTitle); // full confidence + outDict.Add(game.Title, (int)Match.ExactTitle); // full confidence if (max > 0 && i >= max) break; } else if (game.Alias.Equals(match) || @@ -1485,7 +1485,7 @@ public static Dictionary FindMatchingTitles(string match, int max) { i++; m_searchResults.Add(game); - outDict.Add(game.Title, (int)Match.ExactAlias); // very high confidence + outDict.Add(game.Title, (int)Match.ExactAlias); // very high confidence if (max > 0 && i >= max) break; } else if (shortTitle.StartsWith(match) || @@ -1493,14 +1493,14 @@ public static Dictionary FindMatchingTitles(string match, int max) { i++; m_searchResults.Add(game); - outDict.Add(game.Title, (int)Match.BeginTitle); // medium confidence + outDict.Add(game.Title, (int)Match.BeginTitle); // medium confidence if (max > 0 && i >= max) break; } else if (game.Alias.StartsWith(match)) { i++; m_searchResults.Add(game); - outDict.Add(game.Title, (int)Match.BeginAlias); // medium confidence + outDict.Add(game.Title, (int)Match.BeginAlias); // medium confidence if (max > 0 && i >= max) break; } else if ((fullTitle.Contains("- ") && diff --git a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs index 96d01d0..d5ee6bb 100644 --- a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs +++ b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs @@ -188,8 +188,7 @@ public static bool ImportFromJSON(CPlatform platforms, out List matches) if (nGameCount < 1) { CLogger.LogInfo("{0} is empty, corrupt, or outdated. Scanning for games...", _game_json_file); - Console.Write("Scanning for games"); // ScanGames() will add dots for each platform - platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), true); + platforms.ScanGames((bool)CConfig.GetConfigBool(CConfig.CFG_USECUST), !(bool)CConfig.GetConfigBool(CConfig.CFG_IMGSCAN), bFirstScan: true); } return !parseError; @@ -584,7 +583,7 @@ private static bool TranslateConfig(ref CConfig.Hotkeys hotkeys, ref CConfig.Col CLogger.LogError(e); Console.WriteLine($"ERROR: Bad colour value. Resetting defaults..."); parseError = true; - SetConfigDefaults(false, false, false, false, false, true, false, false); + SetConfigDefaults(forceAll: false, boolOnly: false, listOnly: false, numOnly: false, longOnly: false, colourOnly: true, keyOnly: false, textOnly: false); } try { @@ -664,7 +663,7 @@ private static bool TranslateConfig(ref CConfig.Hotkeys hotkeys, ref CConfig.Col CLogger.LogError(e); Console.WriteLine($"ERROR: Bad hotkey value. Resetting defaults..."); parseError = true; - SetConfigDefaults(false, false, false, false, false, false, true, false); + SetConfigDefaults(forceAll: false, boolOnly: false, listOnly: false, numOnly: false, longOnly: false, colourOnly: false, keyOnly: true, textOnly: false); } return !parseError; } @@ -983,7 +982,7 @@ private static void SetConfigDefaults(bool forceAll, bool boolOnly, bool listOnl /// private static void SetConfigDefaults(bool forceAll) { - SetConfigDefaults(forceAll, false, false, false, false, false, false, false); + SetConfigDefaults(forceAll, boolOnly: false, listOnly: false, numOnly: false, longOnly: false, colourOnly: false, keyOnly: false, textOnly: false); } /// diff --git a/GameLauncher_Console/GameLauncher_Console/Logger.cs b/GameLauncher_Console/GameLauncher_Console/Logger.cs index 1885666..4081a9b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Logger.cs +++ b/GameLauncher_Console/GameLauncher_Console/Logger.cs @@ -48,7 +48,7 @@ public static void Configure(string strPathToLog) m_strFilePath = strPathToLog; try { - using StreamWriter writer = new(m_strFilePath, true); + using StreamWriter writer = new(m_strFilePath, append: true); writer.WriteLine("_____S_T_A_R_T_E_D_____"); writer.Close(); } @@ -59,7 +59,7 @@ public static void Configure(string strPathToLog) // Try to create a file and write the starting line try { - using StreamWriter writer = new(strPathToLog, true); + using StreamWriter writer = new(strPathToLog, append: true); writer.WriteLine("_____S_T_A_R_T_E_D_____"); writer.Close(); } @@ -110,7 +110,7 @@ public static void LogInfo(string strMessage, params object[] list) try { - using StreamWriter writer = new(m_strFilePath, true); + using StreamWriter writer = new(m_strFilePath, append: true); string strDateTime = DateTime.Now.ToString(); string msg = string.Format(strMessage, list); string line = string.Format("{0} : {1}", strDateTime, msg); @@ -148,7 +148,7 @@ public static void LogError(Exception ex, string strMessage = null) try { - using StreamWriter writer = new(m_strFilePath, true); + using StreamWriter writer = new(m_strFilePath, append: true); string strDateTime = DateTime.Now.ToString(); string msg = string.Format("ERROR: {0} | {1} {2} | {3}", ex.Message, ex.Source, ex.StackTrace, strMessage ?? ""); string line = string.Format("{0} : {1}", strDateTime, msg); @@ -172,7 +172,7 @@ private static void LogFatal(Exception ex) try { - using StreamWriter writer = new(m_strFilePath, true); + using StreamWriter writer = new(m_strFilePath, append: true); string strDateTime = DateTime.Now.ToString(); string msg = string.Format("FATAL ERROR: {0} | {1} {2}", ex.Message, ex.Source, ex.StackTrace); string line = string.Format("{0} : {1}", strDateTime, msg); diff --git a/GameLauncher_Console/GameLauncher_Console/Platform.cs b/GameLauncher_Console/GameLauncher_Console/Platform.cs index bc5c433..f0b5898 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platform.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platform.cs @@ -174,9 +174,9 @@ public string Description /// Container for a single platform /// public struct PlatformObject - { + { public PlatformObject(int platformID, string name, int gameCount, string description) - { + { PlatformID = platformID; Name = name; GameCount = gameCount; @@ -209,9 +209,9 @@ public CPlatform() } public void AddSupportedPlatform(IPlatform platform) - { + { _platforms.Add(platform); - } + } /// /// Scan the registry and filesystem for games, add new games to memory and export into JSON document @@ -252,13 +252,13 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) { tempGameSet.InsertGame(data.m_gameData.GameId, data.m_gameData.GameName, - data.m_gameData.Launch == default ? data.m_gameData.LaunchUrl : (string.IsNullOrEmpty(data.m_gameData.LaunchArgs) ? data.m_gameData.Launch.GetFullPath() : data.m_gameData.Launch.GetFullPath() + " " + data.m_gameData.LaunchArgs), + data.m_gameData.Launch == default ? data.m_gameData.LaunchUrl : (string.IsNullOrEmpty(data.m_gameData.LaunchArgs) ? data.m_gameData.Launch.GetFullPath() : data.m_gameData.Launch.GetFullPath() + " " + data.m_gameData.LaunchArgs), data.m_gameData.LaunchUrl, data.m_gameData.Icon == default ? "" : data.m_gameData.Icon.GetFullPath(), data.m_gameData.Metadata == default ? "" : data.m_gameData.Metadata.TryGetValue("IconUrl", out var urls) && urls.Count > 0 ? urls[0] : (data.m_gameData.Metadata.TryGetValue("ImageUrl", out urls) && urls.Count > 0 ? urls[0] : ""), data.m_gameData.Uninstall == default ? data.m_gameData.UninstallUrl : (string.IsNullOrEmpty(data.m_gameData.UninstallArgs) ? data.m_gameData.Uninstall.GetFullPath() : data.m_gameData.Uninstall.GetFullPath() + " " + data.m_gameData.UninstallArgs), data.m_gameData.IsInstalled, - false, true, false, + bIsFavourite: false, bIsNew: true, bIsHidden: false, GetAlias(data.m_gameData.GameName), data.m_strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); @@ -274,12 +274,12 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) // Console.Write("."); CLogger.LogInfo("Looking for {0}...", GetPlatformString(GamePlatform.Custom)); - + PlatformCustom custom = new(); custom.GetGames(ref tempGameSet); MergeGameSets(tempGameSet); if (bFirstScan) - SortGames((int)CConsoleHelper.SortMethod.cSort_Alpha, false, (bool)CConfig.GetConfigBool(CConfig.CFG_USEINST), true); + SortGames((int)CConsoleHelper.SortMethod.cSort_Alpha, faveSort: false, (bool)CConfig.GetConfigBool(CConfig.CFG_USEINST), ignoreArticle: true); CLogger.LogDebug("-----------------------"); ExportGames(GetPlatformGameList(GamePlatform.All).ToList()); Console.SetCursorPosition(0, Console.CursorTop); @@ -337,18 +337,18 @@ public void DownloadAllImages(bool bFirstScan = false) /// /// List of PlatformObjects public static DictionaryGetPlatforms() - { + { Dictionary platforms = new(); m_qryRead.MakeFieldsNull(); if(m_qryRead.Select() == SQLiteErrorCode.Ok) - { + { do { platforms[m_qryRead.Name] = new PlatformObject(m_qryRead); } while(m_qryRead.Fetch()); - } + } return platforms; - } + } /// /// Insert specified platform into the database @@ -356,12 +356,12 @@ public static DictionaryGetPlatforms() /// The PlatformObject to insert /// True on insert success, otherwise false public static bool InsertPlatform(PlatformObject platform) - { + { m_qryWrite.MakeFieldsNull(); m_qryWrite.Name = platform.Name; m_qryWrite.Description = platform.Description; return m_qryWrite.Insert() == SQLiteErrorCode.Ok; - } + } /// /// Insert specified platform into the database @@ -383,7 +383,7 @@ public static bool InsertPlatform(string title, string description) /// The PlatformObject to write /// True on update success, otherwise false public static bool UpdatePlatform(PlatformObject platform) - { + { m_qryWrite.MakeFieldsNull(); m_qryWrite.PlatformID = platform.PlatformID; m_qryWrite.Name = platform.Name; @@ -397,10 +397,10 @@ public static bool UpdatePlatform(PlatformObject platform) /// The platformID to delete /// True on delete success, otherwise false public static bool RemovePlatform(int platformID) - { + { m_qryWrite.MakeFieldsNull(); m_qryWrite.PlatformID = platformID; return m_qryWrite.Delete() == SQLiteErrorCode.Ok; } - } + } } \ No newline at end of file diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs index 7e5cb37..b43e557 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs @@ -48,7 +48,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) _ = CDock.StartShellExecute(START_GAME + GetGameID(game.ID)); else diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs index d1bb1a8..12078d7 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs @@ -50,7 +50,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs index 45a4b1b..4121744 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs @@ -48,7 +48,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs index 859b36d..5251c0c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs @@ -51,7 +51,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs index 986f03f..2014548 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs @@ -60,7 +60,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs index 4b37f23..40a579e 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs @@ -88,7 +88,7 @@ private static void FindCustomLinkFiles(ref CTempGameSet tempGameSet) string strAlias = GetAlias(strTitle); if (strAlias.Equals(strTitle, CDock.IGNORE_CASE)) strAlias = ""; - tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, bIsInstalled: true, bIsFavourite: false, bIsNew: true, bIsHidden: false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); } } } @@ -115,7 +115,7 @@ private static void FindCustomBinaries(ref CTempGameSet tempGameSet) string strAlias = GetAlias(strTitle); if (strAlias.Equals(strTitle, CDock.IGNORE_CASE)) strAlias = ""; - tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, true, false, true, false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); + tempGameSet.InsertGame(strID, strTitle, strLaunch, "", strLaunch, "", strUninstall, bIsInstalled: true, bIsFavourite: false, bIsNew: true, bIsHidden: false, strAlias, strPlatform, new List(), DateTime.MinValue, 0, 0, 0f); } } } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index f0486fc..010eb02 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -88,7 +88,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); /* if (OperatingSystem.IsWindows()) @@ -240,7 +240,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa } if (string.IsNullOrEmpty(strTitle)) { - TextInfo ti = new CultureInfo("en-US", false).TextInfo; + TextInfo ti = new CultureInfo("en-US", useUserOverride: false).TextInfo; strTitle = ti.ToTitleCase(slug.Replace("-", " ")); } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index 91c0fdf..82e852e 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -54,7 +54,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); //bool useEGL = (bool)CConfig.GetConfigBool(CConfig.CFG_USEEGL); bool useLeg = (bool)CConfig.GetConfigBool(CConfig.CFG_USELEG); string pathLeg = CConfig.GetConfigString(CConfig.CFG_PATHLEG); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index 8ab5e77..7952fa5 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -72,7 +72,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) _ = CDock.StartShellExecute(INSTALL_GAME + GetGameID(game.ID)); else diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs index 21c1158..d6dbc3c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs @@ -63,7 +63,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) { try diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs index 31d9874..78a4324 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs @@ -60,7 +60,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs index 779ceea..613be73 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs @@ -65,7 +65,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) { try diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs index be9159f..2f6ef15 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs @@ -61,7 +61,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index be57747..a8ad6e3 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -46,7 +46,7 @@ public class PlatformMicrosoft : IPlatform [SupportedOSPlatform("windows")] public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs index 6083081..a73f1fb 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs @@ -49,7 +49,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs index ce8338b..1810e8d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs @@ -56,7 +56,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs index f5250c6..db76da6 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs @@ -44,7 +44,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs index 03733e6..caae658 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs @@ -43,7 +43,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs index 984158c..7980f26 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs @@ -38,7 +38,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs index 55ddce8..d8b6fd0 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs @@ -44,7 +44,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 405c056..590157b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -59,7 +59,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - CDock.DeleteCustomImage(game.Title, false); + CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) _ = CDock.StartShellExecute(INSTALL_GAME + GetGameID(game.ID)); else diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs index b3c9e1f..baf28a5 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs @@ -46,7 +46,7 @@ public static int InstallGame(CGame game) // Some games don't provide a valid ID if (game.ID.StartsWith(UPLAY_PREFIX)) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); if (OperatingSystem.IsWindows()) CDock.StartShellExecute(START_GAME + GetGameID(game.ID)); else diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs index b49cb03..b463a9c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs @@ -41,7 +41,7 @@ public static void Launch() // 1 = success public static int InstallGame(CGame game) { - //CDock.DeleteCustomImage(game.Title, false); + //CDock.DeleteCustomImage(game.Title, justBackups: false); Launch(); return -1; } diff --git a/GameLauncher_Console/GameLauncher_Console/SqlDB.cs b/GameLauncher_Console/GameLauncher_Console/SqlDB.cs index c9197ac..ff3f13b 100644 --- a/GameLauncher_Console/GameLauncher_Console/SqlDB.cs +++ b/GameLauncher_Console/GameLauncher_Console/SqlDB.cs @@ -518,14 +518,14 @@ protected virtual string PrepareAdvancedWhereStatement() //while(-1 < vMask && vMask < whereCondition.Length) while(true) { - fMask = whereCondition.IndexOf(M_FIELD_MASK, fMask, false); + fMask = whereCondition.IndexOf(M_FIELD_MASK, fMask, ignoreCase: false); if(fMask == -1) { break; } whereCondition.Replace(M_FIELD_MASK, m_sqlRow[columnIndex].Column, fMask, 1); - vMask = whereCondition.IndexOf(M_VALUE_MASK, fMask, false); + vMask = whereCondition.IndexOf(M_VALUE_MASK, fMask, ignoreCase: false); if (vMask == -1) { break; From 4b3cee9840b7617a55243d997a36d52f14c83696 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Tue, 5 Mar 2024 12:42:57 -0800 Subject: [PATCH 15/21] Add Steam API key Also move GetLogin() from EA platform to Dock so Steam can use it for the API key prompt --- .../GameLauncher_Console/App.config | 3 + .../GameLauncher_Console/Config.cs | 1 + .../GameLauncher_Console/Dock.cs | 89 +++++++++++- .../GameLauncher_Console/JsonWrapper.cs | 1 + .../GameLauncher_Console/Platforms/EA.cs | 133 ++++++------------ .../GameLauncher_Console/Platforms/Steam.cs | 5 +- .../Properties/Settings.Designer.cs | 14 +- .../Properties/Settings.settings | 3 + 8 files changed, 155 insertions(+), 94 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/App.config b/GameLauncher_Console/GameLauncher_Console/App.config index 98d3ba0..543f0fa 100644 --- a/GameLauncher_Console/GameLauncher_Console/App.config +++ b/GameLauncher_Console/GameLauncher_Console/App.config @@ -176,6 +176,9 @@ 0 + + + diff --git a/GameLauncher_Console/GameLauncher_Console/Config.cs b/GameLauncher_Console/GameLauncher_Console/Config.cs index 6eb446d..e0d86de 100644 --- a/GameLauncher_Console/GameLauncher_Console/Config.cs +++ b/GameLauncher_Console/GameLauncher_Console/Config.cs @@ -183,6 +183,7 @@ public struct Colours public const string CFG_IMGPOS = "num_selected_image_y_location_percent"; public const string CFG_COLSIZE = "num_grid_text_min_column_characters"; public const string CFG_STEAMID = "num_steam_id"; + public const string CFG_STEAMAPI = "text_steam_apikey"; public const string CFG_OCULUSID = "text_oculus_username"; public const string CFG_ORIGINID = "text_ea_email"; public const string CFG_ORIGINPW = "base64_ea_password"; diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index 32aa21d..241a7e9 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -16,6 +16,11 @@ //using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using System.Security.Cryptography; +using System.Security; + +using System.Text; + //using System.Security; //using System.Security.Permissions; //using System.Text; @@ -2312,7 +2317,89 @@ public static void BackupCustomImage(string title, bool restore = false) } } - [SupportedOSPlatform("windows")] +#nullable enable + public static bool GetPassword(string prompt, string config, out SecureString? password) + { + password = new(); + try + { + string? encrypted = CConfig.GetConfigString(config); + if (!string.IsNullOrEmpty(encrypted)) + { + Span byteSpan = Convert.FromBase64String(encrypted); + if (OperatingSystem.IsWindows()) + { + Array.ForEach(Encoding.UTF8.GetString(ProtectedData.Unprotect(byteSpan.ToArray(), null, DataProtectionScope.CurrentUser)).ToArray(), password.AppendChar); + } + else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password + Array.ForEach(Encoding.UTF8.GetString(byteSpan).ToArray(), password.AppendChar); + password.MakeReadOnly(); + } + + if (string.IsNullOrEmpty(encrypted)) + { + string? strPwd = InputPassword(prompt + " >>> ", new()); + if (!string.IsNullOrEmpty(strPwd)) + { + Span byteSpan = new(); + if (OperatingSystem.IsWindows()) + byteSpan = ProtectedData.Protect(Encoding.UTF8.GetBytes(strPwd), null, DataProtectionScope.CurrentUser); + else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password + byteSpan = Encoding.UTF8.GetBytes(strPwd); + password = new NetworkCredential("", strPwd).SecurePassword; + password.MakeReadOnly(); + encrypted = Convert.ToBase64String(byteSpan); + CConfig.SetConfigValue(config, encrypted); + byteSpan = null; + } + strPwd = null; + ClearInputLine(new()); + } + encrypted = null; + if (password.Length > 0) + return true; + } + catch (Exception e) + { + CLogger.LogError(e); + } + + return false; + } + + public static bool GetLogin(string prompt, string config, out string? input, bool email = false) + { + input = CConfig.GetConfigString(config); + try + { + if (string.IsNullOrEmpty(input)) + { + input = InputPrompt(prompt + " >>> ", new()); + ClearInputLine(new()); + } + + if (string.IsNullOrEmpty(input)) + CConfig.SetConfigValue(config, "skipped"); + else if (email && (!input.Contains('@') || !input.Contains('.'))) + CConfig.SetConfigValue(config, "invalid"); + else + { + CConfig.SetConfigValue(config, input); + ClearInputLine(new()); + } + if (!string.IsNullOrEmpty(input)) + return true; + } + catch (Exception e) + { + CLogger.LogError(e); + } + + return false; + } +#nullable disable + + [SupportedOSPlatform("windows")] public static Guid GetGuid() { using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, diff --git a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs index d5ee6bb..b8eac2f 100644 --- a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs +++ b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs @@ -1165,6 +1165,7 @@ private static void SetKeyDefaults(bool force) private static void SetTextDefaults(bool force) { SetDefaultVal(CConfig.CFG_PATHLEG, force); + SetDefaultVal(CConfig.CFG_STEAMAPI, force); SetDefaultVal(CConfig.CFG_OCULUSID, force); SetDefaultVal(CConfig.CFG_ORIGINID, force); SetDefaultVal(CConfig.CFG_ORIGINPW, force); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index e876027..0da7c1c 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -1,27 +1,26 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.EADesktop; -using GameFinder.StoreHandlers.EADesktop.Crypto; -using GameFinder.StoreHandlers.EADesktop.Crypto.Windows; +using GameCollector.StoreHandlers.EADesktop; +using GameCollector.StoreHandlers.EADesktop.Crypto.Windows; using Logger; -using PureOrigin.API; -using SHA3.Net; +//using PureOrigin.API; +//using SHA3.Net; using System; -using System.Buffers; +//using System.Buffers; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; +//using System.Globalization; using System.IO; -using System.Linq; -using System.Management; -using System.Net; -using System.Net.Http; -using System.Runtime.InteropServices; +//using System.Linq; +//using System.Management; +//using System.Net; +//using System.Net.Http; +//using System.Runtime.InteropServices; using System.Runtime.Versioning; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using System.Xml; +//using System.Security; +//using System.Security.Cryptography; +//using System.Text; +//using System.Threading.Tasks; +//using System.Xml; using static GameLauncher_Console.CGameData; using FileSystem = NexusMods.Paths.FileSystem; @@ -66,7 +65,7 @@ public class PlatformEA : IPlatform private static readonly string _name = Enum.GetName(typeof(GamePlatform), ENUM); private static readonly string _hwfile = string.Format("{0}_hwinfo.txt", _name); - private readonly static byte[] _ea_iv = { 0x84, 0xef, 0xc4, 0xb8, 0x36, 0x11, 0x9c, 0x20, 0x41, 0x93, 0x98, 0xc3, 0xf3, 0xf2, 0xbc, 0xef, }; + private readonly static byte[] _ea_iv = [0x84, 0xef, 0xc4, 0xb8, 0x36, 0x11, 0x9c, 0x20, 0x41, 0x93, 0x98, 0xc3, 0xf3, 0xf2, 0xbc, 0xef,]; GamePlatform IPlatform.Enum => ENUM; @@ -136,7 +135,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa if (!(bool)CConfig.GetConfigBool(CConfig.CFG_INSTONLY)) { - if (GetLogin(out string email, out SecureString password) && (!email.Equals("skipped") && !email.Equals("invalid") && !password.Equals(null) && password.Length > 0)) + if (CDock.GetLogin(_name + " e-mail", CConfig.CFG_ORIGINID, out string? email, true) && (!email.Equals("skipped") && !email.Equals("invalid")) + && (CDock.GetPassword(_name + " password", CConfig.CFG_ORIGINPW, out SecureString? password) && !password.Equals(null) && password.Length > 0)) { ownedGames = GetOwnedGames(email, password).Result; password.Dispose(); @@ -430,7 +430,9 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa public static string GetIconUrl(CGame game) { - if (GetLogin(out string email, out SecureString password) && (!email.Equals("skipped") && !email.Equals("invalid") && !password.Equals(null) && password.Length > 0)) + /* + if (CDock.GetLogin(_name + " e-mail", CConfig.CFG_ORIGINID, out string? email, true) && (!email.Equals("skipped") && !email.Equals("invalid")) + && (CDock.GetPassword(_name + " password", CConfig.CFG_ORIGINPW, out SecureString? password) && !password.Equals(null) && password.Length > 0)) { List games = GetOwnedGames(email, password, GetGameID(game.ID)).Result; password.Dispose(); @@ -450,6 +452,7 @@ public static string GetIconUrl(CGame game) } } } + */ return ""; } @@ -468,71 +471,7 @@ public static string GetGameID(string key) return key; } - private static bool GetLogin(out string email, out SecureString password) - { - email = CConfig.GetConfigString(CConfig.CFG_ORIGINID); - password = new(); - try - { - string encrypted = CConfig.GetConfigString(CConfig.CFG_ORIGINPW); - if (!string.IsNullOrEmpty(encrypted)) - { - Span byteSpan = Convert.FromBase64String(encrypted); - if (OperatingSystem.IsWindows()) - { - Array.ForEach(Encoding.UTF8.GetString(ProtectedData.Unprotect(byteSpan.ToArray(), null, DataProtectionScope.CurrentUser)).ToArray(), password.AppendChar); - } - else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password - Array.ForEach(Encoding.UTF8.GetString(byteSpan).ToArray(), password.AppendChar); - password.MakeReadOnly(); - } - - if (string.IsNullOrEmpty(email)) - { - email = CDock.InputPrompt(_name + " e-mail >>> ", new()); - CDock.ClearInputLine(new()); - } - - if (string.IsNullOrEmpty(email)) - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, "skipped"); - else if (!email.Contains('@') || !email.Contains('.')) - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, "invalid"); - else - { - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, email); - - if (string.IsNullOrEmpty(encrypted)) - { - string strPwd = CDock.InputPassword(_name + " password >>> ", new()); - if (!string.IsNullOrEmpty(strPwd)) - { - Span byteSpan = new(); - if (OperatingSystem.IsWindows()) - byteSpan = ProtectedData.Protect(Encoding.UTF8.GetBytes(strPwd), null, DataProtectionScope.CurrentUser); - else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password - byteSpan = Encoding.UTF8.GetBytes(strPwd); - password = new NetworkCredential("", strPwd).SecurePassword; - password.MakeReadOnly(); - encrypted = Convert.ToBase64String(byteSpan); - CConfig.SetConfigValue(CConfig.CFG_ORIGINPW, encrypted); - byteSpan = null; - } - strPwd = null; - CDock.ClearInputLine(new()); - } - } - encrypted = null; - if (!string.IsNullOrEmpty(email) && password.Length > 0) - return true; - } - catch (Exception e) - { - CLogger.LogError(e); - } - - return false; - } - + /* [SupportedOSPlatform("windows")] private static string GetWMIValue(string property, string path) { @@ -639,7 +578,9 @@ private static bool DecryptISFile(string dbFile, string hwInfo, out string decry decryptedText = ""; return false; } + */ + /* private static async Task> GetOwnedGames(string email, SecureString password, string id = "") { List games = new(); @@ -669,7 +610,7 @@ private static async Task> GetOwnedGames(string email, SecureStri locale = originApi.InternalUser.Locale; // "en_US" if (string.IsNullOrEmpty(locale)) locale = EA_LANGDEF; - + */ /* OriginUser user = await originApi.GetUserAsync(userid); CLogger.LogDebug("persona: {0}, name: {1}, avatar: {2}", user.PersonaId.ToString(), user.Username, await user.GetAvatarUrlAsync()); @@ -689,6 +630,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogDebug(" {0} 1 content:\n{1}", _name, content); } */ + /* #if DEBUG // Don't re-download if file exists string tmpfile = $"tmp_{_name}_api.xml"; @@ -727,7 +669,7 @@ private static async Task> GetOwnedGames(string email, SecureStri if (!success) return new(); - + */ /* //rand.Next(1, 5); HttpRequestMessage request3 = BaseAPIManager.CreateRequest(HttpMethod.Get, $"https://api1.origin.com/ecommerce2/entitlements/{userid}/associations/pending"); @@ -740,6 +682,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogDebug(" {0} 3 content:\n{1}", _name, content3); } */ + /* XmlNodeList gameList = doc.DocumentElement.SelectNodes("/entitlements/entitlement"); if (gameList == null || gameList.Count <= 0) @@ -759,12 +702,13 @@ private static async Task> GetOwnedGames(string email, SecureStri try { strID = game.SelectSingleNode("offerId").InnerText; // if found later, we'll use softwareId instead of offerId + */ /* // we're now looking for softwareId instead of offerId if (!string.IsNullOrEmpty(id) && !strID.Equals(id)) // used when looking for a particular game ID continue; */ - + /* // skip DLCs //if (!game.SelectSingleNode("originDisplayType").InnerText.Equals("Full Game")) // DLCs will be "Expansion" or "Addon" if (!game.SelectSingleNode("entitlementTag").InnerText.Equals("ORIGIN_DOWNLOAD")) // DLCs will be XPACK{#}_ACCESS @@ -843,7 +787,7 @@ private static async Task> GetOwnedGames(string email, SecureStri } } } - + */ /* //rand.Next(1, 5); HttpRequestMessage request5 = BaseAPIManager.CreateRequest(HttpMethod.Get, $"https://api4.origin.com/ecommerce2/offerUpdatedDate?offerIds={game}"); @@ -856,7 +800,7 @@ private static async Task> GetOwnedGames(string email, SecureStri //CLogger.LogDebug(" {0} 5 content:\n{1}", _name, content5); } */ - + /* //CLogger.LogDebug($"- id:{strID} | title:{strTitle} | lastRun:{lastRun}"); games.Add(new string[] { strID, strTitle, strDescription, lastRun, iconUrl }); } @@ -865,7 +809,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogError(e, string.Format("API error for {0} owned games.", _name.ToUpper())); } } - + */ /* //rand.Next(1, 5); string file = $"supercat-PCWIN_MAC-{country}-{locale}.json.gz"; @@ -882,12 +826,16 @@ private static async Task> GetOwnedGames(string email, SecureStri } } */ + /* return games; } return new(); } + */ + + /* #nullable enable [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern bool GetVolumeInformationW( @@ -899,9 +847,11 @@ private static extern bool GetVolumeInformationW( out uint lpFileSystemFlags, StringBuilder? lpFileSystemNameBuffer, int nFileSystemNameSize); + */ } #nullable restore + /* public class OriginResponse { public class Entitlement @@ -922,4 +872,5 @@ public class OriginEntitlement public List entitlements; } } + */ } \ No newline at end of file diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 5a4a0e8..6cc21a4 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -13,6 +13,7 @@ using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; using FileSystem = NexusMods.Paths.FileSystem; +using System.Security; namespace GameLauncher_Console { @@ -81,7 +82,9 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { string strPlatform = GetPlatformString(ENUM); - SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, null); + _ = CDock.GetLogin(_name + " API key ", CConfig.CFG_STEAMAPI, out string? apiKey, false) && (!apiKey.Equals("skipped")); + + SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, apiKey); foreach (var game in handler.FindAllGames()) { if (game.IsT0) diff --git a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs index 0fb96bf..23b579b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs +++ b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace GameLauncher_Console.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -505,6 +505,18 @@ public int num_steam_id { } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string text_steam_apikey { + get { + return ((string)(this["text_steam_apikey"])); + } + set { + this["text_steam_apikey"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] diff --git a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings index 15acf1c..c1b6668 100644 --- a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings +++ b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings @@ -122,6 +122,9 @@ 0 + + + From 77071ecfa3fc2ae5518de538881453191b5b0ecf Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Wed, 6 Mar 2024 15:24:46 -0800 Subject: [PATCH 16/21] Update GameCollector to 4.2.0.8 --- .../GameLauncher_Console.csproj | 40 +++++++++---------- .../GameLauncher_Console/Platform.cs | 14 +++++-- .../GameLauncher_Console/Platforms/Amazon.cs | 12 +++--- .../GameLauncher_Console/Platforms/Arc.cs | 12 +++--- .../Platforms/Battlenet.cs | 12 +++--- .../Platforms/Bethesda.cs | 12 +++--- .../GameLauncher_Console/Platforms/BigFish.cs | 12 +++--- .../GameLauncher_Console/Platforms/Custom.cs | 2 +- .../GameLauncher_Console/Platforms/EA.cs | 12 +++--- .../GameLauncher_Console/Platforms/Epic.cs | 16 ++++---- .../GameLauncher_Console/Platforms/GOG.cs | 14 +++---- .../Platforms/GameJolt.cs | 12 +++--- .../GameLauncher_Console/Platforms/Humble.cs | 12 +++--- .../Platforms/IGClient.cs | 12 +++--- .../GameLauncher_Console/Platforms/Itch.cs | 12 +++--- .../GameLauncher_Console/Platforms/Legacy.cs | 12 +++--- .../Platforms/Microsoft.cs | 14 +++---- .../GameLauncher_Console/Platforms/Oculus.cs | 12 +++--- .../GameLauncher_Console/Platforms/Paradox.cs | 12 +++--- .../GameLauncher_Console/Platforms/Plarium.cs | 12 +++--- .../GameLauncher_Console/Platforms/Riot.cs | 12 +++--- .../Platforms/RobotCache.cs | 12 +++--- .../Platforms/Rockstar.cs | 12 +++--- .../GameLauncher_Console/Platforms/Steam.cs | 14 +++---- .../GameLauncher_Console/Platforms/Ubisoft.cs | 5 ++- .../Platforms/Wargaming.cs | 5 ++- 26 files changed, 148 insertions(+), 180 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index ba061cb..f525760 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -132,25 +132,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -161,7 +161,7 @@ - + diff --git a/GameLauncher_Console/GameLauncher_Console/Platform.cs b/GameLauncher_Console/GameLauncher_Console/Platform.cs index f0b5898..ab65d83 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platform.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platform.cs @@ -1,4 +1,5 @@ -using Logger; +using GameFinder.Common; +using Logger; using SqlDB; using System; using System.Collections.Generic; @@ -27,7 +28,7 @@ public interface IPlatform void GetEntitlements(); */ - void GetGames(List gameDataList, bool expensiveIcons); + void GetGames(List gameDataList, Settings settings, bool expensiveIcons); //string GetIconUrl(CGame game); //string GetGameID(string id); } @@ -228,6 +229,13 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) var cursor = Console.CursorLeft; if (!bOnlyCustom) { + Settings settings = new() + { + BaseOnly = true, + GamesOnly = false, + InstalledOnly = false, + OwnedOnly = true, + }; foreach (IPlatform platform in _platforms) { //if (bFirstScan) @@ -239,7 +247,7 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) // Console.Write("."); CLogger.LogInfo("Looking for {0} games...", platform.Description); - platform.GetGames(gameDataList, bExpensiveIcons); + platform.GetGames(gameDataList, settings, bExpensiveIcons); //if (bFirstScan) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs index dd23d58..52d5124 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Amazon; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -99,7 +100,7 @@ enum AzUskRating } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); @@ -107,15 +108,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa var windowsRegistry = WindowsRegistry.Shared; AmazonHandler handler = new(windowsRegistry, realFileSystem); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs index a774311..7ee3132 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Arc; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -65,20 +66,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); ArcHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs index 19b964a..cc90c38 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.BattleNet; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using ProtoBuf; @@ -63,20 +64,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); BattleNetHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs index 511cc94..33e6289 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs @@ -1,5 +1,6 @@ //using GameFinder.Deprecated; //using GameFinder.StoreHandlers.BethNet; +using GameFinder.Common; using Logger; using System; using System.Collections.Generic; @@ -72,21 +73,18 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { /* string strPlatform = GetPlatformString(ENUM); BethNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs index 56850c7..7eadc38 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.BigFish; +using GameFinder.Common; using GameFinder.RegistryUtils; using HtmlAgilityPack; using Logger; @@ -75,20 +76,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); BigFishHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs index 40a579e..c16546d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs @@ -44,7 +44,7 @@ public static void StartGame(CGame game) _ = Process.Start(game.Launch); } - public void GetGames(List gameDataList, bool expensiveIcons = false) => throw new NotImplementedException(); + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) => throw new NotImplementedException(); public void GetGames(ref CTempGameSet tempGameSet) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index 0da7c1c..3e8662d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -23,6 +23,7 @@ //using System.Xml; using static GameLauncher_Console.CGameData; using FileSystem = NexusMods.Paths.FileSystem; +using GameFinder.Common; namespace GameLauncher_Console { @@ -108,20 +109,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); EADesktopHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, new HardwareInfoProvider()); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index f0c5d16..adda7e5 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.EGS; +using GameCollector.StoreHandlers.EGS; using Logger; using System; using System.Buffers; @@ -14,6 +14,7 @@ using static GameLauncher_Console.CJsonWrapper; using static System.Environment; using FileSystem = NexusMods.Paths.FileSystem; +using GameFinder.Common; namespace GameLauncher_Console { @@ -209,20 +210,17 @@ public static int UninstallGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); - EGSHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + EGSHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index 3094c9e..55b6ea4 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.GOG; +using GameCollector.StoreHandlers.GOG; using Logger; using System; using System.Collections.Generic; @@ -13,6 +13,7 @@ using static GameLauncher_Console.CJsonWrapper; using static System.Environment; using FileSystem = NexusMods.Paths.FileSystem; +using GameFinder.Common; namespace GameLauncher_Console { @@ -113,20 +114,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); GOGHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs index 22f332c..f822a90 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.GameJolt; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -81,20 +82,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); GameJoltHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs index 3b8e706..e2d67d1 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs @@ -13,6 +13,7 @@ using static GameLauncher_Console.CJsonWrapper; using static GameLauncher_Console.CRegScanner; using FileSystem = NexusMods.Paths.FileSystem; +using GameFinder.Common; namespace GameLauncher_Console { @@ -100,20 +101,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); HumbleHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs index 5f73868..13c139e 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.IGClient; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -76,20 +77,17 @@ public static void StartGame(CGame game) } //[SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); IGClientHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs index e6a7084..e99b39f 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Itch; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -103,20 +104,17 @@ public static void StartGame(CGame game) } //[SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); ItchHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs index b452e6b..4f577b2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Legacy; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -76,20 +77,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); LegacyHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index 7ff21f1..72c22ad 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -1,4 +1,5 @@ -using GameFinder.StoreHandlers.Xbox; +using GameCollector.StoreHandlers.Xbox; +using GameFinder.Common; using Logger; using System; using System.Collections.Generic; @@ -60,20 +61,17 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); XboxHandler handler = new(FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs index d0f0522..ae56d24 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Oculus; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -64,7 +65,7 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); @@ -89,15 +90,12 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa */ OculusHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs index 8ca71d2..8b4bbf7 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Paradox; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -72,20 +73,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); ParadoxHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs index 432e034..8266cc8 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Plarium; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -59,20 +60,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); PlariumHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs index 60a26c1..ecd96d3 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Riot; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -58,20 +59,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); RiotHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs index 6017546..98d6957 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.RobotCache; +using GameFinder.Common; using Logger; using System; using System.Collections.Generic; @@ -53,20 +54,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); RobotCacheHandler handler = new(FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs index a4bfebc..ca4bc3a 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Rockstar; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -59,20 +60,17 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); RockstarHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 6cc21a4..4170bd2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.Steam; +using GameCollector.StoreHandlers.Steam; using HtmlAgilityPack; using Logger; using System; @@ -14,6 +14,7 @@ using static GameLauncher_Console.CJsonWrapper; using FileSystem = NexusMods.Paths.FileSystem; using System.Security; +using GameFinder.Common; namespace GameLauncher_Console { @@ -78,22 +79,19 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); _ = CDock.GetLogin(_name + " API key ", CConfig.CFG_STEAMAPI, out string? apiKey, false) && (!apiKey.Equals("skipped")); SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, apiKey); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { - if (string.IsNullOrEmpty(game.AsT0.BaseGame)) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); } else CLogger.LogWarn(game.AsT1.Message); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs index d308c54..b0c9256 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Ubisoft; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -67,12 +68,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs index b69d9bc..cb0f017 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.WargamingNet; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -56,12 +57,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { From 3b3381e79a28e5609e48bc656b3d786a02749336 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Tue, 5 Mar 2024 12:42:57 -0800 Subject: [PATCH 17/21] Add Steam API key Also move GetLogin() from EA platform to Dock so Steam can use it for the API key prompt --- .../GameLauncher_Console/App.config | 3 + .../GameLauncher_Console/Config.cs | 1 + .../GameLauncher_Console/Dock.cs | 89 +++++++++++- .../GameLauncher_Console/JsonWrapper.cs | 1 + .../GameLauncher_Console/Platforms/EA.cs | 133 ++++++------------ .../GameLauncher_Console/Platforms/Steam.cs | 5 +- .../Properties/Settings.Designer.cs | 14 +- .../Properties/Settings.settings | 3 + 8 files changed, 155 insertions(+), 94 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/App.config b/GameLauncher_Console/GameLauncher_Console/App.config index 98d3ba0..543f0fa 100644 --- a/GameLauncher_Console/GameLauncher_Console/App.config +++ b/GameLauncher_Console/GameLauncher_Console/App.config @@ -176,6 +176,9 @@ 0 + + + diff --git a/GameLauncher_Console/GameLauncher_Console/Config.cs b/GameLauncher_Console/GameLauncher_Console/Config.cs index 6eb446d..e0d86de 100644 --- a/GameLauncher_Console/GameLauncher_Console/Config.cs +++ b/GameLauncher_Console/GameLauncher_Console/Config.cs @@ -183,6 +183,7 @@ public struct Colours public const string CFG_IMGPOS = "num_selected_image_y_location_percent"; public const string CFG_COLSIZE = "num_grid_text_min_column_characters"; public const string CFG_STEAMID = "num_steam_id"; + public const string CFG_STEAMAPI = "text_steam_apikey"; public const string CFG_OCULUSID = "text_oculus_username"; public const string CFG_ORIGINID = "text_ea_email"; public const string CFG_ORIGINPW = "base64_ea_password"; diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index 32aa21d..241a7e9 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -16,6 +16,11 @@ //using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using System.Security.Cryptography; +using System.Security; + +using System.Text; + //using System.Security; //using System.Security.Permissions; //using System.Text; @@ -2312,7 +2317,89 @@ public static void BackupCustomImage(string title, bool restore = false) } } - [SupportedOSPlatform("windows")] +#nullable enable + public static bool GetPassword(string prompt, string config, out SecureString? password) + { + password = new(); + try + { + string? encrypted = CConfig.GetConfigString(config); + if (!string.IsNullOrEmpty(encrypted)) + { + Span byteSpan = Convert.FromBase64String(encrypted); + if (OperatingSystem.IsWindows()) + { + Array.ForEach(Encoding.UTF8.GetString(ProtectedData.Unprotect(byteSpan.ToArray(), null, DataProtectionScope.CurrentUser)).ToArray(), password.AppendChar); + } + else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password + Array.ForEach(Encoding.UTF8.GetString(byteSpan).ToArray(), password.AppendChar); + password.MakeReadOnly(); + } + + if (string.IsNullOrEmpty(encrypted)) + { + string? strPwd = InputPassword(prompt + " >>> ", new()); + if (!string.IsNullOrEmpty(strPwd)) + { + Span byteSpan = new(); + if (OperatingSystem.IsWindows()) + byteSpan = ProtectedData.Protect(Encoding.UTF8.GetBytes(strPwd), null, DataProtectionScope.CurrentUser); + else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password + byteSpan = Encoding.UTF8.GetBytes(strPwd); + password = new NetworkCredential("", strPwd).SecurePassword; + password.MakeReadOnly(); + encrypted = Convert.ToBase64String(byteSpan); + CConfig.SetConfigValue(config, encrypted); + byteSpan = null; + } + strPwd = null; + ClearInputLine(new()); + } + encrypted = null; + if (password.Length > 0) + return true; + } + catch (Exception e) + { + CLogger.LogError(e); + } + + return false; + } + + public static bool GetLogin(string prompt, string config, out string? input, bool email = false) + { + input = CConfig.GetConfigString(config); + try + { + if (string.IsNullOrEmpty(input)) + { + input = InputPrompt(prompt + " >>> ", new()); + ClearInputLine(new()); + } + + if (string.IsNullOrEmpty(input)) + CConfig.SetConfigValue(config, "skipped"); + else if (email && (!input.Contains('@') || !input.Contains('.'))) + CConfig.SetConfigValue(config, "invalid"); + else + { + CConfig.SetConfigValue(config, input); + ClearInputLine(new()); + } + if (!string.IsNullOrEmpty(input)) + return true; + } + catch (Exception e) + { + CLogger.LogError(e); + } + + return false; + } +#nullable disable + + [SupportedOSPlatform("windows")] public static Guid GetGuid() { using RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, diff --git a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs index d5ee6bb..b8eac2f 100644 --- a/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs +++ b/GameLauncher_Console/GameLauncher_Console/JsonWrapper.cs @@ -1165,6 +1165,7 @@ private static void SetKeyDefaults(bool force) private static void SetTextDefaults(bool force) { SetDefaultVal(CConfig.CFG_PATHLEG, force); + SetDefaultVal(CConfig.CFG_STEAMAPI, force); SetDefaultVal(CConfig.CFG_OCULUSID, force); SetDefaultVal(CConfig.CFG_ORIGINID, force); SetDefaultVal(CConfig.CFG_ORIGINPW, force); diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index 010eb02..c4ce205 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -1,27 +1,26 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.EADesktop; -using GameFinder.StoreHandlers.EADesktop.Crypto; -using GameFinder.StoreHandlers.EADesktop.Crypto.Windows; +using GameCollector.StoreHandlers.EADesktop; +using GameCollector.StoreHandlers.EADesktop.Crypto.Windows; using Logger; -using PureOrigin.API; -using SHA3.Net; +//using PureOrigin.API; +//using SHA3.Net; using System; -using System.Buffers; +//using System.Buffers; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; +//using System.Globalization; using System.IO; -using System.Linq; -using System.Management; -using System.Net; -using System.Net.Http; -using System.Runtime.InteropServices; +//using System.Linq; +//using System.Management; +//using System.Net; +//using System.Net.Http; +//using System.Runtime.InteropServices; using System.Runtime.Versioning; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using System.Xml; +//using System.Security; +//using System.Security.Cryptography; +//using System.Text; +//using System.Threading.Tasks; +//using System.Xml; using static GameLauncher_Console.CGameData; using FileSystem = NexusMods.Paths.FileSystem; @@ -66,7 +65,7 @@ public class PlatformEA : IPlatform private static readonly string _name = Enum.GetName(typeof(GamePlatform), ENUM); private static readonly string _hwfile = string.Format("{0}_hwinfo.txt", _name); - private readonly static byte[] _ea_iv = { 0x84, 0xef, 0xc4, 0xb8, 0x36, 0x11, 0x9c, 0x20, 0x41, 0x93, 0x98, 0xc3, 0xf3, 0xf2, 0xbc, 0xef, }; + private readonly static byte[] _ea_iv = [0x84, 0xef, 0xc4, 0xb8, 0x36, 0x11, 0x9c, 0x20, 0x41, 0x93, 0x98, 0xc3, 0xf3, 0xf2, 0xbc, 0xef,]; GamePlatform IPlatform.Enum => ENUM; @@ -133,7 +132,8 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa if (!(bool)CConfig.GetConfigBool(CConfig.CFG_INSTONLY)) { - if (GetLogin(out string email, out SecureString password) && (!email.Equals("skipped") && !email.Equals("invalid") && !password.Equals(null) && password.Length > 0)) + if (CDock.GetLogin(_name + " e-mail", CConfig.CFG_ORIGINID, out string? email, true) && (!email.Equals("skipped") && !email.Equals("invalid")) + && (CDock.GetPassword(_name + " password", CConfig.CFG_ORIGINPW, out SecureString? password) && !password.Equals(null) && password.Length > 0)) { ownedGames = GetOwnedGames(email, password).Result; password.Dispose(); @@ -427,7 +427,9 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa public static string GetIconUrl(CGame game) { - if (GetLogin(out string email, out SecureString password) && (!email.Equals("skipped") && !email.Equals("invalid") && !password.Equals(null) && password.Length > 0)) + /* + if (CDock.GetLogin(_name + " e-mail", CConfig.CFG_ORIGINID, out string? email, true) && (!email.Equals("skipped") && !email.Equals("invalid")) + && (CDock.GetPassword(_name + " password", CConfig.CFG_ORIGINPW, out SecureString? password) && !password.Equals(null) && password.Length > 0)) { List games = GetOwnedGames(email, password, GetGameID(game.ID)).Result; password.Dispose(); @@ -447,6 +449,7 @@ public static string GetIconUrl(CGame game) } } } + */ return ""; } @@ -465,71 +468,7 @@ public static string GetGameID(string key) return key; } - private static bool GetLogin(out string email, out SecureString password) - { - email = CConfig.GetConfigString(CConfig.CFG_ORIGINID); - password = new(); - try - { - string encrypted = CConfig.GetConfigString(CConfig.CFG_ORIGINPW); - if (!string.IsNullOrEmpty(encrypted)) - { - Span byteSpan = Convert.FromBase64String(encrypted); - if (OperatingSystem.IsWindows()) - { - Array.ForEach(Encoding.UTF8.GetString(ProtectedData.Unprotect(byteSpan.ToArray(), null, DataProtectionScope.CurrentUser)).ToArray(), password.AppendChar); - } - else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password - Array.ForEach(Encoding.UTF8.GetString(byteSpan).ToArray(), password.AppendChar); - password.MakeReadOnly(); - } - - if (string.IsNullOrEmpty(email)) - { - email = CDock.InputPrompt(_name + " e-mail >>> ", new()); - CDock.ClearInputLine(new()); - } - - if (string.IsNullOrEmpty(email)) - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, "skipped"); - else if (!email.Contains('@') || !email.Contains('.')) - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, "invalid"); - else - { - CConfig.SetConfigValue(CConfig.CFG_ORIGINID, email); - - if (string.IsNullOrEmpty(encrypted)) - { - string strPwd = CDock.InputPassword(_name + " password >>> ", new()); - if (!string.IsNullOrEmpty(strPwd)) - { - Span byteSpan = new(); - if (OperatingSystem.IsWindows()) - byteSpan = ProtectedData.Protect(Encoding.UTF8.GetBytes(strPwd), null, DataProtectionScope.CurrentUser); - else // If we ever support other OSes, we will need to have a POSIX method to encrypt the password - byteSpan = Encoding.UTF8.GetBytes(strPwd); - password = new NetworkCredential("", strPwd).SecurePassword; - password.MakeReadOnly(); - encrypted = Convert.ToBase64String(byteSpan); - CConfig.SetConfigValue(CConfig.CFG_ORIGINPW, encrypted); - byteSpan = null; - } - strPwd = null; - CDock.ClearInputLine(new()); - } - } - encrypted = null; - if (!string.IsNullOrEmpty(email) && password.Length > 0) - return true; - } - catch (Exception e) - { - CLogger.LogError(e); - } - - return false; - } - + /* [SupportedOSPlatform("windows")] private static string GetWMIValue(string property, string path) { @@ -636,7 +575,9 @@ private static bool DecryptISFile(string dbFile, string hwInfo, out string decry decryptedText = ""; return false; } + */ + /* private static async Task> GetOwnedGames(string email, SecureString password, string id = "") { List games = new(); @@ -666,7 +607,7 @@ private static async Task> GetOwnedGames(string email, SecureStri locale = originApi.InternalUser.Locale; // "en_US" if (string.IsNullOrEmpty(locale)) locale = EA_LANGDEF; - + */ /* OriginUser user = await originApi.GetUserAsync(userid); CLogger.LogDebug("persona: {0}, name: {1}, avatar: {2}", user.PersonaId.ToString(), user.Username, await user.GetAvatarUrlAsync()); @@ -686,6 +627,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogDebug(" {0} 1 content:\n{1}", _name, content); } */ + /* #if DEBUG // Don't re-download if file exists string tmpfile = $"tmp_{_name}_api.xml"; @@ -724,7 +666,7 @@ private static async Task> GetOwnedGames(string email, SecureStri if (!success) return new(); - + */ /* //rand.Next(1, 5); HttpRequestMessage request3 = BaseAPIManager.CreateRequest(HttpMethod.Get, $"https://api1.origin.com/ecommerce2/entitlements/{userid}/associations/pending"); @@ -737,6 +679,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogDebug(" {0} 3 content:\n{1}", _name, content3); } */ + /* XmlNodeList gameList = doc.DocumentElement.SelectNodes("/entitlements/entitlement"); if (gameList == null || gameList.Count <= 0) @@ -756,12 +699,13 @@ private static async Task> GetOwnedGames(string email, SecureStri try { strID = game.SelectSingleNode("offerId").InnerText; // if found later, we'll use softwareId instead of offerId + */ /* // we're now looking for softwareId instead of offerId if (!string.IsNullOrEmpty(id) && !strID.Equals(id)) // used when looking for a particular game ID continue; */ - + /* // skip DLCs //if (!game.SelectSingleNode("originDisplayType").InnerText.Equals("Full Game")) // DLCs will be "Expansion" or "Addon" if (!game.SelectSingleNode("entitlementTag").InnerText.Equals("ORIGIN_DOWNLOAD")) // DLCs will be XPACK{#}_ACCESS @@ -840,7 +784,7 @@ private static async Task> GetOwnedGames(string email, SecureStri } } } - + */ /* //rand.Next(1, 5); HttpRequestMessage request5 = BaseAPIManager.CreateRequest(HttpMethod.Get, $"https://api4.origin.com/ecommerce2/offerUpdatedDate?offerIds={game}"); @@ -853,7 +797,7 @@ private static async Task> GetOwnedGames(string email, SecureStri //CLogger.LogDebug(" {0} 5 content:\n{1}", _name, content5); } */ - + /* //CLogger.LogDebug($"- id:{strID} | title:{strTitle} | lastRun:{lastRun}"); games.Add(new string[] { strID, strTitle, strDescription, lastRun, iconUrl }); } @@ -862,7 +806,7 @@ private static async Task> GetOwnedGames(string email, SecureStri CLogger.LogError(e, string.Format("API error for {0} owned games.", _name.ToUpper())); } } - + */ /* //rand.Next(1, 5); string file = $"supercat-PCWIN_MAC-{country}-{locale}.json.gz"; @@ -879,12 +823,16 @@ private static async Task> GetOwnedGames(string email, SecureStri } } */ + /* return games; } return new(); } + */ + + /* #nullable enable [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern bool GetVolumeInformationW( @@ -896,9 +844,11 @@ private static extern bool GetVolumeInformationW( out uint lpFileSystemFlags, StringBuilder? lpFileSystemNameBuffer, int nFileSystemNameSize); + */ } #nullable restore + /* public class OriginResponse { public class Entitlement @@ -919,4 +869,5 @@ public class OriginEntitlement public List entitlements; } } + */ } \ No newline at end of file diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 590157b..6766cb6 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -13,6 +13,7 @@ using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; using FileSystem = NexusMods.Paths.FileSystem; +using System.Security; namespace GameLauncher_Console { @@ -81,7 +82,9 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa { string strPlatform = GetPlatformString(ENUM); - SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, null); + _ = CDock.GetLogin(_name + " API key ", CConfig.CFG_STEAMAPI, out string? apiKey, false) && (!apiKey.Equals("skipped")); + + SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, apiKey); foreach (var game in handler.FindAllGames()) { if (game.IsT0) diff --git a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs index 0fb96bf..23b579b 100644 --- a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs +++ b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace GameLauncher_Console.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -505,6 +505,18 @@ public int num_steam_id { } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string text_steam_apikey { + get { + return ((string)(this["text_steam_apikey"])); + } + set { + this["text_steam_apikey"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] diff --git a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings index 15acf1c..c1b6668 100644 --- a/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings +++ b/GameLauncher_Console/GameLauncher_Console/Properties/Settings.settings @@ -122,6 +122,9 @@ 0 + + + From 6d5b9d9e7552377e449e6ea7ea431993d172fc18 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Fri, 16 Feb 2024 00:33:34 -0800 Subject: [PATCH 18/21] Update GameCollector to 4.2.0.8 --- .../GameLauncher_Console.csproj | 40 +++++++++---------- .../GameLauncher_Console/Platform.cs | 14 +++++-- .../GameLauncher_Console/Platforms/Amazon.cs | 5 ++- .../GameLauncher_Console/Platforms/Arc.cs | 5 ++- .../Platforms/Battlenet.cs | 5 ++- .../Platforms/Bethesda.cs | 5 ++- .../GameLauncher_Console/Platforms/BigFish.cs | 5 ++- .../GameLauncher_Console/Platforms/Custom.cs | 2 +- .../GameLauncher_Console/Platforms/EA.cs | 5 ++- .../GameLauncher_Console/Platforms/Epic.cs | 9 +++-- .../GameLauncher_Console/Platforms/GOG.cs | 7 ++-- .../Platforms/GameJolt.cs | 5 ++- .../GameLauncher_Console/Platforms/Humble.cs | 5 ++- .../Platforms/IGClient.cs | 11 +++-- .../GameLauncher_Console/Platforms/Itch.cs | 11 +++-- .../GameLauncher_Console/Platforms/Legacy.cs | 5 ++- .../Platforms/Microsoft.cs | 7 ++-- .../GameLauncher_Console/Platforms/Oculus.cs | 5 ++- .../GameLauncher_Console/Platforms/Paradox.cs | 7 +++- .../GameLauncher_Console/Platforms/Plarium.cs | 5 ++- .../GameLauncher_Console/Platforms/Riot.cs | 5 ++- .../Platforms/RobotCache.cs | 5 ++- .../Platforms/Rockstar.cs | 5 ++- .../GameLauncher_Console/Platforms/Steam.cs | 7 ++-- .../GameLauncher_Console/Platforms/Ubisoft.cs | 30 ++++++++------ .../Platforms/Wargaming.cs | 32 ++++++++------- 26 files changed, 145 insertions(+), 102 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index ba061cb..f525760 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -132,25 +132,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -161,7 +161,7 @@ - + diff --git a/GameLauncher_Console/GameLauncher_Console/Platform.cs b/GameLauncher_Console/GameLauncher_Console/Platform.cs index f0b5898..ab65d83 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platform.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platform.cs @@ -1,4 +1,5 @@ -using Logger; +using GameFinder.Common; +using Logger; using SqlDB; using System; using System.Collections.Generic; @@ -27,7 +28,7 @@ public interface IPlatform void GetEntitlements(); */ - void GetGames(List gameDataList, bool expensiveIcons); + void GetGames(List gameDataList, Settings settings, bool expensiveIcons); //string GetIconUrl(CGame game); //string GetGameID(string id); } @@ -228,6 +229,13 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) var cursor = Console.CursorLeft; if (!bOnlyCustom) { + Settings settings = new() + { + BaseOnly = true, + GamesOnly = false, + InstalledOnly = false, + OwnedOnly = true, + }; foreach (IPlatform platform in _platforms) { //if (bFirstScan) @@ -239,7 +247,7 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) // Console.Write("."); CLogger.LogInfo("Looking for {0} games...", platform.Description); - platform.GetGames(gameDataList, bExpensiveIcons); + platform.GetGames(gameDataList, settings, bExpensiveIcons); //if (bFirstScan) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs index b43e557..52d5124 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Amazon.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Amazon; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -99,7 +100,7 @@ enum AzUskRating } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); @@ -107,7 +108,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa var windowsRegistry = WindowsRegistry.Shared; AmazonHandler handler = new(windowsRegistry, realFileSystem); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs index 12078d7..7ee3132 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Arc.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Arc; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -65,12 +66,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); ArcHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs index 4121744..cc90c38 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Battlenet.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.BattleNet; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using ProtoBuf; @@ -63,12 +64,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); BattleNetHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs index 5251c0c..33e6289 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Bethesda.cs @@ -1,5 +1,6 @@ //using GameFinder.Deprecated; //using GameFinder.StoreHandlers.BethNet; +using GameFinder.Common; using Logger; using System; using System.Collections.Generic; @@ -72,13 +73,13 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { /* string strPlatform = GetPlatformString(ENUM); BethNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs index 2014548..7eadc38 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/BigFish.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.BigFish; +using GameFinder.Common; using GameFinder.RegistryUtils; using HtmlAgilityPack; using Logger; @@ -75,12 +76,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); BigFishHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs index 40a579e..c16546d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Custom.cs @@ -44,7 +44,7 @@ public static void StartGame(CGame game) _ = Process.Start(game.Launch); } - public void GetGames(List gameDataList, bool expensiveIcons = false) => throw new NotImplementedException(); + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) => throw new NotImplementedException(); public void GetGames(ref CTempGameSet tempGameSet) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs index c4ce205..3e8662d 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/EA.cs @@ -23,6 +23,7 @@ //using System.Xml; using static GameLauncher_Console.CGameData; using FileSystem = NexusMods.Paths.FileSystem; +using GameFinder.Common; namespace GameLauncher_Console { @@ -108,12 +109,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); EADesktopHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, new HardwareInfoProvider()); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs index 82e852e..adda7e5 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Epic.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.EGS; +using GameCollector.StoreHandlers.EGS; using Logger; using System; using System.Buffers; @@ -14,6 +14,7 @@ using static GameLauncher_Console.CJsonWrapper; using static System.Environment; using FileSystem = NexusMods.Paths.FileSystem; +using GameFinder.Common; namespace GameLauncher_Console { @@ -209,12 +210,12 @@ public static int UninstallGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); - EGSHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + EGSHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs index 7952fa5..55b6ea4 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GOG.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.GOG; +using GameCollector.StoreHandlers.GOG; using Logger; using System; using System.Collections.Generic; @@ -13,6 +13,7 @@ using static GameLauncher_Console.CJsonWrapper; using static System.Environment; using FileSystem = NexusMods.Paths.FileSystem; +using GameFinder.Common; namespace GameLauncher_Console { @@ -113,12 +114,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); GOGHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs index 89eb8ca..f822a90 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/GameJolt.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.GameJolt; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -81,12 +82,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); GameJoltHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs index d6dbc3c..e2d67d1 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Humble.cs @@ -13,6 +13,7 @@ using static GameLauncher_Console.CJsonWrapper; using static GameLauncher_Console.CRegScanner; using FileSystem = NexusMods.Paths.FileSystem; +using GameFinder.Common; namespace GameLauncher_Console { @@ -100,12 +101,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); HumbleHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs index 78a4324..13c139e 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/IGClient.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.IGClient; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -6,6 +7,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using System.Text.Json; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CJsonWrapper; @@ -74,12 +76,13 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } - public void GetGames(List gameDataList, bool expensiveIcons = false) - { + //[SupportedOSPlatform("windows")] + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) + { string strPlatform = GetPlatformString(ENUM); - IGClientHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + IGClientHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs index 613be73..e99b39f 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Itch.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Itch; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -7,6 +8,7 @@ using System.Data.SQLite; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CRegScanner; using static System.Environment; @@ -101,12 +103,13 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } - public void GetGames(List gameDataList, bool expensiveIcons = false) - { + //[SupportedOSPlatform("windows")] + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) + { string strPlatform = GetPlatformString(ENUM); - ItchHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + ItchHandler handler = new(FileSystem.Shared, null); // WindowsRegistry.Shared); + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs index 2f6ef15..4f577b2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Legacy.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Legacy; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -76,12 +77,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); LegacyHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs index a8ad6e3..72c22ad 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Microsoft.cs @@ -1,4 +1,5 @@ -using GameFinder.StoreHandlers.Xbox; +using GameCollector.StoreHandlers.Xbox; +using GameFinder.Common; using Logger; using System; using System.Collections.Generic; @@ -60,12 +61,12 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); XboxHandler handler = new(FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs index a73f1fb..ae56d24 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Oculus.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Oculus; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -64,7 +65,7 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); @@ -89,7 +90,7 @@ public void GetGames(List gameDataList, bool expensiveIcons = fa */ OculusHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs index 1810e8d..8b4bbf7 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Paradox.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Paradox; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using Microsoft.Win32; @@ -6,6 +7,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using static GameLauncher_Console.CGameData; using static GameLauncher_Console.CRegScanner; using FileSystem = NexusMods.Paths.FileSystem; @@ -70,12 +72,13 @@ public static void StartGame(CGame game) Process.Start(game.Launch); } - public void GetGames(List gameDataList, bool expensiveIcons = false) + [SupportedOSPlatform("windows")] + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); ParadoxHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs index db76da6..8266cc8 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Plarium.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Plarium; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -59,12 +60,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); PlariumHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs index caae658..ecd96d3 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Riot.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Riot; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -58,12 +59,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); RiotHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs index 7980f26..98d6957 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/RobotCache.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.RobotCache; +using GameFinder.Common; using Logger; using System; using System.Collections.Generic; @@ -53,12 +54,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); RobotCacheHandler handler = new(FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs index d8b6fd0..ca4bc3a 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Rockstar.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Rockstar; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -59,12 +60,12 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); RockstarHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 6766cb6..4170bd2 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -1,5 +1,5 @@ using GameFinder.RegistryUtils; -using GameFinder.StoreHandlers.Steam; +using GameCollector.StoreHandlers.Steam; using HtmlAgilityPack; using Logger; using System; @@ -14,6 +14,7 @@ using static GameLauncher_Console.CJsonWrapper; using FileSystem = NexusMods.Paths.FileSystem; using System.Security; +using GameFinder.Common; namespace GameLauncher_Console { @@ -78,14 +79,14 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { string strPlatform = GetPlatformString(ENUM); _ = CDock.GetLogin(_name + " API key ", CConfig.CFG_STEAMAPI, out string? apiKey, false) && (!apiKey.Equals("skipped")); SteamHandler handler = new(FileSystem.Shared, WindowsRegistry.Shared, apiKey); - foreach (var game in handler.FindAllGames()) + foreach (var game in handler.FindAllGames(settings)) { if (game.IsT0) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs index baf28a5..b0c9256 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Ubisoft.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.Ubisoft; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -67,21 +68,24 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); - UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) - { - if (game.IsT0) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } - else - CLogger.LogWarn(game.AsT1.Message); - } + UbisoftHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames(settings)) + { + if (game.IsT0) + { + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + } + else + CLogger.LogWarn(game.AsT1.Message); + } /* List keyList; diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs index b463a9c..cb0f017 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Wargaming.cs @@ -1,4 +1,5 @@ using GameCollector.StoreHandlers.WargamingNet; +using GameFinder.Common; using GameFinder.RegistryUtils; using Logger; using System; @@ -56,24 +57,27 @@ public static void StartGame(CGame game) } [SupportedOSPlatform("windows")] - public void GetGames(List gameDataList, bool expensiveIcons = false) + public void GetGames(List gameDataList, Settings settings, bool expensiveIcons = false) { - string strPlatform = GetPlatformString(ENUM); + string strPlatform = GetPlatformString(ENUM); - WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); - foreach (var game in handler.FindAllGames()) - { - if (game.IsT0) - { - CLogger.LogDebug("* " + game.AsT0.GameName); - gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); - } - else - CLogger.LogWarn(game.AsT1.Message); - } + WargamingNetHandler handler = new(WindowsRegistry.Shared, FileSystem.Shared); + foreach (var game in handler.FindAllGames(settings)) + { + if (game.IsT0) + { + if (string.IsNullOrEmpty(game.AsT0.BaseGame)) + { + CLogger.LogDebug("* " + game.AsT0.GameName); + gameDataList.Add(new ImportGameData(strPlatform, game.AsT0)); + } + } + else + CLogger.LogWarn(game.AsT1.Message); + } /* - Dictionary installDict = new(); + Dictionary installDict = new(); List keyList; */ /* From 5d9eae27ca34fddd52c4b3764be9afb33b75d039 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Tue, 2 Jul 2024 14:15:04 -0700 Subject: [PATCH 19/21] Update dependencies --- .../GameLauncher_Console/GameLauncher_Console.csproj | 8 ++++---- GameLauncher_Console/UnitTest/UnitTest.csproj | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index c5389d3..6932bdf 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -183,9 +183,9 @@ all - - - + + + @@ -193,7 +193,7 @@ - + diff --git a/GameLauncher_Console/UnitTest/UnitTest.csproj b/GameLauncher_Console/UnitTest/UnitTest.csproj index f8492c3..f7e8ffc 100644 --- a/GameLauncher_Console/UnitTest/UnitTest.csproj +++ b/GameLauncher_Console/UnitTest/UnitTest.csproj @@ -6,9 +6,9 @@ false - - - + + + all From f22e03d8c34f2acd0b98d97d86a770c41f9c1b93 Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Tue, 2 Jul 2024 14:17:58 -0700 Subject: [PATCH 20/21] Try to ensure we're getting the file extension rather than a website TLD --- GameLauncher_Console/GameLauncher_Console/Dock.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GameLauncher_Console/GameLauncher_Console/Dock.cs b/GameLauncher_Console/GameLauncher_Console/Dock.cs index 241a7e9..66b6eff 100644 --- a/GameLauncher_Console/GameLauncher_Console/Dock.cs +++ b/GameLauncher_Console/GameLauncher_Console/Dock.cs @@ -2209,7 +2209,10 @@ public static bool DownloadCustomImage(string title, string url, bool overwrite { if (!string.IsNullOrEmpty(url)) { - string ext = Path.GetExtension(url); + string stripFile = url; + if (url.Contains('?')) + stripFile = url[..url.IndexOf('?')]; + string ext = Path.GetExtension(stripFile); if (string.IsNullOrEmpty(ext)) ext = ".jpg"; string iconFile = Path.Combine(currentPath, IMAGE_FOLDER_NAME, From f9a18fcfa9e1e70de5ed6cfae101266fcde0ef0f Mon Sep 17 00:00:00 2001 From: Nutzzz Date: Tue, 2 Jul 2024 14:28:01 -0700 Subject: [PATCH 21/21] Update GameCollector to 4.2.3.2 Also set GameCollector's setting GamesOnly to true --- GameLauncher_Console/GameLauncher_Console.sln | 363 ------------------ .../GameLauncher_Console/GameData.cs | 10 + .../GameLauncher_Console.csproj | 68 ++-- .../GameLauncher_Console/Platform.cs | 9 +- .../GameLauncher_Console/Platforms/Steam.cs | 6 +- 5 files changed, 37 insertions(+), 419 deletions(-) diff --git a/GameLauncher_Console/GameLauncher_Console.sln b/GameLauncher_Console/GameLauncher_Console.sln index f8788b9..7cffd15 100644 --- a/GameLauncher_Console/GameLauncher_Console.sln +++ b/GameLauncher_Console/GameLauncher_Console.sln @@ -30,141 +30,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PureOrigin.API", "..\PureOr EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PureOrigin.API.Tests", "..\PureOrigin.API\Src\PureOrigin.API.Tests\PureOrigin.API.Tests.csproj", "{AFD1FA2C-F2BF-43D3-91FB-225BF1021543}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GameCollector", "GameCollector", "{37826248-39D5-4E1F-B920-37C49D9CD519}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solutionItems", ".solutionItems", "{87C3DD03-31FE-4D00-B7BF-D492D6299427}" -ProjectSection(SolutionItems) = preProject - ..\..\GameCollector\.editorconfig = ..\..\GameCollector\.editorconfig - ..\..\GameCollector\.gitattributes = ..\..\GameCollector\.gitattributes - ..\..\GameCollector\.gitignore = ..\..\GameCollector\.gitignore - ..\..\GameCollector\CHANGELOG.md = ..\..\GameCollector\CHANGELOG.md - ..\..\GameCollector\LICENSE = ..\..\GameCollector\LICENSE - ..\..\GameCollector\README.md = ..\..\GameCollector\README.md - ..\..\GameCollector\CONTRIBUTING.md = ..\..\GameCollector\CONTRIBUTING.md - ..\..\GameCollector\renovate.json = ..\..\GameCollector\renovate.json - ..\..\GameCollector\codecov.yml = ..\..\GameCollector\codecov.yml - ..\..\GameCollector\Directory.Build.props = ..\..\GameCollector\Directory.Build.props - ..\..\GameCollector\Directory.Build.targets = ..\..\GameCollector\Directory.Build.targets - ..\..\GameCollector\Directory.Packages.props = ..\..\GameCollector\Directory.Packages.props -EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.RegistryUtils", "..\..\GameCollector\src\GameFinder.RegistryUtils\GameFinder.RegistryUtils.csproj", "{BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Steam", "..\..\GameCollector\src\GameFinder.StoreHandlers.Steam\GameFinder.StoreHandlers.Steam.csproj", "{3CADF882-5158-4D2E-B15C-D54F5FE89B30}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.GOG", "..\..\GameCollector\src\GameFinder.StoreHandlers.GOG\GameFinder.StoreHandlers.GOG.csproj", "{6F00D927-358E-41A4-8DDF-471B1514128B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.EGS", "..\..\GameCollector\src\GameFinder.StoreHandlers.EGS\GameFinder.StoreHandlers.EGS.csproj", "{58A62CC7-4A61-4218-9F93-CE85FDF00E15}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StoreHandlers", "StoreHandlers", "{B765999C-AB3D-495F-9F5E-9108F2D4FE33}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Example", "..\..\GameCollector\other\GameFinder.Example\GameFinder.Example.csproj", "{DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Origin", "..\..\GameCollector\src\GameFinder.StoreHandlers.Origin\GameFinder.StoreHandlers.Origin.csproj", "{82126DC0-0DF8-4430-9DB7-7326A0192E48}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Common", "..\..\GameCollector\src\GameFinder.Common\GameFinder.Common.csproj", "{4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Benchmarks", "..\..\GameCollector\other\GameFinder.Benchmarks\GameFinder.Benchmarks.csproj", "{E91CA2ED-F46D-484B-8759-E7ADED282647}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Common.Tests", "..\..\GameCollector\tests\GameFinder.Common.Tests\GameFinder.Common.Tests.csproj", "{17A107B4-38CF-469F-AE09-AA5795734D48}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21}" - ProjectSection(SolutionItems) = preProject - ..\..\GameCollector\src\Directory.Build.props = ..\..\GameCollector\src\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9C6671E1-A94D-4C76-9F61-78B491A62408}" - ProjectSection(SolutionItems) = preProject - ..\..\GameCollector\tests\Directory.Build.props = ..\..\GameCollector\tests\Directory.Build.props - ..\..\GameCollector\tests\Directory.Build.targets = ..\..\GameCollector\tests\Directory.Build.targets - ..\..\GameCollector\tests\NexusMods.Paths.TestingHelpers.props = ..\..\GameCollector\tests\NexusMods.Paths.TestingHelpers.props - ..\..\GameCollector\tests\SharedAssemblyAttributes.cs = ..\..\GameCollector\tests\SharedAssemblyAttributes.cs - ..\..\GameCollector\tests\SharedUsings.cs = ..\..\GameCollector\tests\SharedUsings.cs - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "other", "other", "{7EA29B58-0E2E-4714-81AC-1F86FE253664}" - ProjectSection(SolutionItems) = preProject - ..\..\GameCollector\other\Directory.Build.props = ..\..\GameCollector\other\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{41011D08-70EF-410D-83E7-7BEAF795494E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.RegistryUtils.Tests", "..\..\GameCollector\tests\GameFinder.RegistryUtils.Tests\GameFinder.RegistryUtils.Tests.csproj", "{EAE6E28E-DDA5-417D-985F-57B8ADCCA981}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.EGS.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.EGS.Tests\GameFinder.StoreHandlers.EGS.Tests.csproj", "{CCC94557-9698-4468-AAE6-69CB28C676E2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.GOG.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.GOG.Tests\GameFinder.StoreHandlers.GOG.Tests.csproj", "{37E8F2F8-FED5-4722-934F-621C4CE085F4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Origin.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.Origin.Tests\GameFinder.StoreHandlers.Origin.Tests.csproj", "{18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Steam.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.Steam.Tests\GameFinder.StoreHandlers.Steam.Tests.csproj", "{0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtils", "..\..\GameCollector\tests\TestUtils\TestUtils.csproj", "{C26BCA96-CF68-41F5-AC55-B24EF0545E4A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.EADesktop", "..\..\GameCollector\src\GameFinder.StoreHandlers.EADesktop\GameFinder.StoreHandlers.EADesktop.csproj", "{F7807045-BAA2-46F6-81A6-0127FA662AC8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.EADesktop.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.EADesktop.Tests\GameFinder.StoreHandlers.EADesktop.Tests.csproj", "{519FD898-CFD1-4093-833F-510BE8BD9379}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wine", "Wine", "{21F0CD9E-DC99-49E5-B451-A8A111664E6E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Wine", "..\..\GameCollector\src\GameFinder.Wine\GameFinder.Wine.csproj", "{F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.Wine.Tests", "..\..\GameCollector\tests\GameFinder.Wine.Tests\GameFinder.Wine.Tests.csproj", "{C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Xbox", "..\..\GameCollector\src\GameFinder.StoreHandlers.Xbox\GameFinder.StoreHandlers.Xbox.csproj", "{2F75FCA7-DCE5-4162-B2AE-24994D14FC03}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder.StoreHandlers.Xbox.Tests", "..\..\GameCollector\tests\GameFinder.StoreHandlers.Xbox.Tests\GameFinder.StoreHandlers.Xbox.Tests.csproj", "{7D04AF8D-E8AE-44DB-AB36-5452594DC789}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameFinder", "..\..\GameCollector\src\GameFinder\GameFinder.csproj", "{8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.Common", "..\..\GameCollector\src\GameCollector.Common\GameCollector.Common.csproj", "{C1BA59AD-3143-4102-96F0-07D745198398}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.SQLiteUtils", "..\..\GameCollector\src\GameCollector.SQLiteUtils\GameCollector.SQLiteUtils.csproj", "{B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.YamlUtils", "..\..\GameCollector\src\GameCollector.YamlUtils\GameCollector.YamlUtils.csproj", "{FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Amazon", "..\..\GameCollector\src\GameCollector.StoreHandlers.Amazon\GameCollector.StoreHandlers.Amazon.csproj", "{158A060B-0036-4CE0-8C4B-CDD2F876A1ED}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Arc", "..\..\GameCollector\src\GameCollector.StoreHandlers.Arc\GameCollector.StoreHandlers.Arc.csproj", "{F411D87A-7833-44F4-9B41-814C50292CAE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.BattleNet", "..\..\GameCollector\src\GameCollector.StoreHandlers.BattleNet\GameCollector.StoreHandlers.BattleNet.csproj", "{82823466-00E1-4D38-8CEF-1E7955B4C5A4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.BigFish", "..\..\GameCollector\src\GameCollector.StoreHandlers.BigFish\GameCollector.StoreHandlers.BigFish.csproj", "{FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.GameJolt", "..\..\GameCollector\src\GameCollector.StoreHandlers.GameJolt\GameCollector.StoreHandlers.GameJolt.csproj", "{FAEE9122-5E0D-4246-A9FC-A346295A82FD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Humble", "..\..\GameCollector\src\GameCollector.StoreHandlers.Humble\GameCollector.StoreHandlers.Humble.csproj", "{5074B706-14AD-4104-A2DA-EBBD36B19255}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.IGClient", "..\..\GameCollector\src\GameCollector.StoreHandlers.IGClient\GameCollector.StoreHandlers.IGClient.csproj", "{06AA6AE5-2FAC-4761-9D44-CA11A3912256}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Itch", "..\..\GameCollector\src\GameCollector.StoreHandlers.Itch\GameCollector.StoreHandlers.Itch.csproj", "{C8DE7215-67F5-494E-B7AB-088270CB28C3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Legacy", "..\..\GameCollector\src\GameCollector.StoreHandlers.Legacy\GameCollector.StoreHandlers.Legacy.csproj", "{64EA04B2-A7A7-4184-AB99-180F084033BC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Oculus", "..\..\GameCollector\src\GameCollector.StoreHandlers.Oculus\GameCollector.StoreHandlers.Oculus.csproj", "{487FD285-16EB-46AD-AF82-9F058D2A4141}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Paradox", "..\..\GameCollector\src\GameCollector.StoreHandlers.Paradox\GameCollector.StoreHandlers.Paradox.csproj", "{DD16375A-6112-49F4-A4D3-9B1524B952B3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Plarium", "..\..\GameCollector\src\GameCollector.StoreHandlers.Plarium\GameCollector.StoreHandlers.Plarium.csproj", "{6147F764-C8B3-4D80-9311-52974100B916}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Riot", "..\..\GameCollector\src\GameCollector.StoreHandlers.Riot\GameCollector.StoreHandlers.Riot.csproj", "{0E5D8910-979B-46B8-B32F-12298707F892}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.RobotCache", "..\..\GameCollector\src\GameCollector.StoreHandlers.RobotCache\GameCollector.StoreHandlers.RobotCache.csproj", "{7D1B9F43-C54A-4903-9839-AAE845A41592}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Rockstar", "..\..\GameCollector\src\GameCollector.StoreHandlers.Rockstar\GameCollector.StoreHandlers.Rockstar.csproj", "{67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.Ubisoft", "..\..\GameCollector\src\GameCollector.StoreHandlers.Ubisoft\GameCollector.StoreHandlers.Ubisoft.csproj", "{E939182C-42EC-474A-952C-064FE757CDCA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.StoreHandlers.WargamingNet", "..\..\GameCollector\src\GameCollector.StoreHandlers.WargamingNet\GameCollector.StoreHandlers.WargamingNet.csproj", "{6368DFB4-1E79-4D24-9603-17449F0C2F71}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EmuHandlers", "EmuHandlers", "{1F5F230D-146C-4794-A2E6-F9C13279D721}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.EmuHandlers.Dolphin", "..\..\GameCollector\src\GameCollector.EmuHandlers.Dolphin\GameCollector.EmuHandlers.Dolphin.csproj", "{6173D1F4-48C2-4B14-B907-C7A746CF081D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameCollector.EmuHandlers.MAME", "..\..\GameCollector\src\GameCollector.EmuHandlers.MAME\GameCollector.EmuHandlers.MAME.csproj", "{EA0A79A3-639B-4983-A28F-1D07EC1113C7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataHandlers", "DataHandlers", "{82816E34-196A-4304-8A28-BF22FA937DF0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -191,182 +56,6 @@ Global {AFD1FA2C-F2BF-43D3-91FB-225BF1021543}.Debug|Any CPU.Build.0 = Debug|Any CPU {AFD1FA2C-F2BF-43D3-91FB-225BF1021543}.Release|Any CPU.ActiveCfg = Release|Any CPU {AFD1FA2C-F2BF-43D3-91FB-225BF1021543}.Release|Any CPU.Build.0 = Release|Any CPU - {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF}.Release|Any CPU.Build.0 = Release|Any CPU - {3CADF882-5158-4D2E-B15C-D54F5FE89B30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3CADF882-5158-4D2E-B15C-D54F5FE89B30}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3CADF882-5158-4D2E-B15C-D54F5FE89B30}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3CADF882-5158-4D2E-B15C-D54F5FE89B30}.Release|Any CPU.Build.0 = Release|Any CPU - {6F00D927-358E-41A4-8DDF-471B1514128B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F00D927-358E-41A4-8DDF-471B1514128B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F00D927-358E-41A4-8DDF-471B1514128B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F00D927-358E-41A4-8DDF-471B1514128B}.Release|Any CPU.Build.0 = Release|Any CPU - {58A62CC7-4A61-4218-9F93-CE85FDF00E15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {58A62CC7-4A61-4218-9F93-CE85FDF00E15}.Debug|Any CPU.Build.0 = Debug|Any CPU - {58A62CC7-4A61-4218-9F93-CE85FDF00E15}.Release|Any CPU.ActiveCfg = Release|Any CPU - {58A62CC7-4A61-4218-9F93-CE85FDF00E15}.Release|Any CPU.Build.0 = Release|Any CPU - {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53}.Release|Any CPU.Build.0 = Release|Any CPU - {82126DC0-0DF8-4430-9DB7-7326A0192E48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {82126DC0-0DF8-4430-9DB7-7326A0192E48}.Debug|Any CPU.Build.0 = Debug|Any CPU - {82126DC0-0DF8-4430-9DB7-7326A0192E48}.Release|Any CPU.ActiveCfg = Release|Any CPU - {82126DC0-0DF8-4430-9DB7-7326A0192E48}.Release|Any CPU.Build.0 = Release|Any CPU - {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD}.Release|Any CPU.Build.0 = Release|Any CPU - {E91CA2ED-F46D-484B-8759-E7ADED282647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E91CA2ED-F46D-484B-8759-E7ADED282647}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E91CA2ED-F46D-484B-8759-E7ADED282647}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E91CA2ED-F46D-484B-8759-E7ADED282647}.Release|Any CPU.Build.0 = Release|Any CPU - {17A107B4-38CF-469F-AE09-AA5795734D48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {17A107B4-38CF-469F-AE09-AA5795734D48}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17A107B4-38CF-469F-AE09-AA5795734D48}.Release|Any CPU.ActiveCfg = Release|Any CPU - {17A107B4-38CF-469F-AE09-AA5795734D48}.Release|Any CPU.Build.0 = Release|Any CPU - {EAE6E28E-DDA5-417D-985F-57B8ADCCA981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EAE6E28E-DDA5-417D-985F-57B8ADCCA981}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EAE6E28E-DDA5-417D-985F-57B8ADCCA981}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EAE6E28E-DDA5-417D-985F-57B8ADCCA981}.Release|Any CPU.Build.0 = Release|Any CPU - {CCC94557-9698-4468-AAE6-69CB28C676E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CCC94557-9698-4468-AAE6-69CB28C676E2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CCC94557-9698-4468-AAE6-69CB28C676E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CCC94557-9698-4468-AAE6-69CB28C676E2}.Release|Any CPU.Build.0 = Release|Any CPU - {37E8F2F8-FED5-4722-934F-621C4CE085F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {37E8F2F8-FED5-4722-934F-621C4CE085F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {37E8F2F8-FED5-4722-934F-621C4CE085F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {37E8F2F8-FED5-4722-934F-621C4CE085F4}.Release|Any CPU.Build.0 = Release|Any CPU - {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9}.Release|Any CPU.Build.0 = Release|Any CPU - {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391}.Release|Any CPU.Build.0 = Release|Any CPU - {C26BCA96-CF68-41F5-AC55-B24EF0545E4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C26BCA96-CF68-41F5-AC55-B24EF0545E4A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C26BCA96-CF68-41F5-AC55-B24EF0545E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C26BCA96-CF68-41F5-AC55-B24EF0545E4A}.Release|Any CPU.Build.0 = Release|Any CPU - {F7807045-BAA2-46F6-81A6-0127FA662AC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7807045-BAA2-46F6-81A6-0127FA662AC8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7807045-BAA2-46F6-81A6-0127FA662AC8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7807045-BAA2-46F6-81A6-0127FA662AC8}.Release|Any CPU.Build.0 = Release|Any CPU - {519FD898-CFD1-4093-833F-510BE8BD9379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {519FD898-CFD1-4093-833F-510BE8BD9379}.Debug|Any CPU.Build.0 = Debug|Any CPU - {519FD898-CFD1-4093-833F-510BE8BD9379}.Release|Any CPU.ActiveCfg = Release|Any CPU - {519FD898-CFD1-4093-833F-510BE8BD9379}.Release|Any CPU.Build.0 = Release|Any CPU - {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5}.Release|Any CPU.Build.0 = Release|Any CPU - {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE}.Release|Any CPU.Build.0 = Release|Any CPU - {2F75FCA7-DCE5-4162-B2AE-24994D14FC03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2F75FCA7-DCE5-4162-B2AE-24994D14FC03}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F75FCA7-DCE5-4162-B2AE-24994D14FC03}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2F75FCA7-DCE5-4162-B2AE-24994D14FC03}.Release|Any CPU.Build.0 = Release|Any CPU - {7D04AF8D-E8AE-44DB-AB36-5452594DC789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7D04AF8D-E8AE-44DB-AB36-5452594DC789}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7D04AF8D-E8AE-44DB-AB36-5452594DC789}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7D04AF8D-E8AE-44DB-AB36-5452594DC789}.Release|Any CPU.Build.0 = Release|Any CPU - {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E}.Release|Any CPU.Build.0 = Release|Any CPU - {C1BA59AD-3143-4102-96F0-07D745198398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C1BA59AD-3143-4102-96F0-07D745198398}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C1BA59AD-3143-4102-96F0-07D745198398}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C1BA59AD-3143-4102-96F0-07D745198398}.Release|Any CPU.Build.0 = Release|Any CPU - {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C}.Release|Any CPU.Build.0 = Release|Any CPU - {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD}.Release|Any CPU.Build.0 = Release|Any CPU - {158A060B-0036-4CE0-8C4B-CDD2F876A1ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {158A060B-0036-4CE0-8C4B-CDD2F876A1ED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {158A060B-0036-4CE0-8C4B-CDD2F876A1ED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {158A060B-0036-4CE0-8C4B-CDD2F876A1ED}.Release|Any CPU.Build.0 = Release|Any CPU - {F411D87A-7833-44F4-9B41-814C50292CAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F411D87A-7833-44F4-9B41-814C50292CAE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F411D87A-7833-44F4-9B41-814C50292CAE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F411D87A-7833-44F4-9B41-814C50292CAE}.Release|Any CPU.Build.0 = Release|Any CPU - {82823466-00E1-4D38-8CEF-1E7955B4C5A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {82823466-00E1-4D38-8CEF-1E7955B4C5A4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {82823466-00E1-4D38-8CEF-1E7955B4C5A4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {82823466-00E1-4D38-8CEF-1E7955B4C5A4}.Release|Any CPU.Build.0 = Release|Any CPU - {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217}.Release|Any CPU.Build.0 = Release|Any CPU - {FAEE9122-5E0D-4246-A9FC-A346295A82FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FAEE9122-5E0D-4246-A9FC-A346295A82FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FAEE9122-5E0D-4246-A9FC-A346295A82FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FAEE9122-5E0D-4246-A9FC-A346295A82FD}.Release|Any CPU.Build.0 = Release|Any CPU - {5074B706-14AD-4104-A2DA-EBBD36B19255}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5074B706-14AD-4104-A2DA-EBBD36B19255}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5074B706-14AD-4104-A2DA-EBBD36B19255}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5074B706-14AD-4104-A2DA-EBBD36B19255}.Release|Any CPU.Build.0 = Release|Any CPU - {06AA6AE5-2FAC-4761-9D44-CA11A3912256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {06AA6AE5-2FAC-4761-9D44-CA11A3912256}.Debug|Any CPU.Build.0 = Debug|Any CPU - {06AA6AE5-2FAC-4761-9D44-CA11A3912256}.Release|Any CPU.ActiveCfg = Release|Any CPU - {06AA6AE5-2FAC-4761-9D44-CA11A3912256}.Release|Any CPU.Build.0 = Release|Any CPU - {C8DE7215-67F5-494E-B7AB-088270CB28C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C8DE7215-67F5-494E-B7AB-088270CB28C3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8DE7215-67F5-494E-B7AB-088270CB28C3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C8DE7215-67F5-494E-B7AB-088270CB28C3}.Release|Any CPU.Build.0 = Release|Any CPU - {64EA04B2-A7A7-4184-AB99-180F084033BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {64EA04B2-A7A7-4184-AB99-180F084033BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {64EA04B2-A7A7-4184-AB99-180F084033BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {64EA04B2-A7A7-4184-AB99-180F084033BC}.Release|Any CPU.Build.0 = Release|Any CPU - {487FD285-16EB-46AD-AF82-9F058D2A4141}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {487FD285-16EB-46AD-AF82-9F058D2A4141}.Debug|Any CPU.Build.0 = Debug|Any CPU - {487FD285-16EB-46AD-AF82-9F058D2A4141}.Release|Any CPU.ActiveCfg = Release|Any CPU - {487FD285-16EB-46AD-AF82-9F058D2A4141}.Release|Any CPU.Build.0 = Release|Any CPU - {DD16375A-6112-49F4-A4D3-9B1524B952B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD16375A-6112-49F4-A4D3-9B1524B952B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD16375A-6112-49F4-A4D3-9B1524B952B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD16375A-6112-49F4-A4D3-9B1524B952B3}.Release|Any CPU.Build.0 = Release|Any CPU - {6147F764-C8B3-4D80-9311-52974100B916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6147F764-C8B3-4D80-9311-52974100B916}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6147F764-C8B3-4D80-9311-52974100B916}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6147F764-C8B3-4D80-9311-52974100B916}.Release|Any CPU.Build.0 = Release|Any CPU - {0E5D8910-979B-46B8-B32F-12298707F892}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0E5D8910-979B-46B8-B32F-12298707F892}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0E5D8910-979B-46B8-B32F-12298707F892}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0E5D8910-979B-46B8-B32F-12298707F892}.Release|Any CPU.Build.0 = Release|Any CPU - {7D1B9F43-C54A-4903-9839-AAE845A41592}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7D1B9F43-C54A-4903-9839-AAE845A41592}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7D1B9F43-C54A-4903-9839-AAE845A41592}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7D1B9F43-C54A-4903-9839-AAE845A41592}.Release|Any CPU.Build.0 = Release|Any CPU - {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E}.Release|Any CPU.Build.0 = Release|Any CPU - {E939182C-42EC-474A-952C-064FE757CDCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E939182C-42EC-474A-952C-064FE757CDCA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E939182C-42EC-474A-952C-064FE757CDCA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E939182C-42EC-474A-952C-064FE757CDCA}.Release|Any CPU.Build.0 = Release|Any CPU - {6368DFB4-1E79-4D24-9603-17449F0C2F71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6368DFB4-1E79-4D24-9603-17449F0C2F71}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6368DFB4-1E79-4D24-9603-17449F0C2F71}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6368DFB4-1E79-4D24-9603-17449F0C2F71}.Release|Any CPU.Build.0 = Release|Any CPU - {6173D1F4-48C2-4B14-B907-C7A746CF081D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6173D1F4-48C2-4B14-B907-C7A746CF081D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6173D1F4-48C2-4B14-B907-C7A746CF081D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6173D1F4-48C2-4B14-B907-C7A746CF081D}.Release|Any CPU.Build.0 = Release|Any CPU - {EA0A79A3-639B-4983-A28F-1D07EC1113C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EA0A79A3-639B-4983-A28F-1D07EC1113C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EA0A79A3-639B-4983-A28F-1D07EC1113C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EA0A79A3-639B-4983-A28F-1D07EC1113C7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -374,58 +63,6 @@ Global GlobalSection(NestedProjects) = preSolution {D149C871-27ED-4307-BE1F-E5FB55C2BB45} = {EF2BF649-24D0-4307-9D49-4FA96259C214} {AFD1FA2C-F2BF-43D3-91FB-225BF1021543} = {EF2BF649-24D0-4307-9D49-4FA96259C214} - {BED6FB0B-C200-4651-BCE8-2DD9210FC7CF} = {41011D08-70EF-410D-83E7-7BEAF795494E} - {3CADF882-5158-4D2E-B15C-D54F5FE89B30} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {6F00D927-358E-41A4-8DDF-471B1514128B} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {58A62CC7-4A61-4218-9F93-CE85FDF00E15} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {B765999C-AB3D-495F-9F5E-9108F2D4FE33} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} - {DFC0FA99-91A5-4CC0-A12C-1CAA84D2CB53} = {7EA29B58-0E2E-4714-81AC-1F86FE253664} - {82126DC0-0DF8-4430-9DB7-7326A0192E48} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {4DD3B263-D44B-4D4D-9FDD-9AA6DA8DEDDD} = {41011D08-70EF-410D-83E7-7BEAF795494E} - {E91CA2ED-F46D-484B-8759-E7ADED282647} = {7EA29B58-0E2E-4714-81AC-1F86FE253664} - {17A107B4-38CF-469F-AE09-AA5795734D48} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} = {37826248-39D5-4E1F-B920-37C49D9CD519} - {9C6671E1-A94D-4C76-9F61-78B491A62408} = {37826248-39D5-4E1F-B920-37C49D9CD519} - {7EA29B58-0E2E-4714-81AC-1F86FE253664} = {37826248-39D5-4E1F-B920-37C49D9CD519} - {41011D08-70EF-410D-83E7-7BEAF795494E} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} - {EAE6E28E-DDA5-417D-985F-57B8ADCCA981} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {CCC94557-9698-4468-AAE6-69CB28C676E2} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {37E8F2F8-FED5-4722-934F-621C4CE085F4} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {18AD8AE9-4AAF-4322-8F8E-2DBCDC40D9A9} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {0A89AE18-0C30-4FD6-874A-7DC5DE6FB391} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {C26BCA96-CF68-41F5-AC55-B24EF0545E4A} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {F7807045-BAA2-46F6-81A6-0127FA662AC8} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {519FD898-CFD1-4093-833F-510BE8BD9379} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {21F0CD9E-DC99-49E5-B451-A8A111664E6E} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} - {F553AEEA-FD48-4C84-B5A1-7CC31F2F76D5} = {21F0CD9E-DC99-49E5-B451-A8A111664E6E} - {C1FA1F2C-8CC2-4EFF-8206-8B52A1B4FBFE} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {2F75FCA7-DCE5-4162-B2AE-24994D14FC03} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {7D04AF8D-E8AE-44DB-AB36-5452594DC789} = {9C6671E1-A94D-4C76-9F61-78B491A62408} - {8F9D4B7D-5269-4053-BB20-9DB7B5F8DF8E} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} - {C1BA59AD-3143-4102-96F0-07D745198398} = {41011D08-70EF-410D-83E7-7BEAF795494E} - {B399A554-BDD6-4A2D-A71A-5CC88FF4DE4C} = {41011D08-70EF-410D-83E7-7BEAF795494E} - {FD458F9E-A2BC-4E60-B26A-F8DEC2AD7DDD} = {41011D08-70EF-410D-83E7-7BEAF795494E} - {158A060B-0036-4CE0-8C4B-CDD2F876A1ED} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {F411D87A-7833-44F4-9B41-814C50292CAE} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {82823466-00E1-4D38-8CEF-1E7955B4C5A4} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {FDDB677C-FFDC-4D3F-BB63-CA385BE8B217} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {FAEE9122-5E0D-4246-A9FC-A346295A82FD} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {5074B706-14AD-4104-A2DA-EBBD36B19255} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {06AA6AE5-2FAC-4761-9D44-CA11A3912256} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {C8DE7215-67F5-494E-B7AB-088270CB28C3} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {64EA04B2-A7A7-4184-AB99-180F084033BC} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {487FD285-16EB-46AD-AF82-9F058D2A4141} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {DD16375A-6112-49F4-A4D3-9B1524B952B3} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {6147F764-C8B3-4D80-9311-52974100B916} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {0E5D8910-979B-46B8-B32F-12298707F892} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {7D1B9F43-C54A-4903-9839-AAE845A41592} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {67B56585-D06F-4EEC-9CB0-E3CB5CC1AE6E} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {E939182C-42EC-474A-952C-064FE757CDCA} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {6368DFB4-1E79-4D24-9603-17449F0C2F71} = {B765999C-AB3D-495F-9F5E-9108F2D4FE33} - {1F5F230D-146C-4794-A2E6-F9C13279D721} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} - {6173D1F4-48C2-4B14-B907-C7A746CF081D} = {1F5F230D-146C-4794-A2E6-F9C13279D721} - {EA0A79A3-639B-4983-A28F-1D07EC1113C7} = {1F5F230D-146C-4794-A2E6-F9C13279D721} - {82816E34-196A-4304-8A28-BF22FA937DF0} = {EFB4E7DB-DE24-4BDE-B660-DAF1394ECC21} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {90858D12-1823-4AAB-91A4-04758C95F911} diff --git a/GameLauncher_Console/GameLauncher_Console/GameData.cs b/GameLauncher_Console/GameLauncher_Console/GameData.cs index 756f324..8633ed7 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameData.cs +++ b/GameLauncher_Console/GameLauncher_Console/GameData.cs @@ -3,10 +3,12 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Globalization; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Text; +using System.Text.Json; namespace GameLauncher_Console { @@ -15,6 +17,14 @@ namespace GameLauncher_Console /// public static class CGameData { + public static Settings gcSettings = new() + { + BaseOnly = true, + GamesOnly = true, + InstalledOnly = false, + OwnedOnly = true, + }; + /// /// Enumerator containing currently supported game platforms /// diff --git a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj index 6932bdf..852e372 100644 --- a/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj +++ b/GameLauncher_Console/GameLauncher_Console/GameLauncher_Console.csproj @@ -132,49 +132,31 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GameLauncher_Console/GameLauncher_Console/Platform.cs b/GameLauncher_Console/GameLauncher_Console/Platform.cs index ab65d83..b3490e3 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platform.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platform.cs @@ -229,13 +229,6 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) var cursor = Console.CursorLeft; if (!bOnlyCustom) { - Settings settings = new() - { - BaseOnly = true, - GamesOnly = false, - InstalledOnly = false, - OwnedOnly = true, - }; foreach (IPlatform platform in _platforms) { //if (bFirstScan) @@ -247,7 +240,7 @@ public void ScanGames(bool bOnlyCustom, bool bExpensiveIcons, bool bFirstScan) // Console.Write("."); CLogger.LogInfo("Looking for {0} games...", platform.Description); - platform.GetGames(gameDataList, settings, bExpensiveIcons); + platform.GetGames(gameDataList, gcSettings, bExpensiveIcons); //if (bFirstScan) { diff --git a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs index 4170bd2..3e21e1a 100644 --- a/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs +++ b/GameLauncher_Console/GameLauncher_Console/Platforms/Steam.cs @@ -507,14 +507,10 @@ public static string GetIconUrl(CGame game) } else { - var options = new JsonDocumentOptions - { - AllowTrailingCommas = true - }; string rgGames = gameList.InnerText.Remove(0, gameList.InnerText.IndexOf('[')); rgGames = rgGames.Remove(rgGames.IndexOf(';')); - using JsonDocument document = JsonDocument.Parse(@rgGames, options); + using JsonDocument document = JsonDocument.Parse(@rgGames, jsonTrailingCommas); foreach (JsonElement rggame in document.RootElement.EnumerateArray()) { ulong id = GetULongProperty(rggame, "appid");