User Tools

Site Tools


nsis_script

This is an old revision of the document!


NSIS (http://nsis.sourceforge.net) is used to create the install program for the Windows version of the Manitou-Mail user interface. It assumes the existence of a c:\manitou\nsis-installer directory, and that this directory contains manitou.exe, the Qt DLLs, and help/ xpm/ translations/ sub-directories, as well as assistant_adp.exe, which is the program for the Qt help system.

The script:

!include "MUI.nsh"

!define VERSION "0.9.11"


Name "Manitou-Mail ${VERSION} user interface"
Caption "Manitou-Mail installation"
;Icon "c:\manitou\nsis-installer\install.ico"

OutFile "Manitou-Installer.exe"

InstallDir "$PROGRAMFILES\Manitou-Mail"


!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "c:\manitou\nsis-installer\manitou-logo.bmp"

;Pages
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
  
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"

Section "Main Section" SecMain
  SetOutPath "$INSTDIR"
  File manitou.exe
  File assistant_adp.exe
  File /r xpm
  File *.dll
  File /r help
  File /r translations

  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DisplayName" \
  "Manitou-Mail" "Manitou Mail -- user interface"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Manitou-Mail" \
  "UninstallString" "$INSTDIR\uninstall.exe"

  WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd

LangString DESC_SecMain ${LANG_ENGLISH} "Manitou-Mail installation."


Section "Uninstall"
  Delete "$INSTDIR\manitou.exe"
  Delete "$INSTDIR\assistant_adp.exe"
  Delete "$INSTDIR\xpm\*.*"
  RMDir "$INSTDIR\xpm"
  Delete "$INSTDIR\Uninstall.exe"
  RMDir "$INSTDIR"
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Manitou-Mail"
SectionEnd
nsis_script.1244588359.txt.gz · Last modified: 2009/06/09 22:59 by daniel