mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
installer: add up to date check for inkscape
also fine-tune the conversion of wmf/emf images
This commit is contained in:
parent
3fc47f2a5c
commit
fe450c850c
@ -162,8 +162,16 @@ Function MissingPrograms
|
|||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
# test if Inkscape is installed
|
# 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
|
# test if Gnumeric is installed
|
||||||
ReadRegStr $0 HKLM "Software\Classes\Applications\gnumeric.exe\shell\Open\command" ""
|
ReadRegStr $0 HKLM "Software\Classes\Applications\gnumeric.exe\shell\Open\command" ""
|
||||||
${if} $0 != ""
|
${if} $0 != ""
|
||||||
|
@ -168,14 +168,17 @@ Section -Configure
|
|||||||
\format "pdf2" "pdf" "PDF (pdflatex)" "F" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n\
|
\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'
|
\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
|
# if Inkscape is not available Imagemagick will be used to convert WMF/EMF files
|
||||||
# otherwise 1024 dpi are used and eps2pdf takes ages
|
# We need to specify a resolution for the converter otherwise 1024 dpi are used and
|
||||||
# 300 dpi are a good compromise for speed and size
|
# 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} $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
|
# if LilyPondPath was found
|
||||||
# we need to add these entris because python scripts can only be executed
|
# We need to add these entris because python scripts can only be executed
|
||||||
# if the full path is given
|
# if the full path is given.
|
||||||
${if} $LilyPondPath != ""
|
${if} $LilyPondPath != ""
|
||||||
FileWrite $R1 '\format "lilypond-book" "lytex" "LilyPond book (LaTeX)" "" "" "auto" "document,menu=export" ""$\r$\n\
|
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\
|
\converter "lilypond-book" "pdflatex" "python \"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
|
||||||
|
Loading…
Reference in New Issue
Block a user