@joebigelow / wix / commits / 77b1f671

Fix CustomActionData names.

Fixes https://github.com/wixtoolset/issues/issues/7189. Also: - Clean up duplicate caDecor.h. - Clean up use of CUSTOM_ACTION_DECORATION.

Bob Arnson committed Feb 1, 2023 at 20:22 UTC 77b1f6715534192ab143dd9109aacc50fc78e52a
13 files changed +17 -70
src/ext/Http/ca/caDecor.h deleted
-13
@@ -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 CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
7 -#elif defined(_M_AMD64)
8 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
9 -#elif defined(_M_ARM)
10 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
11 -#else
12 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
13 -#endif
src/ext/Http/ca/precomp.h
+1 -1
@@ -15,7 +15,7 @@
15
16 #include "cost.h"
17
18 -#include "caDecor.h"
18 +#include "..\..\caDecor.h"
19
20 enum eHandleExisting
21 {
src/ext/Http/ca/snisslcert.cpp
+4 -4
@@ -420,16 +420,16 @@ static UINT SchedHttpSniSslCerts(
420
421 if (WCA_TODO_INSTALL == todoSched)
422 {
423 - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpSniSslCertsInstall"), sczRollbackCustomActionData, cCertificates * COST_HTTP_SNI_SSL);
423 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackHttpSniSslCertsInstall"), sczRollbackCustomActionData, cCertificates * COST_HTTP_SNI_SSL);
424 ExitOnFailure(hr, "Failed to schedule install SNI SSL certificate rollback");
425 - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpSniSslCertsInstall"), sczCustomActionData, cCertificates * COST_HTTP_SNI_SSL);
425 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecHttpSniSslCertsInstall"), sczCustomActionData, cCertificates * COST_HTTP_SNI_SSL);
426 ExitOnFailure(hr, "Failed to schedule install SNI SSL certificate execution");
427 }
428 else
429 {
430 - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpSniSslCertsUninstall"), sczRollbackCustomActionData, cCertificates * COST_HTTP_SNI_SSL);
430 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackHttpSniSslCertsUninstall"), sczRollbackCustomActionData, cCertificates * COST_HTTP_SNI_SSL);
431 ExitOnFailure(hr, "Failed to schedule uninstall SNI SSL certificate rollback");
432 - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpSniSslCertsUninstall"), sczCustomActionData, cCertificates * COST_HTTP_SNI_SSL);
432 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecHttpSniSslCertsUninstall"), sczCustomActionData, cCertificates * COST_HTTP_SNI_SSL);
433 ExitOnFailure(hr, "Failed to schedule uninstall SNI SSL certificate execution");
434 }
435 }
src/ext/Http/ca/wixhttpca.cpp
+4 -4
@@ -191,16 +191,16 @@ static UINT SchedHttpUrlReservations(
191
192 if (WCA_TODO_INSTALL == todoSched)
193 {
194 - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpUrlReservationsInstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL);
194 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackHttpUrlReservationsInstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL);
195 ExitOnFailure(hr, "Failed to schedule install URL reservations rollback.");
196 - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpUrlReservationsInstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL);
196 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecHttpUrlReservationsInstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL);
197 ExitOnFailure(hr, "Failed to schedule install URL reservations execution.");
198 }
199 else
200 {
201 - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpUrlReservationsUninstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL);
201 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackHttpUrlReservationsUninstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL);
202 ExitOnFailure(hr, "Failed to schedule uninstall URL reservations rollback.");
203 - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpUrlReservationsUninstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL);
203 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecHttpUrlReservationsUninstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL);
204 ExitOnFailure(hr, "Failed to schedule uninstall URL reservations execution.");
205 }
206 }
src/ext/NetFx/ca/caDecor.h deleted
-13
@@ -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 CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
7 -#elif defined(_M_AMD64)
8 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
9 -#elif defined(_M_ARM)
10 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
11 -#else
12 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
13 -#endif
src/ext/NetFx/ca/netfxca.cpp
+4 -5
@@ -795,24 +795,23 @@ extern "C" UINT __stdcall SchedNetFx(
795 // Schedule the install custom action
796 if (pwzInstallCustomActionData && *pwzInstallCustomActionData)
797 {
798 - hr = WcaSetProperty(L"NetFxExecuteNativeImageInstall", pwzInstallCustomActionData);
798 + hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"NetFxExecuteNativeImageInstall"), pwzInstallCustomActionData);
799 ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageInstall action");
800
801 - hr = WcaSetProperty(L"NetFxExecuteNativeImageCommitInstall", pwzInstallCustomActionData);
801 + hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"NetFxExecuteNativeImageCommitInstall"), pwzInstallCustomActionData);
802 ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageCommitInstall action");
803 }
804
805 // Schedule the uninstall custom action
806 if (pwzUninstallCustomActionData && *pwzUninstallCustomActionData)
807 {
808 - hr = WcaSetProperty(L"NetFxExecuteNativeImageUninstall", pwzUninstallCustomActionData);
808 + hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"NetFxExecuteNativeImageUninstall"), pwzUninstallCustomActionData);
809 ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageUninstall action");
810
811 - hr = WcaSetProperty(L"NetFxExecuteNativeImageCommitUninstall", pwzUninstallCustomActionData);
811 + hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"NetFxExecuteNativeImageCommitUninstall"), pwzUninstallCustomActionData);
812 ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageCommitUninstall action");
813 }
814
815 -
815 LExit:
816 ReleaseStr(pwzInstallCustomActionData);
817 ReleaseStr(pwzUninstallCustomActionData);
src/ext/NetFx/ca/precomp.h
+1 -1
@@ -14,5 +14,5 @@
14 #include "dirutil.h"
15 #include "guidutil.h"
16
17 -#include "caDecor.h"
17 +#include "..\..\caDecor.h"
18 #include "cost.h"
src/ext/Sql/ca/caDecor.h deleted
-13
@@ -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 CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
7 -#elif defined(_M_AMD64)
8 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
9 -#elif defined(_M_ARM)
10 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
11 -#else
12 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
13 -#endif
src/ext/Sql/ca/precomp.h
+1 -1
@@ -23,4 +23,4 @@
23 #include "scacost.h"
24 #include "scasqlstr.h"
25
26 -#include "caDecor.h"
26 +#include "..\..\caDecor.h"
src/ext/Util/ca/OsInfo.cpp
+1
@@ -330,6 +330,7 @@ LExit:
330 {
331 ::LocalFree(psid);
332 }
333 +
334 ReleaseStr(pwzPropertyValue);
335 return hr;
336 }
src/ext/Util/ca/caDecor.h deleted
-13
@@ -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 CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
7 -#elif defined(_M_AMD64)
8 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
9 -#elif defined(_M_ARM)
10 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
11 -#else
12 -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
13 -#endif
src/ext/Util/ca/precomp.h
+1 -1
@@ -51,4 +51,4 @@
51 #include "scasmb.h"
52 #include "scasmbexec.h"
53
54 -#include "caDecor.h"
54 +#include "..\..\caDecor.h"
src/ext/Util/ca/utilca.vcxproj
-1
@@ -79,7 +79,6 @@
79 </ItemGroup>
80
81 <ItemGroup>
82 - <ClInclude Include="caDecor.h" />
82 <ClInclude Include="cost.h" />
83 <ClInclude Include="CustomMsiErrors.h" />
84 <ClInclude Include="precomp.h" />