summaryrefslogtreecommitdiff
path: root/setup_native/source/win32
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-09-28 12:40:42 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-09-29 14:55:11 +0200
commit0dd2e602e5c1b46e82abc6051677aeaab1d265b8 (patch)
tree7f7a1cbc9cb87c38c732d4691129bf81dc1d04ff /setup_native/source/win32
parent8b12c98ec7ec0b5ba20c28890ee63803fb9518d5 (diff)
Drop check for Windows versions we don't support
Since we dropped support of Vista and below in master toward 6.0, those checks are needless. Removing the code that only worked in older versions, and streamlining the resulting code. Also, use kernel32.dll version for Windows version, instead of deprecated GetVersionEx, and inconvenient VersionHelpers. Since both GetVersion(Ex) and VersionHelpers (based on VerifyVersionInfo) are subject to manifest-based behavior since Windows 8.1, this move will hopefully result in more reliable OS version detection. Change-Id: I3edd8fc1843e64b6a65bd3a126be6a085511f13c Reviewed-on: https://gerrit.libreoffice.org/42905 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'setup_native/source/win32')
-rw-r--r--setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx32
1 files changed, 2 insertions, 30 deletions
diff --git a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
index ad736270b2d2..7534c4cfc50e 100644
--- a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
@@ -29,37 +29,9 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle )
{
std::wstring sOfficeMenuFolder = GetMsiPropertyW( handle, L"OfficeMenuFolder" );
std::wstring sDesktopFile = sOfficeMenuFolder + L"Desktop.ini";
- std::wstring sIconFile = GetMsiPropertyW( handle, L"INSTALLLOCATION" ) + L"program\\soffice.exe";
-// the Win32 SDK 8.1 deprecates GetVersionEx()
-#ifdef _WIN32_WINNT_WINBLUE
- bool const bIsVistaOrLater = IsWindowsVistaOrGreater();
-#else
- OSVERSIONINFOW osverinfo;
- osverinfo.dwOSVersionInfoSize = sizeof(osverinfo);
- GetVersionExW( &osverinfo );
- bool const bIsVistaOrLater = (osverinfo.dwMajorVersion >= 6);
-#endif
-
- if (!bIsVistaOrLater)
- {
- WritePrivateProfileStringW(
- L".ShellClassInfo",
- L"IconFile",
- sIconFile.c_str(),
- sDesktopFile.c_str() );
-
- WritePrivateProfileStringW(
- L".ShellClassInfo",
- L"IconIndex",
- L"0",
- sDesktopFile.c_str() );
- }
- // else
- // {
- // // at the moment there exists no Vista Icon, so we use the default folder icon.
- // // add the icon into desktop/util/verinfo.rc
- // }
+ // at the moment there exists no Vista Icon, so we use the default folder icon.
+ // add the icon into desktop/util/verinfo.rc
// The value '0' is to avoid a message like "You Are Deleting a System Folder" warning when deleting or moving the folder.
WritePrivateProfileStringW(