Skip to content

Commit

Permalink
Add client, tiny fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilisThePikachu committed Mar 21, 2024
1 parent 7e75790 commit a52a95a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Content.Packaging/ClientPackaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static class ClientPackaging
/// <summary>
/// Be advised this can be called from server packaging during a HybridACZ build.
/// </summary>
public static async Task PackageClient(bool skipBuild, IPackageLogger logger)
public static async Task PackageClient(bool skipBuild, string configuration, IPackageLogger logger)
{
logger.Info("Building client...");

Expand All @@ -26,7 +26,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
{
"build",
Path.Combine("Content.Client", "Content.Client.csproj"),
"-c", "Release",
"-c", configuration,
"--nologo",
"/v:m",
"/t:Rebuild",
Expand Down
4 changes: 2 additions & 2 deletions Content.Packaging/CommandLineArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed class CommandLineArgs
public bool HybridAcz { get; set; }

/// <summary>
/// Configuration used for when packaging. (Release, Debug)
/// Configuration used for when packaging the server. (Release, Debug, Tools)
/// </summary>
public string Configuration { get; set; }

Expand Down Expand Up @@ -136,7 +136,7 @@ private static void PrintHelp()
--no-wipe-release Don't wipe the release folder before creating files.
--hybrid-acz Use HybridACZ for server builds.
--platform Platform for server builds. Default will output several x64 targets.
--configuration Configuration to use for building. Default is Release.
--configuration Configuration to use for building the server (Release, Debug, Tools). Default is Release.
");
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Packaging/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if (parsed.Client)
{
await ClientPackaging.PackageClient(parsed.SkipBuild, logger);
await ClientPackaging.PackageClient(parsed.SkipBuild, parsed.Configuration, logger);
}
else
{
Expand Down
12 changes: 6 additions & 6 deletions Content.Packaging/ServerPackaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static async Task PackageServer(bool skipBuild, bool hybridAcz, IPackageL
// Rather than hosting the client ZIP on the watchdog or on a separate server,
// Hybrid ACZ uses the ACZ hosting functionality to host it as part of the status host,
// which means that features such as automatic UPnP forwarding still work properly.
await ClientPackaging.PackageClient(skipBuild, logger);
await ClientPackaging.PackageClient(skipBuild, configuration, logger);
}

// Good variable naming right here.
Expand All @@ -97,7 +97,7 @@ public static async Task PackageServer(bool skipBuild, bool hybridAcz, IPackageL

private static async Task BuildPlatform(PlatformReg platform, bool skipBuild, bool hybridAcz, string configuration, IPackageLogger logger)
{
logger.Info($"Building project for {platform}...");
logger.Info($"Building project for {platform.TargetOs}...");

if (!skipBuild)
{
Expand All @@ -108,7 +108,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
{
"build",
Path.Combine("Content.Server", "Content.Server.csproj"),
"-c", $"{configuration}",
"-c", configuration,
"--nologo",
"/v:m",
$"/p:TargetOs={platform.TargetOs}",
Expand All @@ -118,7 +118,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
}
});

await PublishClientServer(platform.Rid, platform.TargetOs);
await PublishClientServer(platform.Rid, platform.TargetOs, configuration);
}

logger.Info($"Packaging {platform.Rid} server...");
Expand All @@ -137,7 +137,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
logger.Info($"Finished packaging server in {sw.Elapsed}");
}

private static async Task PublishClientServer(string runtime, string targetOs)
private static async Task PublishClientServer(string runtime, string targetOs, string configuration)
{
await ProcessHelpers.RunCheck(new ProcessStartInfo
{
Expand All @@ -147,7 +147,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
"publish",
"--runtime", runtime,
"--no-self-contained",
"-c", "Release",
"-c", configuration,
$"/p:TargetOs={targetOs}",
"/p:FullRelease=True",
"/m",
Expand Down

0 comments on commit a52a95a

Please sign in to comment.