Write additional uninstaller information

- Use DWORD instead of string for Minor and major version
 - Show only "Uninstall" instead of "Uninstall/Change"
 - Write installed size as well which will be shown in "Program and Features"

Closes #2580
This commit is contained in:
SinghRajenM 2016-11-18 21:02:05 +05:30 committed by Don Ho
parent bd6f7b4d20
commit 2b27a5f33b
2 changed files with 11 additions and 2 deletions

View File

@ -31,6 +31,7 @@
!include "MUI.nsh" ; Modern UI
!include "nsDialogs.nsh" ; allows creation of custom pages in the installer
!include "Memento.nsh" ; remember user selections in the installer across runs
!include "FileFunc.nsh"
Unicode true ; Generate a Unicode installer. It can only be used outside of sections and functions and before any data is compressed.
SetCompressor /SOLID lzma ; This reduces installer size by approx 30~35%

View File

@ -134,14 +134,22 @@ Function writeInstallInfoInRegistry
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "DisplayName" "${APPNAME} (32-bit x86)"
!endif
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "Publisher" "Notepad++ Team"
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "VersionMajor" "${VERSION_MAJOR}"
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "VersionMinor" "${VERSION_MINOR}"
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "MajorVersion" "${VERSION_MAJOR}"
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "MinorVersion" "${VERSION_MINOR}"
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "UninstallString" "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "DisplayIcon" "$INSTDIR\notepad++.exe"
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "DisplayVersion" "${APPVERSION}"
WriteRegStr HKLM "${UNINSTALL_REG_KEY}" "URLInfoAbout" "${APPWEBSITE}"
WriteRegDWORD HKLM "${UNINSTALL_REG_KEY}" "VersionMajor" ${VERSION_MAJOR}
WriteRegDWORD HKLM "${UNINSTALL_REG_KEY}" "VersionMinor" ${VERSION_MINOR}
WriteRegDWORD HKLM "${UNINSTALL_REG_KEY}" "NoModify" 1
WriteRegDWORD HKLM "${UNINSTALL_REG_KEY}" "NoRepair" 1
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IfErrors +3 0
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "${UNINSTALL_REG_KEY}" "EstimatedSize" "$0"
WriteUninstaller "$INSTDIR\uninstall.exe"
FunctionEnd