mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Update content package for Secrets
This commit is contained in:
parent
00cfed5ce5
commit
949df85170
2 changed files with 58 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ namespace Content.Packaging;
|
|||
|
||||
public static class ClientPackaging
|
||||
{
|
||||
private static readonly bool UseSecrets = Directory.Exists(Path.Combine("Secrets")); // Corvax-Secrets
|
||||
/// <summary>
|
||||
/// Be advised this can be called from server packaging during a HybridACZ build.
|
||||
/// </summary>
|
||||
|
|
@ -34,6 +35,24 @@ public static class ClientPackaging
|
|||
"/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...");
|
||||
|
|
@ -65,11 +84,17 @@ public static class ClientPackaging
|
|||
|
||||
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",
|
||||
new[] { "Content.Client", "Content.Shared", "Content.Shared.Database", "Content.Corvax.Interfaces.Client", "Content.Corvax.Interfaces.Shared" }, // Corvax-Secrets: Add Corvax interfaces to Magic ACZ
|
||||
assemblies, // Corvax-Secrets
|
||||
cancel: cancel);
|
||||
|
||||
await RobustClientPackaging.WriteClientResources(contentDir, pass, cancel);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@ public static class ServerPackaging
|
|||
|
||||
private static readonly List<string> ServerContentAssemblies = new()
|
||||
{
|
||||
// Corvax-Secrets-Start
|
||||
"Content.Corvax.Interfaces.Shared",
|
||||
"Content.Corvax.Interfaces.Server",
|
||||
// Corvax-Secrets-End
|
||||
"Content.Server.Database",
|
||||
"Content.Server",
|
||||
"Content.Shared",
|
||||
|
|
@ -74,6 +78,8 @@ public static class ServerPackaging
|
|||
"zh-Hant"
|
||||
};
|
||||
|
||||
private static readonly bool UseSecrets = Directory.Exists(Path.Combine("Secrets")); // Corvax-Secrets
|
||||
|
||||
public static async Task PackageServer(bool skipBuild, bool hybridAcz, IPackageLogger logger, List<string>? platforms = null)
|
||||
{
|
||||
if (platforms == null)
|
||||
|
|
@ -122,6 +128,28 @@ public static class ServerPackaging
|
|||
"/m"
|
||||
}
|
||||
});
|
||||
// Corvax-Secrets-Start
|
||||
if (UseSecrets)
|
||||
{
|
||||
logger.Info($"Secrets found. Building secret project for {platform}...");
|
||||
await ProcessHelpers.RunCheck(new ProcessStartInfo
|
||||
{
|
||||
FileName = "dotnet",
|
||||
ArgumentList =
|
||||
{
|
||||
"build",
|
||||
Path.Combine("Secrets","Content.Corvax.Server", "Content.Corvax.Server.csproj"),
|
||||
"-c", "Release",
|
||||
"--nologo",
|
||||
"/v:m",
|
||||
$"/p:TargetOs={platform.TargetOs}",
|
||||
"/t:Rebuild",
|
||||
"/p:FullRelease=true",
|
||||
"/m"
|
||||
}
|
||||
});
|
||||
}
|
||||
// Corvax-Secrets-End
|
||||
|
||||
await PublishClientServer(platform.Rid, platform.TargetOs);
|
||||
}
|
||||
|
|
@ -179,6 +207,10 @@ public static class ServerPackaging
|
|||
|
||||
var inputPass = graph.Input;
|
||||
var contentAssemblies = new List<string>(ServerContentAssemblies);
|
||||
// Corvax-Secrets-Start
|
||||
if (UseSecrets)
|
||||
contentAssemblies.AddRange(new[] { "Content.Corvax.Shared", "Content.Corvax.Server" });
|
||||
// Corvax-Secrets-End
|
||||
|
||||
// Additional assemblies that need to be copied such as EFCore.
|
||||
var sourcePath = Path.Combine(contentDir, "bin", "Content.Server");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue