installer: updates for LyX 1.6.2 and some bug fixes and optimizations

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28668 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2009-03-02 02:38:12 +00:00
parent 9d133e4a54
commit d98a88e9c7
6 changed files with 55 additions and 18 deletions

View File

@ -2,6 +2,9 @@
- LyX 1.6.2 - LyX 1.6.2
- updated to Ghostscript 8.64 - updated to Ghostscript 8.64
- updated to ImageMagick 6.4.9-7 - updated to ImageMagick 6.4.9-7
- fix bug that some programs that were installed together with
LyX are not uninstalled together with LyX when the update
installer was used in the meantime
Version 4.17 Version 4.17

View File

@ -160,13 +160,14 @@ Function InstDirChange
StrCpy $INSTDIR_OLD $INSTDIR StrCpy $INSTDIR_OLD $INSTDIR
StrCpy $INSTDIR $INSTDIR_NEW StrCpy $INSTDIR $INSTDIR_NEW
# set new PATH_PREFIX in the file lyxrc.dist # set new path_prefix in the file lyxrc.dist
FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" a StrCpy $OldString "${PRODUCT_VERSION_OLD}"
FileRead $R1 $PathPrefix # the whole file content is now in $PathPrefix StrCpy $NewString "LyX ${PRODUCT_VERSION}"
${WordReplace} $PathPrefix "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $PathPrefix # following macro from TextFunc.nsh # calls Function ReplaceLineContent from LyXUtils.nsh
FileSeek $R1 0 # set file pointer to the beginning ${LineFind} "$INSTDIR\Resources\lyxrc.dist" "" "1:-1" "ReplaceLineContent"
FileWrite $R1 '$PathPrefix' # overwrite the existing path with the actual one # this is only needed for this installer version 4.18 (delete it afterwards!)
FileClose $R1 StrCpy $OldString "LyX 1.6.0"
${LineFind} "$INSTDIR\Resources\lyxrc.dist" "" "1:-1" "ReplaceLineContent"
# set the new path to the preferences file for all users # set the new path to the preferences file for all users
StrCpy $FileName "preferences" StrCpy $FileName "preferences"
@ -201,27 +202,57 @@ Function RefreshRegUninst
# Aspell # Aspell
ReadRegStr $0 SHCTX "Software\Aspell" "OnlyWithLyX" # special entry to test if it was installed with LyX ReadRegStr $0 SHCTX "Software\Aspell" "OnlyWithLyX" # special entry to test if it was installed with LyX
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}" ${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
# this is only needed for this installer version 4.18 (delete it afterwards!)
${orif} $0 == "Yes160"
WriteRegStr HKLM "SOFTWARE\Aspell" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" WriteRegStr HKLM "SOFTWARE\Aspell" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
${endif} ${endif}
# Metafile2eps
Var /GLOBAL RegLocation
StrCpy $RegLocation "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter"
ReadRegStr $0 SHCTX "$RegLocation" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
# this is only needed for this installer version 4.18 (delete it afterwards!)
${orif} $0 == "Yes160"
WriteRegStr HKLM "$RegLocation" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
# set the new path
ReadRegStr $0 HKLM "SOFTWARE\InkNote Selector" ""
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0 # macro from WordFunc.nsh
WriteRegStr HKLM "SOFTWARE\InkNote Selector" "" "$0"
ReadRegStr $0 HKLM "$RegLocation" "InstallLocation"
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
WriteRegStr HKLM "$RegLocation" "InstallLocation" "$0"
# this is only needed for this installer version 4.18 (delete it afterwards!)
ReadRegStr $0 HKLM "SOFTWARE\InkNote Selector" ""
${WordReplace} $0 "LyX 1.6.0" "LyX ${PRODUCT_VERSION}" "+" $0
WriteRegStr HKLM "SOFTWARE\InkNote Selector" "" "$0"
ReadRegStr $0 HKLM "$RegLocation" "InstallLocation"
${WordReplace} $0 "LyX 1.6.0" "LyX ${PRODUCT_VERSION}" "+" $0
WriteRegStr HKLM "$RegLocation" "InstallLocation" "$0"
${endif}
# MiKTeX # MiKTeX
ReadRegStr $0 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" ReadRegStr $0 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}" ${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
# this is only needed for this installer version 4.18 (delete it afterwards!)
${orif} $0 == "Yes160"
WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
${endif} ${endif}
# JabRef # JabRef
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}" ${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
# this is only needed for this installer version 4.18 (delete it afterwards!)
${orif} $0 == "Yes160"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
${endif} ${endif}
# Aiksaurus # Aiksaurus currently not needed
ReadRegStr $0 SHCTX "Software\Aiksaurus" "OnlyWithLyX" # special entry to test if it was installed with LyX #ReadRegStr $0 SHCTX "Software\Aiksaurus" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}" #${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
WriteRegStr HKLM "SOFTWARE\Aiksaurus" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # WriteRegStr HKLM "SOFTWARE\Aiksaurus" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
${endif} #${endif}
# ImageMagick # ImageMagick
ReadRegStr $0 SHCTX "Software\ImageMagick" "OnlyWithLyX" ReadRegStr $0 SHCTX "Software\ImageMagick" "OnlyWithLyX"

