[Libreoffice-commits] .: Branch 'libreoffice-3-6' - instsetoo_native/inc_ooohelppack instsetoo_native/inc_ooolangpack instsetoo_native/inc_openoffice scp2/source setup_native/source
Andras Timar
timar at kemper.freedesktop.org
Tue Jun 12 13:21:33 PDT 2012
instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt | 1
instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt | 1
instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt | 1
instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt | 1
instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt | 1
instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt | 1
instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf | 3
instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt | 1
instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt | 1
instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt | 1
scp2/source/ooo/windowscustomaction_ooo.scp | 30 --
setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx | 150 ----------
setup_native/source/win32/customactions/languagepacks/exports.dxp | 1
setup_native/source/win32/customactions/languagepacks/makefile.mk | 3
setup_native/source/win32/customactions/patch/exports.dxp | 1
setup_native/source/win32/customactions/patch/swappatchfiles.cxx | 40 --
setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx | 135 ---------
setup_native/source/win32/customactions/shellextensions/exports.dxp | 1
setup_native/source/win32/customactions/shellextensions/makefile.mk | 1
19 files changed, 2 insertions(+), 372 deletions(-)
New commits:
commit 44428bf195b6ccea840fcf4f28c004ca9858d078
Author: Andras Timar <atimar at suse.com>
Date: Tue Jun 12 22:04:04 2012 +0200
delete problematic IsOfficeRunning custom action
Change-Id: Id68521b92f572366a68f35c09387a7ed45a835ff
diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt
index 7af1c7b..997515a 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt
@@ -7,4 +7,3 @@ setUserProfileNT 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
NewProductFound 19 OOO_CUSTOMACTION_1
SameProductFound 19 OOO_CUSTOMACTION_2
-RunningOffice 19 OOO_CUSTOMACTION_4
diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt
index 90ba9c6..7d22ecb 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt
@@ -49,7 +49,6 @@ RemoveIniValues 1550
RemoveODBC 1200
RemoveRegistryValues 1300
RemoveShortcuts 1600
-RunningOffice OFFICERUNS="1" 135
RMCCPSearch Not CCP_SUCCESS And CCP_TEST 250
SameProductFound SAMEPRODUCTS 120
ScheduleReboot ISSCHEDULEREBOOT 3125
diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt b/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
index 0f3ed1e..a4b5edc 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
@@ -28,7 +28,6 @@ ISSCRIPT_VERSION_MISSING IDS_ISSCRIPT_VERSION_MISSING
ISSCRIPT_VERSION_OLD IDS_ISSCRIPT_VERSION_OLD
ISVROOT_PORT_NO 0
Manufacturer MANUFACTURERTEMPLATE
-OFFICERUNS 0
PIDTemplate 12345<###-%%%%%%%>@@@@@
ProductCode PRODUCTCODETEMPLATE
ProductID none
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
index 7af1c7b..997515a 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
@@ -7,4 +7,3 @@ setUserProfileNT 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
NewProductFound 19 OOO_CUSTOMACTION_1
SameProductFound 19 OOO_CUSTOMACTION_2
-RunningOffice 19 OOO_CUSTOMACTION_4
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
index 90ba9c6..7d22ecb 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
@@ -49,7 +49,6 @@ RemoveIniValues 1550
RemoveODBC 1200
RemoveRegistryValues 1300
RemoveShortcuts 1600
-RunningOffice OFFICERUNS="1" 135
RMCCPSearch Not CCP_SUCCESS And CCP_TEST 250
SameProductFound SAMEPRODUCTS 120
ScheduleReboot ISSCHEDULEREBOOT 3125
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt
index 0f3ed1e..a4b5edc 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt
@@ -28,7 +28,6 @@ ISSCRIPT_VERSION_MISSING IDS_ISSCRIPT_VERSION_MISSING
ISSCRIPT_VERSION_OLD IDS_ISSCRIPT_VERSION_OLD
ISVROOT_PORT_NO 0
Manufacturer MANUFACTURERTEMPLATE
-OFFICERUNS 0
PIDTemplate 12345<###-%%%%%%%>@@@@@
ProductCode PRODUCTCODETEMPLATE
ProductID none
diff --git a/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf b/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
index b80d173..29325b2 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
+++ b/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
@@ -6,6 +6,3 @@ en-US = "The same version of this product is already installed."
[OOO_CUSTOMACTION_3]
en-US = "An older version of [ProductName] was found. To install a newer version, the older version needs to be removed first."
-
-[OOO_CUSTOMACTION_4]
-en-US = "Setup detected a running soffice.bin process. Before you restart the installation, please exit the application that owns soffice.bin. It can be LibreOffice, OpenOffice.org, Lotus Symphony, etc. Also check for the running Quickstarter on Windows taskbar. If you are using a multi-user system, also make sure that no other user has this application open."
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
index 4d7125f..41c2de2 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
@@ -13,4 +13,3 @@ SetLanguageSelected 51 LANG_SELECTED 1
ResetLanguageSelected 51 LANG_SELECTED 0
SetApplicationSelected 51 APP_SELECTED 1
ResetApplicationSelected 51 APP_SELECTED 0
-RunningOffice 19 OOO_CUSTOMACTION_4
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
index c4db5c2..bf9367b 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
@@ -50,7 +50,6 @@ RemoveIniValues 1550
RemoveODBC 1200
RemoveRegistryValues 1300
RemoveShortcuts 1600
-RunningOffice OFFICERUNS="1" 135
RMCCPSearch Not CCP_SUCCESS And CCP_TEST 250
SameProductFound SAMEPRODUCTS 120
ScheduleReboot ISSCHEDULEREBOOT 3125
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
index 920251e..979b58f 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
@@ -29,7 +29,6 @@ ISSCRIPT_VERSION_MISSING IDS_ISSCRIPT_VERSION_MISSING
ISSCRIPT_VERSION_OLD IDS_ISSCRIPT_VERSION_OLD
ISVROOT_PORT_NO 0
Manufacturer MANUFACTURERTEMPLATE
-OFFICERUNS 0
PIDTemplate 12345<###-%%%%%%%>@@@@@
ProductCode PRODUCTCODETEMPLATE
ProductID none
diff --git a/scp2/source/ooo/windowscustomaction_ooo.scp b/scp2/source/ooo/windowscustomaction_ooo.scp
index 2fdae2c..3733fb3 100644
--- a/scp2/source/ooo/windowscustomaction_ooo.scp
+++ b/scp2/source/ooo/windowscustomaction_ooo.scp
@@ -107,7 +107,7 @@ WindowsCustomAction gid_Customaction_sdqsmsidll
Source = "sdqsmsi.dll";
Target = "ShutDownQuickstarter";
Inbinarytable = 1;
- Assignment1 = ("InstallExecuteSequence", "", "IsOfficeRunning");
+ Assignment1 = ("InstallExecuteSequence", "", "CCPSearch");
End
WindowsCustomAction gid_Customaction_qslnkmsidll
@@ -321,34 +321,6 @@ WindowsCustomAction gid_Customaction_Patch_Shutdownquickstarter
Assignment2 = ("InstallExecuteSequence", "", "IsolateComponents");
End
-WindowsCustomAction gid_Customaction_Patch_Isofficerunning
- Name = "IsOfficeRunning";
- Typ = "321";
- Source = "patchmsi.dll";
- Target = "IsOfficeRunning";
- Inbinarytable = 1;
- Assignment1 = ("ControlEvent", "ReadyToInstall", "InstallNow", "DoAction", "IsOfficeRunning", "1", "1");
- Assignment2 = ("InstallExecuteSequence", "VersionNT < 600", "RunningOffice");
-End
-
-WindowsCustomAction gid_Customaction_Full_Isofficerunning
- Name = "IsOfficeRunning";
- Typ = "65";
- Source = "shlxtmsi.dll";
- Target = "IsOfficeRunning";
- Inbinarytable = 1;
- Assignment1 = ("InstallExecuteSequence", "VersionNT < 600 Or Not PATCH", "RunningOffice");
-End
-
-WindowsCustomAction gid_Customaction_Langpack_Isofficerunning
- Name = "IsOfficeRunning";
- Typ = "65";
- Source = "lngpckinsthlp.dll";
- Target = "IsOfficeRunning";
- Inbinarytable = 1;
- Assignment1 = ("InstallExecuteSequence", "PATCH And VersionNT < 600", "RunningOffice");
-End
-
WindowsCustomAction gid_Customaction_CheckPatchList
Name = "CheckPatchList";
Typ = "65";
diff --git a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx b/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx
deleted file mode 100644
index ff1efc0..0000000
--- a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#define _WIN32_WINDOWS 0x0410
-
-#ifdef _MSC_VER
-#pragma warning(push, 1) /* disable warnings within system headers */
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <msiquery.h>
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#include <malloc.h>
-#include <assert.h>
-
-#ifdef UNICODE
-#define _UNICODE
-#define _tstring wstring
-#else
-#define _tstring string
-#endif
-#include <tchar.h>
-#include <string>
-#include <queue>
-#include <stdio.h>
-#include <sal/macros.h>
-
-#include <systools/win32/uwinapi.h>
-#include <../tools/seterror.hxx>
-
-#ifdef DEBUG
-inline void OutputDebugStringFormat( LPCTSTR pFormat, ... )
-{
- _TCHAR buffer[1024];
- va_list args;
-
- va_start( args, pFormat );
- _vsntprintf( buffer, SAL_N_ELEMENTS(buffer), pFormat, args );
- OutputDebugString( buffer );
-}
-#else
-static inline void OutputDebugStringFormat( LPCTSTR, ... )
-{
-}
-#endif
-
-static std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& sProperty )
-{
- std::_tstring result;
- TCHAR szDummy[1] = TEXT("");
- DWORD nChars = 0;
-
- if ( MsiGetProperty( handle, sProperty.c_str(), szDummy, &nChars ) == ERROR_MORE_DATA )
- {
- DWORD nBytes = ++nChars * sizeof(TCHAR);
- LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(nBytes));
- ZeroMemory( buffer, nBytes );
- MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars);
- result = buffer;
- }
-
- return result;
-}
-
-static inline bool IsSetMsiProperty(MSIHANDLE handle, const std::_tstring& sProperty)
-{
- std::_tstring value = GetMsiProperty(handle, sProperty);
- return (value.length() > 0);
-}
-
-static inline void UnsetMsiProperty(MSIHANDLE handle, const std::_tstring& sProperty)
-{
- MsiSetProperty(handle, sProperty.c_str(), NULL);
-}
-
-static inline void SetMsiProperty(MSIHANDLE handle, const std::_tstring& sProperty)
-{
- MsiSetProperty(handle, sProperty.c_str(), TEXT("1"));
-}
-
-extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
-{
- std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
- std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\");
- std::_tstring sPattern = sResourceDir + TEXT("vcl*.res");
-
- WIN32_FIND_DATA aFindFileData;
- HANDLE hFind = FindFirstFile( sPattern.c_str(), &aFindFileData );
-
- if ( IsValidHandle(hFind) )
- {
- BOOL fSuccess = false;
- bool fRenameSucceeded;
-
- do
- {
- std::_tstring sResourceFile = sResourceDir + aFindFileData.cFileName;
- std::_tstring sIntermediate = sResourceFile + TEXT(".tmp");
-
- fRenameSucceeded = MoveFileExA( sResourceFile.c_str(), sIntermediate.c_str(), MOVEFILE_REPLACE_EXISTING );
- if ( fRenameSucceeded )
- {
- MoveFileExA( sIntermediate.c_str(), sResourceFile.c_str(), 0 );
- fSuccess = FindNextFile( hFind, &aFindFileData );
- }
- } while ( fSuccess && fRenameSucceeded );
-
- if ( !fRenameSucceeded )
- {
- MsiSetProperty(handle, TEXT("OFFICERUNS"), TEXT("1"));
- SetMsiErrorCode( MSI_ERROR_OFFICE_IS_RUNNING );
- }
-
- FindClose( hFind );
- }
-
- return ERROR_SUCCESS;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/customactions/languagepacks/exports.dxp b/setup_native/source/win32/customactions/languagepacks/exports.dxp
index c098a38..eb3e3c3 100644
--- a/setup_native/source/win32/customactions/languagepacks/exports.dxp
+++ b/setup_native/source/win32/customactions/languagepacks/exports.dxp
@@ -1,6 +1,5 @@
SetProductInstallationPath
RegisterLanguagePack
GetUserInstallMode
-IsOfficeRunning
RegisterExtensions
diff --git a/setup_native/source/win32/customactions/languagepacks/makefile.mk b/setup_native/source/win32/customactions/languagepacks/makefile.mk
index 94eab3a..f30ec08 100644
--- a/setup_native/source/win32/customactions/languagepacks/makefile.mk
+++ b/setup_native/source/win32/customactions/languagepacks/makefile.mk
@@ -49,8 +49,7 @@ CDEFS+=-Dnot_used_define_to_disable_pch
UWINAPILIB=
SLOFILES = $(SLO)$/lngpckinsthelper.obj \
- $(SLO)$/respintest.obj \
- $(SLO)$/checkrunningofficelanguagepack.obj
+ $(SLO)$/respintest.obj
STDSHL+= \
$(ADVAPI32LIB) \
diff --git a/setup_native/source/win32/customactions/patch/exports.dxp b/setup_native/source/win32/customactions/patch/exports.dxp
index dd5eb4d..360156e 100755
--- a/setup_native/source/win32/customactions/patch/exports.dxp
+++ b/setup_native/source/win32/customactions/patch/exports.dxp
@@ -3,7 +3,6 @@ UninstallPatchedFiles
GetUserInstallMode
SetProductInstallMode
ShutDownQuickstarter
-IsOfficeRunning
SetFeatureState
SetNewFeatureState
ShowOnlineUpdateDialog
diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
index c0c6fd2..7f83ca5 100644
--- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
+++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
@@ -576,46 +576,6 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle )
return ERROR_SUCCESS;
}
-extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
-{
- std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
- std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\");
- std::_tstring sPattern = sResourceDir + TEXT("vcl*.res");
-
- WIN32_FIND_DATA aFindFileData;
- HANDLE hFind = FindFirstFile( sPattern.c_str(), &aFindFileData );
-
- if ( IsValidHandle(hFind) )
- {
- BOOL fSuccess = false;
- bool fRenameSucceeded;
-
- do
- {
- std::_tstring sResourceFile = sResourceDir + aFindFileData.cFileName;
- std::_tstring sIntermediate = sResourceFile + TEXT(".tmp");
-
- fRenameSucceeded = MoveFileExA( sResourceFile.c_str(), sIntermediate.c_str(), MOVEFILE_REPLACE_EXISTING );
- if ( fRenameSucceeded )
- {
- MoveFileExA( sIntermediate.c_str(), sResourceFile.c_str(), 0 );
- fSuccess = FindNextFile( hFind, &aFindFileData );
- }
- } while ( fSuccess && fRenameSucceeded );
-
- if ( !fRenameSucceeded )
- {
- MsiSetProperty(handle, TEXT("OFFICERUNS"), TEXT("1"));
- SetMsiErrorCode( MSI_ERROR_OFFICE_IS_RUNNING );
- }
-
- FindClose( hFind );
- }
-
-
- return ERROR_SUCCESS;
-}
-
extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
{
diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
deleted file mode 100644
index c1319e2..0000000
--- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#define _WIN32_WINDOWS 0x0410
-
-#ifdef _MSC_VER
-#pragma warning(push, 1) /* disable warnings within system headers */
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <msiquery.h>
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#include <malloc.h>
-#include <assert.h>
-
-#ifdef UNICODE
-#define _UNICODE
-#define _tstring wstring
-#else
-#define _tstring string
-#endif
-#include <tchar.h>
-#include <string>
-#include <queue>
-#include <stdio.h>
-#include <sal/macros.h>
-
-// works with Windows XP as well as with Windows 7
-#define PSAPI_VERSION 1
-#include <psapi.h>
-
-#include <systools/win32/uwinapi.h>
-#include <../tools/seterror.hxx>
-
-#ifdef DEBUG
-inline void OutputDebugStringFormat( LPCTSTR pFormat, ... )
-{
- _TCHAR buffer[1024];
- va_list args;
-
- va_start( args, pFormat );
- _vsntprintf( buffer, SAL_N_ELEMENTS(buffer), pFormat, args );
- OutputDebugString( buffer );
-}
-#else
-static inline void OutputDebugStringFormat( LPCTSTR, ... )
-{
-}
-#endif
-
-static std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& sProperty )
-{
- std::_tstring result;
- TCHAR szDummy[1] = TEXT("");
- DWORD nChars = 0;
-
- if ( MsiGetProperty( handle, sProperty.c_str(), szDummy, &nChars ) == ERROR_MORE_DATA )
- {
- DWORD nBytes = ++nChars * sizeof(TCHAR);
- LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(nBytes));
- ZeroMemory( buffer, nBytes );
- MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars);
- result = buffer;
- }
-
- return result;
-}
-
-extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
-{
- std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
- // Property empty -> no office installed
- if ( sOfficeInstallPath.length() == 0 )
- return ERROR_SUCCESS;
-
- DWORD aProcesses[1024], cbNeeded, cProcesses; /* 1024 processes ought to be enough for anybody */
-
- if ( !EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) )
- return ERROR_INSTALL_FAILURE;
-
- cProcesses = cbNeeded / sizeof(DWORD);
-
- // Check if there is "soffice.bin" among the processes
- for ( unsigned int i = 0; i < cProcesses; i++ )
- {
- if( aProcesses[i] != 0 )
- {
- TCHAR szProcessName[MAX_PATH] = TEXT("<unknown>");
- HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, aProcesses[i] );
- if (NULL != hProcess )
- {
- HMODULE hMod;
- if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod), &cbNeeded) )
- GetModuleBaseName( hProcess, hMod, szProcessName, sizeof(szProcessName)/sizeof(TCHAR) );
- }
- CloseHandle( hProcess );
- if ( _tcscmp( szProcessName, TEXT("soffice.bin") ) == 0 )
- {
- MsiSetProperty( handle, TEXT("OFFICERUNS"), TEXT("1") );
- SetMsiErrorCode( MSI_ERROR_OFFICE_IS_RUNNING );
- }
- }
- }
- return ERROR_SUCCESS;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/customactions/shellextensions/exports.dxp b/setup_native/source/win32/customactions/shellextensions/exports.dxp
index 4e26119..474df76 100644
--- a/setup_native/source/win32/customactions/shellextensions/exports.dxp
+++ b/setup_native/source/win32/customactions/shellextensions/exports.dxp
@@ -16,6 +16,5 @@ ShowProperties
copyEditionData
RenamePrgFolder
RemovePrgFolder
-IsOfficeRunning
CheckPatchList
copyExtensionData
diff --git a/setup_native/source/win32/customactions/shellextensions/makefile.mk b/setup_native/source/win32/customactions/shellextensions/makefile.mk
index 3a15e35..fbebd6e 100644
--- a/setup_native/source/win32/customactions/shellextensions/makefile.mk
+++ b/setup_native/source/win32/customactions/shellextensions/makefile.mk
@@ -61,7 +61,6 @@ SLOFILES = \
$(SLO)$/registerextensions.obj \
$(SLO)$/copyeditiondata.obj \
$(SLO)$/vistaspecial.obj \
- $(SLO)$/checkrunningoffice.obj \
$(SLO)$/checkpatches.obj \
$(SLO)$/copyextensiondata.obj
More information about the Libreoffice-commits
mailing list