diff --git a/ChangelogMaker.exe b/ChangelogMaker.exe index 1572a911..3896ea47 100644 Binary files a/ChangelogMaker.exe and b/ChangelogMaker.exe differ diff --git a/MakeGITRelease.bat b/MakeGITRelease.bat index c5f2edc9..164bd2e9 100644 --- a/MakeGITRelease.bat +++ b/MakeGITRelease.bat @@ -174,7 +174,7 @@ IF NOT EXIST "Build\Plugins\VisplaneExplorer.dll" GOTO FILEFAIL ECHO. ECHO Creating changelog... ECHO. -ChangelogMaker.exe "GIT_Build\Changelog.xml" "Build" "MaxED" %REVISIONNUMBER% +ChangelogMaker.exe "GIT_Build\Changelog.xml" "Build" "m-x-d>MaxED" %REVISIONNUMBER% IF %ERRORLEVEL% NEQ 0 GOTO LOGFAIL ECHO. diff --git a/MakeRelease.bat b/MakeRelease.bat index 07d9eeef..b7a6ba26 100644 --- a/MakeRelease.bat +++ b/MakeRelease.bat @@ -167,7 +167,7 @@ IF NOT EXIST "Build\Plugins\VisplaneExplorer.dll" GOTO FILEFAIL ECHO. ECHO Creating changelog... ECHO. -ChangelogMaker.exe "Release\Changelog.xml" "Build" "MaxED" %REVISIONNUMBER% +ChangelogMaker.exe "Release\Changelog.xml" "Build" "m-x-d>MaxED" %REVISIONNUMBER% IF %ERRORLEVEL% NEQ 0 GOTO LOGFAIL ECHO. diff --git a/README.md b/README.md index f0f31a5a..df4046e8 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,16 @@ -System requirements: -• 2.4 GHz CPU or faster (multi-core recommended). -• Windows XP, Vista, 7, 8 or 10. -• Graphics card with Pixel Shader model 2.0 support. +**System requirements:** +- 2.4 GHz CPU or faster (multi-core recommended). +- Windows XP, Vista, 7, 8 or 10. +- Graphics card with Pixel Shader model 2.0 support. -Required software: -• Microsoft .Net Framework 3.5 (http://www.microsoft.com/download/en/details.aspx?id=25150). -• DirectX 9.0 Runtime (https://www.microsoft.com/en-us/download/details.aspx?id=35&44F86079-8679-400C-BFF2-9CA5F2BCBDFC=1). +**Required software:** +- Microsoft .Net Framework 3.5 (http://www.microsoft.com/download/en/details.aspx?id=25150). +- DirectX 9.0 Runtime (https://www.microsoft.com/en-us/download/details.aspx?id=35&44F86079-8679-400C-BFF2-9CA5F2BCBDFC=1). -Official thread at ZDoom.org: -• http://forum.zdoom.org/viewtopic.php?f=3&t=32392 +**Links:** +- [Official thread at ZDoom.org](http://forum.zdoom.org/viewtopic.php?f=3&t=32392) +- [Unofficial thread at iddqd.ru (in russian)](http://i.iddqd.ru/viewtopic.php?t=522) +- [Git builds at DRDTeam.org](http://devbuilds.drdteam.org/doombuilder2-gzdb/) -Unofficial thread at iddqd.ru (in russian): -• http://i.iddqd.ru/viewtopic.php?t=522 - -Git builds at DRDTeam.org: -• http://devbuilds.drdteam.org/doombuilder2-gzdb/ - -More detailed info can be found in the editor documentation (Refmanual.chm). +More detailed info can be found in the **editor documentation** (Refmanual.chm). diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index e5b00d3d..693264c2 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -1441,12 +1441,33 @@ - if exist "%25VS140COMNTOOLS%25" call "%25VS140COMNTOOLS%25vsvars32.bat" -else if exist "%25VS120COMNTOOLS%25" call "%25VS120COMNTOOLS%25vsvars32.bat" -else if exist "%25VS110COMNTOOLS%25" call "%25VS110COMNTOOLS%25vsvars32.bat" -else if exist "%25VS100COMNTOOLS%25" call "%25VS100COMNTOOLS%25vsvars32.bat" -else if exist "%25VS90COMNTOOLS%25" call "%25VS90COMNTOOLS%25vsvars32.bat" + if exist "%25VS140COMNTOOLS%25" goto tools140 +if exist "%25VS120COMNTOOLS%25" goto tools120 +if exist "%25VS110COMNTOOLS%25" goto tools110 +if exist "%25VS100COMNTOOLS%25" goto tools100 +if exist "%25VS90COMNTOOLS%25" goto tools90 +:tools140 +call "%25VS140COMNTOOLS%25vsvars32.bat" +goto end + +:tools120 +call "%25VS120COMNTOOLS%25vsvars32.bat" +goto end + +:tools110 +call "%25VS110COMNTOOLS%25vsvars32.bat" +goto end + +:tools100 +call "%25VS100COMNTOOLS%25vsvars32.bat" +goto end + +:tools90 +call "%25VS90COMNTOOLS%25vsvars32.bat" +goto end + +:end editbin.exe /NOLOGO /LARGEADDRESSAWARE "$(TargetPath)" \ No newline at end of file diff --git a/Source/Tools/ChangelogMaker/Program.cs b/Source/Tools/ChangelogMaker/Program.cs index bb4ec25a..cc006431 100644 --- a/Source/Tools/ChangelogMaker/Program.cs +++ b/Source/Tools/ChangelogMaker/Program.cs @@ -1,6 +1,7 @@ #region ======================== Namespaces using System; +using System.Collections.Generic; using System.IO; using System.Text; using System.Xml; @@ -21,25 +22,41 @@ namespace mxd.ChangelogMaker static int Main(string[] args) { - Console.WriteLine("Changelog Maker v02 by MaxED"); + Console.WriteLine("Changelog Maker v03 by MaxED"); if(args.Length != 4) { return Fail("USAGE: ChangelogMaker.exe input output author revision_number\n" + - "input: xml file generated by 'svn log --xml' command\n" + + "input: xml file generated by MakeRelese.bat\\MakeGITRelese.bat\n" + "output: directory to store Changelog.txt in\n" + - "author: commit author\n" + + "renameauthor: commit authors rename scheme. For example, \"m-x-d>MaxED|biwa>Boris\"\n" + "revision_number: latest revision number", 1); } string input = args[0]; string output = args[1]; - string author = args[2]; + string renameauthor = args[2]; // m-x-d>MaxED|biwa>Boris int revnum; if(!int.TryParse(args[3], out revnum)) return Fail("Unable to parse revision number from string '" + revnum + "'.", 4); if(!File.Exists(input)) return Fail("Input file '" + input + "' does not exist.", 2); if(!Directory.Exists(output)) return Fail("Output folder '" + output + "' does not exist.", 3); + // Create author rename array, because git log can't decide how to call me... + Dictionary authorrename = new Dictionary(StringComparer.OrdinalIgnoreCase); + string[] parts = renameauthor.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries); + foreach(string ren in parts) + { + string[] rename = ren.Split(new[] { '>' }, StringSplitOptions.RemoveEmptyEntries); + if(rename.Length == 2 && !string.IsNullOrEmpty(rename[0].Trim()) && !string.IsNullOrEmpty(rename[1].Trim())) + { + authorrename[rename[0].Trim()] = rename[1].Trim(); + } + else + { + Console.WriteLine("Invalid rename scheme: \"" + ren + "\""); + } + } + //Replace bracket placeholders, because git log command doesn't escape xml-unfriendly chars like < or >... string inputtext = File.ReadAllText(input); inputtext = inputtext.Replace("<", "<").Replace(">", ">").Replace("&", "&").Replace("[OB]", "<").Replace("[CB]", ">"); @@ -51,6 +68,7 @@ namespace mxd.ChangelogMaker } StringBuilder result = new StringBuilder(1000); + char[] messagetrim = {' ', '\r', '\n' }; foreach(XmlNode node in log.ChildNodes) { if(node.ChildNodes.Count == 0) continue; @@ -60,7 +78,7 @@ namespace mxd.ChangelogMaker string commit = (logentry.Attributes != null ? logentry.Attributes.GetNamedItem("commit").Value : "unknown"); DateTime date = DateTime.Now; string message = string.Empty; - bool skip = false; + string author = string.Empty; // Add revision info... if(logentry.Attributes != null) @@ -75,7 +93,15 @@ namespace mxd.ChangelogMaker switch(value.Name) { case "author": - if(value.InnerText != author) skip = true; + if(authorrename.ContainsKey(value.InnerText)) + { + author = authorrename[value.InnerText]; + value.InnerText = author; // save author + } + else + { + author = value.InnerText; + } break; case "date": @@ -83,27 +109,27 @@ namespace mxd.ChangelogMaker break; case "msg": - message = value.InnerText; + message = value.InnerText.Trim(messagetrim); + value.InnerText = message; // also save trimmed message break; } } - if(!skip) - { - result.Append("R" + revnum) - .Append(" | ") - .Append(commit) - .Append(" | ") - .Append(date.ToShortDateString()) - .Append(", ") - .Append(date.ToShortTimeString()) - .Append(Environment.NewLine) - .AppendLine(SEPARATOR) - .Append(message) - .Append(Environment.NewLine) - .Append(Environment.NewLine) - .Append(Environment.NewLine); - } + result.Append("R" + revnum) + .Append(" | ") + .Append(commit) + .Append(" | ") + .Append(author) + .Append(" | ") + .Append(date.ToShortDateString()) + .Append(", ") + .Append(date.ToShortTimeString()) + .Append(Environment.NewLine) + .AppendLine(SEPARATOR) + .Append(message) + .Append(Environment.NewLine) + .Append(Environment.NewLine) + .Append(Environment.NewLine); // Decrease revision number... revnum--;