summaryrefslogtreecommitdiff
path: root/setup_native/source/win32/customactions/shellextensions
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-09-18 17:25:55 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-09-18 23:18:01 +0200
commit28b4f4aeaf160c7721dfecf5bd2445d7dbc6f01c (patch)
treec281b491f1792d1a509294904911811324093e41 /setup_native/source/win32/customactions/shellextensions
parentb9a2d00c7c38ccd24b0663a2ecc6c08106fe51f1 (diff)
Get rid of Windows .def files in setup_native, use __declspec(dllexport)
For one, replacing the dated .def files with equivalent functionality should be a good move all by itself. And for another, it paves the way for using loplugin:external with clang-cl on Windows, which uses the heuristic of not warning about functions that are explicitly marked as __declspec(dllexport). Change-Id: I6efd50a8c5ce2a166ca0dd4e5f472118f3f9a071 Reviewed-on: https://gerrit.libreoffice.org/60691 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'setup_native/source/win32/customactions/shellextensions')
-rw-r--r--setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/checkpatches.cxx2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/shlxtmsi.def11
-rw-r--r--setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx4
-rw-r--r--setup_native/source/win32/customactions/shellextensions/upgrade.cxx2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx4
8 files changed, 9 insertions, 20 deletions
diff --git a/setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx b/setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx
index 9f7080984293..5c68659950ef 100644
--- a/setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx
@@ -28,7 +28,7 @@
#include <systools/win32/uwinapi.h>
#include "../tools/seterror.hxx"
-extern "C" UINT __stdcall CheckInstallDirectory(MSIHANDLE handle)
+extern "C" __declspec(dllexport) UINT __stdcall CheckInstallDirectory(MSIHANDLE handle)
{
std::wstring sInstallPath = GetMsiPropertyW(handle, L"INSTALLLOCATION");
std::wstring sOfficeHostnamePath = GetMsiPropertyW(handle, L"OFFICEDIRHOSTNAME");
diff --git a/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx b/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx
index 729bce0bc0cb..836b3e655e75 100644
--- a/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx
@@ -38,7 +38,7 @@ static inline void OutputDebugStringFormatW( PCWSTR, ... )
}
#endif
-extern "C" UINT __stdcall CheckPatchList( MSIHANDLE handle )
+extern "C" __declspec(dllexport) UINT __stdcall CheckPatchList( MSIHANDLE handle )
{
std::wstring sPatchList = GetMsiPropertyW( handle, L"PATCH" );
std::wstring sRequiredPatch = GetMsiPropertyW( handle, L"PREREQUIREDPATCH" );
diff --git a/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx b/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx
index 9eb5762dc0e8..ee8c71369720 100644
--- a/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx
@@ -21,7 +21,7 @@
#include <malloc.h>
-extern "C" UINT __stdcall CompleteInstallPath( MSIHANDLE handle )
+extern "C" __declspec(dllexport) UINT __stdcall CompleteInstallPath( MSIHANDLE handle )
{
// This CustomAction is necessary for updates from OOo 3.0, OOo 3.1 and OOo 3.2 to versions
// OOo 3.3 or later. This is caused by a change of INSTALLLOCATION, that starting with OOo 3.3
diff --git a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
index 76de7a7559f0..66bb99ae18e8 100644
--- a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
@@ -21,7 +21,7 @@
#include <algorithm>
#include <systools/win32/uwinapi.h>
-extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle )
+extern "C" __declspec(dllexport) UINT __stdcall MigrateInstallPath( MSIHANDLE handle )
{
WCHAR szValue[8192];
DWORD nValueSize = sizeof(szValue); // yes, it is the number of bytes
diff --git a/setup_native/source/win32/customactions/shellextensions/shlxtmsi.def b/setup_native/source/win32/customactions/shellextensions/shlxtmsi.def
deleted file mode 100644
index e0e667953d4f..000000000000
--- a/setup_native/source/win32/customactions/shellextensions/shlxtmsi.def
+++ /dev/null
@@ -1,11 +0,0 @@
-LIBRARY "shlxtmsi.dll"
-EXPORTS
- CheckInstallDirectory
- CheckPatchList
- CompleteInstallPath
- MigrateInstallPath
- InstallStartmenuFolderIcon
- DeinstallStartmenuFolderIcon
- SetProductInstallMode
- RenamePrgFolder
- RemovePrgFolder
diff --git a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
index 7534c4cfc50e..6e95c6e1e69b 100644
--- a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
@@ -25,7 +25,7 @@
Called during installation to customize the start menu folder icon.
See: http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/custom.asp
*/
-extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle )
+extern "C" __declspec(dllexport) UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle )
{
std::wstring sOfficeMenuFolder = GetMsiPropertyW( handle, L"OfficeMenuFolder" );
std::wstring sDesktopFile = sOfficeMenuFolder + L"Desktop.ini";
@@ -47,7 +47,7 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle )
return ERROR_SUCCESS;
}
-extern "C" UINT __stdcall DeinstallStartmenuFolderIcon(MSIHANDLE handle)
+extern "C" __declspec(dllexport) UINT __stdcall DeinstallStartmenuFolderIcon(MSIHANDLE handle)
{
std::wstring sOfficeMenuFolder = GetMsiPropertyW( handle, L"OfficeMenuFolder" );
std::wstring sDesktopFile = sOfficeMenuFolder + L"Desktop.ini";
diff --git a/setup_native/source/win32/customactions/shellextensions/upgrade.cxx b/setup_native/source/win32/customactions/shellextensions/upgrade.cxx
index 9dd726fff606..3b5262ca9826 100644
--- a/setup_native/source/win32/customactions/shellextensions/upgrade.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/upgrade.cxx
@@ -129,7 +129,7 @@ namespace
}
} // namespace
-extern "C" UINT __stdcall SetProductInstallMode(MSIHANDLE handle)
+extern "C" __declspec(dllexport) UINT __stdcall SetProductInstallMode(MSIHANDLE handle)
{
std::wstring upgradeCode = GetMsiPropertyW(handle, L"UpgradeCode");
upgradeCode = ConvertGuid(std::wstring(upgradeCode.c_str() + 1, upgradeCode.length() - 2));
diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
index 1d5c0e9f9e22..ee4f7dc0df87 100644
--- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
@@ -80,7 +80,7 @@ static BOOL RemoveCompleteDirectoryW(const std::wstring& rPath)
return bDirectoryRemoved;
}
-extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
+extern "C" __declspec(dllexport) UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
{
std::wstring sOfficeInstallPath = GetMsiPropertyW(handle, L"INSTALLLOCATION");
@@ -105,7 +105,7 @@ extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
return ERROR_SUCCESS;
}
-extern "C" UINT __stdcall RemovePrgFolder( MSIHANDLE handle )
+extern "C" __declspec(dllexport) UINT __stdcall RemovePrgFolder( MSIHANDLE handle )
{
std::wstring sOfficeInstallPath = GetMsiPropertyW(handle, L"INSTALLLOCATION");
std::wstring sRemoveDir = sOfficeInstallPath + L"program_old";