Add NSI installer script
[SnapShooter.git] / installer.nsi
diff --git a/installer.nsi b/installer.nsi
new file mode 100644 (file)
index 0000000..6568306
--- /dev/null
@@ -0,0 +1,44 @@
+!define VERSION "1.0"
+Name "SnapShooter ${VERSION}"
+OutFile "SnapShooterSetup.exe"
+InstallDir "$PROGRAMFILES\Dominion Of Awesome\SnapShooter"
+
+Page directory
+Page components
+Page instfiles
+UninstPage uninstConfirm
+UninstPage instfiles
+
+Section "SnapShooter"
+  SetShellVarContext all
+  SetOutPath $INSTDIR
+  File "SnapShooter\bin\Release\SnapShooter.exe"
+  File "SnapShooter\bin\Release\DominionOfAwesome.Transit.dll"
+  File "SnapShooter\bin\Release\Microsoft.WindowsAPICodePack.dll"
+  File "SnapShooter\bin\Release\Microsoft.WindowsAPICodePack.Shell.dll"
+
+  WriteUninstaller "$INSTDIR\Uninst.exe"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "DisplayName" "SnapShooter" 
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "UninstallString" "$\"$INSTDIR\Uninst.exe$\"" 
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "Publisher" "The Dominion of Awesome" 
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "HelpLink" "http://dominionofawesome.com/software/" 
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "URLInfoAbout" "http://dominionofawesome.com/software/" 
+  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "NoModify" "1" 
+  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "NoRepair" "1" 
+  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter" "EstimatedSize" "700"
+SectionEnd
+
+Section "Start Menu shortcuts"
+  SetShellVarContext all
+  CreateDirectory "$SMPROGRAMS\SnapShooter"
+
+  CreateShortCut "$SMPROGRAMS\SnapShooter\SnapShooter.lnk" "$INSTDIR\WpfSnapShooter.exe"
+SectionEnd
+
+Section "Uninstall"
+  SetShellVarContext all
+  RMDir /r $INSTDIR
+  RMDir "$PROGRAMFILES\Dominion Of Awesome"
+  RMDir /r "$SMPROGRAMS\SnapShooter"
+  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SnapShooter"
+SectionEnd