Add deploying game debug symbols for Windows builds
This commit is contained in:
@@ -93,6 +93,22 @@ namespace Flax.Deploy
|
||||
BuildPlatform(platform, architectures);
|
||||
}
|
||||
}
|
||||
|
||||
if (Platform.BuildTargetPlatform == TargetPlatform.Windows)
|
||||
{
|
||||
Log.Info("Compressing game debug symbols files...");
|
||||
var gamePackageZipPath = Path.Combine(Deployer.PackageOutputPath, "GameDebugSymbols.zip");
|
||||
Utilities.FileDelete(gamePackageZipPath);
|
||||
using (var zip = new Ionic.Zip.ZipFile())
|
||||
{
|
||||
zip.AddDirectory(Path.Combine(Deployer.PackageOutputPath, "GameDebugSymbols"));
|
||||
zip.CompressionLevel = Ionic.Zlib.CompressionLevel.BestCompression;
|
||||
zip.Comment = string.Format("Flax Game {0}.{1}.{2}\nDate: {3}", Deployer.VersionMajor, Deployer.VersionMinor, Deployer.VersionBuild, DateTime.UtcNow);
|
||||
zip.Save(gamePackageZipPath);
|
||||
}
|
||||
Log.Info("Compressed game debug symbols package size: " + Utilities.GetFileSize(gamePackageZipPath));
|
||||
}
|
||||
Utilities.DirectoryDelete(Path.Combine(Deployer.PackageOutputPath, "GameDebugSymbols"));
|
||||
}
|
||||
|
||||
if (Configuration.DeployEditor)
|
||||
|
||||
@@ -28,6 +28,18 @@ namespace Flax.Deploy
|
||||
string dst = Path.Combine(Deployer.PackageOutputPath, platformName);
|
||||
Utilities.DirectoryDelete(dst);
|
||||
|
||||
// Deploy debug files for crashes debugging
|
||||
foreach (var configuration in new[] { TargetConfiguration.Debug, TargetConfiguration.Development, TargetConfiguration.Release })
|
||||
{
|
||||
if (platform == TargetPlatform.Windows)
|
||||
{
|
||||
var dstDebug = Path.Combine(Deployer.PackageOutputPath, $"GameDebugSymbols/{platform}/{configuration}");
|
||||
Directory.CreateDirectory(dstDebug);
|
||||
var binaries = Path.Combine(src, "Binaries", "Game", "x64", configuration.ToString());
|
||||
DeployFiles(binaries, dstDebug, "*.pdb");
|
||||
}
|
||||
}
|
||||
|
||||
// Deploy files
|
||||
{
|
||||
DeployFolder(platformsRoot, Deployer.PackageOutputPath, platformName);
|
||||
|
||||
Reference in New Issue
Block a user