Trying to fix UpdateLanguageFiles to point to correct files - thx xylographe :)

This commit is contained in:
niksedk 2015-09-18 19:50:47 +02:00
parent 07ecad1367
commit 500e93336e
4 changed files with 9 additions and 15 deletions

View File

@ -439,9 +439,8 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>IF NOT EXIST "$(ProjectDir)Properties\AssemblyInfo.cs" (
COPY "$(ProjectDir)Properties\AssemblyInfo.cs.template" "$(ProjectDir)Properties\AssemblyInfo.cs"
)</PreBuildEvent>
<PreBuildEvent>IF NOT EXIST "$(ProjectDir)Properties\AssemblyInfo.cs" (COPY "$(ProjectDir)Properties\AssemblyInfo.cs.template" "$(ProjectDir)Properties\AssemblyInfo.cs")
"$(ProjectDir)..\build_helpers.bat" rev $(ConfigurationName) &amp;&amp; "$(ProjectDir)..\build_helpers.bat" lang $(ConfigurationName)</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -1601,14 +1601,11 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>"$(ProjectDir)..\build_helpers.bat" rev $(ConfigurationName) &amp;&amp; "$(ProjectDir)..\build_helpers.bat" lang $(ConfigurationName)</PreBuildEvent>
<PreBuildEvent>"$(ProjectDir)..\build_helpers.bat" rev $(ConfigurationName)</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>COPY /Y /V "$(ProjectDir)packages\NHunspell.1.2.5554.16953\content\*.dll" "$(TargetDir)"
IF NOT EXIST "$(ProjectDir)Properties\AssemblyInfo.cs" (COPY "$(ProjectDir)Properties\AssemblyInfo.cs.template" "$(ProjectDir)Properties\AssemblyInfo.cs")
REM "$(ProjectDir)packages\ILRepack.2.0.1\tools\ILRepack.exe" /out:"$(TargetDir)$(TargetName).exe" "$(TargetDir)$(TargetName).exe" "$(ProjectDir)packages\NHunspell.1.2.5554.16953\lib\net\NHunspell.dll" "$(ProjectDir)packages\zlib.net.1.0.4.0\lib\zlib.net.dll" "$(ProjectDir)DLLs\Interop.QuartzTypeLib.dll" /targetplatform:v4 /internalize /parallel
</PostBuildEvent>
IF NOT EXIST "$(ProjectDir)Properties\AssemblyInfo.cs" (COPY "$(ProjectDir)Properties\AssemblyInfo.cs.template" "$(ProjectDir)Properties\AssemblyInfo.cs")</PostBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>

View File

@ -177,7 +177,6 @@ namespace UpdateAssemblyInfo
UpdateAssemblyInfo(seTemplateFileName, newVersionInfo);
UpdateAssemblyInfo(libSeTmplateFileName, newVersionInfo);
return 0;
}
Console.WriteLine("no changes");

View File

@ -7,7 +7,7 @@ namespace UpdateLanguageFiles
internal class Program
{
private static string workInProgress = "Updating language files...";
private const string WorkInProgress = "Updating language files...";
private static int Main(string[] args)
{
@ -25,14 +25,13 @@ namespace UpdateLanguageFiles
return 1;
}
Console.Write(workInProgress);
Console.Write(WorkInProgress);
try
{
int noOfChanges = 0;
var language = new Nikse.SubtitleEdit.Core.Language();
language.General.Version = FindVersionNumber();
var language = new Nikse.SubtitleEdit.Core.Language { General = { Version = FindVersionNumber() } };
var languageAsXml = language.GetCurrentLanguageAsXml();
var oldLanguageAsXml = string.Empty;
if (File.Exists(args[0]))
@ -94,7 +93,7 @@ namespace UpdateLanguageFiles
if (File.Exists(fileName))
{
var text = File.ReadAllText(fileName);
var pattern = @"\[assembly: AssemblyVersion\(""(\d+\.\d+\.\d+)\.\[REVNO]""\)]";
const string pattern = @"\[assembly: AssemblyVersion\(""(\d+\.\d+\.\d+)\.\[REVNO]""\)]";
var version = System.Text.RegularExpressions.Regex.Match(text, pattern);
if (version.Success)
{
@ -108,7 +107,7 @@ namespace UpdateLanguageFiles
}
Console.WriteLine();
Console.WriteLine("WARNING: " + warning);
Console.Write(workInProgress);
Console.Write(WorkInProgress);
return "unknown";
}