diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-05-16 16:03:25 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-05-17 22:54:13 -0500 |
commit | 0ea53e27361cbfe664df98d717e55005f329aff1 (patch) | |
tree | d75e02fadee9669593ca3ccf28401b67064244af /src/api/burn/WixToolset.Mba.Core | |
parent | d5985a1688bc878e42ffd3ce3939fa52303cab16 (diff) | |
download | wix-0ea53e27361cbfe664df98d717e55005f329aff1.tar.gz wix-0ea53e27361cbfe664df98d717e55005f329aff1.tar.bz2 wix-0ea53e27361cbfe664df98d717e55005f329aff1.zip |
Store the prefix character in VERUTIL_VERSION.
Fix edge case where version string is all v's.
Diffstat (limited to 'src/api/burn/WixToolset.Mba.Core')
-rw-r--r-- | src/api/burn/WixToolset.Mba.Core/VerUtil.cs | 1 | ||||
-rw-r--r-- | src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/api/burn/WixToolset.Mba.Core/VerUtil.cs b/src/api/burn/WixToolset.Mba.Core/VerUtil.cs index a342f85c..611f9710 100644 --- a/src/api/burn/WixToolset.Mba.Core/VerUtil.cs +++ b/src/api/burn/WixToolset.Mba.Core/VerUtil.cs | |||
@@ -59,6 +59,7 @@ namespace WixToolset.Mba.Core | |||
59 | internal struct VersionStruct | 59 | internal struct VersionStruct |
60 | { | 60 | { |
61 | public IntPtr sczVersion; | 61 | public IntPtr sczVersion; |
62 | public char chPrefix; | ||
62 | public uint dwMajor; | 63 | public uint dwMajor; |
63 | public uint dwMinor; | 64 | public uint dwMinor; |
64 | public uint dwPatch; | 65 | public uint dwPatch; |
diff --git a/src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs b/src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs index 7408c26f..731dedaf 100644 --- a/src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs +++ b/src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs | |||
@@ -17,6 +17,7 @@ namespace WixToolset.Mba.Core | |||
17 | var pVersion = handle.DangerousGetHandle(); | 17 | var pVersion = handle.DangerousGetHandle(); |
18 | var version = (VerUtil.VersionStruct)Marshal.PtrToStructure(pVersion, typeof(VerUtil.VersionStruct)); | 18 | var version = (VerUtil.VersionStruct)Marshal.PtrToStructure(pVersion, typeof(VerUtil.VersionStruct)); |
19 | this.Version = Marshal.PtrToStringUni(version.sczVersion); | 19 | this.Version = Marshal.PtrToStringUni(version.sczVersion); |
20 | this.Prefix = version.chPrefix; | ||
20 | this.Major = version.dwMajor; | 21 | this.Major = version.dwMajor; |
21 | this.Minor = version.dwMinor; | 22 | this.Minor = version.dwMinor; |
22 | this.Patch = version.dwPatch; | 23 | this.Patch = version.dwPatch; |
@@ -39,6 +40,11 @@ namespace WixToolset.Mba.Core | |||
39 | public string Version { get; private set; } | 40 | public string Version { get; private set; } |
40 | 41 | ||
41 | /// <summary> | 42 | /// <summary> |
43 | /// Prefix character that was stripped from <c>Version</c>, or the null character if there was no prefix. | ||
44 | /// </summary> | ||
45 | public char Prefix { get; private set; } | ||
46 | |||
47 | /// <summary> | ||
42 | /// For version A.B.C.D, Major is A. It is 0 if not specified. | 48 | /// For version A.B.C.D, Major is A. It is 0 if not specified. |
43 | /// </summary> | 49 | /// </summary> |
44 | public uint Major { get; private set; } | 50 | public uint Major { get; private set; } |