Skip to content

Commit

Permalink
Release version 3 (#109)
Browse files Browse the repository at this point in the history
* update deps

* updates

* update workflows

* update deps

* start renaming packages and ns

* build for linux again

* rename assemblies

* rename project files

* remove odd warning suppression for now

* use new ns syntax

* rename test namespaces

* rename clients windows ns

* rename clients and steam ns

* rename other ns

* remove steam exception from infrastructure

* move steam code new package

* steam tests for windows for now

* remove leftovers

* no tests

* update deps and enable tests partially

* enable more tests

* disable aet tests

* remove some tag

* update libs and ns

* fix build

* try aet enable tests

* fix build

* really fix build

* verbose output

* change csproj

* maybe this time...

* update tests

* update test and extract windows intrinsics from shared wrapper code

* fix race

* update deps

* Separate Windows registry

* fix tests windows

* do not support ubuntu in this version and update some tests and contracts

* pack icon and license
  • Loading branch information
AnakinRaW authored Mar 30, 2024
1 parent 8ec2770 commit 73ea01f
Show file tree
Hide file tree
Showing 306 changed files with 3,782 additions and 3,910 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
with:
fetch-depth: 0
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
- name: Create packages
run: dotnet pack --configuration Release --output ./packages
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: NuGet packages
path: packages/*.*
Expand All @@ -39,21 +39,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
- uses: actions/download-artifact@v3
uses: actions/setup-dotnet@v4
- uses: actions/download-artifact@v4
with:
name: NuGet packages
path: packages
- name: Push packages
run: dotnet nuget push "packages/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- uses: dotnet/[email protected].0
- uses: dotnet/[email protected].2
id: nbgv
- name: Create GitHub release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
name: v${{ steps.nbgv.outputs.SemVer2 }}
tag_name: v${{ steps.nbgv.outputs.SemVer2 }}
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'

- name: Build & Test in Release Mode
run: dotnet test --configuration Release --logger "GitHubActions"

- name: Build & Test .NET Framework
if: matrix.os == 'windows-latest'
run: dotnet test --configuration Release -f net48 --logger "GitHubActions"
run: dotnet test --configuration Release --logger "GitHubActions"
Binary file removed AlamoEngineTools.snk
Binary file not shown.
72 changes: 43 additions & 29 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
<Project>
<PropertyGroup>
<Product>PetroglyphTools</Product>
<Copyright>Copyright © Anakin Sklavenwalker 2019-2023</Copyright>
<Authors>Anakin Sklavenwalker</Authors>
<Company>Republic at War Modding Team</Company>
<PackageTags>petroglyph, alamo, glyphx, foc, eaw</PackageTags>
<PackageProjectUrl>https://github.com/AlamoEngine-Tools</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>
<PropertyGroup>
<SignAssembly Condition="'$(Configuration)' == 'Release'">False</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)AlamoEngineTools.snk</AssemblyOriginatorKeyFile>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
<PrivateAssets>all</PrivateAssets>
<Version>3.6.132</Version>
</PackageReference>
<PackageReference Include="SauceControl.InheritDoc" Version="1.3.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="" />
</ItemGroup>
<PropertyGroup>
<RepoRootPath>$(MSBuildThisFileDirectory)</RepoRootPath>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<EnableDynamicPlatformResolution>true</EnableDynamicPlatformResolution>
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\</PackageOutputPath>
</PropertyGroup>
<PropertyGroup>
<Authors>Alamo Engine Tools and Contributors</Authors>
<Copyright>Copyright © 2024 Alamo Engine Tools and contributors. All rights reserved.</Copyright>
<Company>Alamo Engine Tools</Company>
<PackageTags>petroglyph, alamo, glyphx, foc, eaw</PackageTags>
<PackageProjectUrl>https://github.com/AlamoEngine-Tools/PetroglyphGameInfrastructure</PackageProjectUrl>
<LicenseFile>$(MSBuildThisFileDirectory)LICENSE</LicenseFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RepositoryUrl>https://github.com/AlamoEngine-Tools/PetroglyphGameInfrastructure</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>aet.png</PackageIcon>
</PropertyGroup>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
<PrivateAssets>all</PrivateAssets>
<Version>3.6.133</Version>
</PackageReference>
<PackageReference Include="SauceControl.InheritDoc" Version="2.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="$(LicenseFile)" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)aet.png" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>
53 changes: 23 additions & 30 deletions PetroGlyphGameInfrastructure.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,23 @@ VisualStudioVersion = 17.0.31717.71
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DDF4836A-1257-4323-A288-B5F277242010}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PetroGlyph.Games.EawFoc.Test", "src\PetroGlyph.Games.EawFoc\test\PetroGlyph.Games.EawFoc.Test.csproj", "{90490B07-F4E3-4D1E-B3E3-FD059A0DAB8D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PG.StarWarsGame.Infrastructure.Test", "src\PetroGlyph.Games.EawFoc\test\PG.StarWarsGame.Infrastructure.Test.csproj", "{90490B07-F4E3-4D1E-B3E3-FD059A0DAB8D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PetroGlyph.Games.EawFoc.Clients", "src\PetroGlyph.Games.EawFoc.Clients\src\PetroGlyph.Games.EawFoc.Clients.csproj", "{F622B36D-E5C9-4C14-B4B1-8871DCF1FF46}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PG.StarWarsGame.Infrastructure.Clients", "src\PetroGlyph.Games.EawFoc.Clients\src\PG.StarWarsGame.Infrastructure.Clients.csproj", "{F622B36D-E5C9-4C14-B4B1-8871DCF1FF46}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PetroGlyph.Games.EawFoc.Clients.Steam.Windows", "src\PetroGlyph.Games.EawFoc.Clients.Steam.Windows\src\PetroGlyph.Games.EawFoc.Clients.Steam.Windows.csproj", "{3EB69B97-AD3F-4D72-BE49-D17547EE0895}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PetroGlyph.Games.EawFoc", "src\PetroGlyph.Games.EawFoc\src\PetroGlyph.Games.EawFoc.csproj", "{6A14A57C-60E6-4DDE-B8F0-55ADB3A20758}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PG.StarWarsGame.Infrastructure", "src\PetroGlyph.Games.EawFoc\src\PG.StarWarsGame.Infrastructure.csproj", "{6A14A57C-60E6-4DDE-B8F0-55ADB3A20758}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{91EC3980-0C87-484F-91E5-0FE684C1D2E0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PetroGlyph.Games.EawFoc.Clients.Steam.Windows.Test", "src\PetroGlyph.Games.EawFoc.Clients.Steam.Windows\test\PetroGlyph.Games.EawFoc.Clients.Steam.Windows.Test.csproj", "{9F5EB615-86CB-4AF1-88B9-A1DAF4EAF9F2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PG.StarWarsGame.Infrastructure.Clients.Test", "src\PetroGlyph.Games.EawFoc.Clients\test\PG.StarWarsGame.Infrastructure.Clients.Test.csproj", "{0D5DAC91-BB5F-46F4-9145-4296E9151DC3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PetroGlyph.Games.EawFoc.Clients.Test", "src\PetroGlyph.Games.EawFoc.Clients\test\PetroGlyph.Games.EawFoc.Clients.Test.csproj", "{0D5DAC91-BB5F-46F4-9145-4296E9151DC3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleApplication", "sample\SampleApplication\SampleApplication.csproj", "{8F295344-3D7B-4983-88FD-D0E5C692CBAB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PetroGlyph.Games.EawFoc.Clients.Steam", "src\PetroGlyph.Games.EawFoc.Clients.Steam\src\PetroGlyph.Games.EawFoc.Clients.Steam.csproj", "{179786D1-8C85-46B3-9943-30A1902D92B4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PG.TestingUtilities", "src\Testing\PG.TestingUtilities\PG.TestingUtilities.csproj", "{C8F51821-F25D-4C4E-8050-5C559ADD39DB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PetroGlyph.Games.EawFoc.Clients.Steam.Test", "src\PetroGlyph.Games.EawFoc.Clients.Steam\test\PetroGlyph.Games.EawFoc.Clients.Steam.Test.csproj", "{69666FB7-7F44-451B-8ABF-7F18DEC3AD45}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AET.SteamAbstraction", "src\AET.SteamAbstraction\AET.SteamAbstraction\AET.SteamAbstraction.csproj", "{24CA9F24-E6DC-4908-B586-E7C14515628C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApplication", "sample\SampleApplication\SampleApplication.csproj", "{8F295344-3D7B-4983-88FD-D0E5C692CBAB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AET.SteamAbstraction.Test", "src\AET.SteamAbstraction\AET.SteamAbstraction.Test\AET.SteamAbstraction.Test.csproj", "{38FE318C-F775-4318-859C-DCAB3C6FCD71}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -39,47 +37,42 @@ Global
{F622B36D-E5C9-4C14-B4B1-8871DCF1FF46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F622B36D-E5C9-4C14-B4B1-8871DCF1FF46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F622B36D-E5C9-4C14-B4B1-8871DCF1FF46}.Release|Any CPU.Build.0 = Release|Any CPU
{3EB69B97-AD3F-4D72-BE49-D17547EE0895}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3EB69B97-AD3F-4D72-BE49-D17547EE0895}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3EB69B97-AD3F-4D72-BE49-D17547EE0895}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3EB69B97-AD3F-4D72-BE49-D17547EE0895}.Release|Any CPU.Build.0 = Release|Any CPU
{6A14A57C-60E6-4DDE-B8F0-55ADB3A20758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A14A57C-60E6-4DDE-B8F0-55ADB3A20758}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A14A57C-60E6-4DDE-B8F0-55ADB3A20758}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A14A57C-60E6-4DDE-B8F0-55ADB3A20758}.Release|Any CPU.Build.0 = Release|Any CPU
{9F5EB615-86CB-4AF1-88B9-A1DAF4EAF9F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F5EB615-86CB-4AF1-88B9-A1DAF4EAF9F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F5EB615-86CB-4AF1-88B9-A1DAF4EAF9F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F5EB615-86CB-4AF1-88B9-A1DAF4EAF9F2}.Release|Any CPU.Build.0 = Release|Any CPU
{0D5DAC91-BB5F-46F4-9145-4296E9151DC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D5DAC91-BB5F-46F4-9145-4296E9151DC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D5DAC91-BB5F-46F4-9145-4296E9151DC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D5DAC91-BB5F-46F4-9145-4296E9151DC3}.Release|Any CPU.Build.0 = Release|Any CPU
{179786D1-8C85-46B3-9943-30A1902D92B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{179786D1-8C85-46B3-9943-30A1902D92B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{179786D1-8C85-46B3-9943-30A1902D92B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{179786D1-8C85-46B3-9943-30A1902D92B4}.Release|Any CPU.Build.0 = Release|Any CPU
{69666FB7-7F44-451B-8ABF-7F18DEC3AD45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69666FB7-7F44-451B-8ABF-7F18DEC3AD45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69666FB7-7F44-451B-8ABF-7F18DEC3AD45}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69666FB7-7F44-451B-8ABF-7F18DEC3AD45}.Release|Any CPU.Build.0 = Release|Any CPU
{8F295344-3D7B-4983-88FD-D0E5C692CBAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F295344-3D7B-4983-88FD-D0E5C692CBAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F295344-3D7B-4983-88FD-D0E5C692CBAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F295344-3D7B-4983-88FD-D0E5C692CBAB}.Release|Any CPU.Build.0 = Release|Any CPU
{C8F51821-F25D-4C4E-8050-5C559ADD39DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8F51821-F25D-4C4E-8050-5C559ADD39DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8F51821-F25D-4C4E-8050-5C559ADD39DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8F51821-F25D-4C4E-8050-5C559ADD39DB}.Release|Any CPU.Build.0 = Release|Any CPU
{24CA9F24-E6DC-4908-B586-E7C14515628C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24CA9F24-E6DC-4908-B586-E7C14515628C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24CA9F24-E6DC-4908-B586-E7C14515628C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24CA9F24-E6DC-4908-B586-E7C14515628C}.Release|Any CPU.Build.0 = Release|Any CPU
{38FE318C-F775-4318-859C-DCAB3C6FCD71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38FE318C-F775-4318-859C-DCAB3C6FCD71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38FE318C-F775-4318-859C-DCAB3C6FCD71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38FE318C-F775-4318-859C-DCAB3C6FCD71}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{90490B07-F4E3-4D1E-B3E3-FD059A0DAB8D} = {91EC3980-0C87-484F-91E5-0FE684C1D2E0}
{F622B36D-E5C9-4C14-B4B1-8871DCF1FF46} = {DDF4836A-1257-4323-A288-B5F277242010}
{3EB69B97-AD3F-4D72-BE49-D17547EE0895} = {DDF4836A-1257-4323-A288-B5F277242010}
{6A14A57C-60E6-4DDE-B8F0-55ADB3A20758} = {DDF4836A-1257-4323-A288-B5F277242010}
{9F5EB615-86CB-4AF1-88B9-A1DAF4EAF9F2} = {91EC3980-0C87-484F-91E5-0FE684C1D2E0}
{0D5DAC91-BB5F-46F4-9145-4296E9151DC3} = {91EC3980-0C87-484F-91E5-0FE684C1D2E0}
{179786D1-8C85-46B3-9943-30A1902D92B4} = {DDF4836A-1257-4323-A288-B5F277242010}
{69666FB7-7F44-451B-8ABF-7F18DEC3AD45} = {91EC3980-0C87-484F-91E5-0FE684C1D2E0}
{C8F51821-F25D-4C4E-8050-5C559ADD39DB} = {91EC3980-0C87-484F-91E5-0FE684C1D2E0}
{24CA9F24-E6DC-4908-B586-E7C14515628C} = {DDF4836A-1257-4323-A288-B5F277242010}
{38FE318C-F775-4318-859C-DCAB3C6FCD71} = {91EC3980-0C87-484F-91E5-0FE684C1D2E0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {76D00646-2467-4997-A19B-8299D8724D38}
Expand Down
Binary file added aet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions global.json

This file was deleted.

36 changes: 17 additions & 19 deletions sample/SampleApplication/Program.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
using System;
using System.Collections.Generic;
using System.IO.Abstractions;
using System.Linq;
using AET.SteamAbstraction;
using AnakinRaW.CommonUtilities.Registry.Windows;
using Microsoft.Extensions.DependencyInjection;
using PetroGlyph.Games.EawFoc;
using PetroGlyph.Games.EawFoc.Clients;
using PetroGlyph.Games.EawFoc.Clients.Steam;
using PetroGlyph.Games.EawFoc.Games;
using PetroGlyph.Games.EawFoc.Mods;
using PetroGlyph.Games.EawFoc.Services;
using PetroGlyph.Games.EawFoc.Services.Dependencies;
using PetroGlyph.Games.EawFoc.Services.Detection;
using PetroGlyph.Games.EawFoc.Services.Name;
using PG.StarWarsGame.Infrastructure;
using PG.StarWarsGame.Infrastructure.Clients;
using PG.StarWarsGame.Infrastructure.Clients.Steam;
using PG.StarWarsGame.Infrastructure.Games;
using PG.StarWarsGame.Infrastructure.Mods;
using PG.StarWarsGame.Infrastructure.Services;
using PG.StarWarsGame.Infrastructure.Services.Dependencies;
using PG.StarWarsGame.Infrastructure.Services.Detection;


var sp = SetupApplication();
Expand Down Expand Up @@ -65,19 +66,16 @@ IGame FindGame()
IServiceProvider SetupApplication()
{
var sc = new ServiceCollection();
PetroglyphGameInfrastructureLibrary.InitializeLibraryWithDefaultServices(sc);
PetroglyphClientsLibrary.InitializeLibraryWithDefaultServices(sc);
PetroglyphWindowsSteamClientsLibrary.InitializeLibraryWithDefaultServices(sc);

sc.AddSingleton(WindowsRegistry.Default);
sc.AddSingleton<IFileSystem>(_ => new FileSystem());

PetroglyphGameInfrastructure.InitializeServices(sc);
SteamAbstractionLayer.InitializeServices(sc);
PetroglyphGameClients.InitializeServices(sc);

// The game detector to use for this application.
sc.AddTransient<IGameDetector>(sp => new SteamPetroglyphStarWarsGameDetector(sp));
sc.AddTransient<IGameFactory>(sp => new GameFactory(sp));
sc.AddTransient<IModReferenceFinder>(sp => new FileSystemModFinder(sp));
sc.AddTransient<IModFactory>(sp => new ModFactory(sp));
sc.AddTransient<IModReferenceLocationResolver>(sp => new ModReferenceLocationResolver(sp));
sc.AddTransient<IModNameResolver>(sp => new DirectoryModNameResolver(sp));
sc.AddTransient<IDependencyResolver>(sp => new ModDependencyResolver(sp));
sc.AddTransient<IGameClientFactory>(sp => new DefaultGameClientFactory(sp));

return sc.BuildServiceProvider();
}
22 changes: 6 additions & 16 deletions sample/SampleApplication/SampleApplication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,18 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<LangVersion>10.0</LangVersion>
<TargetFramework>net6.0-windows</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup>
<IncludeSymbols>true</IncludeSymbols>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<InheritDocEnabled>false</InheritDocEnabled>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="AnakinRaW.CommonUtilities.Registry" Version="10.1.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\PetroGlyph.Games.EawFoc.Clients.Steam.Windows\src\PetroGlyph.Games.EawFoc.Clients.Steam.Windows.csproj" />
<ProjectReference Include="..\..\src\PetroGlyph.Games.EawFoc.Clients.Steam\src\PetroGlyph.Games.EawFoc.Clients.Steam.csproj" />
<ProjectReference Include="..\..\src\PetroGlyph.Games.EawFoc.Clients\src\PetroGlyph.Games.EawFoc.Clients.csproj" />
<ProjectReference Include="..\..\src\PetroGlyph.Games.EawFoc\src\PetroGlyph.Games.EawFoc.csproj" />
<ProjectReference Include="..\..\src\PetroGlyph.Games.EawFoc.Clients\src\PG.StarWarsGame.Infrastructure.Clients.csproj" />
<ProjectReference Include="..\..\src\PetroGlyph.Games.EawFoc\src\PG.StarWarsGame.Infrastructure.csproj" />
</ItemGroup>

</Project>
Loading

0 comments on commit 73ea01f

Please sign in to comment.