-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathradegast_voicepack.nsi
97 lines (74 loc) · 3.02 KB
/
radegast_voicepack.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Includes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!include "LogicLib.nsh"
!include WordFunc.nsh
!include "FileFunc.nsh"
!insertmacro VersionCompare
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Compiler flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SetOverwrite on ; overwrite files
SetCompress auto ; compress iff saves space
SetCompressor /solid lzma ; compress whole installer as one block
SetDatablockOptimize off ; only saves us 0.1%, not worth it
XPStyle on ; add an XP manifest to the installer
RequestExecutionLevel admin ; on Vista we must be admin because we write to Program Files
LangString LanguageCode ${LANG_ENGLISH} "en"
!define INSTPROG "Radegast"
!define APPNAME "RadegastVoicepack"
!define VERSION "1.0"
!define UNINST_REG "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
; The name of the installer
Name "${APPNAME}"
; The file to write
OutFile "..\${APPNAME}-${VERSION}.exe"
; The default installation directory
InstallDir "$PROGRAMFILES\${INSTPROG}"
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\${APPNAME}" "Install_Dir"
;--------------------------------
LicenseText "Please review the Vivox license terms before installing Radegast Voicepack"
LicenseData "Vivox-License.rtf"
; Pages
Page license
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
; The stuff to install
Section "${APPNAME} core (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File /x *.nsi /x *.bak /x *~ /x .* *.*
; Write the installation path into the registry
WriteRegStr HKLM "SOFTWARE\${APPNAME}" "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM ${UNINST_REG} "DisplayName" "${APPNAME}"
WriteRegStr HKLM ${UNINST_REG} "UninstallString" '"$INSTDIR\uninstall_voice.exe"'
WriteRegStr HKLM ${UNINST_REG} "QuietUninstallString" '"$INSTDIR\uninstall_voice.exe" /S'
WriteRegStr HKLM ${UNINST_REG} "Publisher" "Radegast Development Team"
WriteRegStr HKLM ${UNINST_REG} "DisplayVersion" "${VERSION}"
WriteRegDWORD HKLM ${UNINST_REG} "NoModify" 1
WriteRegDWORD HKLM ${UNINST_REG} "NoRepair" 1
WriteUninstaller "uninstall_voice.exe"
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM ${UNINST_REG}
DeleteRegKey HKLM "SOFTWARE\${APPNAME}"
; Remove files and uninstaller
Delete $INSTDIR\SLVoice.exe
Delete $INSTDIR\Vivox-License.rtf
Delete $INSTDIR\alut.dll
Delete $INSTDIR\ortp.dll
Delete $INSTDIR\vivoxsdk.dll
Delete $INSTDIR\wrap_oal.dll
Delete $INSTDIR\uninstall_voice.exe
SectionEnd