Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Packaging TEST #215

Merged
merged 7 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 3 additions & 47 deletions Content.Packaging/ClientPackaging.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Diagnostics;
using System.Diagnostics;
using System.IO.Compression;
using Robust.Packaging;
using Robust.Packaging.AssetProcessing;
Expand All @@ -10,7 +10,6 @@ namespace Content.Packaging;

public static class ClientPackaging
{
private static readonly bool UseSecrets = File.Exists(Path.Combine("Secrets", "CorvaxSecrets.sln")); // Corvax-Secrets
/// <summary>
/// Be advised this can be called from server packaging during a HybridACZ build.
/// </summary>
Expand All @@ -35,24 +34,6 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
"/m"
}
});
if (UseSecrets)
{
await ProcessHelpers.RunCheck(new ProcessStartInfo
{
FileName = "dotnet",
ArgumentList =
{
"build",
Path.Combine("Secrets","Content.Corvax.Client", "Content.Corvax.Client.csproj"),
"-c", "Release",
"--nologo",
"/v:m",
"/t:Rebuild",
"/p:FullRelease=true",
"/m"
}
});
}
}

logger.Info("Packaging client...");
Expand Down Expand Up @@ -84,40 +65,15 @@ public static async Task WriteResources(

var inputPass = graph.Input;

// Corvax-Secrets-Start: Add Corvax interfaces to Magic ACZ
var assemblies = new List<string> { "Content.Client", "Content.Shared", "Content.Shared.Database", "Content.Corvax.Interfaces.Client", "Content.Corvax.Interfaces.Shared" };
if (UseSecrets)
assemblies.AddRange(new[] { "Content.Corvax.Shared", "Content.Corvax.Client" });
// Corvax-Secrets-End

await RobustSharedPackaging.WriteContentAssemblies(
inputPass,
contentDir,
"Content.Client",
assemblies, // Corvax-Secrets
new[] { "Content.Client", "Content.Shared", "Content.Shared.Database" },
cancel: cancel);

await WriteClientResources(contentDir, pass, cancel); // Corvax-Secrets: Support content resource ignore to ignore server-only prototypes
await RobustClientPackaging.WriteClientResources(contentDir, pass, cancel);

inputPass.InjectFinished();
}

// Corvax-Secrets-Start
public static IReadOnlySet<string> ContentClientIgnoredResources { get; } = new HashSet<string>
{
"CorvaxSecretsServer"
};

private static async Task WriteClientResources(
string contentDir,
AssetPass pass,
CancellationToken cancel = default)
{
var ignoreSet = RobustClientPackaging.ClientIgnoredResources
.Union(RobustSharedPackaging.SharedIgnoredResources)
.Union(ContentClientIgnoredResources).ToHashSet();

await RobustSharedPackaging.DoResourceCopy(Path.Combine(contentDir, "Resources"), pass, ignoreSet, cancel: cancel);
}
// Corvax-Secrets-End
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public sealed class PanicBunkerStatus
public bool ShowReason;
public int MinAccountAgeMinutes;
public int MinOverallMinutes;
public bool DenyVpn; // Corvax-VPNGuard
//public bool DenyVpn; // Corvax-VPNGuard
}

[Serializable, NetSerializable]
Expand Down
2 changes: 1 addition & 1 deletion Resources/ConfigPresets/Corvax/athara.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enabled = true
show_reason = true
min_account_age = 0
min_overall_minutes = 0
deny_vpn = true
#deny_vpn = true #FIX ADT
enable_without_admins = true
disable_with_admins = true

Expand Down
2 changes: 1 addition & 1 deletion Resources/ConfigPresets/Corvax/elysium.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enabled = true
show_reason = true
min_account_age = 0
min_overall_minutes = 0
deny_vpn = true
#deny_vpn = true #ADT Fix
enable_without_admins = true
disable_with_admins = true

Expand Down
2 changes: 1 addition & 1 deletion Resources/ConfigPresets/Corvax/main.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enabled = true
show_reason = true
min_account_age = 0
min_overall_minutes = 0
deny_vpn = true
#deny_vpn = true # Fix ADT
enable_without_admins = true
disable_with_admins = true

Expand Down
2 changes: 1 addition & 1 deletion Resources/ConfigPresets/Corvax/nebula.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enabled = true
show_reason = true
min_account_age = 0
min_overall_minutes = 0
deny_vpn = true
#deny_vpn = true # FIX ADT
enable_without_admins = true
disable_with_admins = true

Expand Down
2 changes: 1 addition & 1 deletion Resources/ConfigPresets/Corvax/solaris.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enabled = true
show_reason = true
min_account_age = 0
min_overall_minutes = 0
deny_vpn = true
#deny_vpn = true #ADT Fix
enable_without_admins = true
disable_with_admins = true

Expand Down
Loading