-
Notifications
You must be signed in to change notification settings - Fork 0
/
SeqFileProcessing2D.nsi
50 lines (42 loc) · 2.26 KB
/
SeqFileProcessing2D.nsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
!include "MUI.nsh"
Name "SeqFileProcessing2D"
Icon "SeqFileProcessing2D.ico"
OutFile "SeqFileProcessing2DInstaller.exe"
InstallDir $PROGRAMFILES64\SeqFileProcessing2D
!insertmacro MUI_PAGE_LICENSE "LICENSE.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section ""
SetOutPath $INSTDIR
File build/SeqFileProcessing2D.exe
File SeqFileProcessing2D.ico
WriteUninstaller $INSTDIR\uninstall.exe
CreateShortCut "$DESKTOP\SeqFileProcessing2D.lnk" "$INSTDIR\SeqFileProcessing2D.exe" "" "$INSTDIR\SeqFileProcessing2D.ico"
CreateDirectory "$SMPROGRAMS\SeqFileProcessing2D"
CreateShortCut "$SMPROGRAMS\SeqFileProcessing2D\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\SeqFileProcessing2D.ico"
CreateShortCut "$SMPROGRAMS\SeqFileProcessing2D\SeqFileProcessing2D.lnk" "$INSTDIR\SeqFileProcessing2D.exe" "" "$INSTDIR\SeqFileProcessing2D.ico"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SeqFileProcessing2D" "DisplayName" "SeqFileProcessing2D (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SeqFileProcessing2D" "UninstallString" "$INSTDIR\uninstall.exe"
WriteRegStr HKCR "SeqFileProcessing2D\DefaultIcon" "" "$INSTDIR\SeqFileProcessing2D.ico"
WriteRegStr HKCR "seq_auto_file\Shell\open\command\" "" '"$INSTDIR\SeqFileProcessing2D.exe" "-i" "%1"'
WriteRegStr HKCR "SeqFileProcessing2D\Shell\open\command\" "" '"$INSTDIR\SeqFileProcessing2D.exe" "-i" "%1"'
WriteRegStr HKCR ".seq" "" "SeqFileProcessing2D.exe"
SectionEnd
Section "Uninstall"
Delete "$DESKTOP\SeqFileProcessing2D.lnk"
Delete "$SMPROGRAMS\SeqFileProcessing2D\*.*"
RmDir "$SMPROGRAMS\SeqFileProcessing2D"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\SeqFileProcessing2D"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SeqFileProcessing2D"
DeleteRegKey HKCR "SeqFileProcessing2D\DefaultIcon"
DeleteRegKey HKCR "seq_auto_file\Shell\open\command\"
DeleteRegKey HKCR "SeqFileProcessing2D\Shell\open\command\"
DeleteRegKey HKCR ".seq"
Delete $INSTDIR\uninstall.exe
Delete $INSTDIR\SeqFileProcessing2D.exe
Delete $INSTDIR\SeqFileProcessing2D.ico
RMDir $INSTDIR
SectionEnd