Installer and readme updates.

This commit is contained in:
Roger A. Light 2018-08-16 13:24:07 +01:00
parent 4ccc68d2df
commit cbd7a70408
4 changed files with 60 additions and 105 deletions

View File

@ -31,11 +31,14 @@ and such source code may be obtained at <a href="http://www.eclipse.org/">http:/
did not receive this Content directly from the Eclipse Foundation, the following is provided did not receive this Content directly from the Eclipse Foundation, the following is provided
for informational purposes only, and you should look to the Redistributor's license for for informational purposes only, and you should look to the Redistributor's license for
terms and conditions of use.</p> terms and conditions of use.</p>
<p><em>
<strong>None</strong> <br><br>
<br><br>
</em></p>
<h4>libwebsockets 2.4.2</h4>
<p>This project makes use of the libwebsockets library.</p>
<p>The use of libwebsockets is based on the terms and conditions of the
LGPL 2.1 with some specific exceptions.
<a href="https://github.com/warmcat/libwebsockets/blob/v2.4.2/LICENSE">https://github.com/warmcat/libwebsockets/blob/v2.4.2/LICENSE</a></p>
<p>When libwebsockets is distributed with the project, it is being used
subject to the Static Linking Exception (Section 2) of the License. As
a result, the content is not subject to the LGPL 2.1.</p>
</body></html> </body></html>

View File

@ -8,7 +8,7 @@
!include "WinMessages.nsh" !include "WinMessages.nsh"
!define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
Name "mosquitto" Name "Eclipse Mosquitto"
!define VERSION 1.5.0 !define VERSION 1.5.0
OutFile "mosquitto-${VERSION}-install-windows-x86.exe" OutFile "mosquitto-${VERSION}-install-windows-x86.exe"
@ -55,8 +55,8 @@ Section "Files" SecInstall
File "..\readme.md" File "..\readme.md"
File "..\readme-windows.txt" File "..\readme-windows.txt"
;File "C:\pthreads\Pre-built.2\dll\x86\pthreadVC2.dll" ;File "C:\pthreads\Pre-built.2\dll\x86\pthreadVC2.dll"
;File "C:\OpenSSL-Win32\libeay32.dll" ;File "C:\OpenSSL-Win32\bin\libssl_1-1.dll"
;File "C:\OpenSSL-Win32\ssleay32.dll" ;File "C:\OpenSSL-Win32\bin\libcrypto_1-1.dll"
File "..\edl-v10" File "..\edl-v10"
File "..\epl-v10" File "..\epl-v10"
@ -68,11 +68,11 @@ Section "Files" SecInstall
File "..\src\mosquitto_plugin.h" File "..\src\mosquitto_plugin.h"
WriteUninstaller "$INSTDIR\Uninstall.exe" WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "DisplayName" "Mosquitto MQTT broker" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "DisplayName" "Eclipse Mosquitto MQTT broker"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" 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" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "HelpLink" "http://mosquitto.org/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "HelpLink" "https://mosquitto.org/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "URLInfoAbout" "http://mosquitto.org/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "URLInfoAbout" "https://mosquitto.org/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "DisplayVersion" "${VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "DisplayVersion" "${VERSION}"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "NoModify" "1" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "NoModify" "1"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "NoRepair" "1" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto" "NoRepair" "1"
@ -81,10 +81,6 @@ Section "Files" SecInstall
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
SectionEnd SectionEnd
Section "Service" SecService
ExecWait '"$INSTDIR\mosquitto.exe" install'
SectionEnd
Section "Uninstall" Section "Uninstall"
ExecWait '"$INSTDIR\mosquitto.exe" uninstall' ExecWait '"$INSTDIR\mosquitto.exe" uninstall'
Delete "$INSTDIR\mosquitto.exe" Delete "$INSTDIR\mosquitto.exe"
@ -100,8 +96,8 @@ Section "Uninstall"
Delete "$INSTDIR\readme.txt" Delete "$INSTDIR\readme.txt"
Delete "$INSTDIR\readme-windows.txt" Delete "$INSTDIR\readme-windows.txt"
;Delete "$INSTDIR\pthreadVC2.dll" ;Delete "$INSTDIR\pthreadVC2.dll"
;Delete "$INSTDIR\libeay32.dll" ;Delete "$INSTDIR\libssl_1-1.dll"
;Delete "$INSTDIR\ssleay32.dll" ;Delete "$INSTDIR\libcrypto_1-1.dll"
Delete "$INSTDIR\edl-v10" Delete "$INSTDIR\edl-v10"
Delete "$INSTDIR\epl-v10" Delete "$INSTDIR\epl-v10"
@ -120,10 +116,8 @@ Section "Uninstall"
SectionEnd SectionEnd
LangString DESC_SecInstall ${LANG_ENGLISH} "The main installation." LangString DESC_SecInstall ${LANG_ENGLISH} "The main installation."
LangString DESC_SecService ${LANG_ENGLISH} "Install mosquitto as a Windows service?"
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} $(DESC_SecInstall) !insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} $(DESC_SecInstall)
!insertmacro MUI_DESCRIPTION_TEXT ${SecService} $(DESC_SecService)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
Var Dialog Var Dialog
@ -138,16 +132,11 @@ Function DependencyPage
Abort Abort
${EndIf} ${EndIf}
${NSD_CreateLabel} 0 0 100% 12u "OpenSSL - install 'Win32 OpenSSL vXXXXX Light' then copy dlls to the mosquitto directory" ${NSD_CreateLabel} 0 0 100% 12u "OpenSSL - install 'Win32 OpenSSL v1.1.0* Light' then copy libssl_1-1.dll and libcrypto_1-1.dll to the mosquitto directory"
${NSD_CreateLink} 13u 13u 100% 12u "http://slproweb.com/products/Win32OpenSSL.html" ${NSD_CreateLink} 13u 13u 100% 12u "http://slproweb.com/products/Win32OpenSSL.html"
Pop $OSSLLink Pop $OSSLLink
${NSD_OnClick} $OSSLLink OnClick_OSSL ${NSD_OnClick} $OSSLLink OnClick_OSSL
${NSD_CreateLabel} 0 26u 100% 12u "pthreads - copy 'pthreadVC2.dll' to the mosquitto directory"
${NSD_CreateLink} 13u 39u 100% 12u "ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x86/"
Pop $PTHLink
${NSD_OnClick} $PTHLink OnClick_PTH
!insertmacro MUI_HEADER_TEXT_PAGE "Dependencies" "This page lists packages that must be installed if not already present" !insertmacro MUI_HEADER_TEXT_PAGE "Dependencies" "This page lists packages that must be installed if not already present"
nsDialogs::Show nsDialogs::Show
FunctionEnd FunctionEnd
@ -156,8 +145,3 @@ Function OnClick_OSSL
Pop $0 Pop $0
ExecShell "open" "http://slproweb.com/products/Win32OpenSSL.html" ExecShell "open" "http://slproweb.com/products/Win32OpenSSL.html"
FunctionEnd FunctionEnd
Function OnClick_PTH
Pop $0
ExecShell "open" "ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x86/"
FunctionEnd

