The installer now also copies the DLLs + some string changes.
1 parent 98a9837 commit 8a550d0a42fc60106e207d8ecbe60722fd1d112e
@Sönke Ludwig Sönke Ludwig authored on 1 Mar 2013
Showing 1 changed file
View
22
installer/win/installer.nsi
;--------------------------------------------------------
 
; Options
!define Version "0.9.9"
!define DubExecPath "..\..\dub.exe"
!define DubExecPath "..\.."
 
;--------------------------------------------------------
; Includes
;--------------------------------------------------------
; General definitions
;--------------------------------------------------------
 
; Name of the installer
Name "dub Package Manager ${Version}"
Name "DUB Package Manager ${Version}"
 
; Name of the output file of the installer
OutFile "dub-${Version}-setup.exe"
 
; Create installation directory
CreateDirectory "$INSTDIR"
File "${DubExecPath}"
File "${DubExecPath}\dub.exe"
File "${DubExecPath}\libcurl.dll"
File "${DubExecPath}\libeay32.dll"
File "${DubExecPath}\ssleay32.dll"
; Create command line batch file
FileOpen $0 "$INSTDIR\dubvars.bat" w
FileWrite $0 "@echo.$\n"
; Write installation dir in the registry
WriteRegStr HKLM SOFTWARE\dub "Install_Dir" "$INSTDIR"
 
; Write registry keys to make uninstall from Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\dub" "DisplayName" "dub"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\dub" "DisplayName" "DUB package manager"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\dub" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\dub" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\dub" "NoRepair" 1
WriteUninstaller "uninstall.exe"
${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR"
 
SectionEnd
 
Section /o "Start Menu shortcuts" StartMenuShortcuts
CreateDirectory "$SMPROGRAMS\dub"
Section /o "Start menu shortcuts" StartMenuShortcuts
CreateDirectory "$SMPROGRAMS\DUB"
 
; install dub command prompt
CreateShortCut "$SMPROGRAMS\dub\dub Command Prompt.lnk" '%comspec%' '/k ""$INSTDIR\dubvars.bat""' "" "" SW_SHOWNORMAL "" "Open dub Command Prompt"
CreateShortCut "$SMPROGRAMS\DUB\DUB Command Prompt.lnk" '%comspec%' '/k ""$INSTDIR\dubvars.bat""' "" "" SW_SHOWNORMAL "" "Open DUB Command Prompt"
 
CreateShortCut "$SMPROGRAMS\dub\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\DUB\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
SectionEnd
 
;--------------------------------------------------------
; Uninstaller