]> git.lyx.org Git - lyx.git/blobdiff - development/Win32/packaging/AltInstaller/InstallActions-update.nsh
installer fix two bugs in the Update installer
[lyx.git] / development / Win32 / packaging / AltInstaller / InstallActions-update.nsh
index 1f87218178fe53a208e8ffde1174be1d195a8ed1..3a13131c88eb7fc01e682b298c4387e7c67f5e5f 100644 (file)
@@ -101,7 +101,7 @@ Section "-Installation actions" SecInstallation
   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 == ""
@@ -227,12 +227,51 @@ Function RefreshRegUninst
   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