lyx_mirror/development/Win32/packaging/installer/setup/uninstall.nsh
Joost Verburg d1a3055578 lots of installer improvements:
* use nsDialogs instead of InstallOptions for custom wizard pages, faster & easier to customize
* upgrade to Modern UI 2
* use MultiUser.nsh to support multiple installation modes (all users / current user) in a much more simple way
* use LangFile.nsh for the language files, again less scripting required
* simplified installer structure
* more meaningful variable names
* more comments
* minor fixes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24062 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-30 21:37:53 +00:00

89 lines
2.1 KiB
Plaintext

/*
uninstall.nsh
Uninstall
*/
Var FileAssociation
Section "un.Program Files" un.SecProgramFiles
# Binaries
Delete "$INSTDIR\bin\lyx.exe"
Delete "$INSTDIR\bin\lyxc.exe"
!insertmacro FileListLyXBin Delete "$INSTDIR\bin\"
!insertmacro FileListQtBin Delete "$INSTDIR\bin\"
!insertmacro FileListDllMSVCBin Delete "$INSTDIR\bin\"
!insertmacro FileListMSVCBin Delete "$INSTDIR\bin\"
!insertmacro FileListMSVCManifest Delete "$INSTDIR\bin\"
!insertmacro FileListNetpbmBin Delete "$INSTDIR\bin\"
!insertmacro FileListDTLBin Delete "$INSTDIR\bin\"
!insertmacro FileListPDFToolsBin Delete "$INSTDIR\bin\"
!insertmacro FileListPDFViewBin Delete "$INSTDIR\bin\"
# Icons
!insertmacro FileListLyXIcons Delete "$INSTDIR\bin\"
# Resources
RMDir /r "$INSTDIR\Resources"
# Components of Python
RMDir /r "$INSTDIR\python"
# Aiksaurus Data
!insertmacro FileListAiksaurusData Delete "$INSTDIR\aiksaurus\"
RMDir "$INSTDIR\aiksaurus"
# Helper DLLs for NSIS-based tools
!insertmacro FileListNSISPluginsStandard Delete "$INSTDIR\bin\"
!insertmacro FileListNSISPlugins Delete "$INSTDIR\bin\"
# Shortcuts
Delete "$SMPROGRAMS\${APP_NAME} ${APP_SERIES_NAME}.lnk"
Delete "$DESKTOP\${APP_NAME} ${APP_SERIES_NAME}.lnk"
# Uninstaller itself
Delete "$INSTDIR\${SETUP_UNINSTALLER}"
RMDir "$INSTDIR\bin"
# Application folder
SetOutPath "$PROGRAMFILES"
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}
SectionEnd
Section "un.User Preferences and Custom Files" un.SecUserFiles
SetShellVarContext current
RMDir /r "$APPDATA\${APP_DIR_USERDATA}"
SectionEnd