[Sumover-dev] [svn commit] r3832 - rat/trunk

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Fri Sep 8 20:54:40 BST 2006


Author: piers
Date: Fri Sep  8 20:55:28 2006
New Revision: 3832

Added:
   rat/trunk/rat-nsis-installer.nsi

Log:
NSIS installer creation script - compile and run it using NSIS tools from http://nsis.sourceforge.net/

Added: rat/trunk/rat-nsis-installer.nsi
==============================================================================
--- (empty file)
+++ rat/trunk/rat-nsis-installer.nsi	Fri Sep  8 20:55:28 2006
@@ -0,0 +1,124 @@
+; Script generated by the HM NIS Edit Script Wizard.
+
+; HM NIS Edit Wizard helper defines
+!define PRODUCT_NAME "RAT"
+!define PRODUCT_VERSION "4.2.27"
+!define PRODUCT_PUBLISHER "UCL"
+!define PRODUCT_WEB_SITE "http://mediatools.cs.ucl.ac.uk/mbone/mmedia"
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\vic.exe"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
+
+; for path manipulation
+;http://nsis.sourceforge.net/wiki/Path_Manipulation
+!include "AddToPath.nsh"
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP  "${NSISDIR}\Contrib\Graphics\Header\orange.bmp"
+!define MUI_WELCOMEPAGE_TITLE "UCL Media Tools Installer\r\n${PRODUCT_NAME} ${PRODUCT_VERSION}"
+
+; Welcome page
+!insertmacro MUI_PAGE_WELCOME
+; License page
+!insertmacro MUI_PAGE_LICENSE "rat\COPYRIGHT"
+; Directory page
+!insertmacro MUI_PAGE_DIRECTORY
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+!insertmacro MUI_PAGE_FINISH
+
+; Uninstaller pages
+!insertmacro MUI_UNPAGE_INSTFILES
+
+; Language files
+!insertmacro MUI_LANGUAGE "English"
+
+; MUI end ------
+
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
+OutFile "Setup.exe"
+InstallDir "$PROGRAMFILES\UCL Media Tools"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+ShowInstDetails show
+ShowUnInstDetails show
+
+Section "MainSection" SEC01
+  SetOutPath "$INSTDIR"
+  SetOverwrite ifnewer
+  File "rat\Debug\rat.exe"
+  CreateDirectory "$SMPROGRAMS\UCL Media Tools"
+  CreateShortCut "$SMPROGRAMS\UCL Media Tools\RAT.lnk" "$INSTDIR\rat.exe"
+  CreateShortCut "$DESKTOP\Vic.lnk" "$INSTDIR\RAT.exe"
+  File "rat\Debug\ratmedia.exe"
+  File "rat\Debug\ratui.exe"
+SectionEnd
+
+Section "Add to path"
+  Push $INSTDIR
+  Call AddToPath
+
+  ;likewise AddToPath could be
+  ;Push "PATH"
+  ;Push $INSTDIR
+  ;Call AddToEnvVar
+SectionEnd
+
+Section -AdditionalIcons
+  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
+  CreateShortCut "$SMPROGRAMS\UCL Media Tools\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
+  CreateShortCut "$SMPROGRAMS\UCL Media Tools\Uninstall.lnk" "$INSTDIR\uninst.exe"
+SectionEnd
+
+Section -Post
+  WriteUninstaller "$INSTDIR\uninst.exe"
+  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vic.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\rat.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
+SectionEnd
+
+
+Function un.onUninstSuccess
+  HideWindow
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
+FunctionEnd
+
+Function un.onInit
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
+  Abort
+FunctionEnd
+
+Section Uninstall
+  Delete "$INSTDIR\${PRODUCT_NAME}.url"
+  Delete "$INSTDIR\uninst.exe"
+  Delete "$INSTDIR\rat.exe"
+  Delete "$INSTDIR\ratui.exe"
+  Delete "$INSTDIR\ratmedia.exe"
+
+  Delete "$SMPROGRAMS\UCL Media Tools\Uninstall.lnk"
+  Delete "$SMPROGRAMS\UCL Media Tools\Website.lnk"
+  Delete "$DESKTOP\RAT.lnk"
+  Delete "$SMPROGRAMS\UCL Media Tools\RAT.lnk"
+
+  Push $INSTDIR
+  Call un.RemoveFromPath
+
+  RMDir "$SMPROGRAMS\UCL Media Tools"
+  RMDir "$INSTDIR"
+
+  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
+  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
+  SetAutoClose true
+SectionEnd
\ No newline at end of file



More information about the Sumover-dev mailing list