summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-01-25 10:31:03 +0000
committerSimon MacMullen <simon@rabbitmq.com>2011-01-25 10:31:03 +0000
commit980034c74b3c5030498419cbb42c1853a21d833e (patch)
tree741f668889c6613c00362ba25dd4e97eec839e1e /packaging
parent7fa2a589e2b85d5ad9a4b9021ae0d5667555f959 (diff)
downloadrabbitmq-server-git-980034c74b3c5030498419cbb42c1853a21d833e.tar.gz
Actually set ERLANG_HOME.
Diffstat (limited to 'packaging')
-rw-r--r--packaging/windows-exe/rabbitmq_nsi.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/packaging/windows-exe/rabbitmq_nsi.in b/packaging/windows-exe/rabbitmq_nsi.in
index a11f45c3be..693f0cf436 100644
--- a/packaging/windows-exe/rabbitmq_nsi.in
+++ b/packaging/windows-exe/rabbitmq_nsi.in
@@ -1,6 +1,9 @@
; Use the "Modern" UI
!include MUI2.nsh
!include LogicLib.nsh
+!include "winmessages.nsh"
+
+!define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
;--------------------------------
@@ -99,6 +102,8 @@ Section "Uninstall"
;RMDir "$SMPROGRAMS\RabbitMQ"
;RMDir "$INSTDIR"
+ ; TODO: unset ERLANG_HOME?
+
SectionEnd
;--------------------------------
@@ -126,7 +131,10 @@ Function findErlang
Abort
${Else}
ReadRegStr $0 HKLM "Software\Ericsson\Erlang\$2" ""
- MessageBox MB_OK "Erlang is installed at: $0"
+
+ ; See http://nsis.sourceforge.net/Setting_Environment_Variables
+ WriteRegExpandStr ${env_hklm} ERLANG_HOME $0
+ SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
${EndIf}
FunctionEnd \ No newline at end of file