Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Update project files for configuration changes. (#14281)
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 authored Mar 6, 2023
1 parent 9b080c0 commit c5b3f62
Show file tree
Hide file tree
Showing 18 changed files with 187 additions and 60 deletions.
6 changes: 6 additions & 0 deletions BuildChecker/BuildChecker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Tools|AnyCPU' ">
<OutputPath>bin\Tools\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugOpt|AnyCPU' ">
<OutputPath>bin\DebugOpt\</OutputPath>
</PropertyGroup>
<Target Name="Build">
<Exec Command="$(Python) git_helper.py" CustomErrorRegularExpression="^Error" />
</Target>
Expand Down
1 change: 0 additions & 1 deletion Content.Benchmarks/Content.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@
<ProjectReference Include="..\RobustToolbox\Robust.Shared.Maths\Robust.Shared.Maths.csproj" />
<ProjectReference Include="..\RobustToolbox\Robust.Shared\Robust.Shared.csproj" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />
</Project>
7 changes: 4 additions & 3 deletions Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand All @@ -10,8 +9,9 @@
<OutputType Condition="'$(FullRelease)' != 'True'">Exe</OutputType>
<WarningsAsErrors>nullable</WarningsAsErrors>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;Tools;DebugOpt</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.DefineConstants.targets" />
<ItemGroup>
<PackageReference Include="Nett" Version="0.15.0" />
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
Expand All @@ -34,6 +34,7 @@
<DependentUpon>StrippingWindow.xaml</DependentUpon>
</Compile>
</ItemGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<Import Project="..\RobustToolbox\MSBuild\XamlIL.targets" />
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />
</Project>
4 changes: 1 addition & 3 deletions Content.IntegrationTests/Content.IntegrationTests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand All @@ -8,7 +7,6 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<LangVersion>11</LangVersion>
</PropertyGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.DefineConstants.targets" />
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
Expand All @@ -25,5 +23,5 @@
<ProjectReference Include="..\RobustToolbox\Robust.Shared\Robust.Shared.csproj" />
<ProjectReference Include="..\RobustToolbox\Robust.UnitTesting\Robust.UnitTesting.csproj" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
19 changes: 13 additions & 6 deletions Content.IntegrationTests/PoolManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,7 @@ private static void SetupCVars(PoolSettings poolSettings, RobustIntegrationTest.
options.CVarOverrides[CCVars.GameDummyTicker.Name] = "true";
}

if (poolSettings.InLobby)
{
options.CVarOverrides[CCVars.GameLobbyEnabled.Name] = "true";
}
options.CVarOverrides[CCVars.GameLobbyEnabled.Name] = poolSettings.InLobby.ToString();

if (poolSettings.DisableInterpolate)
{
Expand All @@ -233,6 +230,8 @@ private static void SetupCVars(PoolSettings poolSettings, RobustIntegrationTest.
options.CVarOverrides[CCVars.GameMap.Name] = poolSettings.Map;
}

options.CVarOverrides[CCVars.ConfigPresetDevelopment.Name] = "false";

// This breaks some tests.
// TODO: Figure out which tests this breaks.
options.CVarOverrides[CVars.NetBufferSize.Name] = "0";
Expand Down Expand Up @@ -647,12 +646,12 @@ public sealed class PoolSettings
/// <summary>
/// If the returned pair must not be reused
/// </summary>
public bool MustNotBeReused => Destructive || NoLoadContent || DisableInterpolate || DummyTicker;
public bool MustNotBeReused => Destructive || NoLoadContent || DisableInterpolate || DummyTicker || NoToolsExtraPrototypes;

/// <summary>
/// If the given pair must be brand new
/// </summary>
public bool MustBeNew => Fresh || NoLoadContent || DisableInterpolate || DummyTicker;
public bool MustBeNew => Fresh || NoLoadContent || DisableInterpolate || DummyTicker || NoToolsExtraPrototypes;

/// <summary>
/// If the given pair must not be connected
Expand Down Expand Up @@ -744,6 +743,14 @@ public bool CanFastRecycle(PoolSettings nextSettings)
if (ExtraPrototypes != nextSettings.ExtraPrototypes) return false;
return true;
}

// Prototype hot reload is not available outside TOOLS builds,
// so we can't pool test instances that use ExtraPrototypes without TOOLS.
#if TOOLS
private bool NoToolsExtraPrototypes => false;
#else
private bool NoToolsExtraPrototypes => !string.IsNullOrEmpty(ExtraPrototypes);
#endif
}

/// <summary>
Expand Down
11 changes: 5 additions & 6 deletions Content.MapRenderer/Content.MapRenderer.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets"/>

<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputPath>..\bin\Content.MapRenderer\</OutputPath>
Expand All @@ -10,13 +8,14 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Content.IntegrationTests\Content.IntegrationTests.csproj"/>
<ProjectReference Include="..\RobustToolbox\Robust.UnitTesting\Robust.UnitTesting.csproj"/>
<ProjectReference Include="..\Content.IntegrationTests\Content.IntegrationTests.csproj" />
<ProjectReference Include="..\RobustToolbox\Robust.UnitTesting\Robust.UnitTesting.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3"/>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
</ItemGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
5 changes: 2 additions & 3 deletions Content.Packaging/Content.Packaging.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets"/>

