Skip to content

Commit 11eccfd

Browse files
committed
Create an installer NSI file
1 parent cb4569f commit 11eccfd

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

installer.nsi

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#####
2+
# Installer for TreeStats
3+
4+
5+
##### Globals
6+
!define APPNAME "TreeStats"
7+
!define GUID "{FBC6259D-86FF-4189-ABB9-E2E810E0AC22}"
8+
!define SURROGATE "{71A69713-6593-47EC-0002-0000000DECA1}"
9+
!define DLL "TreeStats.dll"
10+
11+
12+
##### Settings
13+
OutFile "Install.exe"
14+
InstallDir "$PROGRAMFILES\${APPNAME}"
15+
16+
17+
##### Pages
18+
page directory
19+
page instfiles
20+
21+
22+
##### Installer section
23+
# default section start
24+
Section
25+
26+
SetOutPath $INSTDIR
27+
File "bin\Release\${DLL}"
28+
WriteUninstaller $INSTDIR\Uninstall.exe
29+
30+
# Registry
31+
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "" "${APPNAME}"
32+
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Assembly" "${DLL}"
33+
WriteRegDWORD HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Enabled" 0x01
34+
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Object" "${APPNAME}"
35+
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Path" "$INSTDIR"
36+
WriteRegStr HKLM "SOFTWARE\Decal\Plugins\${GUID}" "Surrogate" "${SURROGATE}"
37+
38+
SectionEnd
39+
40+
41+
##### Uninstaller section
42+
Section "un.Uninstall"
43+
44+
delete $INSTDIR\Uninstall.exe
45+
delete "$INSTDIR\${DLL}"
46+
rmDir $INSTDIR
47+
DeleteRegKey HKLM "SOFTWARE\Decal\Plugins\${GUID}"
48+
49+
SectionEnd

0 commit comments

Comments
 (0)