From e192f61514cd1500de895cb10128d412f842d7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Tue, 21 Jul 2015 21:39:15 +0100 Subject: [PATCH] win: fix custom actions for WiX older than 3.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Older WiX versions included a header with extern "C" declaration, hence the custom action source must be C++. Reviewed-By: João Reis PR-URL: https://github.com/joyent/node/pull/25569 --- tools/msvs/msi/{custom_actions.c => custom_actions.cc} | 4 ++-- tools/msvs/msi/custom_actions.vcxproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename tools/msvs/msi/{custom_actions.c => custom_actions.cc} (83%) diff --git a/tools/msvs/msi/custom_actions.c b/tools/msvs/msi/custom_actions.cc similarity index 83% rename from tools/msvs/msi/custom_actions.c rename to tools/msvs/msi/custom_actions.cc index 5e7d617f387..9a23d557476 100644 --- a/tools/msvs/msi/custom_actions.c +++ b/tools/msvs/msi/custom_actions.cc @@ -6,7 +6,7 @@ #include -UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) { +extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) { HRESULT hr = S_OK; UINT er = ERROR_SUCCESS; @@ -27,7 +27,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); diff --git a/tools/msvs/msi/custom_actions.vcxproj b/tools/msvs/msi/custom_actions.vcxproj index ae82905cd4b..3716f07ff6d 100644 --- a/tools/msvs/msi/custom_actions.vcxproj +++ b/tools/msvs/msi/custom_actions.vcxproj @@ -169,7 +169,7 @@ - +