From: Joost Verburg Date: Fri, 2 May 2008 15:53:14 +0000 (+0000) Subject: detect JabRef and put in path_prefix (for new menu item to edit BibTeX database) X-Git-Tag: 1.6.10~4926 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=96956421bbce481bc08286c73b042894215f757c;p=features.git detect JabRef and put in path_prefix (for new menu item to edit BibTeX database) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24582 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/Win32/packaging/installer/include/declarations.nsh b/development/Win32/packaging/installer/include/declarations.nsh index 4f00631d1f..428141c8a2 100644 --- a/development/Win32/packaging/installer/include/declarations.nsh +++ b/development/Win32/packaging/installer/include/declarations.nsh @@ -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 diff --git a/development/Win32/packaging/installer/include/detection.nsh b/development/Win32/packaging/installer/include/detection.nsh index dcecc23e48..1019c7e222 100644 --- a/development/Win32/packaging/installer/include/detection.nsh +++ b/development/Win32/packaging/installer/include/detection.nsh @@ -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 diff --git a/development/Win32/packaging/installer/include/nsis.nsh b/development/Win32/packaging/installer/include/nsis.nsh index 7cd2fe0f0e..b286d6eb4a 100644 --- a/development/Win32/packaging/installer/include/nsis.nsh +++ b/development/Win32/packaging/installer/include/nsis.nsh @@ -38,7 +38,5 @@ Configuration of standard NSIS header files #-------------------------------- # Include standard functions -!insertmacro GetParent !insertmacro RefreshShellIcons -!insertmacro VersionCompare !insertmacro WordFind2X diff --git a/development/Win32/packaging/installer/include/variables.nsh b/development/Win32/packaging/installer/include/variables.nsh index 9c254b1ef2..15e0c4547c 100644 --- a/development/Win32/packaging/installer/include/variables.nsh +++ b/development/Win32/packaging/installer/include/variables.nsh @@ -10,6 +10,7 @@ Var PathLaTeX Var PathLaTeXLocal Var PathImageMagick Var PathGhostscript +Var PathBibTeXEditor Var SetupLaTeX Var SizeLaTeX diff --git a/development/Win32/packaging/installer/setup/configure.nsh b/development/Win32/packaging/installer/setup/configure.nsh index 58e281cbcb..e6e908be7d 100644 --- a/development/Win32/packaging/installer/setup/configure.nsh +++ b/development/Win32/packaging/installer/setup/configure.nsh @@ -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'