]> git.lyx.org Git - features.git/commitdiff
Fix bug #7870: Win installer: check for Gnumeric
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 13 May 2012 15:28:37 +0000 (17:28 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 13 May 2012 18:59:15 +0000 (20:59 +0200)
Gnumeric is needed for the spreadsheet external inset template.

development/Win32/packaging/installer/include/detection.nsh
development/Win32/packaging/installer/include/variables.nsh
development/Win32/packaging/installer/setup/configure.nsh
status.20x

index af58ef900c09cdbac912dd99a48f519d85f43580..b520c46d5d068445f00e3300ab8dad801a371791 100644 (file)
@@ -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
+
index e33b1da8deb64142d40ebbe367a8a9fd491f0205..821473b63bfa3629b55b1786e519c8d52f264ac4 100644 (file)
@@ -9,6 +9,7 @@ Variables that are shared between multiple files
 Var PathLaTeX
 Var PathLaTeXLocal
 Var PathBibTeXEditor
+Var PathGnumeric
 
 Var SetupLaTeX
 Var SizeLaTeX
index 8bc5088df9acc16423080d5321a6c308ccc18383..a134b1a73613bdadad264268c7db97f7b2239a94 100644 (file)
@@ -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'
 
index 05f8db7559b2ccc749e9005e8e12a3332448bfa6..e9f97c6985e2ef121bff6913050fbc7a35840e1a 100644 (file)
@@ -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).
+