View File

@ -8,21 +8,12 @@
!include "WinMessages.nsh" !include "WinMessages.nsh"
!define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
Name "mosquitto" Name "Eclipse Mosquitto"
!define VERSION 1.5.0 !define VERSION 1.5.0
OutFile "mosquitto-${VERSION}-install-windows-x64.exe" OutFile "mosquitto-${VERSION}-install-windows-x64.exe"
!include "x64.nsh" !include "x64.nsh"
# Default install location, for 32-bit files InstallDir "$PROGRAMFILES64\mosquitto"
InstallDir "$PROGRAMFILES\mosquitto"
# Override install and registry locations if this is a 64-bit install.
function .onInit
${If} ${ARCH} == "x64"
SetRegView 64
StrCpy $INSTDIR "$PROGRAMFILES64\mosquitto"
${EndIf}
functionEnd
;-------------------------------- ;--------------------------------
; Installer pages ; Installer pages
@ -65,8 +56,8 @@ Section "Files" SecInstall
File "..\readme.md" File "..\readme.md"
File "..\readme-windows.txt" File "..\readme-windows.txt"
;File "C:\pthreads\Pre-built.2\dll\x64\pthreadVC2.dll" ;File "C:\pthreads\Pre-built.2\dll\x64\pthreadVC2.dll"
;File "C:\OpenSSL-Win64\libeay32.dll" ;File "C:\OpenSSL-Win64\bin\libssl_1-1-x64.dll"
;File "C:\OpenSSL-Win64\ssleay32.dll" ;File "C:\OpenSSL-Win64\bin\libcrypto_1-1-x64.dll"
File "..\edl-v10" File "..\edl-v10"
File "..\epl-v10" File "..\epl-v10"
@ -78,11 +69,11 @@ Section "Files" SecInstall
File "..\src\mosquitto_plugin.h" File "..\src\mosquitto_plugin.h"
WriteUninstaller "$INSTDIR\Uninstall.exe" WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "DisplayName" "Mosquitto MQTT broker (64 bit)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "DisplayName" "Eclipse Mosquitto MQTT broker (64 bit)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" 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" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "HelpLink" "http://mosquitto.org/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "HelpLink" "https://mosquitto.org/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "URLInfoAbout" "http://mosquitto.org/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "URLInfoAbout" "https://mosquitto.org/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "DisplayVersion" "${VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "DisplayVersion" "${VERSION}"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "NoModify" "1" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "NoModify" "1"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "NoRepair" "1" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mosquitto64" "NoRepair" "1"
@ -91,10 +82,6 @@ Section "Files" SecInstall
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
SectionEnd SectionEnd
Section "Service" SecService
ExecWait '"$INSTDIR\mosquitto.exe" install'
SectionEnd
Section "Uninstall" Section "Uninstall"
ExecWait '"$INSTDIR\mosquitto.exe" uninstall' ExecWait '"$INSTDIR\mosquitto.exe" uninstall'
Delete "$INSTDIR\mosquitto.exe" Delete "$INSTDIR\mosquitto.exe"
@ -110,8 +97,8 @@ Section "Uninstall"
Delete "$INSTDIR\readme.txt" Delete "$INSTDIR\readme.txt"
Delete "$INSTDIR\readme-windows.txt" Delete "$INSTDIR\readme-windows.txt"
;Delete "$INSTDIR\pthreadVC2.dll" ;Delete "$INSTDIR\pthreadVC2.dll"
;Delete "$INSTDIR\libeay32.dll" ;Delete "$INSTDIR\libssl_1-1-x64.dll"
;Delete "$INSTDIR\ssleay32.dll" ;Delete "$INSTDIR\libcrypto_1-1-x64.dll"
Delete "$INSTDIR\edl-v10" Delete "$INSTDIR\edl-v10"
Delete "$INSTDIR\epl-v10" Delete "$INSTDIR\epl-v10"
@ -130,10 +117,8 @@ Section "Uninstall"
SectionEnd SectionEnd
LangString DESC_SecInstall ${LANG_ENGLISH} "The main installation." LangString DESC_SecInstall ${LANG_ENGLISH} "The main installation."
LangString DESC_SecService ${LANG_ENGLISH} "Install mosquitto as a Windows service?"
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} $(DESC_SecInstall) !insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} $(DESC_SecInstall)
!insertmacro MUI_DESCRIPTION_TEXT ${SecService} $(DESC_SecService)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
Var Dialog Var Dialog
@ -148,16 +133,11 @@ Function DependencyPage
Abort Abort
${EndIf} ${EndIf}
${NSD_CreateLabel} 0 0 100% 12u "OpenSSL - install 'Win64 OpenSSL vXXXXX Light' then copy dlls to the mosquitto directory" ${NSD_CreateLabel} 0 0 100% 12u "OpenSSL - install 'Win64 OpenSSL v1.1.0* Light' then copy libssl_1-1-x64.dll and libcrypto_1-1-x64.dll to the mosquitto directory"
${NSD_CreateLink} 13u 13u 100% 12u "http://slproweb.com/products/Win32OpenSSL.html" ${NSD_CreateLink} 13u 13u 100% 12u "http://slproweb.com/products/Win32OpenSSL.html"
Pop $OSSLLink Pop $OSSLLink
${NSD_OnClick} $OSSLLink OnClick_OSSL ${NSD_OnClick} $OSSLLink OnClick_OSSL
${NSD_CreateLabel} 0 26u 100% 12u "pthreads - copy 'pthreadVC2.dll' to the mosquitto directory"
${NSD_CreateLink} 13u 39u 100% 12u "ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x64/"
Pop $PTHLink
${NSD_OnClick} $PTHLink OnClick_PTH
!insertmacro MUI_HEADER_TEXT_PAGE "Dependencies" "This page lists packages that must be installed if not already present" !insertmacro MUI_HEADER_TEXT_PAGE "Dependencies" "This page lists packages that must be installed if not already present"
nsDialogs::Show nsDialogs::Show
FunctionEnd FunctionEnd
@ -166,8 +146,3 @@ Function OnClick_OSSL
Pop $0 Pop $0
ExecShell "open" "http://slproweb.com/products/Win32OpenSSL.html" ExecShell "open" "http://slproweb.com/products/Win32OpenSSL.html"
FunctionEnd FunctionEnd
Function OnClick_PTH
Pop $0
ExecShell "open" "ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x64/"
FunctionEnd

