diff --git a/CodeCompletion/CodeCompletionPCUReader.cs b/CodeCompletion/CodeCompletionPCUReader.cs index 94e908048..b2706a380 100644 --- a/CodeCompletion/CodeCompletionPCUReader.cs +++ b/CodeCompletion/CodeCompletionPCUReader.cs @@ -77,6 +77,7 @@ namespace CodeCompletion if (Header[i] != PCUFile.Header[i]) return false; pcu_file.Version = br.ReadInt16(); + pcu_file.Revision = br.ReadInt32(); pcu_file.CRC = br.ReadInt64(); pcu_file.IncludeDebugInfo = br.ReadBoolean(); return true; @@ -96,7 +97,7 @@ namespace CodeCompletion { //(ssyy) DarkStar - Ïî÷åìó áû â ýòîì ñëó÷àå ïðîñòî íå ïåðåêîìïèëèðîâàòü ìîäóëü? CloseUnit(); - throw new InvalidPCUFule(unit_name); + throw new InvalidPCUFile(unit_name); } private void ReadPCUHeader() diff --git a/Compiler/Compiler.cs b/Compiler/Compiler.cs index 1a5b759b4..6430aaced 100644 --- a/Compiler/Compiler.cs +++ b/Compiler/Compiler.cs @@ -4181,7 +4181,7 @@ namespace PascalABCCompiler return true; } } - catch (InvalidPCUFule) + catch (InvalidPCUFile) { //Перекомпилируем.... } diff --git a/Compiler/PCU/PCUFileFormatVersion.cs b/Compiler/PCU/PCUFileFormatVersion.cs index dc4bb8279..df9533567 100644 --- a/Compiler/PCU/PCUFileFormatVersion.cs +++ b/Compiler/PCU/PCUFileFormatVersion.cs @@ -6,6 +6,6 @@ namespace PascalABCCompiler.PCU { public static class PCUFileFormatVersion { - public static System.Int16 Version = 119; + public static System.Int16 Version = 120; } } diff --git a/Compiler/PCU/PCUReader.cs b/Compiler/PCU/PCUReader.cs index 4f3e09498..0c2ef3c93 100644 --- a/Compiler/PCU/PCUReader.cs +++ b/Compiler/PCU/PCUReader.cs @@ -16,10 +16,10 @@ namespace PascalABCCompiler.PCU BeginReadTree, EndReadTree, BeginSaveTree, EndSaveTree, ErrorSaveTree } - public class InvalidPCUFule: PascalABCCompiler.Errors.LocatedError + public class InvalidPCUFile: PascalABCCompiler.Errors.LocatedError { internal string UnitName; - public InvalidPCUFule(string UnitName) + public InvalidPCUFile(string UnitName) { this.UnitName = UnitName; } @@ -263,6 +263,7 @@ namespace PascalABCCompiler.PCU ms = new MemoryStream(File.ReadAllBytes(FileName)); br = new BinaryReader(ms); ReadPCUHeader(); + units[FileName] = this; unit = new CompilationUnit(); unit.UnitFileName = FileName; @@ -543,9 +544,8 @@ namespace PascalABCCompiler.PCU private void InvalidUnitDetected() { - //(ssyy) DarkStar - Почему бы в этом случае просто не перекомпилировать модуль? CloseUnit(); - throw new InvalidPCUFule(unit_name); + throw new InvalidPCUFile(unit_name); } private static bool ReadPCUHead(PCUFile pcu_file, BinaryReader br) @@ -555,6 +555,7 @@ namespace PascalABCCompiler.PCU if (Header[i] != PCUFile.Header[i]) return false; pcu_file.Version = br.ReadInt16(); + pcu_file.Revision = br.ReadInt32(); pcu_file.CRC = br.ReadInt64(); pcu_file.UseRtlDll = br.ReadBoolean(); pcu_file.IncludeDebugInfo = br.ReadBoolean(); @@ -564,7 +565,7 @@ namespace PascalABCCompiler.PCU //чтение заголовка PCU private void ReadPCUHeader() { - if (!ReadPCUHead(pcu_file, br) || PCUFile.SupportedVersion != pcu_file.Version) + if (!ReadPCUHead(pcu_file, br) || PCUFile.SupportedVersion != pcu_file.Version || PCUFile.SupportedRevision != pcu_file.Revision) InvalidUnitDetected(); if(pcu_file.IncludeDebugInfo) diff --git a/Compiler/PCU/PCUWriter.cs b/Compiler/PCU/PCUWriter.cs index 04cca00f2..b09d06e60 100644 --- a/Compiler/PCU/PCUWriter.cs +++ b/Compiler/PCU/PCUWriter.cs @@ -159,9 +159,9 @@ namespace PascalABCCompiler.PCU public static char[] Header = new char[3] { 'P', 'C', 'U'}; public static Int16 SupportedVersion = PCUFileFormatVersion.Version; - + public static int SupportedRevision = Convert.ToInt32(RevisionClass.Revision); public Int16 Version; - + public int Revision; public static int CRCOffset = 3 + 2; public Int64 CRC; @@ -428,6 +428,7 @@ namespace PascalABCCompiler.PCU pcu_file.imp_entitles[i] = imp_entitles[i]; fbw.Write(PCUFile.Header); fbw.Write(PCUFile.SupportedVersion); + fbw.Write(Convert.ToInt32(RevisionClass.Revision)); fbw.Write((Int64)0);//CRC32 fbw.Write(pcu_file.UseRtlDll); fbw.Write(pcu_file.IncludeDebugInfo); diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 75c3fe3e6..a0aaf715a 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "9"; public const string Build = "0"; - public const string Revision = "3412"; + public const string Revision = "3414"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index b83ccd1f5..75404b977 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=0 -%REVISION%=3412 +%REVISION%=3414 %MINOR%=9 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 3e0dc5c2e..25ef70610 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.9.0.3412 +3.9.0.3414 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 608a701c9..05e6aa25d 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.9.0.3412' +!define VERSION '3.9.0.3414'