commit fe450c850c60a3087042ed74b4572798845fe6e1 Author: Uwe Stöhr <uwesto...@lyx.org> Date: Wed Dec 2 00:47:05 2015 +0100
installer: add up to date check for inkscape also fine-tune the conversion of wmf/emf images diff --git a/development/Win32/packaging/installer/include/detection.nsh b/development/Win32/packaging/installer/include/detection.nsh index b0d09b3..b0d4be7 100644 --- a/development/Win32/packaging/installer/include/detection.nsh +++ b/development/Win32/packaging/installer/include/detection.nsh @@ -162,8 +162,16 @@ Function MissingPrograms ${endif} # test if Inkscape is installed - ReadRegStr $SVGPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Inkscape" "InstallLocation" - + ReadRegStr $SVGPath HKLM "SOFTWARE\Classes\inkscape.svg\DefaultIcon" "" + ${if} $SVGPath != "" + StrCpy $SVGPath $SVGPath "" 1 # remove the leading quote + StrCpy $SVGPath $SVGPath -14 # # delete '\inkscape.exe"' + ${endif} + ${if} $SVGPath == "" + # this was used before Inkscape 0.91: + ReadRegStr $SVGPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Inkscape" "InstallLocation" + ${endif} + # test if Gnumeric is installed ReadRegStr $0 HKLM "Software\Classes\Applications\gnumeric.exe\shell\Open\command" "" ${if} $0 != "" diff --git a/development/Win32/packaging/installer/setup/configure.nsh b/development/Win32/packaging/installer/setup/configure.nsh index 10410ef..3b5a152 100644 --- a/development/Win32/packaging/installer/setup/configure.nsh +++ b/development/Win32/packaging/installer/setup/configure.nsh @@ -168,14 +168,17 @@ Section -Configure \format "pdf2" "pdf" "PDF (pdflatex)" "F" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n\ \format "pdf" "pdf" "PDF (ps2pdf)" "P" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n' - # for the wmf image type we need to specify a resolution for the converter - # otherwise 1024 dpi are used and eps2pdf takes ages - # 300 dpi are a good compromise for speed and size - FileWrite $R1 '\converter "wmf" "eps" "convert -density 300 $$$$i $$$$o" ""$\r$\n' + # if Inkscape is not available Imagemagick will be used to convert WMF/EMF files + # We need to specify a resolution for the converter otherwise 1024 dpi are used and + # eps2pdf takes ages. 300 dpi are a good compromise for speed and size. + ${if} $SVGPath == "" + FileWrite $R1 '\converter "wmf" "eps" "convert -density 300 $$$$i $$$$o" ""$\r$\n\ + \converter "emf" "eps" "convert -density 300 $$$$i $$$$o" ""$\r$\n' + ${endif} # if LilyPondPath was found - # we need to add these entris because python scripts can only be executed - # if the full path is given + # We need to add these entris because python scripts can only be executed + # if the full path is given. ${if} $LilyPondPath != "" FileWrite $R1 '\format "lilypond-book" "lytex" "LilyPond book (LaTeX)" "" "" "auto" "document,menu=export" ""$\r$\n\ \converter "lilypond-book" "pdflatex" "python \"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$$$i" ""$\r$\n\