installer fix two bugs in the Update installer

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@20923 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2007-10-11 22:27:11 +00:00
parent 1508a0ea8f
commit 12ecde9bb1
3 changed files with 26 additions and 25 deletions

View File

@ -226,50 +226,52 @@ Function RefreshRegUninst
# ImageMagick
ReadRegStr $0 SHCTX "Software\ImageMagick" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
# set the new path
WriteRegStr HKLM "SOFTWARE\ImageMagick" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
ReadRegStr $0 HKLM "Software\ImageMagick\Current" "BinPath"
# 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"
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"
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"
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"
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "LibPath"
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "LibPath" "$0"
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "Version" "${ImageMagickVersion}"
${COPY_REGISTRY_KEY} HKLM "Software\ImageMagick\${ImageMagickVersion_Old}" \
HKLM "Software\ImageMagick\${ImageMagickVersion}" # macro from registry.nsh
DeleteRegKey HKLM "Software\ImageMagick\${ImageMagickVersion_Old}"
# set the new path
ReadRegStr $0 HKLM "Software\ImageMagick\${ImageMagickVersion}\Q:16" "BinPath"
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "BinPath"
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "BinPath" "$0"
ReadRegStr $0 HKLM "Software\ImageMagick\${ImageMagickVersion}\Q:16" "CoderModulesPath"
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}\Q:16" "+" $0
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "CoderModulesPath" "$0"
ReadRegStr $0 HKLM "Software\ImageMagick\${ImageMagickVersion}\Q:16" "ConfigurePath"
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}\Q:16" "ConfigurePath" "$0"
ReadRegStr $0 HKLM "Software\ImageMagick\${ImageMagickVersion}\Q:16" "FilterModulesPath"
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}\Q:16" "FilterModulesPath" "$0"
ReadRegStr $0 HKLM "Software\ImageMagick\${ImageMagickVersion}\Q:16" "LibPath"
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}\Q:16" "LibPath" "$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

View File

@ -80,8 +80,6 @@ Var UserName
!insertmacro LineFind
!include "WordFunc.nsh"
!insertmacro WordReplace
!include "registry.nsh"
!insertmacro COPY_REGISTRY_KEY
# Set of various macros and functions
!include "LyXUtils.nsh"

View File

@ -44,6 +44,7 @@ BrandingText "LyXWinInstaller v3.20 - ${INSTALLER_VERSION}"
!define PRODUCT_VERSION_SHORT_OLD "151"
!define JabRefVersion "2.2" # could be an older version
!define ImageMagickVersion_Old "6.3.5" # could be an older version
!define GhostscriptVersion_Old "8.60"
!define MiKTeXDeliveredVersion "2.6" # could be an older version
!endif