-/*
+/*
detection.nsh
Function SearchExternal
Call LaTeXActions # function from LaTeX.nsh
Call MissingPrograms
+ SetRegView ${APP_VERSION_ACHITECHTURE}
Call FindDictionaries # function from dictionaries.nsh
FunctionEnd
ReadRegStr $ImageEditorPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1" "InstallLocation"
${if} $ImageEditorPath != ""
StrCpy $ImageEditorPath "$ImageEditorPathbin" # add the bin folder
+ StrCpy $ImageEditor "Gimp"
${endif}
${if} ${RunningX64}
SetRegView 32
${else}
StrCpy $ImageEditorPath $0
${endif}
+ StrCpy $ImageEditor "Photoshop"
${endif}
-
+ # check for Krita
+ ${if} ${RunningX64}
+ SetRegView 64
+ ${endif}
+ ReadRegStr $0 HKLM "SOFTWARE\Classes\Krita.Document\shell\open\command" ""
+ ${if} $0 != ""
+ StrCpy $0 "$0" -16 # delete '\krita.exe" "%1"'
+ StrCpy $0 $0 "" 1 # remove the leading quote
+ ${if} $ImageEditorPath != ""
+ StrCpy $ImageEditorPath "$ImageEditorPath;$0"
+ ${else}
+ StrCpy $ImageEditorPath $0
+ ${endif}
+ StrCpy $ImageEditor "Krita"
+ ${endif}
+ ${if} ${RunningX64}
+ SetRegView 32
+ ${endif}
+
# test if and where the BibTeX-editor JabRef is installed
- ReadRegStr $PathBibTeXEditor HKCU "Software\JabRef" "Path"
+ ${if} ${RunningX64}
+ SetRegView 64
+ ${endif}
+ ReadRegStr $PathBibTeXEditor HKLM "SOFTWARE\JabRef" "Path"
+ # if not installed as admin, check for user
${if} $PathBibTeXEditor == ""
- ReadRegStr $PathBibTeXEditor HKLM "Software\JabRef" "Path"
+ ReadRegStr $PathBibTeXEditor HKCU "Software\JabRef" "Path"
+ ${endif}
+ ${if} ${RunningX64}
+ SetRegView 32
${endif}
${ifnot} ${FileExists} "$PathBibTeXEditor\${BIN_BIBTEXEDITOR}"
${else}
StrCpy $JabRefInstalled == "Yes"
${endif}
-
+
# test if and where LilyPond is installed
ReadRegStr $LilyPondPath HKLM "Software\LilyPond" "Install_Dir"
${if} $LilyPondPath != ""
StrCpy $LilyPondPath "$LilyPondPath\usr\bin" # add "\usr\bin"
${endif}
-
+
# test if Inkscape is installed
ReadRegStr $SVGPath HKLM "SOFTWARE\Classes\inkscape.svg\DefaultIcon" ""
${if} $SVGPath != ""
StrCpy $GnumericPath $0
${endif}
+ # test if Pandoc is installed
+ # HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\John MacFarlane\Pandoc
+ ${if} ${RunningX64}
+ SetRegView 64 # the PATH is in the 64bit registry section
+ ${endif}
+ # check for the path to the pandoc.exe in Window's PATH variable
+ StrCpy $5 ""
+ StrCpy $Search "pandoc"
+ ReadRegStr $String HKCU "Environment" "PATH"
+ !insertmacro PATHCheck $5 "pandoc.exe" # macro from LyXUtils.nsh
+ # if it is not in the user-specific PATH it might be in the global PATH
+ ${if} $5 == "False"
+ ReadRegStr $String HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
+ !insertmacro PATHCheck $5 "pandoc.exe" # macro from LyXUtils.nsh
+ ${endif}
+ SetRegView 32
+ ${if} $5 != "False"
+ StrCpy $PandocPath $5
+ ${endif}
+
FunctionEnd
# ---------------------------------------