Windows: Installer quality of life improvements

This commit is contained in:
Roger A. Light
2024-05-24 09:29:25 +01:00
parent 3d4bac0fc7
commit 0881024aca
3 changed files with 29 additions and 0 deletions
+5
View File
@@ -19,6 +19,11 @@ Broker:
Clients:
- Fix mosquitto_rr not honouring `-R`. Closes #2893.
Windows:
- Installer will start/stop the mosquitto service when installing and
uninstalling, to prevent problems with not being able to overwrite or remove
mosquitto.exe.
2.0.17 - 2023-08-22
===================
+12
View File
@@ -40,7 +40,12 @@ InstallDir "$PROGRAMFILES\mosquitto"
Section "Files" SecInstall
SectionIn RO
ExecWait 'sc stop mosquitto'
Sleep 1000
SetOutPath "$INSTDIR"
File "..\logo\mosquitto.ico"
File "..\build\src\Release\mosquitto.exe"
File "..\build\apps\mosquitto_passwd\Release\mosquitto_passwd.exe"
File "..\build\apps\mosquitto_ctrl\Release\mosquitto_ctrl.exe"
@@ -75,6 +80,7 @@ Section "Files" SecInstall
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "DisplayName" "Eclipse Mosquitto MQTT broker"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "DisplayIcon" "$INSTDIR\mosquitto.ico"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "HelpLink" "https://mosquitto.org/"
@@ -89,10 +95,15 @@ SectionEnd
Section "Service" SecService
ExecWait '"$INSTDIR\mosquitto.exe" install'
ExecWait 'sc start mosquitto'
SectionEnd
Section "Uninstall"
ExecWait 'sc stop mosquitto'
Sleep 1000
ExecWait '"$INSTDIR\mosquitto.exe" uninstall'
Sleep 1000
Delete "$INSTDIR\mosquitto.exe"
Delete "$INSTDIR\mosquitto_ctrl.exe"
Delete "$INSTDIR\mosquitto_passwd.exe"
@@ -114,6 +125,7 @@ Section "Uninstall"
Delete "$INSTDIR\libcrypto-1_1.dll"
Delete "$INSTDIR\edl-v10"
Delete "$INSTDIR\epl-v20"
Delete "$INSTDIR\mosquitto.ico"
Delete "$INSTDIR\devel\mosquitto.h"
Delete "$INSTDIR\devel\mosquitto.lib"
+12
View File
@@ -41,7 +41,12 @@ InstallDir "$PROGRAMFILES64\mosquitto"
Section "Files" SecInstall
SectionIn RO
ExecWait 'sc stop mosquitto'
Sleep 1000
SetOutPath "$INSTDIR"
File "..\logo\mosquitto.ico"
File "..\build64\src\Release\mosquitto.exe"
File "..\build64\apps\mosquitto_ctrl\Release\mosquitto_ctrl.exe"
File "..\build64\apps\mosquitto_passwd\Release\mosquitto_passwd.exe"
@@ -81,6 +86,7 @@ Section "Files" SecInstall
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "DisplayName" "Eclipse Mosquitto MQTT broker (64 bit)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "DisplayIcon" "$INSTDIR\mosquitto.ico"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "HelpLink" "https://mosquitto.org/"
@@ -102,10 +108,15 @@ SectionEnd
Section "Service" SecService
ExecWait '"$INSTDIR\mosquitto.exe" install'
ExecWait 'sc start mosquitto'
SectionEnd
Section "Uninstall"
ExecWait 'sc stop mosquitto'
Sleep 1000
ExecWait '"$INSTDIR\mosquitto.exe" uninstall'
Sleep 1000
Delete "$INSTDIR\mosquitto.dll"
Delete "$INSTDIR\mosquitto.exe"
Delete "$INSTDIR\mosquitto_ctrl.exe"
@@ -126,6 +137,7 @@ Section "Uninstall"
Delete "$INSTDIR\SECURITY.md"
Delete "$INSTDIR\edl-v10"
Delete "$INSTDIR\epl-v20"
Delete "$INSTDIR\mosquitto.ico"
Delete "$INSTDIR\cjson.dll"
Delete "$INSTDIR\libcrypto-3-x64.dll"