From 77b1f6715534192ab143dd9109aacc50fc78e52a Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 1 Feb 2023 20:22:50 -0500 Subject: Fix CustomActionData names. Fixes https://github.com/wixtoolset/issues/issues/7189. Also: - Clean up duplicate caDecor.h. - Clean up use of CUSTOM_ACTION_DECORATION. --- src/ext/Http/ca/caDecor.h | 13 ------------- src/ext/Http/ca/precomp.h | 2 +- src/ext/Http/ca/snisslcert.cpp | 8 ++++---- src/ext/Http/ca/wixhttpca.cpp | 8 ++++---- src/ext/NetFx/ca/caDecor.h | 13 ------------- src/ext/NetFx/ca/netfxca.cpp | 9 ++++----- src/ext/NetFx/ca/precomp.h | 2 +- src/ext/Sql/ca/caDecor.h | 13 ------------- src/ext/Sql/ca/precomp.h | 2 +- src/ext/Util/ca/OsInfo.cpp | 1 + src/ext/Util/ca/caDecor.h | 13 ------------- src/ext/Util/ca/precomp.h | 2 +- src/ext/Util/ca/utilca.vcxproj | 1 - 13 files changed, 17 insertions(+), 70 deletions(-) delete mode 100644 src/ext/Http/ca/caDecor.h delete mode 100644 src/ext/NetFx/ca/caDecor.h delete mode 100644 src/ext/Sql/ca/caDecor.h delete mode 100644 src/ext/Util/ca/caDecor.h diff --git a/src/ext/Http/ca/caDecor.h b/src/ext/Http/ca/caDecor.h deleted file mode 100644 index da274650..00000000 --- a/src/ext/Http/ca/caDecor.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -// 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. - - -#if defined(_M_ARM64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64" -#elif defined(_M_AMD64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64" -#elif defined(_M_ARM) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM" -#else -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86" -#endif diff --git a/src/ext/Http/ca/precomp.h b/src/ext/Http/ca/precomp.h index c78d78c1..42287cb2 100644 --- a/src/ext/Http/ca/precomp.h +++ b/src/ext/Http/ca/precomp.h @@ -15,7 +15,7 @@ #include "cost.h" -#include "caDecor.h" +#include "..\..\caDecor.h" enum eHandleExisting { diff --git a/src/ext/Http/ca/snisslcert.cpp b/src/ext/Http/ca/snisslcert.cpp index e9cafd66..81cd5298 100644 --- a/src/ext/Http/ca/snisslcert.cpp +++ b/src/ext/Http/ca/snisslcert.cpp @@ -420,16 +420,16 @@ static UINT SchedHttpSniSslCerts( if (WCA_TODO_INSTALL == todoSched) { - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpSniSslCertsInstall"), sczRollbackCustomActionData, cCertificates * COST_HTTP_SNI_SSL); + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackHttpSniSslCertsInstall"), sczRollbackCustomActionData, cCertificates * COST_HTTP_SNI_SSL); ExitOnFailure(hr, "Failed to schedule install SNI SSL certificate rollback"); - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpSniSslCertsInstall"), sczCustomActionData, cCertificates * COST_HTTP_SNI_SSL); + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecHttpSniSslCertsInstall"), sczCustomActionData, cCertificates * COST_HTTP_SNI_SSL); ExitOnFailure(hr, "Failed to schedule install SNI SSL certificate execution"); } else { - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpSniSslCertsUninstall"), sczRollbackCustomActionData, cCertificates * COST_HTTP_SNI_SSL); + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackHttpSniSslCertsUninstall"), sczRollbackCustomActionData, cCertificates * COST_HTTP_SNI_SSL); ExitOnFailure(hr, "Failed to schedule uninstall SNI SSL certificate rollback"); - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpSniSslCertsUninstall"), sczCustomActionData, cCertificates * COST_HTTP_SNI_SSL); + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecHttpSniSslCertsUninstall"), sczCustomActionData, cCertificates * COST_HTTP_SNI_SSL); ExitOnFailure(hr, "Failed to schedule uninstall SNI SSL certificate execution"); } } diff --git a/src/ext/Http/ca/wixhttpca.cpp b/src/ext/Http/ca/wixhttpca.cpp index e24096bb..be2db913 100644 --- a/src/ext/Http/ca/wixhttpca.cpp +++ b/src/ext/Http/ca/wixhttpca.cpp @@ -191,16 +191,16 @@ static UINT SchedHttpUrlReservations( if (WCA_TODO_INSTALL == todoSched) { - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpUrlReservationsInstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackHttpUrlReservationsInstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); ExitOnFailure(hr, "Failed to schedule install URL reservations rollback."); - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpUrlReservationsInstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecHttpUrlReservationsInstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); ExitOnFailure(hr, "Failed to schedule install URL reservations execution."); } else { - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpUrlReservationsUninstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackHttpUrlReservationsUninstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); ExitOnFailure(hr, "Failed to schedule uninstall URL reservations rollback."); - hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpUrlReservationsUninstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecHttpUrlReservationsUninstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); ExitOnFailure(hr, "Failed to schedule uninstall URL reservations execution."); } } diff --git a/src/ext/NetFx/ca/caDecor.h b/src/ext/NetFx/ca/caDecor.h deleted file mode 100644 index da274650..00000000 --- a/src/ext/NetFx/ca/caDecor.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -// 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. - - -#if defined(_M_ARM64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64" -#elif defined(_M_AMD64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64" -#elif defined(_M_ARM) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM" -#else -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86" -#endif diff --git a/src/ext/NetFx/ca/netfxca.cpp b/src/ext/NetFx/ca/netfxca.cpp index cd086c53..57eb96b1 100644 --- a/src/ext/NetFx/ca/netfxca.cpp +++ b/src/ext/NetFx/ca/netfxca.cpp @@ -795,24 +795,23 @@ extern "C" UINT __stdcall SchedNetFx( // Schedule the install custom action if (pwzInstallCustomActionData && *pwzInstallCustomActionData) { - hr = WcaSetProperty(L"NetFxExecuteNativeImageInstall", pwzInstallCustomActionData); + hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"NetFxExecuteNativeImageInstall"), pwzInstallCustomActionData); ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageInstall action"); - hr = WcaSetProperty(L"NetFxExecuteNativeImageCommitInstall", pwzInstallCustomActionData); + hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"NetFxExecuteNativeImageCommitInstall"), pwzInstallCustomActionData); ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageCommitInstall action"); } // Schedule the uninstall custom action if (pwzUninstallCustomActionData && *pwzUninstallCustomActionData) { - hr = WcaSetProperty(L"NetFxExecuteNativeImageUninstall", pwzUninstallCustomActionData); + hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"NetFxExecuteNativeImageUninstall"), pwzUninstallCustomActionData); ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageUninstall action"); - hr = WcaSetProperty(L"NetFxExecuteNativeImageCommitUninstall", pwzUninstallCustomActionData); + hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"NetFxExecuteNativeImageCommitUninstall"), pwzUninstallCustomActionData); ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageCommitUninstall action"); } - LExit: ReleaseStr(pwzInstallCustomActionData); ReleaseStr(pwzUninstallCustomActionData); diff --git a/src/ext/NetFx/ca/precomp.h b/src/ext/NetFx/ca/precomp.h index db618bce..aa90be4f 100644 --- a/src/ext/NetFx/ca/precomp.h +++ b/src/ext/NetFx/ca/precomp.h @@ -14,5 +14,5 @@ #include "dirutil.h" #include "guidutil.h" -#include "caDecor.h" +#include "..\..\caDecor.h" #include "cost.h" diff --git a/src/ext/Sql/ca/caDecor.h b/src/ext/Sql/ca/caDecor.h deleted file mode 100644 index da274650..00000000 --- a/src/ext/Sql/ca/caDecor.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -// 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. - - -#if defined(_M_ARM64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64" -#elif defined(_M_AMD64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64" -#elif defined(_M_ARM) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM" -#else -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86" -#endif diff --git a/src/ext/Sql/ca/precomp.h b/src/ext/Sql/ca/precomp.h index e92abdc5..c18d3624 100644 --- a/src/ext/Sql/ca/precomp.h +++ b/src/ext/Sql/ca/precomp.h @@ -23,4 +23,4 @@ #include "scacost.h" #include "scasqlstr.h" -#include "caDecor.h" +#include "..\..\caDecor.h" diff --git a/src/ext/Util/ca/OsInfo.cpp b/src/ext/Util/ca/OsInfo.cpp index 005407af..593e3b0c 100644 --- a/src/ext/Util/ca/OsInfo.cpp +++ b/src/ext/Util/ca/OsInfo.cpp @@ -330,6 +330,7 @@ LExit: { ::LocalFree(psid); } + ReleaseStr(pwzPropertyValue); return hr; } diff --git a/src/ext/Util/ca/caDecor.h b/src/ext/Util/ca/caDecor.h deleted file mode 100644 index da274650..00000000 --- a/src/ext/Util/ca/caDecor.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -// 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. - - -#if defined(_M_ARM64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64" -#elif defined(_M_AMD64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64" -#elif defined(_M_ARM) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM" -#else -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86" -#endif diff --git a/src/ext/Util/ca/precomp.h b/src/ext/Util/ca/precomp.h index 98e61e1a..efde32a6 100644 --- a/src/ext/Util/ca/precomp.h +++ b/src/ext/Util/ca/precomp.h @@ -51,4 +51,4 @@ #include "scasmb.h" #include "scasmbexec.h" -#include "caDecor.h" +#include "..\..\caDecor.h" diff --git a/src/ext/Util/ca/utilca.vcxproj b/src/ext/Util/ca/utilca.vcxproj index 8fe26942..758f075c 100644 --- a/src/ext/Util/ca/utilca.vcxproj +++ b/src/ext/Util/ca/utilca.vcxproj @@ -79,7 +79,6 @@ - -- cgit v1.2.3-55-g6feb