From 84886d10ba49107d2b4442dfa1a4309c48f36ab5 Mon Sep 17 00:00:00 2001 From: MaxED Date: Tue, 27 Dec 2016 15:12:57 +0300 Subject: [PATCH] Internal: more updates to the build toolchain... --- ChangelogMaker.exe | Bin 8192 -> 9216 bytes MakeGITRelease.bat | 2 +- MakeRelease.bat | 2 +- README.md | 28 +++++----- Source/Core/Builder.csproj | 31 +++++++++-- Source/Tools/ChangelogMaker/Program.cs | 72 +++++++++++++++++-------- 6 files changed, 89 insertions(+), 46 deletions(-) diff --git a/ChangelogMaker.exe b/ChangelogMaker.exe index 1572a911ef0997348f246989c8b069b128208bbb..3896ea47dff3188b0af8623f10ad79ac2cc70931 100644 GIT binary patch delta 3398 zcmZ`+Yj6|S6+U-YyRu|^@zvUr{FdzivV|NQ8)Ne_#_xpG0YeH61cbc<3$j+MWQqwy zZu6KVEi|qs1>AAcrkRAaP4dGnrNdArZKgBySJG*x%?!gpI&CxUbV%F$Ax)v*UCH3d zq>Jvk=X~co=iIY`wx>yyJJ z;6Vjdgf~VJRbWy2GV8e@LdJ`<}l% z7alHyH|2-WT?K)YL6p$_-0!bFKF9q5D7p+rs|NUH2=(6d^h9 zkA*2h98)hyRg1Kqa1AD2VAWzug#_f~9`3d3pk6ED-W6^b^)Rl6K9Y%24T4fw?!3UI z@8N5@!b?T}dJ*?n%b-}xg;mkH9X?)Rg<++!XP92hi*tlVKwTZeod=wV%1-Pr;+2ac zG_F}qAV=Nyc`Q8Q&)fE|MH>-#tQ8P?W=S|I=8`9x#l&-yFV9{P;U4>UBI17G)wz!S z)&kXPg~*e*Zmop14CcKisyfeMQ}e1tODg51RvU;*_3Ex~2xqnZ7de9u*bXpS1M?G9 z%2@-jZr`6o3U-KmGP=cd|Rg1@EUx?n%qa^g|_NiIAh^;U|Z`UY%f4Z z<4Zmd_&x{tO2QlN#`#2CMx+4Ty#R+dE@*a85PD!@je>U1^+nn;Phe*;_JGsIC;vqo zb-XgyMlG*J8@2g1Dsq&U1*I&*D{`C=4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PZb6cmK(SBx(4(~TB6)hnux`P~_L2aI7Hrju8Z_)jL@n}{mmn%+dj Xy_PpTpcmZqC{;BBy!a~Xt@8Z~Q_F}G 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--;