Skip to content

Commit 44d7054

Browse files
committed
win: fix custom actions for WiX older than 3.9
This is a port of 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 <reis@janeasystems.com> PR-URL: nodejs/node-v0.x-archive#25569 PR-URL: #2843 Reviewed-By: rvagg - Rod Vagg <rod@vagg.org> Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
1 parent 586c4d8 commit 44d7054

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#define GUID_BUFFER_SIZE 39 // {8-4-4-4-12}\0
88

99

10-
UINT WINAPI SetInstallScope(MSIHANDLE hInstall) {
10+
extern "C" UINT WINAPI SetInstallScope(MSIHANDLE hInstall) {
1111
HRESULT hr = S_OK;
1212
UINT er = ERROR_SUCCESS;
1313
TCHAR upgrade_code[GUID_BUFFER_SIZE];
@@ -56,7 +56,7 @@ UINT WINAPI SetInstallScope(MSIHANDLE hInstall) {
5656
}
5757

5858

59-
UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
59+
extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
6060
HRESULT hr = S_OK;
6161
UINT er = ERROR_SUCCESS;
6262

@@ -77,7 +77,7 @@ UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
7777
}
7878

7979

80-
BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
80+
extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
8181
switch (ulReason) {
8282
case DLL_PROCESS_ATTACH:
8383
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)