Skip to content

Commit bce1aea

Browse files
committed
win: fix custom actions for WiX older than 3.9
This is a port of nodejs/node-v0.x-archive@e192f61 . Original commit message: Older WiX versions included a header with extern "C" declaration, hence the custom action source must be C++. Reviewed-By: João Reis <[email protected]> PR-URL: nodejs/node-v0.x-archive#25569 PR-URL: #2365 Reviewed-By: Alexis Campailla <[email protected]>
1 parent 0acc9b2 commit bce1aea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/msvs/msi/custom_actions.c tools/msvs/msi/custom_actions.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <wcautil.h>
77

88

9-
UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
9+
extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
1010
HRESULT hr = S_OK;
1111
UINT er = ERROR_SUCCESS;
1212

@@ -27,7 +27,7 @@ UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
2727
}
2828

2929

30-
BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
30+
extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
3131
switch (ulReason) {
3232
case DLL_PROCESS_ATTACH:
3333
WcaGlobalInitialize(hInst);

tools/msvs/msi/custom_actions.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
</Link>
170170
</ItemDefinitionGroup>
171171
<ItemGroup>
172-
<ClCompile Include="custom_actions.c">
172+
<ClCompile Include="custom_actions.cc">
173173
</ClCompile>
174174
</ItemGroup>
175175
<ItemGroup>

0 commit comments

Comments
 (0)