aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2020-07-04 18:36:13 -0400
committerBob Arnson <bob@firegiant.com>2020-07-04 18:58:45 -0400
commite6510bc49ebe47d37790a1930587f6405249def7 (patch)
tree30bdff91ad25db96e085b577a632306b8f703fbb
parent8181317ba1b9f718b6e54ce13cba04351e464c01 (diff)
downloadwix-e6510bc49ebe47d37790a1930587f6405249def7.tar.gz
wix-e6510bc49ebe47d37790a1930587f6405249def7.tar.bz2
wix-e6510bc49ebe47d37790a1930587f6405249def7.zip
Fix deferred custom action invocations.
-rw-r--r--src/ca/caDecor.h13
-rw-r--r--src/ca/firewall.cpp8
-rw-r--r--src/ca/precomp.h2
3 files changed, 19 insertions, 4 deletions
diff --git a/src/ca/caDecor.h b/src/ca/caDecor.h
new file mode 100644
index 00000000..da274650
--- /dev/null
+++ b/src/ca/caDecor.h
@@ -0,0 +1,13 @@
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
diff --git a/src/ca/firewall.cpp b/src/ca/firewall.cpp
index bf40ce77..038f4ea5 100644
--- a/src/ca/firewall.cpp
+++ b/src/ca/firewall.cpp
@@ -150,16 +150,16 @@ static UINT SchedFirewallExceptions(
150 150
151 if (WCA_TODO_INSTALL == todoSched) 151 if (WCA_TODO_INSTALL == todoSched)
152 { 152 {
153 hr = WcaDoDeferredAction(L"WixRollbackFirewallExceptionsInstall", pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION); 153 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackFirewallExceptionsInstall"), pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
154 ExitOnFailure(hr, "failed to schedule firewall install exceptions rollback"); 154 ExitOnFailure(hr, "failed to schedule firewall install exceptions rollback");
155 hr = WcaDoDeferredAction(L"WixExecFirewallExceptionsInstall", pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION); 155 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecFirewallExceptionsInstall"), pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
156 ExitOnFailure(hr, "failed to schedule firewall install exceptions execution"); 156 ExitOnFailure(hr, "failed to schedule firewall install exceptions execution");
157 } 157 }
158 else 158 else
159 { 159 {
160 hr = WcaDoDeferredAction(L"WixRollbackFirewallExceptionsUninstall", pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION); 160 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackFirewallExceptionsUninstall"), pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
161 ExitOnFailure(hr, "failed to schedule firewall uninstall exceptions rollback"); 161 ExitOnFailure(hr, "failed to schedule firewall uninstall exceptions rollback");
162 hr = WcaDoDeferredAction(L"WixExecFirewallExceptionsUninstall", pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION); 162 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecFirewallExceptionsUninstall"), pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
163 ExitOnFailure(hr, "failed to schedule firewall uninstall exceptions execution"); 163 ExitOnFailure(hr, "failed to schedule firewall uninstall exceptions execution");
164 } 164 }
165 } 165 }
diff --git a/src/ca/precomp.h b/src/ca/precomp.h
index a84bacff..03845e1e 100644
--- a/src/ca/precomp.h
+++ b/src/ca/precomp.h
@@ -15,3 +15,5 @@
15 15
16#include "CustomMsiErrors.h" 16#include "CustomMsiErrors.h"
17#include "cost.h" 17#include "cost.h"
18
19#include "caDecor.h"