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
This commit is contained in:
Joost Verburg 2008-05-02 15:53:14 +00:00
parent aef7b07571
commit 96956421bb
5 changed files with 41 additions and 4 deletions

View 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

View File

@ -8,8 +8,13 @@ Detection of external component locations
Function SearchExternal
Call SearchLaTeX
Call SearchGhostscript
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

View File

@ -38,7 +38,5 @@ Configuration of standard NSIS header files
#--------------------------------
# Include standard functions
!insertmacro GetParent
!insertmacro RefreshShellIcons
!insertmacro VersionCompare
!insertmacro WordFind2X

View File

@ -10,6 +10,7 @@ Var PathLaTeX
Var PathLaTeXLocal
Var PathImageMagick
Var PathGhostscript
Var PathBibTeXEditor
Var SetupLaTeX
Var SizeLaTeX

View 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'