diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-11-13 11:58:45 +0100 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-11-13 11:58:45 +0100 |
| commit | c9cb9b45f8ed08b49804ee98af2c8e19e75f9dbf (patch) | |
| tree | 5fc31dd6d91f98274863559e126e855cdf26af9d /packaging | |
| parent | 9ce5036edd3d9ef116285565c8de8124601389e4 (diff) | |
| download | rabbitmq-server-git-c9cb9b45f8ed08b49804ee98af2c8e19e75f9dbf.tar.gz | |
packaging/windows-exe: Always install in \Program Files
... even on 64-bit Windows (instead of `\Program Files (x86)`
previoously).
This change of directory takes effect for new installs only, not for
updates.
Diffstat (limited to 'packaging')
| -rw-r--r-- | packaging/windows-exe/rabbitmq_nsi.in | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/packaging/windows-exe/rabbitmq_nsi.in b/packaging/windows-exe/rabbitmq_nsi.in index 7ad711ba38..c3a7fc9ff1 100644 --- a/packaging/windows-exe/rabbitmq_nsi.in +++ b/packaging/windows-exe/rabbitmq_nsi.in @@ -4,6 +4,7 @@ !include WinMessages.nsh !include FileFunc.nsh !include WordFunc.nsh +!include x64.nsh !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' !define uninstall "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" @@ -19,8 +20,10 @@ OutFile "rabbitmq-server-%%VERSION%%.exe" ; Icons !define MUI_ICON "rabbitmq.ico" -; The default installation directory -InstallDir "$PROGRAMFILES\RabbitMQ Server" +; The default installation directory is empty. The .onInit function +; below takes care of selecting the appropriate (32-bit vs. 64-bit) +; "Program Files". +InstallDir "" ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) @@ -182,6 +185,16 @@ SectionEnd ; Functions Function .onInit + ; By default, always install in "\Program Files", not matter if we run + ; on a 32-bit or 64-bit Windows. + ${If} $INSTDIR == ""; + ${If} ${RunningX64} + StrCpy $INSTDIR "$PROGRAMFILES64\RabbitMQ Server" + ${Else} + StrCpy $INSTDIR "$PROGRAMFILES\RabbitMQ Server" + ${EndIf} + ${EndIf} + Call findErlang ReadRegStr $0 HKLM ${uninstall} "UninstallString" |
