diff options
Diffstat (limited to 'src/ext/Util')
-rw-r--r-- | src/ext/Util/be/UtilBundleExtension.cpp | 12 | ||||
-rw-r--r-- | src/ext/Util/be/beDecor.h | 13 | ||||
-rw-r--r-- | src/ext/Util/be/detectsha2support.cpp | 8 | ||||
-rw-r--r-- | src/ext/Util/be/precomp.h | 2 | ||||
-rw-r--r-- | src/ext/Util/be/utilbe.vcxproj | 1 | ||||
-rw-r--r-- | src/ext/Util/be/utilsearch.cpp | 20 | ||||
-rw-r--r-- | src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs | 2 |
7 files changed, 20 insertions, 38 deletions
diff --git a/src/ext/Util/be/UtilBundleExtension.cpp b/src/ext/Util/be/UtilBundleExtension.cpp index 110599fa..23f5d94f 100644 --- a/src/ext/Util/be/UtilBundleExtension.cpp +++ b/src/ext/Util/be/UtilBundleExtension.cpp | |||
@@ -28,16 +28,16 @@ public: //CBextBaseBundleExtension | |||
28 | IXMLDOMNode* pixnBundleExtension = NULL; | 28 | IXMLDOMNode* pixnBundleExtension = NULL; |
29 | 29 | ||
30 | hr = __super::Initialize(pCreateArgs); | 30 | hr = __super::Initialize(pCreateArgs); |
31 | ExitOnFailure(hr, "CBextBaseBundleExtension initialization failed."); | 31 | BextExitOnFailure(hr, "CBextBaseBundleExtension initialization failed."); |
32 | 32 | ||
33 | hr = XmlLoadDocumentFromFile(m_sczBundleExtensionDataPath, &pixdManifest); | 33 | hr = XmlLoadDocumentFromFile(m_sczBundleExtensionDataPath, &pixdManifest); |
34 | ExitOnFailure(hr, "Failed to load bundle extension manifest from path: %ls", m_sczBundleExtensionDataPath); | 34 | BextExitOnFailure(hr, "Failed to load bundle extension manifest from path: %ls", m_sczBundleExtensionDataPath); |
35 | 35 | ||
36 | hr = BextGetBundleExtensionDataNode(pixdManifest, UTIL_BUNDLE_EXTENSION_ID, &pixnBundleExtension); | 36 | hr = BextGetBundleExtensionDataNode(pixdManifest, UTIL_BUNDLE_EXTENSION_ID, &pixnBundleExtension); |
37 | ExitOnFailure(hr, "Failed to get BundleExtension '%ls'", UTIL_BUNDLE_EXTENSION_ID); | 37 | BextExitOnFailure(hr, "Failed to get BundleExtension '%ls'", UTIL_BUNDLE_EXTENSION_ID); |
38 | 38 | ||
39 | hr = UtilSearchParseFromXml(&m_searches, pixnBundleExtension); | 39 | hr = UtilSearchParseFromXml(&m_searches, pixnBundleExtension); |
40 | ExitOnFailure(hr, "Failed to parse searches from bundle extension manifest."); | 40 | BextExitOnFailure(hr, "Failed to parse searches from bundle extension manifest."); |
41 | 41 | ||
42 | LExit: | 42 | LExit: |
43 | ReleaseObject(pixnBundleExtension); | 43 | ReleaseObject(pixnBundleExtension); |
@@ -73,10 +73,10 @@ HRESULT UtilBundleExtensionCreate( | |||
73 | CWixUtilBundleExtension* pExtension = NULL; | 73 | CWixUtilBundleExtension* pExtension = NULL; |
74 | 74 | ||
75 | pExtension = new CWixUtilBundleExtension(pEngine); | 75 | pExtension = new CWixUtilBundleExtension(pEngine); |
76 | ExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixUtilBundleExtension."); | 76 | BextExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixUtilBundleExtension."); |
77 | 77 | ||
78 | hr = pExtension->Initialize(pArgs); | 78 | hr = pExtension->Initialize(pArgs); |
79 | ExitOnFailure(hr, "CWixUtilBundleExtension initialization failed."); | 79 | BextExitOnFailure(hr, "CWixUtilBundleExtension initialization failed."); |
80 | 80 | ||
81 | *ppBundleExtension = pExtension; | 81 | *ppBundleExtension = pExtension; |
82 | pExtension = NULL; | 82 | pExtension = NULL; |
diff --git a/src/ext/Util/be/beDecor.h b/src/ext/Util/be/beDecor.h deleted file mode 100644 index 2c6a8818..00000000 --- a/src/ext/Util/be/beDecor.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | #if defined(_M_ARM64) | ||
6 | #define BUNDLE_EXTENSION_DECORATION(f) L"Wix4" f L"_A64" | ||
7 | #elif defined(_M_AMD64) | ||
8 | #define BUNDLE_EXTENSION_DECORATION(f) L"Wix4" f L"_X64" | ||
9 | #elif defined(_M_ARM) | ||
10 | #define BUNDLE_EXTENSION_DECORATION(f) L"Wix4" f L"_ARM" | ||
11 | #else | ||
12 | #define BUNDLE_EXTENSION_DECORATION(f) L"Wix4" f L"_X86" | ||
13 | #endif | ||
diff --git a/src/ext/Util/be/detectsha2support.cpp b/src/ext/Util/be/detectsha2support.cpp index 90e349cd..4abfc63c 100644 --- a/src/ext/Util/be/detectsha2support.cpp +++ b/src/ext/Util/be/detectsha2support.cpp | |||
@@ -13,7 +13,7 @@ HRESULT DetectSHA2CodeSigning( | |||
13 | DWORD er = ERROR_SUCCESS; | 13 | DWORD er = ERROR_SUCCESS; |
14 | 14 | ||
15 | hr = LoadSystemLibrary(L"wintrust.dll", &hModule); | 15 | hr = LoadSystemLibrary(L"wintrust.dll", &hModule); |
16 | ExitOnFailure(hr, "Failed to load wintrust.dll"); | 16 | BextExitOnFailure(hr, "Failed to load wintrust.dll"); |
17 | 17 | ||
18 | pfn = ::GetProcAddress(hModule, "CryptCATAdminAcquireContext2"); | 18 | pfn = ::GetProcAddress(hModule, "CryptCATAdminAcquireContext2"); |
19 | if (pfn) | 19 | if (pfn) |
@@ -30,7 +30,7 @@ HRESULT DetectSHA2CodeSigning( | |||
30 | } | 30 | } |
31 | 31 | ||
32 | hr = HRESULT_FROM_WIN32(er); | 32 | hr = HRESULT_FROM_WIN32(er); |
33 | ExitOnFailure(hr, "Failed to probe for CryptCATAdminAcquireContext2 in wintrust.dll"); | 33 | BextExitOnFailure(hr, "Failed to probe for CryptCATAdminAcquireContext2 in wintrust.dll"); |
34 | 34 | ||
35 | LExit: | 35 | LExit: |
36 | ::FreeLibrary(hModule); | 36 | ::FreeLibrary(hModule); |
@@ -48,10 +48,10 @@ HRESULT UtilPerformDetectSHA2CodeSigning( | |||
48 | BOOL fSupported = FALSE; | 48 | BOOL fSupported = FALSE; |
49 | 49 | ||
50 | hr = DetectSHA2CodeSigning(&fSupported); | 50 | hr = DetectSHA2CodeSigning(&fSupported); |
51 | ExitOnFailure(hr, "DetectSHA2CodeSigning failed."); | 51 | BextExitOnFailure(hr, "DetectSHA2CodeSigning failed."); |
52 | 52 | ||
53 | hr = pEngine->SetVariableNumeric(wzVariable, fSupported ? 1 : 0); | 53 | hr = pEngine->SetVariableNumeric(wzVariable, fSupported ? 1 : 0); |
54 | ExitOnFailure(hr, "Failed to set variable '%ls'", wzVariable); | 54 | BextExitOnFailure(hr, "Failed to set variable '%ls'", wzVariable); |
55 | 55 | ||
56 | LExit: | 56 | LExit: |
57 | return hr; | 57 | return hr; |
diff --git a/src/ext/Util/be/precomp.h b/src/ext/Util/be/precomp.h index bb36b3f3..5ce5744f 100644 --- a/src/ext/Util/be/precomp.h +++ b/src/ext/Util/be/precomp.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <bextutil.h> | 31 | #include <bextutil.h> |
32 | #include <BextBundleExtensionEngine.h> | 32 | #include <BextBundleExtensionEngine.h> |
33 | 33 | ||
34 | #include "beDecor.h" | 34 | #include "..\..\beDecor.h" |
35 | #include "utilsearch.h" | 35 | #include "utilsearch.h" |
36 | #include "detectsha2support.h" | 36 | #include "detectsha2support.h" |
37 | #include "UtilBundleExtension.h" | 37 | #include "UtilBundleExtension.h" |
diff --git a/src/ext/Util/be/utilbe.vcxproj b/src/ext/Util/be/utilbe.vcxproj index 4e4f80d9..fa39dcf3 100644 --- a/src/ext/Util/be/utilbe.vcxproj +++ b/src/ext/Util/be/utilbe.vcxproj | |||
@@ -56,7 +56,6 @@ | |||
56 | </ItemGroup> | 56 | </ItemGroup> |
57 | 57 | ||
58 | <ItemGroup> | 58 | <ItemGroup> |
59 | <ClInclude Include="beDecor.h" /> | ||
60 | <ClInclude Include="detectsha2support.h" /> | 59 | <ClInclude Include="detectsha2support.h" /> |
61 | <ClInclude Include="precomp.h" /> | 60 | <ClInclude Include="precomp.h" /> |
62 | <ClInclude Include="UtilBundleExtension.h" /> | 61 | <ClInclude Include="UtilBundleExtension.h" /> |
diff --git a/src/ext/Util/be/utilsearch.cpp b/src/ext/Util/be/utilsearch.cpp index 7cd2ea09..20a514d8 100644 --- a/src/ext/Util/be/utilsearch.cpp +++ b/src/ext/Util/be/utilsearch.cpp | |||
@@ -17,11 +17,11 @@ STDMETHODIMP UtilSearchParseFromXml( | |||
17 | 17 | ||
18 | // Select Util search nodes. | 18 | // Select Util search nodes. |
19 | hr = XmlSelectNodes(pixnBundleExtension, L"WixWindowsFeatureSearch", &pixnNodes); | 19 | hr = XmlSelectNodes(pixnBundleExtension, L"WixWindowsFeatureSearch", &pixnNodes); |
20 | ExitOnFailure(hr, "Failed to select Util search nodes."); | 20 | BextExitOnFailure(hr, "Failed to select Util search nodes."); |
21 | 21 | ||
22 | // Get Util search node count. | 22 | // Get Util search node count. |
23 | hr = pixnNodes->get_length((long*)&cNodes); | 23 | hr = pixnNodes->get_length((long*)&cNodes); |
24 | ExitOnFailure(hr, "Failed to get Util search node count."); | 24 | BextExitOnFailure(hr, "Failed to get Util search node count."); |
25 | 25 | ||
26 | if (!cNodes) | 26 | if (!cNodes) |
27 | { | 27 | { |
@@ -30,7 +30,7 @@ STDMETHODIMP UtilSearchParseFromXml( | |||
30 | 30 | ||
31 | // Allocate memory for searches. | 31 | // Allocate memory for searches. |
32 | pSearches->rgSearches = (UTIL_SEARCH*)MemAlloc(sizeof(UTIL_SEARCH) * cNodes, TRUE); | 32 | pSearches->rgSearches = (UTIL_SEARCH*)MemAlloc(sizeof(UTIL_SEARCH) * cNodes, TRUE); |
33 | ExitOnNull(pSearches->rgSearches, hr, E_OUTOFMEMORY, "Failed to allocate memory for search structs."); | 33 | BextExitOnNull(pSearches->rgSearches, hr, E_OUTOFMEMORY, "Failed to allocate memory for search structs."); |
34 | 34 | ||
35 | pSearches->cSearches = cNodes; | 35 | pSearches->cSearches = cNodes; |
36 | 36 | ||
@@ -40,11 +40,11 @@ STDMETHODIMP UtilSearchParseFromXml( | |||
40 | UTIL_SEARCH* pSearch = &pSearches->rgSearches[i]; | 40 | UTIL_SEARCH* pSearch = &pSearches->rgSearches[i]; |
41 | 41 | ||
42 | hr = XmlNextElement(pixnNodes, &pixnNode, &bstrNodeName); | 42 | hr = XmlNextElement(pixnNodes, &pixnNode, &bstrNodeName); |
43 | ExitOnFailure(hr, "Failed to get next node."); | 43 | BextExitOnFailure(hr, "Failed to get next node."); |
44 | 44 | ||
45 | // @Id | 45 | // @Id |
46 | hr = XmlGetAttributeEx(pixnNode, L"Id", &pSearch->sczId); | 46 | hr = XmlGetAttributeEx(pixnNode, L"Id", &pSearch->sczId); |
47 | ExitOnFailure(hr, "Failed to get @Id."); | 47 | BextExitOnFailure(hr, "Failed to get @Id."); |
48 | 48 | ||
49 | // Read type specific attributes. | 49 | // Read type specific attributes. |
50 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"WixWindowsFeatureSearch", -1)) | 50 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"WixWindowsFeatureSearch", -1)) |
@@ -53,7 +53,7 @@ STDMETHODIMP UtilSearchParseFromXml( | |||
53 | 53 | ||
54 | // @Type | 54 | // @Type |
55 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 55 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
56 | ExitOnFailure(hr, "Failed to get @Type."); | 56 | BextExitOnFailure(hr, "Failed to get @Type."); |
57 | 57 | ||
58 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"sha2CodeSigning", -1)) | 58 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"sha2CodeSigning", -1)) |
59 | { | 59 | { |
@@ -61,14 +61,12 @@ STDMETHODIMP UtilSearchParseFromXml( | |||
61 | } | 61 | } |
62 | else | 62 | else |
63 | { | 63 | { |
64 | hr = E_INVALIDARG; | 64 | BextExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
65 | ExitOnFailure(hr, "Invalid value for @Type: %ls", scz); | ||
66 | } | 65 | } |
67 | } | 66 | } |
68 | else | 67 | else |
69 | { | 68 | { |
70 | hr = E_UNEXPECTED; | 69 | BextExitWithRootFailure(hr, E_UNEXPECTED, "Unexpected element name: %ls", bstrNodeName); |
71 | ExitOnFailure(hr, "Unexpected element name: %ls", bstrNodeName); | ||
72 | } | 70 | } |
73 | 71 | ||
74 | // prepare next iteration | 72 | // prepare next iteration |
@@ -112,7 +110,7 @@ STDMETHODIMP UtilSearchExecute( | |||
112 | UTIL_SEARCH* pSearch = NULL; | 110 | UTIL_SEARCH* pSearch = NULL; |
113 | 111 | ||
114 | hr = UtilSearchFindById(pSearches, wzSearchId, &pSearch); | 112 | hr = UtilSearchFindById(pSearches, wzSearchId, &pSearch); |
115 | ExitOnFailure(hr, "Search id '%ls' is unknown to the util extension."); | 113 | BextExitOnFailure(hr, "Search id '%ls' is unknown to the util extension.", wzSearchId); |
116 | 114 | ||
117 | switch (pSearch->Type) | 115 | switch (pSearch->Type) |
118 | { | 116 | { |
diff --git a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs index 72091c3b..3b357a96 100644 --- a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs +++ b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs | |||
@@ -33,8 +33,6 @@ namespace WixToolset.Util | |||
33 | 33 | ||
34 | public static partial class UtilSymbolDefinitions | 34 | public static partial class UtilSymbolDefinitions |
35 | { | 35 | { |
36 | public static readonly Version Version = new Version("4.0.0"); | ||
37 | |||
38 | public static IntermediateSymbolDefinition ByName(string name) | 36 | public static IntermediateSymbolDefinition ByName(string name) |
39 | { | 37 | { |
40 | if (!Enum.TryParse(name, out UtilSymbolDefinitionType type)) | 38 | if (!Enum.TryParse(name, out UtilSymbolDefinitionType type)) |