forked from movitto/snap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installer.nsi
53 lines (40 loc) · 1.55 KB
/
installer.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
51
52
53
; Snap windows installer
;--------------------------------
;Configuration
;General
Name "Snap! System Snapshotter"
OutFile "snap-installer.exe"
;Folder selection page
InstallDir "$PROGRAMFILES\snap"
;Get install folder from registry if available
InstallDirRegKey HKLM "SOFTWARE\Snap" ""
;---------------------------------
!Include "MUI.nsh"
!include "Sections.nsh"
!include "logiclib.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section "Installer Section" inst_sec
SetOutPath $INSTDIR
File "dist\\library.zip"
File "dist\\python27.dll"
File "dist\\snaptool.exe"
File "resources\\snap.conf"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Snap" \
"DisplayName" "Snap System Snapshotter"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Snap" \
"Publisher" "Mo Morsi"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Snap" \
"UninstallString" "$\"$INSTDIR\uninstaller.exe$\""
; TODO http://nsis.sourceforge.net/Signing_an_Uninstaller
writeUninstaller $INSTDIR\uninstaller.exe
SectionEnd
Section "un.Uninstaller Section" uinst_sec
delete "$INSTDIR\\library.zip"
delete "$INSTDIR\\python27.dll"
delete "$INSTDIR\\snaptool.exe"
delete "$INSTDIR\\uninstaller.exe"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Snap"
SectionEnd