lyx_mirror/development/Win32/packaging/installer/setup/uninstall.nsh
Joost Verburg e2329914ec * remove old installer code for external ImageMagick and Ghostscript
* remove old text in uninstaller
* remove language selection in installer (now integrated in LyX prefs)
* updates for MSVC 2010

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37714 a592a061-630c-0410-9148-cb99ea01b6c8
2011-02-17 17:02:10 +00:00

98 lines
3.1 KiB
Plaintext

/*
uninstall.nsh
Uninstall
*/
Var FileAssociation
Section "un.Program Files" un.SecProgramFiles
# Binaries
!insertmacro FileListLyXBin Delete "$INSTDIR\bin\"
!insertmacro FileListLyXLauncher Delete "$INSTDIR\bin\"
!insertmacro FileListQtBin Delete "$INSTDIR\bin\"
!insertmacro FileListDll Delete "$INSTDIR\bin\"
!insertmacro FileListMSVC Delete "$INSTDIR\bin\"
!insertmacro FileListMSVC2008 Delete "$INSTDIR\bin\"
!insertmacro FileListNetpbmBin Delete "$INSTDIR\bin\"
!insertmacro FileListDTLBin Delete "$INSTDIR\bin\"
!insertmacro FileListDvipostBin Delete "$INSTDIR\bin\"
!insertmacro FileListPDFToolsBin Delete "$INSTDIR\bin\"
!insertmacro FileListPDFViewBin Delete "$INSTDIR\bin\"
!insertmacro FileListNSISPluginsStandard Delete "$INSTDIR\bin\"
!insertmacro FileListNSISPlugins Delete "$INSTDIR\bin\"
!insertmacro FileListMetaFile2EPS Delete "$INSTDIR\bin\"
RMDir "$INSTDIR\bin"
# Resources
RMDir /r "$INSTDIR\Resources"
# Components of Python
!insertmacro FileListPythonLibEncodings Delete "$INSTDIR\python\Lib\encodings\"
Delete "$INSTDIR\python\Lib\encodings\*.pyc"
RMDir "$INSTDIR\python\Lib\encodings"
!insertmacro FileListPythonLib Delete "$INSTDIR\python\Lib\"
Delete "$INSTDIR\python\Lib\*.pyc"
RMDir "$INSTDIR\python\Lib"
!insertmacro FileListPythonBin Delete "$INSTDIR\python\"
!insertmacro FileListMSVC Delete "$INSTDIR\python\"
!insertmacro FileListMSVC2008 Delete "$INSTDIR\bin\"
RMDir "$INSTDIR\python"
# Components of ImageMagick
!insertmacro FileListImageMagick Delete "$INSTDIR\imagemagick\"
!insertmacro FileListMSVC Delete "$INSTDIR\imagemagick\"
!insertmacro FileListMSVC2008 Delete "$INSTDIR\bin\"
RMDir "$INSTDIR\imagemagick"
# Components of Ghostscript
!insertmacro FileListGhostscript Delete "$INSTDIR\ghostscript\"
!insertmacro FileListMSVC Delete "$INSTDIR\ghostscript\"
!insertmacro FileListMSVC2008 Delete "$INSTDIR\bin\"
RMDir "$INSTDIR\ghostscript"
# Shortcuts
Delete "$SMPROGRAMS\${APP_NAME} ${APP_SERIES_NAME}.lnk"
Delete "$DESKTOP\${APP_NAME} ${APP_SERIES_NAME}.lnk"
# Uninstaller itself
Delete "$INSTDIR\${SETUP_UNINSTALLER}"
# Application folder
SetOutPath "$TEMP"
RMDir "$INSTDIR"
# Registry keys
DeleteRegKey SHELL_CONTEXT "${APP_REGKEY_SETUP}"
DeleteRegKey SHELL_CONTEXT "${APP_REGKEY}"
DeleteRegKey SHELL_CONTEXT "Software\Classes\${APP_REGNAME_DOC}"
DeleteRegKey SHELL_CONTEXT "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SETUP_UNINSTALLER_KEY}"
# File associations
ReadRegStr $FileAssociation SHELL_CONTEXT "Software\Classes\${APP_EXT}" ""
${If} $FileAssociation == "${APP_REGNAME_DOC}"
DeleteRegKey SHELL_CONTEXT "Software\Classes\${APP_EXT}"
${EndIf}
${If} $MultiUser.Privileges != "Admin"
${OrIf} $MultiUser.Privileges != "Power"
# Delete Postscript printer for metafile to EPS conversion
ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
${EndIf}
SectionEnd
Section "un.User Preferences and Custom Files" un.SecUserFiles
SetShellVarContext current
RMDir /r "$APPDATA\${APP_DIR_USERDATA}"
SectionEnd