View File

@ -1,70 +1,63 @@
Mosquitto for Windows Mosquitto for Windows
===================== =====================
Mosquitto for Windows comes in two flavours, win32 or Cygwin. The win32 version is only Mosquitto for Windows comes in 32-bit and 64-bit flavours.
supported on Windows Vista or later.
In all cases, the dependencies are not provided in this installer and must be installed In both cases, the dependencies are not provided in this installer and must be
separately in the case that they are not already available. installed separately in the case that they are not already available.
Capabilities Capabilities
------------ ------------
Some versions of Windows have limitations on the number of concurrent Some versions of Windows have limitations on the number of concurrent
connections. Non-server versions have been reported to be limited to connections, set at approximately 2048 connections depending on the version of
approximately 1024 connections. Windows you are using.
Websockets Websockets
---------- ----------
The broker executables provided in the installers do not have Websockets support enabled. The broker executables provided in the installers have Websockets support
If you wish to have a version of the broker with Websockets support, you will need to compile through a statically compiled version of libwebsockets and is being distributed
libwebsockets version v1.7 onwards because no Windows binaries are provided. under the Static Linking Exception (Section 2) of the License. As a result, the
content is not subject to the LGPL 2.1.
Please note that on Windows, libwebsockets limits connections to a maximum of 64 clients. Please note that on Windows, libwebsockets limits connections to a maximum of 64 clients.
Library Thread Support
----------------------
Dependencies - win32 libmosquitto on Windows is currently compiled without thread support, so
-------------------- neither of mosquitto_loop_start() nor "mosquitto_pub -l" are available.
A better solution that the old pthreads-win32 is being looked into, so support
will return in the future. If you need thread support, the code still supports
it just fine. Support has been dropped to simplify installation.
Dependencies
------------
* OpenSSL * OpenSSL
Link: http://slproweb.com/products/Win32OpenSSL.html Link: http://slproweb.com/products/Win32OpenSSL.html
Install "Win32 OpenSSL <version>" Install "Win32 OpenSSL 1.1.0* Light" or "Win64 OpenSSL 1.1.0* Light"
Required DLLs: libeay32.dll ssleay32.dll Required DLLs: libssl-1_1.dll, libcrypto-1_1.dll or libssl-1_1-x64.dll, libcrypto-1_1-x64.dll
* pthreads
Link: ftp://sourceware.org/pub/pthreads-win32
Install "pthreads-w32-<version>-release.zip
Required DLLs: pthreadVC2.dll
Please ensure that the required DLLs are on the system path, or are in the same directory as Please ensure that the required DLLs are on the system path, or are in the same directory as
the mosquitto executable. the mosquitto executable - usually C:\Program Files (x86)\mosquitto or C:\Program Files\mosquitto.
Dependencies - Cygwin
---------------------
* OpenSSL
Link: http://slproweb.com/products/Win32OpenSSL.html
Install "Win32 OpenSSL <version>"
* pthreads
Link: ftp://sourceware.org/pub/pthreads-win32
Install "pthreads-w32-<version>-release.zip
* Cygwin
Link: https://www.cygwin.com/setup-x86.exe
Required packages: libgcc1, openssl, zlib0
Windows Service Windows Service
--------------- ---------------
If all dependencies are installed prior to the installer being run, the broker can be If you wish, mosquitto can be installed as a Windows service so you can
installed as a Windows service. start/stop it from the control panel as well as running it as a normal
You can start/stop it from
the control panel as well as running it as a normal
executable. executable.
When running as a service, the configuration in mosquitto.conf in the When running as a service, the configuration file used is mosquitto.conf in the
installation directory is used so modify this to your needs. directory that you installed to.
If you want to install/uninstall mosquitto as a Windows service run from the
command line as follows:
C:\Program Files\mosquitto\mosquitto install
C:\Program Files\mosquitto\mosquitto uninstall