From 6d38a536dda9cfa2ff136f4dfcecb1fff33f2017 Mon Sep 17 00:00:00 2001 From: Jesse Cardone Date: Tue, 15 Oct 2024 15:57:44 -0700 Subject: [PATCH] Convert project to .NET 8, upgrade SteamKit to 3.0.0 beta --- .gitignore | 4 +- .../CommandLineOptions.cs | 16 +- Steam Desktop Authenticator/Program.cs | 7 +- .../Steam Desktop Authenticator.csproj | 279 +----------------- .../Steam Desktop Authenticator.sln | 28 -- Steam Desktop Authenticator/packages.config | 16 - SteamDesktopAuthenticator.sln | 31 ++ 7 files changed, 51 insertions(+), 330 deletions(-) delete mode 100644 Steam Desktop Authenticator/Steam Desktop Authenticator.sln delete mode 100644 Steam Desktop Authenticator/packages.config create mode 100644 SteamDesktopAuthenticator.sln diff --git a/.gitignore b/.gitignore index 03f1ef53..9409da51 100644 --- a/.gitignore +++ b/.gitignore @@ -350,4 +350,6 @@ healthchecksdb MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder -.ionide/ \ No newline at end of file +.ionide/ + +.idea/ \ No newline at end of file diff --git a/Steam Desktop Authenticator/CommandLineOptions.cs b/Steam Desktop Authenticator/CommandLineOptions.cs index 495bb9de..53a54299 100644 --- a/Steam Desktop Authenticator/CommandLineOptions.cs +++ b/Steam Desktop Authenticator/CommandLineOptions.cs @@ -6,21 +6,11 @@ namespace Steam_Desktop_Authenticator class CommandLineOptions { [Option('k', "encryption-key", Required = false, - HelpText = "Encryption key for manifest")] + HelpText = "Encryption key for manifest")] public string EncryptionKey { get; set; } [Option('s', "silent", Required = false, - HelpText = "Start minimized")] + HelpText = "Start minimized")] public bool Silent { get; set; } - - [ParserState] - public IParserState LastParserState { get; set; } - - [HelpOption] - public string GetUsage() - { - return HelpText.AutoBuild(this, - (HelpText current) => HelpText.DefaultParsingErrorsHandler(this, current)); - } } -} +} \ No newline at end of file diff --git a/Steam Desktop Authenticator/Program.cs b/Steam Desktop Authenticator/Program.cs index 6319f96d..05bb80ac 100644 --- a/Steam Desktop Authenticator/Program.cs +++ b/Steam Desktop Authenticator/Program.cs @@ -45,8 +45,9 @@ static void Main(string[] args) } // Parse command line arguments - var options = new CommandLineOptions(); - Parser.Default.ParseArguments(args, options); + CommandLineOptions options = new(); + Parser.Default.ParseArguments(args) + .WithParsed(o => options = o); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); @@ -69,7 +70,7 @@ static void Main(string[] args) { // An maFile was encrypted, we're fucked. MessageBox.Show("Sorry, but SDA was unable to recover your accounts since you used encryption.\nYou'll need to recover your Steam accounts by removing the authenticator.\nClick OK to view instructions.", "Steam Desktop Authenticator", MessageBoxButtons.OK, MessageBoxIcon.Error); - System.Diagnostics.Process.Start(@"https://github.com/Jessecar96/SteamDesktopAuthenticator/wiki/Help!-I'm-locked-out-of-my-account"); + Process.Start(@"https://github.com/Jessecar96/SteamDesktopAuthenticator/wiki/Help!-I'm-locked-out-of-my-account"); return; } } diff --git a/Steam Desktop Authenticator/Steam Desktop Authenticator.csproj b/Steam Desktop Authenticator/Steam Desktop Authenticator.csproj index 527d5c04..c16c7fc0 100644 --- a/Steam Desktop Authenticator/Steam Desktop Authenticator.csproj +++ b/Steam Desktop Authenticator/Steam Desktop Authenticator.csproj @@ -1,291 +1,32 @@ - - - + - Debug - AnyCPU - {0F37C513-9AF4-42C8-9CE9-F9B3BFA55E4E} + net8.0-windows WinExe - Properties Steam_Desktop_Authenticator - Steam Desktop Authenticator - v4.7.2 - 512 - true - false - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true 0 0.2.2.%2a false true - - - false - - - - - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - true - - - bin\x64\Release\ - - - true - none - x64 - prompt - MinimumRecommendedRules.ruleset - true - .pdb - - - true - bin\Debug\ - - - full - x86 - prompt - MinimumRecommendedRules.ruleset - true - Auto - - - bin\Release\ - - - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - true - Auto - true - false - .pdb + false + true + true icon.ico - - packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll - - - packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll - - - packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - - packages\protobuf-net.3.2.16\lib\net462\protobuf-net.dll - - - packages\protobuf-net.Core.3.2.16\lib\net462\protobuf-net.Core.dll - - - packages\SteamKit2.2.5.0-Beta.1\lib\netstandard2.0\SteamKit2.dll - - - - packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - packages\System.Collections.Immutable.7.0.0\lib\net462\System.Collections.Immutable.dll - - - - packages\System.Memory.4.5.5\lib\net461\System.Memory.dll - - - - packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - packages\System.Security.AccessControl.5.0.0\lib\net461\System.Security.AccessControl.dll - - - packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll - - - - - - - - - - - - - + Component - - Form - - - ConfirmationFormWeb.cs - - - - Form - - - CaptchaForm.cs - - - Form - - - ImportAccountForm.cs - - - Form - - - InputForm.cs - - - Form - - - ListInputForm.cs - - - Form - - - LoginForm.cs - - - - Form - - - MainForm.cs - - - - - - Form - - - PhoneInputForm.cs - - - - - Form - - - SettingsForm.cs - - - Form - - - TradePopupForm.cs - - - - Form - - - WelcomeForm.cs - - - CaptchaForm.cs - - - ConfirmationFormWeb.cs - - - ImportAccountForm.cs - - - InputForm.cs - - - ListInputForm.cs - - - LoginForm.cs - - - MainForm.cs - - - PhoneInputForm.cs - - - SettingsForm.cs - - - TradePopupForm.cs - - - WelcomeForm.cs - - - + - - {5ad0934e-f6c4-4ae5-83af-c788313b2a87} - SteamAuth - - - - - False - Microsoft .NET Framework 4.5.2 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - + - + + - - \ No newline at end of file diff --git a/Steam Desktop Authenticator/Steam Desktop Authenticator.sln b/Steam Desktop Authenticator/Steam Desktop Authenticator.sln deleted file mode 100644 index f81785d2..00000000 --- a/Steam Desktop Authenticator/Steam Desktop Authenticator.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steam Desktop Authenticator", "Steam Desktop Authenticator.csproj", "{0F37C513-9AF4-42C8-9CE9-F9B3BFA55E4E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamAuth", "..\lib\SteamAuth\SteamAuth\SteamAuth.csproj", "{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0F37C513-9AF4-42C8-9CE9-F9B3BFA55E4E}.Debug|x86.ActiveCfg = Debug|x86 - {0F37C513-9AF4-42C8-9CE9-F9B3BFA55E4E}.Debug|x86.Build.0 = Debug|x86 - {0F37C513-9AF4-42C8-9CE9-F9B3BFA55E4E}.Release|x86.ActiveCfg = Release|x86 - {0F37C513-9AF4-42C8-9CE9-F9B3BFA55E4E}.Release|x86.Build.0 = Release|x86 - {5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Debug|x86.ActiveCfg = Debug|Any CPU - {5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Debug|x86.Build.0 = Debug|Any CPU - {5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Release|x86.ActiveCfg = Release|Any CPU - {5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Steam Desktop Authenticator/packages.config b/Steam Desktop Authenticator/packages.config deleted file mode 100644 index 43ef8ee2..00000000 --- a/Steam Desktop Authenticator/packages.config +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SteamDesktopAuthenticator.sln b/SteamDesktopAuthenticator.sln new file mode 100644 index 00000000..eee4a7ad --- /dev/null +++ b/SteamDesktopAuthenticator.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steam Desktop Authenticator", "Steam Desktop Authenticator\Steam Desktop Authenticator.csproj", "{A2E468BB-C2D3-48FE-8F88-806D2C2F93A1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamAuth", "lib\SteamAuth\SteamAuth\SteamAuth.csproj", "{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A2E468BB-C2D3-48FE-8F88-806D2C2F93A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A2E468BB-C2D3-48FE-8F88-806D2C2F93A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A2E468BB-C2D3-48FE-8F88-806D2C2F93A1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A2E468BB-C2D3-48FE-8F88-806D2C2F93A1}.Release|Any CPU.Build.0 = Release|Any CPU + {5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {44873D7A-B20E-4469-9EFE-3E8559BCA721} + EndGlobalSection +EndGlobal