View File

@ -94,14 +94,16 @@ Function Metafile2eps
# restore DEVMODE with proper settings # restore DEVMODE with proper settings
ExecWait '$PrinterConf /q /Sr /n "Metafile to EPS Converter" /a "$INSTDIR\metafile2eps.dat" g' ExecWait '$PrinterConf /q /Sr /n "Metafile to EPS Converter" /a "$INSTDIR\metafile2eps.dat" g'
# register printer # register printer
WriteRegStr HKLM "Software\InkNote Selector" "" ${Metafile2epsDir} WriteRegStr HKLM "SOFTWARE\InkNote Selector" "" ${Metafile2epsDir}
# register Metafile2eps # register Metafile2eps
Var /GLOBAL RegLocation Var /GLOBAL RegLocation
StrCpy $RegLocation "Software\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter" StrCpy $RegLocation "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter"
WriteRegStr HKLM "$RegLocation" "InstallLocation" "${Metafile2epsDir}" WriteRegStr HKLM "$RegLocation" "InstallLocation" "${Metafile2epsDir}"
WriteRegStr HKLM "$RegLocation" "DisplayName" "Metafile to EPS Converter" WriteRegStr HKLM "$RegLocation" "DisplayName" "Metafile to EPS Converter"
WriteRegStr HKLM "$RegLocation" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX WriteRegStr HKLM "$RegLocation" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
StrCpy $WMFPath "${Metafile2epsDir}" StrCpy $WMFPath "${Metafile2epsDir}"
# delete temporary file
Delete "$INSTDIR\metafile2eps.dat"
${else} ${else}
# delete unnecessary files # delete unnecessary files
RMDir /r "${Metafile2epsDir}" RMDir /r "${Metafile2epsDir}"

View File

@ -55,6 +55,7 @@ Var MiKTeXVersion
Var MiKTeXUser Var MiKTeXUser
Var MiKTeXPath Var MiKTeXPath
Var MissedProg Var MissedProg
Var PathPrefix
Var PSVPath Var PSVPath
Var SVGPath Var SVGPath
Var WMFPath Var WMFPath

View File

@ -52,6 +52,7 @@ Var LaTeXName
Var MiKTeXVersion Var MiKTeXVersion
Var MiKTeXUser Var MiKTeXUser
Var MissedProg Var MissedProg
Var PathPrefix
Var PSVPath Var PSVPath
Var State Var State
Var SVGPath Var SVGPath

View File

@ -20,7 +20,6 @@ Var LatexPath
Var MiKTeXInstalled Var MiKTeXInstalled
Var NewString Var NewString
Var OldString Var OldString
Var PathPrefix
Var Pointer Var Pointer
Var PrinterConf Var PrinterConf
Var ProductRootKey Var ProductRootKey