-
Notifications
You must be signed in to change notification settings - Fork 4
/
Installer.nsi
52 lines (37 loc) · 1.23 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
#####
# Installer for TownCrier
##### Globals
!define APPNAME "TownCrier"
!define GUID "{F86E1BAE-C2F8-4060-9B98-CD74EB41EB6E}"
!define SURROGATE "{71A69713-6593-47EC-0002-0000000DECA1}"
!define DLL "TownCrier.dll"
!define NewtonsoftJSON "Newtonsoft.Json.dll"
##### Settings
OutFile "InstallTownCrier_v1.3.2.exe"
InstallDir "$PROGRAMFILES\${APPNAME}"
##### Pages
page directory
page instfiles
##### Installer section
# default section start
Section
SetOutPath $INSTDIR
File "bin\Release\${DLL}"
File "bin\Release\${NewtonsoftJSON}"
WriteUninstaller $INSTDIR\Uninstall.exe
# Registry
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "" "${APPNAME}"
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Assembly" "${DLL}"
WriteRegDWORD HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Enabled" 0x01
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Object" "${APPNAME}.PluginCore"
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Path" "$INSTDIR"
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Surrogate" "${SURROGATE}"
SectionEnd
##### Uninstaller section
Section "un.Uninstall"
delete $INSTDIR\Uninstall.exe
delete "$INSTDIR\${DLL}"
delete "$INSTDIR\${NewtonsoftJSON}"
rmDir $INSTDIR
DeleteRegKey HKLM "SOFTWARE\Decal\Plugins\${GUID}"
SectionEnd