Flax.Build compress toogle option

This commit is contained in:
Crawcik
2022-09-07 18:15:14 +02:00
parent 8b0d1b4a8c
commit f154bfcfc1
3 changed files with 13 additions and 3 deletions

View File

@@ -39,6 +39,12 @@ namespace Flax.Build
[CommandLine("deploy", "Runs the deploy tool.")]
public static bool Deploy = false;
/// <summary>
/// Compresses deployed files.
/// </summary>
[CommandLine("deployDontCompress", "Skips compressing deployed files, and keeps files.")]
public static bool DontCompress = false;
/// <summary>
/// Builds the targets. Builds all the targets, use <see cref="BuildTargets"/> to select a custom set of targets for the build.
/// </summary>

View File

@@ -127,6 +127,9 @@ namespace Flax.Deploy
DeployFile(RootPath, OutputPath, "Flax.flaxproj");
// Compress
if (Configuration.DontCompress)
return;
Log.Info(string.Empty);
Log.Info("Compressing editor files...");
string editorPackageZipPath;

View File

@@ -63,6 +63,7 @@ namespace Flax.Deploy
}
// Compress
if (!Configuration.DontCompress)
{
Log.Info("Compressing platform files...");
@@ -84,10 +85,10 @@ namespace Flax.Deploy
#endif
Log.Info(string.Format("Compressed {0} package size: {1}", platformName, Utilities.GetFileSize(packageZipPath)));
}
// Remove files (only zip package is used)
Utilities.DirectoryDelete(dst);
// Remove files (only zip package is used)
Utilities.DirectoryDelete(dst);
}
Log.Info(string.Empty);
}