diff options
author | Arnavion <arnavion@gmail.com> | 2013-10-12 18:41:27 -0700 |
---|---|---|
committer | Arnavion <arnavion@gmail.com> | 2013-10-12 18:41:27 -0700 |
commit | e2edbfe47d89059f2020baccd76ad4715ef87871 (patch) | |
tree | f1948820b339f513f036e62f04ebcd0ed9803085 /version.include.tt | |
parent | 0061cd38d07396cfa42deaaa199c334b40f3d0d3 (diff) |
win32: Use version information from configure.ac to populate the Windows-specific files that need it - config-win32.h, version.txt, hexchat.rc, hexchat.iss
This is done via T4 templates. The original files are now generated at build-time and so have been added to .gitignore and removed from the repository, with the exception of version.txt which must be hosted on GitHub for the updater plugin.
Diffstat (limited to 'version.include.tt')
-rw-r--r-- | version.include.tt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/version.include.tt b/version.include.tt new file mode 100644 index 00000000..ab77a6d9 --- /dev/null +++ b/version.include.tt @@ -0,0 +1,12 @@ +<#@ + template debug="false" hostspecific="false" language="C#" #><#@ + assembly name="System.Core" #><#@ + import namespace="System.IO" #><#@ + import namespace="System.Linq" #><#@ + import namespace="System.Text.RegularExpressions" #><# + var versionParts = File.ReadLines(Path.Combine(System.Environment.GetEnvironmentVariable("SOLUTIONDIR"), "configure.ac")) + .Select(line => Regex.Match(line, @"^AC_INIT\(\[HexChat\],\[([^]]+)\]\)$")) + .First(match => match.Success) + .Groups[1].Value + .Split('.'); +#> \ No newline at end of file |