source: trunk/brainstorms/PuzzleboxBrainstorms-install.nsi @ 251

Last change on this file since 251 was 251, checked in by sc, 11 years ago

build-win32.bat:

  • minor comment and directory cleanup tweaks

PuzzleboxBrainstorms?-install.nsi:

  • Preparation for 0.4.0 release
File size: 9.4 KB
Line 
1; Puzzlebox Brainstorms Windows Installer
2
3; NOTE: this .NSI script is designed for NSIS v1.8+
4
5Name "Puzzlebox Brainstorms"
6OutFile "PuzzleboxBrainstorms-0.4.0-setup.exe"
7
8; Some default compiler settings (uncomment and change at will):
9; SetCompress auto ; (can be off or force)
10; SetDatablockOptimize on ; (can be off)
11; CRCCheck on ; (can be off)
12; AutoCloseWindow false ; (can be true for the window go away automatically at end)
13; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
14; SetDateSave off ; (can be on to have files restored to their orginal date)
15
16LicenseText "You must agree to this license before installing."
17LicenseData "LICENSE.txt"
18
19InstallDir "$PROGRAMFILES\Puzzlebox Brainstorms"
20InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox Brainstorms\Puzzlebox Brainstorms" ""
21;DirShow show ; (make this hide to not let the user change it)
22DirText "Select the directory to install Puzzlebox Brainstorms into:"
23
24InstallColors /windows
25
26Section "" ; (default section)
27SetOutPath "$INSTDIR"
28; add files / whatever that need to be installed here.
29WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox Brainstorms\Puzzlebox Brainstorms" "" "$INSTDIR"
30WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox Brainstorms\Puzzlebox Brainstorms" "DisplayName" "Puzzlebox Brainstorms (remove only)"
31WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox Brainstorms\Puzzlebox Brainstorms" "UninstallString" '"$INSTDIR\PuzzlesboxBrainstorms-Uninstall.exe"'
32
33 File dist\brainstorms-local.exe
34 File dist\brainstorms-network.exe
35 File puzzlebox_brainstorms_configuration.ini
36
37SetOutPath $INSTDIR\docs
38 File LICENSE.txt
39
40 File docs\readme.txt
41
42SetOutPath $INSTDIR\emokey
43 File emokey\puzzlebox_brainstorms.ekm
44 File emokey\puzzlebox_brainstorms-wheelchair.ekm
45
46SetOutPath $INSTDIR\emoscript
47 File emoscript\puzzlebox_brainstorms-test_drive-push_pull.emo
48 File emoscript\puzzlebox_brainstorms-training-pull.emo
49 File emoscript\puzzlebox_brainstorms-training-push.emo
50
51SetOutPath $INSTDIR\images
52 File images\1-upper_left-orange.png
53 File images\1-upper_left-white.png
54 File images\2-up-orange.png
55 File images\2-up-white.png
56 File images\3-upper_right-orange.png
57 File images\3-upper_right-white.png
58 File images\7-lower_left-orange.png
59 File images\7-lower_left-white.png
60 File images\8-down-orange.png
61 File images\8-down-white.png
62 File images\9-lower_right-orange.png
63 File images\9-lower_right-white.png
64 File images\puzzlebox.ico
65 File images\puzzlebox_logo.png
66 File images\brainstorms-aileron_left.svg
67 File images\brainstorms-aileron_right.svg
68 File images\brainstorms-elevator_forward.svg
69 File images\brainstorms-elevator_reverse.svg
70 File images\brainstorms-fly_forward.svg
71 File images\brainstorms-hover.svg
72 File images\brainstorms-land_arrow.svg
73 File images\brainstorms-rudder-left.svg
74 File images\brainstorms-rudder-right.svg
75 File images\brainstorms_stop.svg
76 File images\brainstorms_wheelchair_forward.svg
77 File images\brainstorms_wheelchair_left.svg
78 File images\brainstorms_wheelchair_reverse.svg
79 File images\brainstorms_wheelchair_right.svg
80 File images\braintorms-throttle_up.svg
81 File images\puzzlebox_helicopter.svg
82
83;SetOutPath $INSTDIR\fonts
84; File dist\fonts\tahomabd.ttf
85; File dist\fonts\tahoma.ttf
86
87;SetOutPath $INSTDIR\package
88; File package\vcredist_x86.exe
89;
90;ExecWait 'package\Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"'
91
92SetOutPath $INSTDIR\package
93 File ..\packaging\win32\vcredist_x86.exe
94
95ExecWait '"$INSTDIR\package\vcredist_x86.exe" /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"'
96
97
98; write out uninstaller
99WriteUninstaller "$INSTDIR\PuzzleboxBrainstorms-Uninstall.exe"
100
101SectionEnd ; end of default section
102
103
104Section "Start Menu + Desktop Icons"
105;  SetOutPath "$SMPROGRAMS\Puzzlebox Brainstorms"
106  SetOutPath $INSTDIR
107  CreateDirectory "$SMPROGRAMS\Puzzlebox Brainstorms"
108  CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms.lnk" \
109                 "$INSTDIR\brainstorms-local.exe" \
110                 ""  "$INSTDIR\images\puzzlebox.ico"  "0"  ""
111;  CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms Network Client.lnk" \
112;                 "$INSTDIR\puzzlebox_brainstorms_client_interface_network.exe" \
113;                 ""  "$INSTDIR\images\puzzlebox.ico"  "0"  ""
114;  CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms Network Server.lnk" \
115;                 "$INSTDIR\puzzlebox_brainstorms_network_server.exe" \
116;                 ""  "$INSTDIR\images\puzzlebox.ico"  "0"  "SW_SHOWMINIMIZED"
117;  CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox ThinkGear Connect Client.lnk" \
118;                 "$INSTDIR\puzzlebox_brainstorms_network_client_thinkgear.exe" \
119;                 ""  "$INSTDIR\images\puzzlebox.ico"  "0"  ""
120  CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Edit Puzzlebox Brainstorms Configuration.lnk" \
121                 "$INSTDIR\puzzlebox_brainstorms_configuration.ini" \
122                 ""  ""  "0"  ""
123  CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Uninstall Puzzlebox Brainstorms.lnk" \
124                 "$INSTDIR\PuzzleboxBrainstorms-Uninstall.exe"
125  CreateShortCut "$DESKTOP\Puzzlebox Brainstorms.lnk" \
126                 "$INSTDIR\brainstorms-local.exe" \
127                 ""  "$INSTDIR\images\puzzlebox.ico"  "0"  ""
128SectionEnd
129
130
131; begin uninstall settings/section
132UninstallText "This will uninstall Puzzlebox Brainstorms from your system"
133
134Section Uninstall
135; add delete commands to delete whatever files/registry keys/etc you installed here.
136 Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms.lnk"
137; Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms Network Client.lnk"
138; Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms Network Server.lnk"
139; Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox ThinkGear Connect Client.lnk"
140 Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Edit Puzzlebox Brainstorms Configuration.lnk"
141 Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Uninstall Puzzlebox Brainstorms.lnk"
142  RMDir "$SMPROGRAMS\Puzzlebox Brainstorms"
143 Delete "$DESKTOP\Puzzlebox Brainstorms.lnk"
144
145
146 Delete $INSTDIR\brainstorms-local.exe
147 Delete $INSTDIR\brainstorms-network.exe
148 Delete $INSTDIR\puzzlebox_brainstorms_configuration.ini
149
150 Delete $INSTDIR\docs\LICENSE.txt
151 Delete $INSTDIR\docs\readme.txt
152  RMDir $INSTDIR\docs
153
154
155 Delete $INSTDIR\emokey\puzzlebox_brainstorms.ekm
156 Delete $INSTDIR\emokey\puzzlebox_brainstorms-wheelchair.ekm
157 Delete $INSTDIR\emoscript\puzzlebox_brainstorms-test_drive-push_pull.emo
158 Delete $INSTDIR\emoscript\puzzlebox_brainstorms-training-pull.emo
159 Delete $INSTDIR\emoscript\puzzlebox_brainstorms-training-push.emo
160  RMDir $INSTDIR\emokey
161  RMDir $INSTDIR\emoscript
162
163 Delete $INSTDIR\images\1-upper_left-orange.png
164 Delete $INSTDIR\images\1-upper_left-white.png
165 Delete $INSTDIR\images\2-up-orange.png
166 Delete $INSTDIR\images\2-up-white.png
167 Delete $INSTDIR\images\3-upper_right-orange.png
168 Delete $INSTDIR\images\3-upper_right-white.png
169 Delete $INSTDIR\images\7-lower_left-orange.png
170 Delete $INSTDIR\images\7-lower_left-white.png
171 Delete $INSTDIR\images\8-down-orange.png
172 Delete $INSTDIR\images\8-down-white.png
173 Delete $INSTDIR\images\9-lower_right-orange.png
174 Delete $INSTDIR\images\9-lower_right-white.png
175 Delete $INSTDIR\images\puzzlebox.ico
176 Delete $INSTDIR\images\puzzlebox_logo.png
177 Delete $INSTDIR\images\brainstorms-aileron_left.svg
178 Delete $INSTDIR\images\brainstorms-aileron_right.svg
179 Delete $INSTDIR\images\brainstorms-elevator_forward.svg
180 Delete $INSTDIR\images\brainstorms-elevator_reverse.svg
181 Delete $INSTDIR\images\brainstorms-fly_forward.svg
182 Delete $INSTDIR\images\brainstorms-hover.svg
183 Delete $INSTDIR\images\brainstorms-land_arrow.svg
184 Delete $INSTDIR\images\brainstorms-rudder-left.svg
185 Delete $INSTDIR\images\brainstorms-rudder-right.svg
186 Delete $INSTDIR\images\brainstorms_stop.svg
187 Delete $INSTDIR\images\brainstorms_wheelchair_forward.svg
188 Delete $INSTDIR\images\brainstorms_wheelchair_left.svg
189 Delete $INSTDIR\images\brainstorms_wheelchair_reverse.svg
190 Delete $INSTDIR\images\brainstorms_wheelchair_right.svg
191 Delete $INSTDIR\images\braintorms-throttle_up.svg
192 Delete $INSTDIR\images\puzzlebox_helicopter.svg
193  RMDir $INSTDIR\images
194
195; Delete $INSTDIR\fonts\tahomabd.ttf
196; Delete $INSTDIR\fonts\tahoma.ttf
197; RMDir $INSTDIR\fonts
198
199 Delete $INSTDIR\package\vcredist_x86.exe
200  RMDir $INSTDIR\package
201
202; RMDIR $INSTDIR
203
204Delete "$INSTDIR\PuzzleboxBrainstorms-Uninstall.exe"
205DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox Brainstorms\Puzzlebox Brainstorms"
206DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox Brainstorms"
207;RMDir "$INSTDIR"
208
209
210 RMDIR $INSTDIR
211
212
213  ; if $INSTDIR was removed, skip these next ones
214  IfFileExists $INSTDIR 0 Removed
215    MessageBox MB_YESNO|MB_ICONQUESTION \
216      "Remove all files in your Puzzlebox Brainstorms directory? (If you have anything \
217you created that you want to keep, click No)" IDNO Removed
218    Delete $INSTDIR\*.* ; this would be skipped if the user hits no
219    RMDir /r $INSTDIR
220    IfFileExists $INSTDIR 0 Removed
221      MessageBox MB_OK|MB_ICONEXCLAMATION \
222                 "Note: $INSTDIR could not be removed."
223  Removed:
224
225
226SectionEnd ; end of uninstall section
227
228; eof
229
Note: See TracBrowser for help on using the repository browser.