From 44d7054252cc727e9604711de22a692edf8b556a 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 This is a port of e192f61514cd1500de895cb10128d412f842d7d0 . 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 PR-URL: https://github.com/joyent/node/pull/25569 PR-URL: https://github.com/nodejs/node/pull/2843 Reviewed-By: rvagg - Rod Vagg Reviewed-By: orangemocha - Alexis Campailla Reviewed-By: bnoordhuis - Ben Noordhuis --- tools/msvs/msi/{custom_actions.c => custom_actions.cc} | 6 +++--- tools/msvs/msi/custom_actions.vcxproj | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename tools/msvs/msi/{custom_actions.c => custom_actions.cc} (92%) diff --git a/tools/msvs/msi/custom_actions.c b/tools/msvs/msi/custom_actions.cc similarity index 92% rename from tools/msvs/msi/custom_actions.c rename to tools/msvs/msi/custom_actions.cc index bf36edc734ec1c..5c2a2b5d5245f9 100644 --- a/tools/msvs/msi/custom_actions.c +++ b/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 @@ 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; @@ -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); diff --git a/tools/msvs/msi/custom_actions.vcxproj b/tools/msvs/msi/custom_actions.vcxproj index ae82905cd4b1f4..3716f07ff6de3d 100644 --- a/tools/msvs/msi/custom_actions.vcxproj +++ b/tools/msvs/msi/custom_actions.vcxproj @@ -169,7 +169,7 @@ - +