WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
# test if Python is installed
- # only use an existing python when it is version 2.5 because many Compaq and Dell PC are delivered
+ # only use an existing python when it is version 2.5 because some Compaq and Dell PC are delivered
# with outdated Python interpreters
ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\2.5\InstallPath" ""
${if} $PythonPath == ""
StrCpy $FileName "session"
Call CheckAppPathPreferences # function from LyXUtils.nsh
+ # set the new path to the lyx.bat file
+ # following macro from TextFunc.nsh # calls Function ReplaceLineContent from LyXUtils.nsh
+ ${LineFind} "$INSTDIR\bin\lyx.bat" "" "1:-1" "ReplaceLineContent"
+
# set new path to ImageMagick
ReadRegStr $ImageMagickPath SHCTX "SOFTWARE\Classes\Applications" "AutoRun"
${if} $ImageMagickPath != ""
ReadRegStr $0 SHCTX "Software\ImageMagick" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
WriteRegStr HKLM "SOFTWARE\ImageMagick" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
+ # set the new path
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "BinPath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0 # macro from WordFunc.nsh
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "BinPath" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "CoderModulesPath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "CoderModulesPath" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "ConfigurePath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "ConfigurePath" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "FilterModulesPath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "FilterModulesPath" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "LibPath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "LibPath" "$0"
+ # set the new path
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "BinPath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "BinPath" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "CoderModulesPath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "CoderModulesPath" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "ConfigurePath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "ConfigurePath" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "FilterModulesPath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "FilterModulesPath" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "LibPath"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "LibPath" "$0"
${endif}
# Ghostscript and GSview
ReadRegStr $0 HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
- WriteRegStr HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
+ WriteRegStr HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
+ # set the new path
+ ReadRegStr $0 HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion_Old}" "GS_DLL"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion_Old}" "GS_DLL" "$0"
+ ReadRegStr $0 HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion_Old}" "GS_LIB"
+ ${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
+ WriteRegStr HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion_Old}" "GS_LIB" "$0"
${endif}
FunctionEnd