-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathBrainBay_installer.nsi
175 lines (135 loc) · 4.99 KB
/
BrainBay_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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
;--------------------------------
;Include Modern UI 2
!include "MUI2.nsh"
;--------------------------------
;General
;Name and file
Name "BrainBay"
RequestExecutionLevel admin
OutFile "Setup_BrainBay.exe"
;Default installation folder
; InstallDir $PROGRAMFILES\BrainBay
InstallDir "$LOCALAPPDATA\BrainBay"
;Get installation folder from registry if available
; InstallDirRegKey HKLM "Software\BrainBay" "Install_Dir"
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
!define MUI_UNCONFIRMPAGE_TEXT_TOP "!! W A R N I N G !! \
>> Read this first. << \
*Uninstall* will remove ALL FILES from the folder below, \
INCLUDING any of your own .con files \
created in CONFIGURATIONS or other sub-folders. \
YOU MUST SAVE your own files BEFORE \
you press the *Uninstall* button."
;--------------------------------
;Pages
!insertmacro MUI_PAGE_LICENSE "Readme_License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Section "Application" SecApp
SectionIn RO
SetOutPath "$INSTDIR"
File "bin\*.exe"
File "bin\*.cfg"
File "bin\*.dll"
File "bin\*.txt"
File "bin\*.sys"
File "bin\*.pdf"
SetOutPath $INSTDIR\ARCHIVES
File "bin\ARCHIVES\adxl202.arc"
File "bin\ARCHIVES\alpha.arc"
File "bin\ARCHIVES\Calib.edf"
File "bin\ARCHIVES\Osas2002.edf"
File "bin\ARCHIVES\heart.arc"
File "bin\ARCHIVES\muskel_training1.arc"
File "bin\ARCHIVES\emg.arc"
File "bin\ARCHIVES\monolith1.arc"
File "bin\ARCHIVES\ekg_chn1.arc"
File "bin\ARCHIVES\2_channel_test.arc"
File "bin\ARCHIVES\testsignal.txt"
File "bin\ARCHIVES\testsignal.csv"
SetOutPath $INSTDIR\CONFIGURATIONS
File "bin\CONFIGURATIONS\demomenu.con"
SetOutPath $INSTDIR\CONFIGURATIONS\Assistive
File /r "bin\CONFIGURATIONS\Assistive\*.*"
SetOutPath $INSTDIR\CONFIGURATIONS\ECG
File /r "bin\CONFIGURATIONS\ECG\*.*"
SetOutPath $INSTDIR\CONFIGURATIONS\EEG
File /r "bin\CONFIGURATIONS\EEG\*.*"
SetOutPath $INSTDIR\CONFIGURATIONS\EMG
File /r "bin\CONFIGURATIONS\EMG\*.*"
SetOutPath $INSTDIR\CONFIGURATIONS\MultimediaDemos
File /r "bin\CONFIGURATIONS\MultimediaDemos\*.*"
SetOutPath $INSTDIR\CONFIGURATIONS\OtherDemos
File /r "bin\CONFIGURATIONS\OtherDemos\*.*"
SetOutPath $INSTDIR\GRAPHICS
File "bin\GRAPHICS\*.*"
SetOutPath $INSTDIR\MOVIES
File "bin\MOVIES\face.avi"
File "bin\MOVIES\bear.wmv"
File "bin\MOVIES\flower.wmv"
SetOutPath $INSTDIR\NETWORK
File "bin\NETWORK\*.*"
SetOutPath $INSTDIR\PALETTES
File "bin\PALETTES\*.*"
SetOutPath $INSTDIR\PATTERNS
File "bin\PATTERNS\*.*"
SetOutPath $INSTDIR\REPORTS
File "bin\REPORTS\*.*"
SetOutPath $INSTDIR\SKINDIALOGS
File "bin\SKINDIALOGS\*.*"
SetOutPath $INSTDIR\SOUNDS
File "bin\SOUNDS\*.*"
SetOutPath $INSTDIR\TONESCALES
File "bin\TONESCALES\*.*"
SetOutPath $INSTDIR\NeurobitRuntime
File "bin\NeurobitRuntime\*.*"
SetOutPath $INSTDIR\dictionary
File "bin\dictionary\*.*"
SetOutPath $INSTDIR\ComputerVision
File "bin\ComputerVision\*.*"
SetOutPath $SYSDIR
File "bin\NeurobitRuntime\ftd2xx.dll"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\BrainBay "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BrainBay" "DisplayName" "Brainbay Application"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BrainBay" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BrainBay" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BrainBay" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
SetOutPath $INSTDIR
CreateDirectory "$SMPROGRAMS\BrainBay"
CreateShortCut "$SMPROGRAMS\BrainBay\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\BrainBay\BrainBay.lnk" "$INSTDIR\brainbay.exe" "" "$INSTDIR\brainbay.exe" 0
CreateShortCut "$SMPROGRAMS\BrainBay\Readme.lnk" "$INSTDIR\ReadMe_BrainBay.txt" "" "$INSTDIR\ReadMe_BrainBay.txt" 0
CreateShortCut "$DESKTOP\BrainBay.lnk" "$INSTDIR\BrainBay.exe" ""
CreateShortCut "$DESKTOP\Uninstall_BrainBay.lnk" "$INSTDIR\uninstall.exe" ""
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BrainBay"
DeleteRegKey HKLM SOFTWARE\BrainBay
; Remove files and uninstaller
Delete $INSTDIR\*.*
; Delete $INSTDIR\uninstall.exe
; Remove shortcuts, if any
Delete "$SMPROGRAMS\BrainBay\*.*"
; Remove directories used
RMDir "$SMPROGRAMS\BrainBay"
RMDir /r "$INSTDIR"
SectionEnd