Commit c8572b2
committed
build: generate version.h from git tag and use C++-capable MSBuild
Replaces the old MSBuild version-property approach with the Microsoft-
recommended native C++ pattern: generate a version.h header from the
current git tag and let the .rc file consume the version macros.
Key changes:
- Strip leading "v" from git tags and parse numeric version components
- Generate version.h with FILEVERSION/PRODUCTVERSION macros
- Remove MSBuild version properties that caused MSB1006 errors
- Switch MSBuild discovery to vswhere to ensure a C++-capable toolchain
- Drop legacy registry-based MSBuild lookup
- Improve logging (raw version, parsed version, generated header)
This makes the build deterministic, avoids quoting/regex issues, and
aligns ColorCop with standard native C++ versioning practices.1 parent 7be23e5 commit c8572b2
1 file changed
Lines changed: 37 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
25 | | - | |
| 34 | + | |
26 | 35 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
35 | 56 | | |
36 | 57 | | |
37 | | - | |
38 | | - | |
| 58 | + | |
| 59 | + | |
39 | 60 | | |
40 | 61 | | |
41 | 62 | | |
42 | | - | |
| 63 | + | |
| 64 | + | |
43 | 65 | | |
44 | 66 | | |
45 | 67 | | |
46 | 68 | | |
47 | | - | |
| 69 | + | |
48 | 70 | | |
49 | 71 | | |
50 | 72 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 73 | | |
55 | 74 | | |
56 | 75 | | |
57 | | - | |
| |||
0 commit comments