diff options
author | João Reis <reis@janeasystems.com> | 2015-07-21 21:39:15 +0100 |
---|---|---|
committer | João Reis <reis@janeasystems.com> | 2015-09-16 06:30:18 -0400 |
commit | 44d7054252cc727e9604711de22a692edf8b556a (patch) | |
tree | f51aebd72c3fadf88e327ff0b50957e5817396ef | |
parent | 586c4d8b8eea68a4ba80d054840f2e9784c143bc (diff) | |
download | node-44d7054252cc727e9604711de22a692edf8b556a.tar.gz |
win: fix custom actions for WiX older than 3.9
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 <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>
-rw-r--r-- | tools/msvs/msi/custom_actions.cc (renamed from tools/msvs/msi/custom_actions.c) | 6 | ||||
-rw-r--r-- | tools/msvs/msi/custom_actions.vcxproj | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/msvs/msi/custom_actions.c b/tools/msvs/msi/custom_actions.cc index bf36edc73..5c2a2b5d5 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 @@ 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); diff --git a/tools/msvs/msi/custom_actions.vcxproj b/tools/msvs/msi/custom_actions.vcxproj index ae82905cd..3716f07ff 100644 --- a/tools/msvs/msi/custom_actions.vcxproj +++ b/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> |