<PropertyGroup>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\RobustToolbox\Robust.Packaging\Robust.Packaging.csproj"/>
<ProjectReference Include="..\RobustToolbox\Robust.Packaging\Robust.Packaging.csproj" />
</ItemGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
9 changes: 1 addition & 8 deletions Content.Server.Database/Content.Server.Database.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand All @@ -9,14 +8,8 @@
<OutputPath>..\bin\Content.Server.Database\</OutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<NoWarn>RA0003</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<NoWarn>RA0003</NoWarn>
</PropertyGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.DefineConstants.targets" />

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.5">
Expand All @@ -31,5 +24,5 @@
<ProjectReference Include="..\Content.Shared.Database\Content.Shared.Database.csproj" />
</ItemGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
4 changes: 1 addition & 3 deletions Content.Server/Content.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand All @@ -14,7 +13,6 @@
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.DefineConstants.targets" />
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
</ItemGroup>
Expand All @@ -27,6 +25,6 @@
<ProjectReference Include="..\RobustToolbox\Robust.Server\Robust.Server.csproj" />
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
2 changes: 1 addition & 1 deletion Content.Server/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private static void LoadConfigPresets(IConfigurationManager cfg, IResourceManage

private static void LoadBuildConfigPresets(IConfigurationManager cfg, IResourceManager res, ISawmill sawmill)
{
#if !FULL_RELEASE
#if TOOLS
Load(CCVars.ConfigPresetDevelopment, "development");
#endif
#if DEBUG
Expand Down
3 changes: 1 addition & 2 deletions Content.Shared.Database/Content.Shared.Database.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets"/>

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
6 changes: 1 addition & 5 deletions Content.Shared/Content.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
<LangVersion>11</LangVersion>
<IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Configurations>Release;Debug</Configurations>
<Platforms>AnyCPU</Platforms>
<WarningsAsErrors>nullable</WarningsAsErrors>
<Nullable>enable</Nullable>
</PropertyGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.DefineConstants.targets" />
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
</ItemGroup>
Expand All @@ -30,6 +26,6 @@
<ItemGroup>
<EmbeddedResource Include="Text\Names\*.txt" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
6 changes: 1 addition & 5 deletions Content.Tests/Content.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
<LangVersion>11</LangVersion>
<IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\bin\Content.Tests\</OutputPath>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.DefineConstants.targets" />
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.15.0" />
Expand All @@ -27,6 +23,6 @@
<ProjectReference Include="..\RobustToolbox\Robust.Shared\Robust.Shared.csproj" />
<ProjectReference Include="..\RobustToolbox\Robust.UnitTesting\Robust.UnitTesting.csproj" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
2 changes: 1 addition & 1 deletion Content.Tools/Content.Tools.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand All @@ -13,4 +12,5 @@
<ProjectReference Include="..\RobustToolbox\Robust.Shared\Robust.Shared.csproj" />
</ItemGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
3 changes: 2 additions & 1 deletion Content.YAMLLinter/Content.YAMLLinter.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand All @@ -22,4 +21,6 @@
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
</ItemGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
17 changes: 6 additions & 11 deletions Content.YAMLLinter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,14 @@

namespace Content.YAMLLinter
{
internal class Program
internal static class Program
{
private static int Main(string[] args)
{
return new Program().Run();
}

private int Run()
private static async Task<int> Main(string[] args)
{
var stopwatch = new Stopwatch();
stopwatch.Start();

var errors = RunValidation().Result;
var errors = await RunValidation();

if (errors.Count == 0)
{
Expand All @@ -43,7 +38,7 @@ private int Run()
return -1;
}

private async Task<Dictionary<string, HashSet<ErrorNode>>> ValidateClient()
private static async Task<Dictionary<string, HashSet<ErrorNode>>> ValidateClient()
{
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{DummyTicker = true, Disconnected = true});
var client = pairTracker.Pair.Client;
Expand All @@ -61,7 +56,7 @@ await client.WaitPost(() =>
return clientErrors;
}

private async Task<Dictionary<string, HashSet<ErrorNode>>> ValidateServer()
private static async Task<Dictionary<string, HashSet<ErrorNode>>> ValidateServer()
{
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{DummyTicker = true, Disconnected = true});
var server = pairTracker.Pair.Server;
Expand All @@ -79,7 +74,7 @@ await server.WaitPost(() =>
return serverErrors;
}

public async Task<Dictionary<string, HashSet<ErrorNode>>> RunValidation()
public static async Task<Dictionary<string, HashSet<ErrorNode>>> RunValidation()
{
var allErrors = new Dictionary<string, HashSet<ErrorNode>>();

Expand Down
2 changes: 1 addition & 1 deletion Pow3r/Pow3r.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand All @@ -18,4 +17,5 @@
<ProjectReference Include="..\RobustToolbox\Robust.Shared.Maths\Robust.Shared.Maths.csproj" />
</ItemGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
Loading

0 comments on commit c5b3f62

Please sign in to comment.