diff --git a/Tools/MonoGame.Content.Builder/BuildEvent.cs b/Tools/MonoGame.Content.Builder/BuildEvent.cs index f728aabf197..5a066c4f75f 100644 --- a/Tools/MonoGame.Content.Builder/BuildEvent.cs +++ b/Tools/MonoGame.Content.Builder/BuildEvent.cs @@ -286,8 +286,8 @@ private static string ConvertToString(object value) internal class PipelineBuildEventBinaryWriter : BinaryWriter { private const string Header = "KNIC"; // content db - private const short MajorVersion = 3; - private const short MinorVersion = 9; + private const short MajorVersion = 3; + private const short MinorVersion = 15; private const short DataType = 2; // PipelineBuildEvent data @@ -366,8 +366,8 @@ private void WriteDateTime(DateTime value) internal class PipelineBuildEventBinaryReader : BinaryReader { private const string Header = "KNIC"; // content db - private const short MajorVersion = 3; - private const short MinorVersion = 9; + private const short MajorVersion = 3; + private const short MinorVersion = 15; private const int DataType = 2; // PipelineBuildEvent data diff --git a/Tools/MonoGame.Content.Builder/ContentBuilder.cs b/Tools/MonoGame.Content.Builder/ContentBuilder.cs index 3f9f5c0e5cb..00da9d7d774 100644 --- a/Tools/MonoGame.Content.Builder/ContentBuilder.cs +++ b/Tools/MonoGame.Content.Builder/ContentBuilder.cs @@ -345,7 +345,6 @@ public void Build() } _manager = new PipelineManager(projectDirectory, _responseFilename, outputPath, intermediatePath, this.Quiet); - _manager.Compression = compression; // Feed all the assembly references to the pipeline manager // so it can resolve importers, processors, writers, and types. @@ -361,6 +360,7 @@ public void Build() bool targetChanged = previousFileCollection.Config != Config || previousFileCollection.Platform != Platform || previousFileCollection.Profile != Profile + || previousFileCollection.Compression != compression ; // First clean previously built content. @@ -374,6 +374,7 @@ public void Build() { Profile = _manager.Profile = Profile, Platform = _manager.Platform = Platform, + Compression = _manager.Compression = compression, Config = _manager.Config = Config }; SuccessCount = 0; diff --git a/Tools/MonoGame.Content.Builder/SourceFileCollection.cs b/Tools/MonoGame.Content.Builder/SourceFileCollection.cs index 49e3df38109..094f4f33dcb 100644 --- a/Tools/MonoGame.Content.Builder/SourceFileCollection.cs +++ b/Tools/MonoGame.Content.Builder/SourceFileCollection.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using Microsoft.Xna.Framework.Content.Pipeline; +using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler; using Microsoft.Xna.Framework.Graphics; namespace Microsoft.Xna.Framework.Content.Pipeline.Builder @@ -18,6 +19,8 @@ public sealed class SourceFileCollection public TargetPlatform Platform { get; set; } + public ContentCompression Compression { get; set; } + public string Config { get; set; } public List SourceFiles { get; set; } @@ -87,8 +90,8 @@ public void Merge(SourceFileCollection previousFileCollection) internal class SourceFileCollectionBinaryWriter : BinaryWriter { private const string Header = "KNIC"; // content db - private const short MajorVersion = 3; - private const short MinorVersion = 9; + private const short MajorVersion = 3; + private const short MinorVersion = 15; private const int DataType = 1; // SourceFileCollection data @@ -110,6 +113,7 @@ internal void Write(SourceFileCollection value) Write((Int32)value.Profile); Write((Int32)value.Platform); + Write((Int32)value.Compression); WriteStringOrNull(value.Config); WritePackedInt(value.SourceFiles.Count); @@ -145,8 +149,8 @@ private void WriteStringOrNull(string value) internal class SourceFileCollectionBinaryReader : BinaryReader { private const string Header = "KNIC"; // content db - private const short MajorVersion = 3; - private const short MinorVersion = 9; + private const short MajorVersion = 3; + private const short MinorVersion = 15; private const int DataType = 1; // SourceFileCollection data @@ -175,6 +179,7 @@ internal void Read(SourceFileCollection value) value.Profile = (GraphicsProfile)ReadInt32(); value.Platform = (TargetPlatform)ReadInt32(); + value.Compression = (ContentCompression)ReadInt32(); value.Config = ReadStringOrNull(); int filesCount = ReadPackedInt();