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_LATEX "tex.exe"
!define BIN_IMAGEMAGICK "convert.exe" !define BIN_IMAGEMAGICK "convert.exe"
!define BIN_GHOSTSCRIPT "gswin32c.exe" !define BIN_GHOSTSCRIPT "gswin32c.exe"
!define BIN_BIBTEXEDITOR "JabRef.exe"
#-------------------------------- #--------------------------------
# Custom NSIS plug-ins # Custom NSIS plug-ins

View File

@ -8,8 +8,13 @@ Detection of external component locations
Function SearchExternal Function SearchExternal
Call SearchLaTeX Call SearchLaTeX
Call SearchGhostscript Call SearchBibTeXEditor
Call SearchImageMagick !ifndef BUNDLE_IMAGEMAGICK
Call SearchImageMagick
!endif
!ifndef BUNDLE_GHOSTSCRIPT
Call SearchGhostscript
!endif
FunctionEnd FunctionEnd
#-------------------------------- #--------------------------------
@ -80,6 +85,11 @@ FunctionEnd
#-------------------------------- #--------------------------------
# Ghostscript # Ghostscript
!ifndef BUNDLE_GHOSTSCRIPT
!insertmacro GetParent
!insertmacro VersionCompare
Var Counter Var Counter
Var EnumReturn Var EnumReturn
Var CompareReturn Var CompareReturn
@ -146,9 +156,13 @@ Function SearchGhostscript
FunctionEnd FunctionEnd
!endif
#-------------------------------- #--------------------------------
# ImageMagick # ImageMagick
!ifndef BUNDLE_IMAGEMAGICK
Function SearchImageMagick Function SearchImageMagick
# Search where ImageMagick is installed # Search where ImageMagick is installed
@ -159,3 +173,23 @@ Function SearchImageMagick
${EndIf} ${EndIf}
FunctionEnd 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 # Include standard functions
!insertmacro GetParent
!insertmacro RefreshShellIcons !insertmacro RefreshShellIcons
!insertmacro VersionCompare
!insertmacro WordFind2X !insertmacro WordFind2X

View File

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

View File

@ -102,6 +102,9 @@ Section -Configure
${If} $PathImageMagick != "" ${If} $PathImageMagick != ""
StrCpy $PathPrefix "$PathPrefix;$PathImageMagick" StrCpy $PathPrefix "$PathPrefix;$PathImageMagick"
${EndIf} ${EndIf}
${If} $PathBibTeXEditor != ""
StrCpy $PathPrefix "$PathPrefix;$PathBibTeXEditor"
${EndIf}
FileWrite $DistFile '\path_prefix "$PathPrefix"$\r$\n' FileWrite $DistFile '\path_prefix "$PathPrefix"$\r$\n'