Add NSI installer script
[SnapShooter.git] / installer.nsi
1 !define VERSION "1.0"
2 Name "SnapShooter ${VERSION}"
3 OutFile "SnapShooterSetup.exe"
4 InstallDir "$PROGRAMFILES\Dominion Of Awesome\SnapShooter"
5
6 Page directory
7 Page components
8 Page instfiles
9 UninstPage uninstConfirm
10 UninstPage instfiles
11
12 Section "SnapShooter"
13   SetShellVarContext all
14   SetOutPath $INSTDIR
15   File "SnapShooter\bin\Release\SnapShooter.exe"
16   File "SnapShooter\bin\Release\DominionOfAwesome.Transit.dll"
17   File "SnapShooter\bin\Release\Microsoft.WindowsAPICodePack.dll"
18   File "SnapShooter\bin\Release\Microsoft.WindowsAPICodePack.Shell.dll"
19
20   WriteUninstaller "$INSTDIR\Uninst.exe"
21   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "DisplayName" "SnapShooter" 
22   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "UninstallString" "$\"$INSTDIR\Uninst.exe$\"" 
23   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "Publisher" "The Dominion of Awesome" 
24   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "HelpLink" "http://dominionofawesome.com/software/" 
25   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "URLInfoAbout" "http://dominionofawesome.com/software/" 
26   WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "NoModify" "1" 
27   WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "NoRepair" "1" 
28   WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "EstimatedSize" "700"
29 SectionEnd
30
31 Section "Start Menu shortcuts"
32   SetShellVarContext all
33   CreateDirectory "$SMPROGRAMS\SnapShooter"
34
35   CreateShortCut "$SMPROGRAMS\SnapShooter\SnapShooter.lnk" "$INSTDIR\WpfSnapShooter.exe"
36 SectionEnd
37
38 Section "Uninstall"
39   SetShellVarContext all
40   RMDir /r $INSTDIR
41   RMDir "$PROGRAMFILES\Dominion Of Awesome"
42   RMDir /r "$SMPROGRAMS\SnapShooter"
43   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter"
44 SectionEnd