2007-04-12 20:18:08 +00:00
|
|
|
; Uninstall sections
|
2007-02-08 21:09:30 +00:00
|
|
|
|
|
|
|
Section "un.LyX" un.SecUnProgramFiles
|
|
|
|
|
|
|
|
SectionIn RO
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
; delete LaTeX class files that were installed together with LyX
|
2007-02-08 21:09:30 +00:00
|
|
|
FileOpen $R5 "$INSTDIR\Resources\uninstallPaths.dat" r
|
|
|
|
FileRead $R5 $LatexPath
|
|
|
|
FileClose $R5
|
|
|
|
StrCpy $String $LatexPath
|
|
|
|
StrCpy $Search "miktex\bin"
|
|
|
|
StrLen $3 $String
|
|
|
|
Call un.StrPoint ; search the LaTeXPath for the phrase "miktex\bin" (function from LyXUtils.nsh)
|
|
|
|
${if} $Pointer != "-1" ; if something was found
|
|
|
|
IntOp $Pointer $Pointer - 1 ; jump before the first "\" of "\miktex\bin"
|
|
|
|
StrCpy $String $String "$Pointer" ; $String is now the part before "\miktex\bin"
|
|
|
|
Delete "$String\tex\latex\cv.cls"
|
|
|
|
RMDir /r "$String\tex\latex\lyx"
|
|
|
|
RMDir /r "$String\tex\latex\revtex"
|
|
|
|
RMDir /r "$String\tex\latex\hollywood"
|
|
|
|
RMDir /r "$String\tex\latex\broadway"
|
|
|
|
ExecWait "$LatexPath\initexmf --update-fndb"
|
|
|
|
${endif}
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
; delete LyX's installation folder
|
2007-02-08 21:09:30 +00:00
|
|
|
RMDir /r $INSTDIR
|
2007-04-12 20:18:08 +00:00
|
|
|
; delete start menu folder
|
2007-02-08 21:09:30 +00:00
|
|
|
ReadRegStr $0 ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "StartMenu"
|
|
|
|
RMDir /r "$0"
|
2007-04-12 20:18:08 +00:00
|
|
|
; delete desktop icon
|
2007-02-08 21:09:30 +00:00
|
|
|
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
|
2007-04-12 20:18:08 +00:00
|
|
|
; delete registry entries
|
2007-02-08 21:09:30 +00:00
|
|
|
DeleteRegKey HKCU "${PRODUCT_UNINST_KEY}"
|
|
|
|
DeleteRegKey ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
|
|
|
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
|
|
|
DeleteRegKey HKCR "Applications\lyx.exe"
|
|
|
|
DeleteRegKey HKCR "Applications\lyx.bat"
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
; Aiksaurus
|
2007-02-08 21:09:30 +00:00
|
|
|
!insertmacro FileCheck $5 "meanings.dat" "${AiksaurusDir}" ; macro from LyXUtils.nsh
|
|
|
|
${if} $5 == "True"
|
|
|
|
RMDir /r "${AiksaurusDir}"
|
|
|
|
${endif}
|
2007-04-12 20:18:08 +00:00
|
|
|
; StrCpy $0 ""
|
|
|
|
; ReadRegStr $0 HKLM "Software\Aiksaurus" "OnlyWithLyX" ; special entry to test if it was installed with LyX
|
|
|
|
; ${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
|
|
|
|
; ; unregister Aiksaurus
|
|
|
|
; ReadRegStr $1 HKLM "Software\Aiksaurus" "Data Path"
|
|
|
|
; RMDir /r "$1"
|
|
|
|
; DeleteRegKey HKLM "SOFTWARE\Aiksaurus"
|
|
|
|
; ${endif}
|
|
|
|
|
|
|
|
; ImageMagick
|
2007-02-08 21:09:30 +00:00
|
|
|
StrCpy $0 ""
|
|
|
|
ReadRegStr $0 HKLM "Software\ImageMagick" "OnlyWithLyX" ; special entry to test if it was installed with LyX
|
2007-04-12 20:18:08 +00:00
|
|
|
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
|
|
|
|
; unregister ImageMagick
|
2007-02-08 21:09:30 +00:00
|
|
|
DeleteRegValue HKLM "SOFTWARE\Classes\Applications" "AutoRun"
|
|
|
|
DeleteRegKey HKLM "SOFTWARE\ImageMagick"
|
|
|
|
${endif}
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
; Ghostscript and GSview
|
2007-02-08 21:09:30 +00:00
|
|
|
StrCpy $0 ""
|
|
|
|
StrCpy $5 ""
|
|
|
|
ReadRegStr $0 HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" ; special entry to test if it was installed with LyX
|
2007-04-12 20:18:08 +00:00
|
|
|
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
|
|
|
|
; unregister Ghostscript
|
2007-02-08 21:09:30 +00:00
|
|
|
DeleteRegKey HKLM "SOFTWARE\GPL Ghostscript"
|
2007-04-12 20:18:08 +00:00
|
|
|
; test if GSview is installed
|
2007-02-08 21:09:30 +00:00
|
|
|
EnumRegValue $5 HKLM "Software\Ghostgum\GSview" 0
|
|
|
|
${if} $5 != ""
|
2007-04-12 20:18:08 +00:00
|
|
|
; unregister GSview
|
2007-02-08 21:09:30 +00:00
|
|
|
MessageBox MB_ICONINFORMATION|MB_OK "$(UnGSview)"
|
|
|
|
ReadRegStr $3 HKLM "Software\Ghostgum\GSview" "$5"
|
|
|
|
ReadRegStr $4 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GSview $5" "UninstallString"
|
|
|
|
ExecWait "$4"
|
|
|
|
${endif}
|
|
|
|
${endif}
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
; MiKTeX specific LyX setting
|
2007-02-08 21:09:30 +00:00
|
|
|
DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_AUTOINSTALL"
|
|
|
|
DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_REPOSITORY"
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
; remove extension .lyx
|
2007-02-08 21:09:30 +00:00
|
|
|
${RemoveFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}"
|
|
|
|
DeleteRegKey HKCR "${PRODUCT_NAME}"
|
|
|
|
|
|
|
|
SetAutoClose true
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
;---------------------------------
|
|
|
|
; user preferences
|
2007-02-08 21:09:30 +00:00
|
|
|
Section "un.$(UnLyXPreferencesTitle)" un.SecUnPreferences
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
; remove LyX's config files
|
2007-02-08 21:09:30 +00:00
|
|
|
Call un.DelAppPathSub ; function from LyXUtils.nsh
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
;---------------------------------
|
|
|
|
; Aspell
|
2007-02-08 21:09:30 +00:00
|
|
|
Section "un.Aspell" un.SecUnAspell
|
|
|
|
|
|
|
|
${if} $AspellInstallYes == "Aspell" ; only uninstall Aspell when it was installed together with LyX
|
|
|
|
Call un.UninstAspell ; Function from Aspell.nsh
|
|
|
|
${endif}
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
;---------------------------------
|
|
|
|
; MiKTeX
|
2007-02-08 21:09:30 +00:00
|
|
|
Section "un.MiKTeX" un.SecUnMiKTeX
|
|
|
|
|
|
|
|
${if} $MiKTeXInstalled == "MiKTeX" ; only uninstall MiKTeX when it was installed together with LyX
|
|
|
|
ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MiKTeXDeliveredVersion}" "UninstallString"
|
|
|
|
ExecWait "$1" ; run MiKTeX's uninstaller
|
|
|
|
${endif}
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
;---------------------------------
|
|
|
|
; JabRef
|
2007-02-08 21:09:30 +00:00
|
|
|
Section "un.JabRef" un.SecUnJabRef
|
|
|
|
|
|
|
|
${if} $JabRefInstalled == "JabRef" ; only uninstall JabRef when it was installed together with LyX
|
|
|
|
ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${JabRefVersion}" "UninstallString"
|
|
|
|
ExecWait "$1" ; run JabRef's uninstaller
|
|
|
|
${endif}
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
2007-04-12 20:18:08 +00:00
|
|
|
;---------------------------------
|
|
|
|
; Section descriptions
|
2007-02-08 21:09:30 +00:00
|
|
|
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecUnAspell} "$(SecUnAspellDescription)"
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecUnMiKTeX} "$(SecUnMiKTeXDescription)"
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecUnJabRef} "$(SecUnJabRefDescription)"
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecUnPreferences} "$(SecUnPreferencesDescription)"
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecUnProgramFiles} "$(SecUnProgramFilesDescription)"
|
|
|
|
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
|
|
|
|
|