0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-10 16:17:36 +00:00

Personalize installer and uninstaller Windows (Control Panel) ()

This commit is contained in:
thiagoftsm 2024-07-16 19:57:24 +00:00 committed by GitHub
parent c16ef62599
commit c6e39cffd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 42 additions and 3 deletions

Binary file not shown.

After

(image error) Size: 15 KiB

View file

@ -1,10 +1,16 @@
!include "MUI2.nsh"
!include "FileFunc.nsh"
Name "Netdata"
Outfile "netdata-installer.exe"
InstallDir "$PROGRAMFILES\netdata"
RequestExecutionLevel admin
!define MUI_ICON "NetdataWhite.ico"
!define MUI_UNICON "NetdataWhite.ico"
!define ND_UININSTALL_REG "Software\Microsoft\Windows\CurrentVersion\Uninstall\Netdata"
!define MUI_ABORTWARNING
!define MUI_UNABORTWARNING
@ -41,6 +47,33 @@ Section "Install Netdata"
DetailPrint "Warning: Failed to start Netdata service."
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"DisplayName" "Netdata - Real-time system monitoring."
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"DisplayIcon" "$INSTDIR\Uninstall.exe,0"
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"RegOwner" "Netdata Inc."
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"RegCompany" "Netdata Inc."
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"Publisher" "Netdata Inc."
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"HelpLink" "https://learn.netdata.cloud/"
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"URLInfoAbout" "https://www.netdata.cloud/"
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"DisplayVersion" "${CURRVERSION}"
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"VersionMajor" "${MAJORVERSION}"
WriteRegStr HKLM "${ND_UININSTALL_REG}" \
"VersionMinor" "${MINORVERSION}"
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "${ND_UININSTALL_REG}" "EstimatedSize" "$0"
SectionEnd
Section "Uninstall"
@ -55,4 +88,6 @@ Section "Uninstall"
DetailPrint "Warning: Failed to delete Netdata service."
RMDir /r "$INSTDIR"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Netdata"
SectionEnd

View file

@ -1,9 +1,8 @@
#!/bin/sh
#!/bin/bash
export PATH="/usr/local/bin:${PATH}"
WT_ROOT="$(pwd)"
NULL=""
if [ -z "${MSYSTEM}" ]; then
build="${WT_ROOT}/build-${OSTYPE}"
@ -24,4 +23,9 @@ if [ ! -f "/msys2-installer.exe" ]; then
"https://github.com/msys2/msys2-installer/releases/download/2024-05-07/msys2-x86_64-20240507.exe"
fi
makensis "${WT_ROOT}/packaging/utils/installer.nsi"
NDVERSION=$"$(grep 'CMAKE_PROJECT_VERSION:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
NDMAJORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MAJOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
NDMINORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MINOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
makensis -DCURRVERSION="${NDVERSION}" -DMAJORVERSION="${NDMAJORVERSION}" -DMINORVERSION="${NDMINORVERSION}" "${WT_ROOT}/packaging/utils/installer.nsi"