Delete "$INSTDIR\Resources\lyxrc.dist"
FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" w
# set some general things
- FileWrite $R1 '\screen_zoom "120"$\r$\n'
+ FileWrite $R1 '\screen_zoom "120"$\r$\n\
+ \accept_compound true$\r$\n'
${if} "$PathPrefix" != ""
FileWrite $R1 '\path_prefix "$PathPrefix"$\r$\n'
${endif}
${if} $SVGPath != ""
FileWrite $R1 '\format "svg" "svg" "SVG" "" "inkscape --file=$$$$i" "inkscape --file=$$$$i" "vector"$\r$\n\
\converter "svg" "png" "inkscape --without-gui --file=$$$$i --export-png=$$$$o" ""$\r$\n\
- \converter "svg" "pdf" "inkscape --file=$$$$i --export-area-drawing --without-gui --export-pdf=$$$$o" ""$\r$\n\
- \converter "svg" "pdf2" "inkscape --file=$$$$i --export-area-drawing --without-gui --export-pdf=$$$$o" ""'
+ \converter "svg" "pdf" "inkscape --file=$$$$p/$$$$i --export-area-drawing --without-gui --export-pdf=$$$$p/$$$$o" ""$\r$\n\
+ \converter "svg" "eps" "inkscape --file=$$$$p/$$$$i --export-area-drawing --without-gui --export-eps=$$$$p/$$$$o" ""'
${endif}
FileClose $R1
IfErrors 0 +2
WriteRegStr HKLM "SOFTWARE\Aspell" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
${endif}
- # install eLyXer as Python module
- Call eLyXer # function from InstallThirdPartyProgs.nsh
+ # eLyXer
+ # first test if Python is installed
+ ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\2.5\InstallPath" ""
+ ${if} $PythonPath == ""
+ ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\2.6\InstallPath" ""
+ ${endif}
+ ${if} $PythonPath == ""
+ ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\3.0\InstallPath" ""
+ ${endif}
+ ${if} $PythonPath == ""
+ ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\3.1\InstallPath" ""
+ ${endif}
+ ${if} $PythonPath != ""
+ StrCpy $PythonPath $PythonPath -1 # remove the "\" at the end
+ ${endif}
+ # now install eLyXer as Python module
+ ${if} $PythonPath != ""
+ # a Python module cannot simply started with
+ # ExecWait '$PythonPath\python.exe "$INSTDIR\bin\setup.py" install'
+ # therefore run a script
+ StrCpy $1 $INSTDIR 2 # get drive letter
+ FileOpen $R1 "$INSTDIR\bin\eLyXer.bat" w
+ FileWrite $R1 '$1$\r$\n\
+ cd "$INSTDIR\bin"$\r$\n\
+ "$PythonPath\python.exe" setup.py install'
+ FileClose $R1
+ ExecWait '"$INSTDIR\bin\eLyXer.bat"'
+ Delete "$INSTDIR\bin\eLyXer.bat"
+ ${else}
+ ExecWait '"$INSTDIR\bin\python.exe" "$INSTDIR\bin\setup.py" install'
+ ${endif}
# Metafile2eps
Var /GLOBAL RegLocation
# Function to configure LyX
!include "ConfigLyX.nsh"
-# Function to configure needed third-party programs
+# Functions to configure needed third-party programs
!include "InstallThirdPartyProgs.nsh"
# Function for page to install Aspell dictionaries
# Function to configure LyX
!include "ConfigLyX.nsh"
-# Function to configure needed third-party programs
+# Functions to configure needed third-party programs
!include "InstallThirdPartyProgs.nsh"
# Function for page to install Aspell dictionaries
# test if Python is installed
# only use an existing python when it is version 2.5 or newer because some
- # Compaq and Dell PCs were delivered with outdated Python interpreters
+ # older Compaq and Dell PCs were delivered with outdated Python interpreters
ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\2.5\InstallPath" ""
${if} $PythonPath == ""
ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\2.6\InstallPath" ""