Skip to content

Commit

Permalink
win: fix custom actions for WiX older than 3.9
Browse files Browse the repository at this point in the history
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
  • Loading branch information
joaocgreis committed Sep 12, 2015
1 parent b865f9d commit f352570
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define GUID_BUFFER_SIZE 39 // {8-4-4-4-12}\0


UINT WINAPI SetInstallScope(MSIHANDLE hInstall) {
extern "C" UINT WINAPI SetInstallScope(MSIHANDLE hInstall) {
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
TCHAR upgrade_code[GUID_BUFFER_SIZE];
Expand Down Expand Up @@ -56,7 +56,7 @@ UINT WINAPI SetInstallScope(MSIHANDLE hInstall) {
}


UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;

Expand All @@ -77,7 +77,7 @@ UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
}


BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
switch (ulReason) {
case DLL_PROCESS_ATTACH:
WcaGlobalInitialize(hInst);
Expand Down
2 changes: 1 addition & 1 deletion tools/msvs/msi/custom_actions.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="custom_actions.c">
<ClCompile Include="custom_actions.cc">
</ClCompile>
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit f352570

Please sign in to comment.