diff --git a/Build/FieldWorks.proj b/Build/FieldWorks.proj index ef35795a0a..c8fe09b4a3 100644 --- a/Build/FieldWorks.proj +++ b/Build/FieldWorks.proj @@ -15,6 +15,7 @@ + @@ -60,8 +61,9 @@ - + + + - diff --git a/Build/FwBuildTasks.dll b/Build/FwBuildTasks.dll index 52dde3a157..03a5574d4b 100644 Binary files a/Build/FwBuildTasks.dll and b/Build/FwBuildTasks.dll differ diff --git a/Build/Installer.targets b/Build/Installer.targets index a9dc5f5164..aaaa2ba623 100644 --- a/Build/Installer.targets +++ b/Build/Installer.targets @@ -266,7 +266,7 @@ - + diff --git a/Build/InstallerTests.targets b/Build/InstallerTests.targets new file mode 100644 index 0000000000..b39ccb174b --- /dev/null +++ b/Build/InstallerTests.targets @@ -0,0 +1,58 @@ + + + + $(fwrt)\.. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(AppBuildDir)\$(BinDirSuffix)\installerTestMetadata.$(BuildVersion).csv + + + + + + + + + \ No newline at end of file diff --git a/Build/Src/FwBuildTasks/FwBuildTasks.csproj b/Build/Src/FwBuildTasks/FwBuildTasks.csproj index 3b1fe0dd5a..89b65889e3 100644 --- a/Build/Src/FwBuildTasks/FwBuildTasks.csproj +++ b/Build/Src/FwBuildTasks/FwBuildTasks.csproj @@ -94,9 +94,8 @@ ..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - - False - ..\..\..\Output\Release\SIL.TestUtilities.dll + + ..\..\..\Output\Debug\SIL.TestUtilities.dll @@ -110,6 +109,7 @@ + diff --git a/Build/Src/FwBuildTasks/LogMetadata.cs b/Build/Src/FwBuildTasks/LogMetadata.cs new file mode 100644 index 0000000000..c094e92870 --- /dev/null +++ b/Build/Src/FwBuildTasks/LogMetadata.cs @@ -0,0 +1,47 @@ +// Copyright (c) 2019 SIL International +// This software is licensed under the LGPL, version 2.1 or later +// (http://www.gnu.org/licenses/lgpl-2.1.html) + +using System.Diagnostics; +using System.IO; +using FwBuildTasks; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +namespace SIL.FieldWorks.Build.Tasks +{ + /// + /// Generate a CSV file containing metadata about the specified files (MD5, date modified, etc.) + /// for use in testing installers and patchers + /// + public class LogMetadata : Task + { + [Required] + public string[] Files { get; set; } + + public string PathPrefixToDrop { get; set; } + + [Required] + public string LogFile { get; set; } + + public bool Overwrite { get; set; } + + public override bool Execute() + { + using (var writer = new StreamWriter(LogFile, !Overwrite)) + { + writer.WriteLine("File,MD5,Version,Modified"); + var lengthToDrop = string.IsNullOrEmpty(PathPrefixToDrop) ? 0 : PathPrefixToDrop.Length; + foreach (var file in Files) + { + var md5 = Md5Checksum.Compute(file); + // Some files have commas in their versions. Replace with another character because our CSV reader is cheap. + var version = FileVersionInfo.GetVersionInfo(file).FileVersion?.Replace(',', ';'); + var modified = File.GetLastWriteTimeUtc(file); + writer.WriteLine($"{file.Substring(lengthToDrop)}, {md5}, {version}, {modified:yyyy-MM-dd HH:mm:ss}"); + } + return true; + } + } + } +} diff --git a/Build/Src/FwBuildTasks/Md5Checksum.cs b/Build/Src/FwBuildTasks/Md5Checksum.cs index a5e6d2c9bc..d2fe529296 100644 --- a/Build/Src/FwBuildTasks/Md5Checksum.cs +++ b/Build/Src/FwBuildTasks/Md5Checksum.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2015 SIL International +// Copyright (c) 2015-2019 SIL International // This software is licensed under the LGPL, version 2.1 or later // (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -13,6 +13,8 @@ namespace FwBuildTasks { public class Md5Checksum : Task { + private static readonly HashAlgorithm Hasher = HashAlgorithm.Create("MD5"); + [Required] public string SourceFile { get; set; } @@ -20,21 +22,10 @@ public override bool Execute() { try { - var hasher = HashAlgorithm.Create("MD5"); - byte[] checksum; - using (var file = File.OpenRead(SourceFile)) - { - checksum = hasher.ComputeHash(file); - } - var bldr = new StringBuilder(); - for ( int i=0; i < checksum.Length; i++ ) - { - bldr.Append(String.Format("{0:x2}", checksum[i])); - } var outputFile = SourceFile + ".MD5"; using (var writer = new StreamWriter(outputFile)) { - writer.Write(bldr.ToString()); + writer.Write(Compute(SourceFile)); } return true; } @@ -44,5 +35,21 @@ public override bool Execute() return false; } } + + public static string Compute(string filename) + { + byte[] checksumBytes; + using (var file = File.OpenRead(filename)) + { + checksumBytes = Hasher.ComputeHash(file); + } + var bldr = new StringBuilder(); + foreach (var b in checksumBytes) + { + bldr.AppendFormat("{0:x2}", b); + } + + return bldr.ToString(); + } } } diff --git a/Build/Src/FwBuildTasks/Substitute.cs b/Build/Src/FwBuildTasks/Substitute.cs index 7e0de0605d..e9965ed91f 100644 --- a/Build/Src/FwBuildTasks/Substitute.cs +++ b/Build/Src/FwBuildTasks/Substitute.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2018 SIL International +// Copyright (c) 2018 SIL International // This software is licensed under the LGPL, version 2.1 or later // (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -74,8 +74,18 @@ public override bool Execute() fileContents = regex.Replace(fileContents, string.Format("{0:dd}", DateTime.Now)); regex = new Regex("\\$NUMBEROFDAYS"); - fileContents = regex.Replace(fileContents, - Convert.ToInt32(Math.Truncate(DateTime.Now.ToOADate())).ToString()); + var numberOfDays = Convert.ToInt32(Math.Truncate(DateTime.Now.ToOADate())).ToString(); + fileContents = regex.Replace(fileContents, numberOfDays); + + // Jenkins builds should set the BUILD_NUMBER in the environment + var buildNumber = Environment.GetEnvironmentVariable("BUILD_NUMBER"); + if (string.IsNullOrEmpty(buildNumber)) + { + // fall back to number of days if no BUILD_NUMBER is in the environment + buildNumber = numberOfDays; + } + regex = new Regex("\\$BUILDNUMBER"); + fileContents = regex.Replace(fileContents, buildNumber); regex = new Regex("\\$GENERATEDFILECOMMENT"); if (regex.IsMatch(fileContents)) diff --git a/Src/CommonAssemblyInfoTemplate.cs b/Src/CommonAssemblyInfoTemplate.cs index ea81e04e3d..a8fd6ebe47 100644 --- a/Src/CommonAssemblyInfoTemplate.cs +++ b/Src/CommonAssemblyInfoTemplate.cs @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------------------------- +/*---------------------------------------------------------------------------------------------- Copyright (c) 2002-2013 SIL International This software is licensed under the LGPL, version 2.1 or later (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -25,9 +25,9 @@ Some are kept here so that certain symbols (starting with $ in the template) can [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Format: Version.Milestone.Year.MMDDL -[assembly: AssemblyFileVersion("$!{FWMAJOR:0}.$!{FWMINOR:0}.$!{FWREVISION:0}.$NUMBEROFDAYS")] -// Format: FwMajorVersion.FwMinorVersion +// Format: Major.Minor.Revision.BuildNumber +[assembly: AssemblyFileVersion("$!{FWMAJOR:0}.$!{FWMINOR:0}.$!{FWREVISION:0}.$BUILDNUMBER")] +// Format: FwMajorVersion.FwMinorVersion Alpha/Beta/RC [assembly: AssemblyInformationalVersionAttribute("$!{FWMAJOR:0}.$!{FWMINOR:0} $!FWBETAVERSION")] -// Format: Version.Milestone.0.Level +// Format: Major.Minor.Revision.BuildNumber? [assembly: AssemblyVersion("$!{FWMAJOR:0}.$!{FWMINOR:0}.$!{FWREVISION:0}.*")] diff --git a/Src/InstallValidator/InstallValidator.cs b/Src/InstallValidator/InstallValidator.cs new file mode 100644 index 0000000000..50f2ab3cfc --- /dev/null +++ b/Src/InstallValidator/InstallValidator.cs @@ -0,0 +1,107 @@ +// Copyright (c) 2019 SIL International +// This software is licensed under the LGPL, version 2.1 or later +// (http://www.gnu.org/licenses/lgpl-2.1.html) + +using System.Diagnostics; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace SIL.InstallValidator +{ + public class InstallValidator + { + // ENHANCE (Hasso) 2019.07: look for extra files? + // ENHANCE (Hasso) 2019.07: option to catalog files that have already been installed (for testing against other upgrade scenarios) + public static void Main(string[] args) + { + if (args.Length == 0 || !File.Exists(args[0])) + { + // The user double-clicked (poor user won't see this), ran w/o args, or ran w/ invalid args. + Debug.WriteLine("SIL Installation Validator"); + Debug.WriteLine("Copyright (c) 2019 SIL International"); + Debug.WriteLine(string.Empty); + Debug.WriteLine("This program may be installed in the same directory as another SIL program,"); + Debug.WriteLine("but users should not use it. Its purpose is to help verify that the program"); + Debug.WriteLine(" was installed correctly."); + Debug.WriteLine("Usage:"); + Debug.WriteLine(" - Drop installerTestMetadata.csv on this exe to generate a report"); + Debug.WriteLine(" - InstallValidator.exe installerTestMetadata.csv [alternate report location]"); + Debug.WriteLine(" (for unit tests)"); + return; + } + + var logFile = SafeGetAt(args, 1) ?? Path.Combine(Path.GetTempPath(), "FlexInstallationReport.csv"); + + using (var expected = new StreamReader(args[0])) + using (var actual = new StreamWriter(logFile)) + { + actual.WriteLine("File, Result, Expected Version, Actual Version, Expected Date, Actual Date Modified (UTC)"); + expected.ReadLine(); // skip headers + string file; + while ((file = expected.ReadLine()) != null) + { + var info = file.Split(','); + if (info.Length < 2) + { + actual.WriteLine($"Bad input (or EOF), {file}"); + continue; + } + + var filePath = info[0].Trim(); + actual.Write(filePath); + var fullPath = Path.Combine(Directory.GetCurrentDirectory(), filePath); + if (!File.Exists(fullPath)) + { + actual.WriteLine(", is missing"); + continue; + } + + var expectedMd5 = info[1].Trim(); + var actualMd5 = ComputeMd5Sum(fullPath); + if (string.Equals(expectedMd5, actualMd5)) + { + actual.WriteLine(", was installed correctly"); + continue; + } + + var expectedVersion = SafeGetAt(info, 2); + var actualVersion = FileVersionInfo.GetVersionInfo(fullPath).FileVersion; + var expectedDate = SafeGetAt(info, 3); + var actualDate = File.GetLastWriteTimeUtc(fullPath); + actual.WriteLine( + $", incorrect file is present, {expectedVersion}, {actualVersion}, {expectedDate}, {actualDate:yyyy-MM-dd HH:mm:ss}"); + } + } + + // If we ran the program by dropping installerTestMetadata.csv, open the report using the default program + if (args.Length == 1) + { + Process.Start(logFile); + } + } + + private static string SafeGetAt(string[] arr, int index) + { + return arr.Length > index ? arr[index].Trim() : null; + } + + private static readonly HashAlgorithm Hasher = HashAlgorithm.Create("MD5"); + + public static string ComputeMd5Sum(string filename) + { + byte[] checksumBytes; + using (var file = File.OpenRead(filename)) + { + checksumBytes = Hasher.ComputeHash(file); + } + var bldr = new StringBuilder(); + foreach (var b in checksumBytes) + { + bldr.AppendFormat("{0:x2}", b); + } + + return bldr.ToString(); + } + } +} diff --git a/Src/InstallValidator/InstallValidator.csproj b/Src/InstallValidator/InstallValidator.csproj new file mode 100644 index 0000000000..8525793989 --- /dev/null +++ b/Src/InstallValidator/InstallValidator.csproj @@ -0,0 +1,99 @@ + + + + + Debug + AnyCPU + {EC1AD702-85A0-4431-823E-E3D3CB864E78} + Exe + SIL.InstallValidator + InstallValidator + v4.6.1 + 512 + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + ..\..\Output\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + true + + + pdbonly + true + ..\..\Output\Release\ + TRACE + prompt + 4 + AnyCPU + true + + + true + full + false + ..\..\Output\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + false + + + pdbonly + true + ..\..\Output\Release\ + TRACE + prompt + 4 + AnyCPU + false + + + + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + \ No newline at end of file diff --git a/Src/InstallValidator/InstallValidatorTests/InstallValidatorTests.cs b/Src/InstallValidator/InstallValidatorTests/InstallValidatorTests.cs new file mode 100644 index 0000000000..fdecf2097a --- /dev/null +++ b/Src/InstallValidator/InstallValidatorTests/InstallValidatorTests.cs @@ -0,0 +1,126 @@ +// Copyright (c) 2019 SIL International +// This software is licensed under the LGPL, version 2.1 or later +// (http://www.gnu.org/licenses/lgpl-2.1.html) + +using System.Diagnostics; +using System.IO; +using System.Linq; +using NUnit.Framework; +using SIL.FieldWorks.Build.Tasks; +using SIL.TestUtilities; + +namespace SIL.InstallValidator +{ + [TestFixture] + public class InstallValidatorTests + { + private TemporaryFolder m_TestInstallDir; + + private string m_startingDirectory; + + private static int s_testCounter; + + private const string LogFileName = "metadataLog.csv"; + private const string ResultsFlieName = "resultsLog.csv"; + + [SetUp] + public void SetUp() + { + m_startingDirectory = Directory.GetCurrentDirectory(); + m_TestInstallDir = new TemporaryFolder($"InstallValidatorTests{s_testCounter++}"); + Directory.SetCurrentDirectory(m_TestInstallDir.Path); + } + + [TearDown] + public void TearDown() + { + Directory.SetCurrentDirectory(m_startingDirectory); // CD out of the directory before deleting it + m_TestInstallDir.Dispose(); + } + + [Test] + public void InstallValidatorTest() + { + // "install" some files + var currentDir = Directory.GetCurrentDirectory(); + + const string goodFileName = "correctly-installed-file.txt"; + var goodFilePath = Path.Combine(currentDir, goodFileName); + File.WriteAllText(goodFileName, "contents"); + + const string badFileName = "incorrectly-installed-file.txt"; + var badFilePath = Path.Combine(currentDir, badFileName); + File.WriteAllText(badFileName, "contents"); + + const string missingFileName = "not-installed-file.txt"; + var missingFilePath = Path.Combine(currentDir, missingFileName); + File.WriteAllText(missingFileName, "contents"); + + // record installed files' info in a CSV + new LogMetadata + { + Files = new[] { goodFilePath, badFilePath, missingFilePath }, + LogFile = LogFileName, + PathPrefixToDrop = $"{currentDir}/" + }.Execute(); + + // damage some installed files + File.Delete(missingFileName); + File.AppendAllText(badFileName, " are incorrect!"); + + // SUT + SystemUnderTest(); + + var results = File.ReadLines(ResultsFlieName).Select(line => line.Split(',')).ToDictionary(line => line[0]); + + Assert.Contains(goodFileName, results.Keys); + var result = results[goodFileName]; + Assert.AreEqual(2, result.Length, "correctly-installed files should have two columns in the report"); + StringAssert.EndsWith("installed correctly", result[1]); + + Assert.Contains(badFileName, results.Keys); + result = results[badFileName]; + Assert.GreaterOrEqual(result.Length, 2, "bad file report"); + StringAssert.Contains("incorrect", result[1]); + + Assert.Contains(missingFileName, results.Keys); + result = results[missingFileName]; + Assert.GreaterOrEqual(result.Length, 2, "missing file report"); + StringAssert.EndsWith("missing", result[1]); + + if (results.Count > 5) + { + LogInputAndOutputFiles(); + Assert.Fail("Too many lines in the report"); + } + } + + private void SystemUnderTest() + { + var sut = new Process + { + StartInfo = new ProcessStartInfo(Path.Combine(m_startingDirectory, "InstallValidator.exe"), $"{LogFileName} {ResultsFlieName}") + { + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true + } + }; + sut.Start(); + var error = sut.StandardError.ReadToEnd(); // wait for the process to complete + if (!string.IsNullOrWhiteSpace(error)) + { + LogInputAndOutputFiles(); + Assert.Fail(error); + } + } + + private void LogInputAndOutputFiles() + { + Debug.WriteLine("Input file:"); + Debug.WriteLine(File.ReadAllText(LogFileName)); + Debug.WriteLine("Output File:"); + Debug.WriteLine(File.ReadAllText(ResultsFlieName)); + } + } +} diff --git a/Src/InstallValidator/InstallValidatorTests/InstallValidatorTests.csproj b/Src/InstallValidator/InstallValidatorTests/InstallValidatorTests.csproj new file mode 100644 index 0000000000..12f5c9557b --- /dev/null +++ b/Src/InstallValidator/InstallValidatorTests/InstallValidatorTests.csproj @@ -0,0 +1,109 @@ + + + + Debug + AnyCPU + Library + SIL.InstallValidator + InstallValidatorTests + v4.6.1 + + + 3.5 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + {6F0B6512-FC59-401F-B1A1-37B8D95DCDEA} + + + true + full + false + ..\..\..\Output\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + + + none + true + ..\..\..\Output\Release\ + TRACE + prompt + 4 + AnyCPU + + + true + full + false + ..\..\..\Output\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + + + none + true + ..\..\..\Output\Release\ + TRACE + prompt + 4 + AnyCPU + + + + ..\..\..\Build\FwBuildTasks.dll + + + False + ..\..\..\Output\Debug\InstallValidator.exe + + + + ..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + + ..\..\..\Output\Debug\SIL.TestUtilities.dll + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Src/InstallValidator/Properties/AssemblyInfo.cs b/Src/InstallValidator/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..dfedff2aa0 --- /dev/null +++ b/Src/InstallValidator/Properties/AssemblyInfo.cs @@ -0,0 +1,21 @@ +// Copyright (c) 2019 SIL International +// This software is licensed under the LGPL, version 2.1 or later +// (http://www.gnu.org/licenses/lgpl-2.1.html) + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("SIL")] +[assembly: AssemblyProduct("Install Validator")] +[assembly: AssemblyCopyright("Copyright (c) 2019 SIL International")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +// Using a static version because it is not "part" of FieldWorks and will never need patching. +// Save users a few K on their patch downloads (we can always send them a new version if needed for diagnosis). +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Src/Paratext8Plugin/Paratext8Plugin.csproj b/Src/Paratext8Plugin/Paratext8Plugin.csproj index a20676a334..42b1b279d0 100644 --- a/Src/Paratext8Plugin/Paratext8Plugin.csproj +++ b/Src/Paratext8Plugin/Paratext8Plugin.csproj @@ -1,4 +1,4 @@ - + @@ -93,6 +93,9 @@ + + CommonAssemblyInfo.cs + \ No newline at end of file diff --git a/Src/Paratext8Plugin/Properties/AssemblyInfo.cs b/Src/Paratext8Plugin/Properties/AssemblyInfo.cs index c6f6f4778e..27b1df565c 100644 --- a/Src/Paratext8Plugin/Properties/AssemblyInfo.cs +++ b/Src/Paratext8Plugin/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ -using System.Reflection; -using System.Runtime.CompilerServices; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -7,10 +6,6 @@ // associated with an assembly. [assembly: AssemblyTitle("Paratext8Plugin")] [assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Paratext8Plugin")] -[assembly: AssemblyCopyright("Copyright © SIL International 2017")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from @@ -20,15 +15,4 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b661c6ae-999d-4ba8-80c1-ea853f6d6a30")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +// Version information comes from CommonAssemblyInfo diff --git a/Src/bldinc.h b/Src/bldinc.h index 988aadd3f2..cc8b4a758b 100644 --- a/Src/bldinc.h +++ b/Src/bldinc.h @@ -1,20 +1,10 @@ #define MAJOR_VERSION $!{FWMAJOR:0} #define MINOR_VERSION $!{FWMINOR:0} #define SUITE_REVISION $!{FWREVISION:0} -//#define DN_MAJOR_VERSION $!{DNMAJOR:0} -//#define DN_MINOR_VERSION $!{DNMINOR:0} -//#define DN_REVISION $!{DNREVISION:0} -//#define WP_MAJOR_VERSION $!{WPMAJOR:0} -//#define WP_MINOR_VERSION $!{WPMINOR:0} -//#define WP_REVISION $!{WPREVISION:0} -//#define TLE_MAJOR_VERSION $!{TLEMAJOR:0} -//#define TLE_MINOR_VERSION $!{TLEMINOR:0} -//#define TLE_REVISION $!{TLEREVISION:0} #define YEAR $YEAR -//#define DAY_MONTH_BUILDLVL $MONTH$DAY$!{BUILD_LEVEL:9} -#define NUMBER_OF_DAYS $NUMBEROFDAYS -#define STR_PRODUCT "$!{FWMAJOR:0}.$!{FWMINOR:0}.$!{FWREVISION:0}.$NUMBEROFDAYS\0" +#define BUILD_NUMBER $BUILDNUMBER +#define STR_PRODUCT "$!{FWMAJOR:0}.$!{FWMINOR:0}.$!{FWREVISION:0}.$BUILDNUMBER\0" #define FWSUITE_VERSION "$!{FWMAJOR:0}.$!{FWMINOR:0}.$!{FWREVISION:0}.0\0" -#define COPYRIGHT "Copyright © 2002-$YEAR SIL International\0" -#define COPYRIGHTRESERVED "Copyright © 2002-$YEAR SIL International. All rights reserved." +#define COPYRIGHT "Copyright © 2002-$YEAR SIL International\0" +#define COPYRIGHTRESERVED "Copyright © 2002-$YEAR SIL International. All rights reserved." #define REGISTRYPATHWITHVERSION _T("Software\\SIL\\FieldWorks\\$!{FWMAJOR:0}") diff --git a/Src/views/Views.rc b/Src/views/Views.rc index 243492398e..0e8b38679a 100644 --- a/Src/views/Views.rc +++ b/Src/views/Views.rc @@ -33,8 +33,7 @@ Description: #include "VwResources.h" VS_VERSION_INFO VERSIONINFO // NOTE: These defines are in bldinc.h. - FILEVERSION MAJOR_VERSION,MINOR_VERSION,SUITE_REVISION,NUMBER_OF_DAYS - PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,SUITE_REVISION,NUMBER_OF_DAYS + PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,SUITE_REVISION,BUILD_NUMBER FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -52,7 +51,7 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Fieldworks View support\0" - VALUE "FileVersion", STR_PRODUCT // Uses FILEVERSION. + VALUE "FileVersion", STR_PRODUCT VALUE "InternalName", "Views\0" VALUE "LegalCopyright", COPYRIGHT VALUE "LegalTrademarks", "\0"