Skip to content

Commit

Permalink
Convert project to .NET 8, upgrade SteamKit to 3.0.0 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessecar96 committed Oct 15, 2024
1 parent 6a3108c commit 6d38a53
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 330 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,6 @@ healthchecksdb
MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/
.ionide/

.idea/
16 changes: 3 additions & 13 deletions Steam Desktop Authenticator/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
}
7 changes: 4 additions & 3 deletions Steam Desktop Authenticator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<CommandLineOptions>(args)
.WithParsed(o => options = o);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand All @@ -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;
}
}
Expand Down
279 changes: 10 additions & 269 deletions Steam Desktop Authenticator/Steam Desktop Authenticator.csproj
Original file line number Diff line number Diff line change
@@ -1,291 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0F37C513-9AF4-42C8-9CE9-F9B3BFA55E4E}</ProjectGuid>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Steam_Desktop_Authenticator</RootNamespace>
<AssemblyName>Steam Desktop Authenticator</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.2.2.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>
</DefineConstants>
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<AllowedReferenceRelatedFileExtensions>.pdb</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>
</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>
</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<DebugSymbols>true</DebugSymbols>
<UseVSHostingProcess>false</UseVSHostingProcess>
<AllowedReferenceRelatedFileExtensions>.pdb</AllowedReferenceRelatedFileExtensions>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="protobuf-net, Version=3.0.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
<HintPath>packages\protobuf-net.3.2.16\lib\net462\protobuf-net.dll</HintPath>
</Reference>
<Reference Include="protobuf-net.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
<HintPath>packages\protobuf-net.Core.3.2.16\lib\net462\protobuf-net.Core.dll</HintPath>
</Reference>
<Reference Include="SteamKit2, Version=2.5.0.0, Culture=neutral, PublicKeyToken=ed3ce47ed5aad940, processorArchitecture=MSIL">
<HintPath>packages\SteamKit2.2.5.0-Beta.1\lib\netstandard2.0\SteamKit2.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Collections.Immutable.7.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Security.AccessControl.5.0.0\lib\net461\System.Security.AccessControl.dll</HintPath>
</Reference>
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ConfirmationButton.cs">
<Compile Update="ConfirmationButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ConfirmationFormWeb.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ConfirmationFormWeb.Designer.cs">
<DependentUpon>ConfirmationFormWeb.cs</DependentUpon>
</Compile>
<Compile Include="FileEncryptor.cs" />
<Compile Include="CaptchaForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CaptchaForm.Designer.cs">
<DependentUpon>CaptchaForm.cs</DependentUpon>
</Compile>
<Compile Include="ImportAccountForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ImportAccountForm.Designer.cs">
<DependentUpon>ImportAccountForm.cs</DependentUpon>
</Compile>
<Compile Include="InputForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="InputForm.Designer.cs">
<DependentUpon>InputForm.cs</DependentUpon>
</Compile>
<Compile Include="ListInputForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ListInputForm.Designer.cs">
<DependentUpon>ListInputForm.cs</DependentUpon>
</Compile>
<Compile Include="LoginForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LoginForm.Designer.cs">
<DependentUpon>LoginForm.cs</DependentUpon>
</Compile>
<Compile Include="MaFileEncryptedException.cs" />
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Manifest.cs" />
<Compile Include="ManifestParseException.cs" />
<Compile Include="CommandLineOptions.cs" />
<Compile Include="PhoneInputForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PhoneInputForm.Designer.cs">
<DependentUpon>PhoneInputForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SettingsForm.Designer.cs">
<DependentUpon>SettingsForm.cs</DependentUpon>
</Compile>
<Compile Include="TradePopupForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TradePopupForm.Designer.cs">
<DependentUpon>TradePopupForm.cs</DependentUpon>
</Compile>
<Compile Include="UserFormAuthenticator.cs" />
<Compile Include="WelcomeForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WelcomeForm.Designer.cs">
<DependentUpon>WelcomeForm.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="CaptchaForm.resx">
<DependentUpon>CaptchaForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ConfirmationFormWeb.resx">
<DependentUpon>ConfirmationFormWeb.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ImportAccountForm.resx">
<DependentUpon>ImportAccountForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="InputForm.resx">
<DependentUpon>InputForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ListInputForm.resx">
<DependentUpon>ListInputForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LoginForm.resx">
<DependentUpon>LoginForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PhoneInputForm.resx">
<DependentUpon>PhoneInputForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SettingsForm.resx">
<DependentUpon>SettingsForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TradePopupForm.resx">
<DependentUpon>TradePopupForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WelcomeForm.resx">
<DependentUpon>WelcomeForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
<ProjectReference Include="..\lib\SteamAuth\SteamAuth\SteamAuth.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\lib\SteamAuth\SteamAuth\SteamAuth.csproj">
<Project>{5ad0934e-f6c4-4ae5-83af-c788313b2a87}</Project>
<Name>SteamAuth</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="SteamKit2" Version="3.0.0-Beta.4" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
28 changes: 0 additions & 28 deletions Steam Desktop Authenticator/Steam Desktop Authenticator.sln

This file was deleted.

Loading

0 comments on commit 6d38a53

Please sign in to comment.