From: Vincent van Ravesteijn Date: Sun, 13 May 2012 15:28:37 +0000 (+0200) Subject: Fix bug #7870: Win installer: check for Gnumeric X-Git-Tag: 2.0.4~84 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8c9da0c2d62eb0f4a95b13c316b159e97c47951c;p=features.git Fix bug #7870: Win installer: check for Gnumeric Gnumeric is needed for the spreadsheet external inset template. --- diff --git a/development/Win32/packaging/installer/include/detection.nsh b/development/Win32/packaging/installer/include/detection.nsh index af58ef900c..b520c46d5d 100644 --- a/development/Win32/packaging/installer/include/detection.nsh +++ b/development/Win32/packaging/installer/include/detection.nsh @@ -9,6 +9,7 @@ Detection of external component locations Function SearchExternal Call SearchLaTeX Call SearchBibTeXEditor + Call SearchGnumeric FunctionEnd #-------------------------------- @@ -111,3 +112,26 @@ Function SearchBibTeXEditor ${EndIf} FunctionEnd + + +#-------------------------------- +# Gnumeric + +Function SearchGnumeric + + ReadRegStr $PathGnumeric HKCU "Software\GNOME\Gnumeric" "Path" + + ${IfNot} ${FileExists} "$PathGnumeric\gnumeric.exe" + ReadRegStr $PathGnumeric HKLM "Software\GNOME\Gnumeric" "Path" + ${EndIf} + + ${IfNot} ${FileExists} "$PathGnumeric\gnumeric.exe" + ReadRegStr $0 HKLM "Software\Classes\Applications\gnumeric.exe\shell\Open\command" "" + ${If} $0 != "" + StrCpy $0 $0 -18 # remove \"gnumeric.exe" "%1"\" + StrCpy $PathGnumeric $0 + ${EndIf} + ${EndIf} + +FunctionEnd + diff --git a/development/Win32/packaging/installer/include/variables.nsh b/development/Win32/packaging/installer/include/variables.nsh index e33b1da8de..821473b63b 100644 --- a/development/Win32/packaging/installer/include/variables.nsh +++ b/development/Win32/packaging/installer/include/variables.nsh @@ -9,6 +9,7 @@ Variables that are shared between multiple files Var PathLaTeX Var PathLaTeXLocal Var PathBibTeXEditor +Var PathGnumeric Var SetupLaTeX Var SizeLaTeX diff --git a/development/Win32/packaging/installer/setup/configure.nsh b/development/Win32/packaging/installer/setup/configure.nsh index 8bc5088df9..a134b1a736 100644 --- a/development/Win32/packaging/installer/setup/configure.nsh +++ b/development/Win32/packaging/installer/setup/configure.nsh @@ -93,7 +93,10 @@ Section -Configure ${EndIf} ${If} $PathBibTeXEditor != "" StrCpy $PathPrefix "$PathPrefix;$PathBibTeXEditor" - ${EndIf} + ${EndIf} + ${If} $PathGnumeric != "" + StrCpy $PathPrefix "$PathPrefix;$PathGnumeric" + ${EndIf} FileWrite $DistFile '\path_prefix "$PathPrefix"$\r$\n' diff --git a/status.20x b/status.20x index 05f8db7559..e9f97c6985 100644 --- a/status.20x +++ b/status.20x @@ -242,3 +242,6 @@ What's new - Remove a temporary log file from the user directory after reconfigure. +- Windows installer now detects Gnumeric which is needed for the + spreadsheet external inset template (bug 7870). +