summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-01-24 17:29:39 +0000
committerSimon MacMullen <simon@rabbitmq.com>2011-01-24 17:29:39 +0000
commite37e4ec481e8265802fe381779bd702164679082 (patch)
tree38d21a5de61e53609a2e4596bb2b1b4ed4fb6725
parentdfa3b00ed59369d0134f3de7045ab0852c66dd49 (diff)
downloadrabbitmq-server-git-e37e4ec481e8265802fe381779bd702164679082.tar.gz
The start of an installer. Just install the zip file.
-rw-r--r--.hgignore3
-rw-r--r--packaging/windows-exe/Makefile18
-rw-r--r--packaging/windows-exe/rabbitmq_nsi.in84
3 files changed, 105 insertions, 0 deletions
diff --git a/.hgignore b/.hgignore
index 03b60914a3..912b4a5676 100644
--- a/.hgignore
+++ b/.hgignore
@@ -25,6 +25,9 @@ syntax: regexp
^packaging/macports/macports$
^packaging/generic-unix/rabbitmq-server-generic-unix-.*\.tar\.gz$
^packaging/windows/rabbitmq-server-windows-.*\.zip$
+^packaging/windows-exe/rabbitmq_server-.*$
+^packaging/windows-exe/rabbitmq-.*\.nsi$
+^packaging/windows-exe/rabbitmq-server-.*\.exe$
^docs/.*\.[15]\.gz$
^docs/.*\.man\.xml$
diff --git a/packaging/windows-exe/Makefile b/packaging/windows-exe/Makefile
new file mode 100644
index 0000000000..af46ec9c4f
--- /dev/null
+++ b/packaging/windows-exe/Makefile
@@ -0,0 +1,18 @@
+# You must be on cygwin under Windows. NSIS must be installed and in your path
+
+VERSION=0.0.0
+ZIP=../windows/rabbitmq-server-windows-$(VERSION)
+
+dist: rabbitmq-$(VERSION).nsi rabbitmq_server-$(VERSION)
+ makensis rabbitmq-$(VERSION).nsi
+
+rabbitmq-$(VERSION).nsi: rabbitmq_nsi.in
+ sed \
+ -e 's|%%VERSION%%|$(VERSION)|' \
+ $< > $@
+
+rabbitmq_server-$(VERSION):
+ unzip $(ZIP)
+
+clean:
+ rm -rf rabbitmq-*.nsi rabbitmq_server-*
diff --git a/packaging/windows-exe/rabbitmq_nsi.in b/packaging/windows-exe/rabbitmq_nsi.in
new file mode 100644
index 0000000000..fe634a467d
--- /dev/null
+++ b/packaging/windows-exe/rabbitmq_nsi.in
@@ -0,0 +1,84 @@
+; Use the "Modern" UI
+!include MUI2.nsh
+
+;--------------------------------
+
+; The name of the installer
+Name "RabbitMQ"
+
+; The file to write
+OutFile "rabbitmq-server-v%%VERSION%%.exe"
+
+; The default installation directory
+InstallDir $PROGRAMFILES\RabbitMQ
+
+; Registry key to check for directory (so if you install again, it will
+; overwrite the old one automatically)
+InstallDirRegKey HKLM "Software\RabbitMQ" "Install_Dir"
+
+; Request application privileges for Windows Vista
+RequestExecutionLevel admin
+
+; Windows XP
+TargetMinimalOS 5.1
+
+;--------------------------------
+
+; Pages
+
+
+ !insertmacro MUI_PAGE_LICENSE "..\..\LICENSE-MPL-RabbitMQ"
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_PAGE_FINISH
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+; !insertmacro MUI_UNPAGE_FINISH
+
+;--------------------------------
+
+; The stuff to install
+Section "RabbitMQ (required)"
+
+ SectionIn RO
+
+ ; Set output path to the installation directory.
+ SetOutPath $INSTDIR
+
+ ; Put file there
+ File /r "rabbitmq_server-%%VERSION%%"
+
+ ; Write the installation path into the registry
+ WriteRegStr HKLM SOFTWARE\RabbitMQ "Install_Dir" "$INSTDIR"
+
+ ; Write the uninstall keys for Windows
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" "DisplayName" "RabbitMQ"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" "NoRepair" 1
+ WriteUninstaller "uninstall.exe"
+SectionEnd
+
+;--------------------------------
+
+; Uninstaller
+
+Section "Uninstall"
+
+ ; Remove registry keys
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
+ DeleteRegKey HKLM SOFTWARE\RabbitMQ
+
+ ; Remove files and uninstaller
+ RMDir /r $INSTDIR
+
+ ; Remove shortcuts, if any
+ ;Delete "$SMPROGRAMS\RabbitMQ\*.*"
+
+ ; Remove directories used
+ ;RMDir "$SMPROGRAMS\RabbitMQ"
+ ;RMDir "$INSTDIR"
+
+SectionEnd