M NosTaleGfless.sln => NosTaleGfless.sln +5 -5
@@ 4,7 4,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosTaleGfless", "NosTaleGfl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NostaleAuth", "NostaleAuth\NostaleAuth.csproj", "{63031600-41E1-4B37-A9C5-90CFF5196806}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NostaleGfless.Example", "NostaleGfless.Example\NostaleGfless.Example.csproj", "{66C5FF7F-E7A3-404D-A84A-4B91C1A12980}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NostaleGfless.Example", "NostaleGfless.Example\NostaleGfless.Example.csproj", "{C451472E-0D92-48A2-A6C1-E36AF709DBF2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ 20,9 20,9 @@ Global
{63031600-41E1-4B37-A9C5-90CFF5196806}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63031600-41E1-4B37-A9C5-90CFF5196806}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63031600-41E1-4B37-A9C5-90CFF5196806}.Release|Any CPU.Build.0 = Release|Any CPU
- {66C5FF7F-E7A3-404D-A84A-4B91C1A12980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {66C5FF7F-E7A3-404D-A84A-4B91C1A12980}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {66C5FF7F-E7A3-404D-A84A-4B91C1A12980}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {66C5FF7F-E7A3-404D-A84A-4B91C1A12980}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C451472E-0D92-48A2-A6C1-E36AF709DBF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C451472E-0D92-48A2-A6C1-E36AF709DBF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C451472E-0D92-48A2-A6C1-E36AF709DBF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C451472E-0D92-48A2-A6C1-E36AF709DBF2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
M NosTaleGfless/NosTaleGfless.csproj => NosTaleGfless/NosTaleGfless.csproj +1 -1
@@ 1,7 1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netstandard2.0</TargetFramework>
+ <TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
M NostaleAuth/NostaleAuth.csproj => NostaleAuth/NostaleAuth.csproj +1 -1
@@ 1,7 1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netstandard2.0</TargetFramework>
+ <TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
M NostaleGfless.Example/NostaleGfless.Example.csproj => NostaleGfless.Example/NostaleGfless.Example.csproj +22 -72
@@ 1,72 1,22 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.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')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{66C5FF7F-E7A3-404D-A84A-4B91C1A12980}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>NostaleGfless.Example</RootNamespace>
- <AssemblyName>NostaleGfless.Example</AssemblyName>
- <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Options.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <PackageReference Include="CommandLineParser" Version="2.8.0" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\NostaleAuth\NostaleAuth.csproj">
- <Project>{63031600-41e1-4b37-a9c5-90cff5196806}</Project>
- <Name>NostaleAuth</Name>
- </ProjectReference>
- <ProjectReference Include="..\NosTaleGfless\NosTaleGfless.csproj">
- <Project>{a3f83a69-3981-4c18-953d-dfc7384e041e}</Project>
- <Name>NosTaleGfless</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Content Include="app.manifest" />
- </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>
- -->
- <PropertyGroup>
- <ApplicationManifest>app.manifest</ApplicationManifest>
- </PropertyGroup>
-</Project>>
\ No newline at end of file
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <ApplicationManifest>app.manifest</ApplicationManifest>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="CommandLineParser" Version="2.8.0" />
+ <PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\NostaleAuth\NostaleAuth.csproj" />
+ <ProjectReference Include="..\NosTaleGfless\NosTaleGfless.csproj" />
+ </ItemGroup>
+
+</Project>
M NostaleGfless.Example/Program.cs => NostaleGfless.Example/Program.cs +10 -12
@@ 12,28 12,29 @@ namespace NostaleGfless.Example
internal class Program
{
static EventWaitHandle ewh = new ManualResetEvent(false);
-
+
public static void Main(string[] args)
{
- string installationIdString = (string)Registry.GetValue(@"HKEY_CURRENT_USER\Software\Gameforge4d\TNTClient\MainApp",
+ string installationIdString = (string) Registry.GetValue(
+ @"HKEY_CURRENT_USER\Software\Gameforge4d\TNTClient\MainApp",
"InstallationId", null);
-
+
Guid? installationId = null;
if (installationIdString != null)
{
installationId = Guid.Parse(installationIdString);
}
-
+
Parser.Default.ParseArguments<Options>(args).WithParsed(async options =>
{
if (options.InstallationId != null)
{
installationId = Guid.Parse(options.InstallationId);
}
-
+
var authenticator = new GameforgeAuthenticator();
authenticator.InstallationId = installationId;
- var launcher = await authenticator.Authenticate(options.Email, options.Password);
+ var launcher = await authenticator.Authenticate(options.Email, options.Password);
if (launcher.Accounts.Count == 0)
{
throw new InvalidOperationException("There are no nostale account on the gameforge account");
@@ 56,7 57,7 @@ namespace NostaleGfless.Example
throw new InvalidOperationException($"Account {accountName} not found");
}
}
-
+
accounts.Add(account);
}
}
@@ 86,11 87,8 @@ namespace NostaleGfless.Example
}
ewh.Set();
- }).WithNotParsed((err) =>
- {
- ewh.Set();
- });
-
+ }).WithNotParsed((err) => { ewh.Set(); });
+
ewh.WaitOne();
}
}
D NostaleGfless.Example/Properties/AssemblyInfo.cs => NostaleGfless.Example/Properties/AssemblyInfo.cs +0 -35
@@ 1,35 0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("NostaleGfless.Example")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("NostaleGfless.Example")]
-[assembly: AssemblyCopyright("Copyright © 2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("66C5FF7F-E7A3-404D-A84A-4B91C1A12980")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// 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.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]>
\ No newline at end of file