Browse Source

win: fix custom actions for WiX older than 3.9

This is a port of e192f61514 .

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: https://github.com/joyent/node/pull/25569

PR-URL: https://github.com/nodejs/node/pull/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>
v0.12-staging
João Reis 10 years ago
parent
commit
44d7054252
  1. 6
      tools/msvs/msi/custom_actions.cc
  2. 2
      tools/msvs/msi/custom_actions.vcxproj

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

@ -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];
@ -56,7 +56,7 @@ LExit:
}
UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
@ -77,7 +77,7 @@ LExit:
}
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);

2
tools/msvs/msi/custom_actions.vcxproj

@ -169,7 +169,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="custom_actions.c">
<ClCompile Include="custom_actions.cc">
</ClCompile>
</ItemGroup>
<ItemGroup>

Loading…
Cancel
Save