]> git.lyx.org Git - features.git/commitdiff
detect JabRef and put in path_prefix (for new menu item to edit BibTeX database)
authorJoost Verburg <joostverburg@users.sourceforge.net>
Fri, 2 May 2008 15:53:14 +0000 (15:53 +0000)
committerJoost Verburg <joostverburg@users.sourceforge.net>
Fri, 2 May 2008 15:53:14 +0000 (15:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24582 a592a061-630c-0410-9148-cb99ea01b6c8

development/Win32/packaging/installer/include/declarations.nsh
development/Win32/packaging/installer/include/detection.nsh
development/Win32/packaging/installer/include/nsis.nsh
development/Win32/packaging/installer/include/variables.nsh
development/Win32/packaging/installer/setup/configure.nsh

index 4f00631d1f4efad5f894ba1c2eec254d94ccba33..428141c8a2625283cd1563e1212cc858686b51d6 100644 (file)
@@ -146,6 +146,7 @@ SetCompressor /SOLID lzma
 !define BIN_LATEX "tex.exe"
 !define BIN_IMAGEMAGICK "convert.exe"
 !define BIN_GHOSTSCRIPT "gswin32c.exe"
+!define BIN_BIBTEXEDITOR "JabRef.exe"
 
 #--------------------------------
 # Custom NSIS plug-ins
index dcecc23e48ef454168f756dd0f9c4b9430761888..1019c7e222cb14b439cb8c90ae8c296ba1f2d8c9 100644 (file)
@@ -8,8 +8,13 @@ Detection of external component locations
 
 Function SearchExternal
   Call SearchLaTeX
-  Call SearchGhostscript
-  Call SearchImageMagick
+  Call SearchBibTeXEditor
+  !ifndef BUNDLE_IMAGEMAGICK
+    Call SearchImageMagick
+  !endif
+  !ifndef BUNDLE_GHOSTSCRIPT
+    Call SearchGhostscript
+  !endif
 FunctionEnd
 
 #--------------------------------
@@ -80,6 +85,11 @@ FunctionEnd
 #--------------------------------
 # Ghostscript
 
+!ifndef BUNDLE_GHOSTSCRIPT
+
+!insertmacro GetParent
+!insertmacro VersionCompare
+
 Var Counter
 Var EnumReturn
 Var CompareReturn
@@ -146,9 +156,13 @@ Function SearchGhostscript
   
 FunctionEnd
 
+!endif
+
 #--------------------------------
 # ImageMagick
 
+!ifndef BUNDLE_IMAGEMAGICK
+
 Function SearchImageMagick
 
   # Search where ImageMagick is installed
@@ -159,3 +173,23 @@ Function SearchImageMagick
   ${EndIf}
 
 FunctionEnd
+
+!endif
+
+#--------------------------------
+# JabRef
+
+Function SearchBibTeXEditor
+
+  # Search where JabRef is installed
+  ReadRegStr $PathBibTeXEditor HKCU "Software\JabRef" "Path"
+
+  ${IfNot} ${FileExists} "$PathBibTeXEditor\${BIN_BIBTEXEDITOR}"
+    ReadRegStr $PathBibTeXEditor HKLM "Software\JabRef" "Path"
+  ${EndIf}
+
+  ${IfNot} ${FileExists} "$PathBibTeXEditor\${BIN_BIBTEXEDITOR}"
+    StrCpy $PathBibTeXEditor ""  
+  ${EndIf}
+
+FunctionEnd
index 7cd2fe0f0ec43283d8f2338a62835b3a262b6bd0..b286d6eb4a8770504031abb98e798e32fa1c59b0 100644 (file)
@@ -38,7 +38,5 @@ Configuration of standard NSIS header files
 #--------------------------------\r
 # Include standard functions\r
 \r
-!insertmacro GetParent\r
 !insertmacro RefreshShellIcons\r
-!insertmacro VersionCompare\r
 !insertmacro WordFind2X\r
index 9c254b1ef276253819b5a597ef7f9ee94a37aa55..15e0c4547c338df8f4d5beffb44433908518aa3d 100644 (file)
@@ -10,6 +10,7 @@ Var PathLaTeX
 Var PathLaTeXLocal\r
 Var PathImageMagick\r
 Var PathGhostscript\r
+Var PathBibTeXEditor\r
 \r
 Var SetupLaTeX\r
 Var SizeLaTeX\r
index 58e281cbcba89f12aa22ddedd50156b2d7f007fc..e6e908be7dc415e5fe7d20391c26ba4fdbd7c747 100644 (file)
@@ -102,6 +102,9 @@ Section -Configure
   ${If} $PathImageMagick != ""
     StrCpy $PathPrefix "$PathPrefix;$PathImageMagick"
   ${EndIf}
+  ${If} $PathBibTeXEditor != ""
+    StrCpy $PathPrefix "$PathPrefix;$PathBibTeXEditor"
+  ${EndIf}  
 
   FileWrite $DistFile '\path_prefix "$PathPrefix"$\r$\n'