2007-05-01 17:55:54 +00:00
|
|
|
# this file contains the main installer section
|
2007-04-20 01:15:47 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# The '-' makes the section invisible.
|
2007-04-19 00:55:52 +00:00
|
|
|
Section "-Installation actions" SecInstallation
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# dummy actions to avoid NSIS warnings
|
2007-04-30 00:55:50 +00:00
|
|
|
StrCpy $AspellBaseReg ""
|
2007-05-02 23:06:01 +00:00
|
|
|
StrCpy $AspellMessage ""
|
|
|
|
StrCpy $DictCode ""
|
2007-04-30 00:55:50 +00:00
|
|
|
StrCpy $LangCode ""
|
|
|
|
StrCpy $LangCodeSys ""
|
|
|
|
StrCpy $LangName ""
|
|
|
|
StrCpy $LangNameSys ""
|
2007-05-02 23:06:01 +00:00
|
|
|
StrCpy $RunNumber ""
|
2007-04-30 00:55:50 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# init, this variable is later only set to a value in function InstDirChange
|
|
|
|
# when the $INSTDIR is changed
|
2007-05-01 14:21:21 +00:00
|
|
|
StrCpy $INSTDIR_OLD ""
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# extract modified files
|
|
|
|
Call UpdateModifiedFiles # macro from Updated.nsh
|
2007-04-19 00:55:52 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# delete files
|
|
|
|
Call DeleteFiles # macro from Deleted.nsh
|
2007-04-19 00:55:52 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# delete old uninstaller
|
2007-04-19 00:55:52 +00:00
|
|
|
Delete "${PRODUCT_UNINSTALL_EXE}"
|
2007-04-30 00:55:50 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# delete old start menu folder
|
2007-04-19 00:55:52 +00:00
|
|
|
ReadRegStr $0 SHCTX "${PRODUCT_UNINST_KEY_OLD}" "StartMenu"
|
|
|
|
RMDir /r $0
|
2007-05-01 17:55:54 +00:00
|
|
|
# delete desktop icon
|
2007-04-19 00:55:52 +00:00
|
|
|
Delete "$DESKTOP\${PRODUCT_VERSION_OLD}.lnk"
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# delete old registry entries
|
2007-04-30 00:55:50 +00:00
|
|
|
${if} $CreateFileAssociations == "true"
|
|
|
|
DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
|
2007-05-01 17:55:54 +00:00
|
|
|
# remove file extension .lyx
|
2007-05-01 14:21:21 +00:00
|
|
|
ReadRegStr $R0 SHCTX "Software\Classes\${PRODUCT_EXT}" ""
|
|
|
|
${if} $R0 == "${PRODUCT_REGNAME}"
|
|
|
|
DeleteRegKey SHCTX "Software\Classes\${PRODUCT_EXT}"
|
|
|
|
DeleteRegKey SHCTX "Software\Classes\${PRODUCT_REGNAME}"
|
|
|
|
${endif}
|
2007-04-30 00:55:50 +00:00
|
|
|
${endif}
|
2007-04-19 00:55:52 +00:00
|
|
|
DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY_OLD}"
|
|
|
|
DeleteRegKey HKCR "Applications\lyx.bat"
|
|
|
|
DeleteRegKey HKCR "${PRODUCT_NAME}"
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# determine the new name of the install location,
|
|
|
|
# Change the old install path to the new one (currently only when the user
|
|
|
|
# has used the default path settings of the previous LyX-version)
|
2007-04-30 00:55:50 +00:00
|
|
|
Call InstDirChange
|
2007-04-19 00:55:52 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# Refresh registry setings for the uninstaller
|
2007-04-30 00:55:50 +00:00
|
|
|
Call RefreshRegUninst
|
2007-04-19 00:55:52 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# register LyX
|
2007-04-30 00:55:50 +00:00
|
|
|
${if} $CreateFileAssociations == "true"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "" "${PRODUCT_EXE}"
|
|
|
|
${endif}
|
2007-04-19 00:55:52 +00:00
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "RootKey" "$ProductRootKey"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "LyX ${PRODUCT_VERSION}"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" "${PRODUCT_UNINSTALL_EXE}"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "${PRODUCT_EXE}"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu" "$SMPROGRAMS\$StartmenuFolder"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_INFO_URL}"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_ABOUT_URL}"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "Publisher" "LyX Team"
|
|
|
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "HelpLink" "${PRODUCT_HELP_LINK}"
|
|
|
|
WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" 0x00000001
|
|
|
|
WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" 0x00000001
|
2007-04-30 00:55:50 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# create start menu entry
|
2007-04-19 00:55:52 +00:00
|
|
|
SetOutPath "$INSTDIR\bin"
|
|
|
|
CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
|
|
|
|
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\${PRODUCT_NAME}.lnk" "${PRODUCT_BAT}" "" "${PRODUCT_EXE}"
|
|
|
|
SetOutPath "$INSTDIR"
|
|
|
|
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Uninstall.lnk" "${PRODUCT_UNINSTALL_EXE}"
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# create desktop icon
|
2007-04-19 00:55:52 +00:00
|
|
|
${if} $CreateDesktopIcon == "true"
|
|
|
|
SetOutPath "$INSTDIR\bin"
|
|
|
|
CreateShortCut "$DESKTOP\LyX ${PRODUCT_VERSION}.lnk" "${PRODUCT_BAT}" "" "${PRODUCT_EXE}"
|
|
|
|
${endif}
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# register the extension .lyx
|
2007-04-30 00:55:50 +00:00
|
|
|
${if} $CreateFileAssociations == "true"
|
2007-05-01 17:55:54 +00:00
|
|
|
# write informations about file type
|
2007-05-01 14:21:21 +00:00
|
|
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}" "" "${PRODUCT_NAME} Document"
|
|
|
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\DefaultIcon" "" "${PRODUCT_EXE}"
|
2007-05-02 22:13:27 +00:00
|
|
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\Shell\open\command" "" '"${PRODUCT_BAT}" "%1"'
|
2007-05-01 17:55:54 +00:00
|
|
|
# write informations about file extensions
|
2007-05-01 14:21:21 +00:00
|
|
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_EXT}" "" "${PRODUCT_REGNAME}"
|
|
|
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_EXT}" "Content Type" "${PRODUCT_MIME_TYPE}"
|
2007-05-01 17:55:54 +00:00
|
|
|
# refresh shell
|
2007-05-01 14:21:21 +00:00
|
|
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
|
2007-04-30 00:55:50 +00:00
|
|
|
${endif}
|
2007-04-19 00:55:52 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# create Uninstaller
|
2007-04-19 00:55:52 +00:00
|
|
|
WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# test if Python is installed
|
2007-10-11 20:32:56 +00:00
|
|
|
# only use an existing python when it is version 2.5 because some Compaq and Dell PC are delivered
|
2007-05-01 17:55:54 +00:00
|
|
|
# with outdated Python interpreters
|
2007-04-19 00:55:52 +00:00
|
|
|
ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\2.5\InstallPath" ""
|
|
|
|
${if} $PythonPath == ""
|
|
|
|
StrCpy $PythonPath "$INSTDIR\bin"
|
|
|
|
${else}
|
2007-05-01 17:55:54 +00:00
|
|
|
StrCpy $PythonPath $PythonPath -1 # remove the "\" at the end
|
2007-04-19 00:55:52 +00:00
|
|
|
${endif}
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# run LyX's configure script
|
|
|
|
# create a bat-file to start configure in a console window so that the user see the progress
|
|
|
|
# of the configuration and to have a signal when the configuration is ready to start LyX
|
|
|
|
# this is important when LyX is installed together with MiKTeX or when LyX is installed for the first
|
|
|
|
# time on a computer, because the installation of missing LaTeX-files required by LyX could last minutes
|
|
|
|
# a batch file is needed because simply calling ExecWait '"$PythonPath\python.exe" "$INSTDIR\Resources\configure.py"'
|
|
|
|
# creates the config files in $INSTDIR\bin
|
|
|
|
StrCpy $1 $INSTDIR 2 # get drive letter
|
2007-04-19 00:55:52 +00:00
|
|
|
FileOpen $R1 "$INSTDIR\Resources\configLyX.bat" w
|
|
|
|
FileWrite $R1 '$1$\r$\n\
|
|
|
|
cd $INSTDIR\Resources\$\r$\n\
|
|
|
|
"$PythonPath\python.exe" configure.py'
|
|
|
|
FileClose $R1
|
|
|
|
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
|
|
|
|
ExecWait '"$INSTDIR\Resources\configLyX.bat"'
|
|
|
|
Delete "$INSTDIR\Resources\configLyX.bat"
|
2007-05-01 14:21:21 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# for some unknown odd reason the folder $INSTDIR_OLD\Resources\ui
|
|
|
|
# is not deleted in function InstDirChange, so the deletion has to be called
|
|
|
|
# again to make it work
|
2007-05-01 14:21:21 +00:00
|
|
|
${if} $INSTDIR_OLD != ""
|
|
|
|
RMDir /r $INSTDIR_OLD
|
|
|
|
${endif}
|
2007-04-19 00:55:52 +00:00
|
|
|
|
|
|
|
SectionEnd
|
2007-04-30 00:55:50 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# -------------------------------------------
|
2007-04-30 00:55:50 +00:00
|
|
|
|
|
|
|
Function InstDirChange
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# determine the new name of the install location,
|
2007-12-17 22:34:35 +00:00
|
|
|
# Change the old install path to the new one (only when the user
|
|
|
|
# has used the default path settings of the previous LyX-version, otherwise leave the path as is)
|
2007-04-30 00:55:50 +00:00
|
|
|
StrCpy $String $INSTDIR
|
|
|
|
StrCpy $Search "${PRODUCT_VERSION_OLD}"
|
|
|
|
StrLen $3 $String
|
2007-05-01 17:55:54 +00:00
|
|
|
Call StrPoint # search the $INSTDIR for the phrase in ${PRODUCT_VERSION_OLD} ; function from LyXUtils.nsh
|
|
|
|
${if} $Pointer != "-1" # if something was found
|
2007-04-30 00:55:50 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
IntOp $Pointer $Pointer - 1 # jump before the first "\" of "\${PRODUCT_VERSION_OLD}"
|
|
|
|
StrCpy $String $String "$Pointer" # $String is now the part before "\${PRODUCT_VERSION_OLD}"
|
|
|
|
# rename the installation folder by copying LyX files
|
2007-04-30 00:55:50 +00:00
|
|
|
StrCpy $INSTDIR_NEW "$String\LyX ${PRODUCT_VERSION}"
|
|
|
|
CreateDirectory "$INSTDIR_NEW"
|
|
|
|
CopyFiles "$INSTDIR\*.*" "$INSTDIR_NEW"
|
2007-05-01 17:55:54 +00:00
|
|
|
# delete the old folder
|
2007-04-30 00:55:50 +00:00
|
|
|
RMDir /r $INSTDIR
|
2007-05-01 14:21:21 +00:00
|
|
|
StrCpy $INSTDIR_OLD $INSTDIR
|
2007-04-30 00:55:50 +00:00
|
|
|
StrCpy $INSTDIR $INSTDIR_NEW
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# set new PATH_PREFIX in the file lyxrc.dist
|
2007-04-30 00:55:50 +00:00
|
|
|
FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" a
|
2007-05-01 22:53:06 +00:00
|
|
|
FileRead $R1 $PathPrefix # the whole file content is now in $PathPrefix
|
2007-04-30 00:55:50 +00:00
|
|
|
${WordReplace} $PathPrefix "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $PathPrefix
|
2007-05-01 17:55:54 +00:00
|
|
|
FileSeek $R1 0 # set file pointer to the beginning
|
|
|
|
FileWrite $R1 '$PathPrefix' # overwrite the existing path with the actual one
|
2007-04-30 00:55:50 +00:00
|
|
|
FileClose $R1
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# set the new path to the preferences file for all users
|
2007-04-30 00:55:50 +00:00
|
|
|
StrCpy $FileName "preferences"
|
|
|
|
StrCpy $OldString "${PRODUCT_VERSION_OLD}"
|
|
|
|
StrCpy $NewString "LyX ${PRODUCT_VERSION}"
|
2007-05-01 17:55:54 +00:00
|
|
|
Call CheckAppPathPreferences # function from LyXUtils.nsh
|
2007-04-30 00:55:50 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# set the new path to the session file for all users
|
2007-04-30 00:55:50 +00:00
|
|
|
StrCpy $FileName "session"
|
2007-05-01 17:55:54 +00:00
|
|
|
Call CheckAppPathPreferences # function from LyXUtils.nsh
|
2007-04-30 00:55:50 +00:00
|
|
|
|
2007-05-31 00:48:23 +00:00
|
|
|
# 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"
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# set new path to ImageMagick
|
2007-04-30 00:55:50 +00:00
|
|
|
ReadRegStr $ImageMagickPath SHCTX "SOFTWARE\Classes\Applications" "AutoRun"
|
|
|
|
${if} $ImageMagickPath != ""
|
2007-05-01 17:55:54 +00:00
|
|
|
${WordReplace} $ImageMagickPath "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $ImageMagickPath # macro from WordFunc.nsh
|
2007-04-30 00:55:50 +00:00
|
|
|
WriteRegStr SHCTX "SOFTWARE\Classes\Applications" "AutoRun" "$ImageMagickPath"
|
|
|
|
${endif}
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
${endif} # end ${if} $Pointer != "-1" (if the folder is renamed)
|
2007-04-30 00:55:50 +00:00
|
|
|
|
|
|
|
FunctionEnd
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# -------------------------------------------
|
2007-04-30 00:55:50 +00:00
|
|
|
|
|
|
|
Function RefreshRegUninst
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# Refresh registry setings for the uninstaller
|
2007-04-30 00:55:50 +00:00
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# Aspell
|
|
|
|
ReadRegStr $0 SHCTX "Software\Aspell" "OnlyWithLyX" # special entry to test if it was installed with LyX
|
2007-04-30 00:55:50 +00:00
|
|
|
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
|
|
|
|
WriteRegStr HKLM "SOFTWARE\Aspell" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
|
|
|
|
${endif}
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# MiKTeX
|
2007-04-30 00:55:50 +00:00
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
|
|
|
|
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
|
|
|
|
WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
|
|
|
|
${endif}
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# JabRef
|
2007-05-15 01:31:19 +00:00
|
|
|
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
|
2007-04-30 00:55:50 +00:00
|
|
|
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
|
2007-05-15 01:31:19 +00:00
|
|
|
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
|
2007-04-30 00:55:50 +00:00
|
|
|
${endif}
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# Aiksaurus
|
|
|
|
ReadRegStr $0 SHCTX "Software\Aiksaurus" "OnlyWithLyX" # special entry to test if it was installed with LyX
|
2007-04-30 00:55:50 +00:00
|
|
|
${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
|
|
|
|
WriteRegStr HKLM "SOFTWARE\Aiksaurus" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
|
|
|
|
${endif}
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# ImageMagick
|
2007-04-30 00:55:50 +00:00
|
|
|
ReadRegStr $0 SHCTX "Software\ImageMagick" "OnlyWithLyX"
|
|
|
|
${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
|
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
|
2007-10-11 22:26:52 +00:00
|
|
|
# set the new path
|
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "BinPath"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0 # macro from WordFunc.nsh
|
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "BinPath" "$0"
|
2007-10-11 22:26:52 +00:00
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "CoderModulesPath"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
|
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "CoderModulesPath" "$0"
|
2007-10-11 22:26:52 +00:00
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "ConfigurePath"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
|
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "ConfigurePath" "$0"
|
2007-10-11 22:26:52 +00:00
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "FilterModulesPath"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
|
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "FilterModulesPath" "$0"
|
2007-10-11 22:26:52 +00:00
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\Current" "LibPath"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
|
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "LibPath" "$0"
|
|
|
|
# set the new path
|
2007-10-11 22:26:52 +00:00
|
|
|
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"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
|
2007-10-11 22:26:52 +00:00
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "CoderModulesPath" "$0"
|
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "ConfigurePath"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
|
2007-10-11 22:26:52 +00:00
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "ConfigurePath" "$0"
|
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "FilterModulesPath"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
|
2007-10-11 22:26:52 +00:00
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "FilterModulesPath" "$0"
|
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "LibPath"
|
2007-10-11 20:32:56 +00:00
|
|
|
${WordReplace} $0 "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $0
|
2007-10-11 22:26:52 +00:00
|
|
|
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion_Old}\Q:16" "LibPath" "$0"
|
2007-04-30 00:55:50 +00:00
|
|
|
${endif}
|
|
|
|
|
2007-05-01 17:55:54 +00:00
|
|
|
# Ghostscript and GSview
|
2007-04-30 00:55:50 +00:00
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX"
|
|
|
|
${if} $0 == "Yes${PRODUCT_VERSION_SHORT_OLD}"
|
2007-10-11 22:32:30 +00:00
|
|
|
WriteRegStr HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
|
2007-10-11 22:26:52 +00:00
|
|
|
# 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"
|
2007-04-30 00:55:50 +00:00
|
|
|
${endif}
|
|
|
|
|
|
|
|
FunctionEnd
|