From 7567a40158b1d9f21d2efbd3f95c3979697fd8c8 Mon Sep 17 00:00:00 2001 From: RKrom Date: Thu, 19 Aug 2010 07:34:41 +0000 Subject: [PATCH] Merge from BRANCH: Added check for Microsoft Office Document Imaging (MODI), when this is not installed the OCR plug-in won't be available for installation. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@828 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/releases/innosetup/setup.iss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss index 3225774a7..3b4b045d2 100644 --- a/Greenshot/releases/innosetup/setup.iss +++ b/Greenshot/releases/innosetup/setup.iss @@ -106,7 +106,7 @@ de.ocr=OCR Plugin (braucht Microsoft Office 2003 oder 2007) nl.ocr=OCR Plugin (heeft Microsoft Office 2003 of 2007 nodig) [Components] Name: "plugins"; Description: "Plugins"; Types: Full -Name: "plugins\ocr"; Description: {cm:ocr}; Types: Full +Name: "plugins\ocr"; Description: {cm:ocr}; Types: Full; Check: CheckMODI ;Name: "plugins\jira"; Description: "JIRA Plugin"; Types: Full Name: "plugins\titlefix"; Description: {cm:titlefix}; Types: Full ;Name: "plugins\flickr"; Description: "Flickr Plugin"; Types: Full @@ -120,6 +120,11 @@ external 'IssFindModule@files:IssProc.dll stdcall setuponly'; function IssFindModuleU(hWnd: Integer; Modulename: PAnsiChar; Language: PAnsiChar; Silent: Boolean; CanIgnore: Boolean ): Integer; external 'IssFindModule@{app}\IssProc.dll stdcall uninstallonly'; +function CheckMODI(): Boolean; +begin + Result := RegKeyExists(HKEY_CURRENT_USER, 'Software\Microsoft\Office\11.0\MODI') or RegKeyExists(HKEY_CURRENT_USER, 'Software\Microsoft\Office\12.0\MODI'); +end; + // Don't install as long as Greenshot is running function NextButtonClick(CurPage: Integer): Boolean; var