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

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

PuzzleboxBrainstorms?-0.4.0-setup.exe:

  • comment cleanup
File size: 8.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\Edit Puzzlebox Brainstorms Configuration.lnk" \
112                 "$INSTDIR\puzzlebox_brainstorms_configuration.ini" \
113                 ""  ""  "0"  ""
114  CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Uninstall Puzzlebox Brainstorms.lnk" \
115                 "$INSTDIR\PuzzleboxBrainstorms-Uninstall.exe"
116  CreateShortCut "$DESKTOP\Puzzlebox Brainstorms.lnk" \
117                 "$INSTDIR\brainstorms-local.exe" \
118                 ""  "$INSTDIR\images\puzzlebox.ico"  "0"  ""
119SectionEnd
120
121
122; begin uninstall settings/section
123UninstallText "This will uninstall Puzzlebox Brainstorms from your system"
124
125Section Uninstall
126; add delete commands to delete whatever files/registry keys/etc you installed here.
127 Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms.lnk"
128 Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Edit Puzzlebox Brainstorms Configuration.lnk"
129 Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Uninstall Puzzlebox Brainstorms.lnk"
130  RMDir "$SMPROGRAMS\Puzzlebox Brainstorms"
131 Delete "$DESKTOP\Puzzlebox Brainstorms.lnk"
132
133
134 Delete $INSTDIR\brainstorms-local.exe
135 Delete $INSTDIR\brainstorms-network.exe
136 Delete $INSTDIR\puzzlebox_brainstorms_configuration.ini
137
138 Delete $INSTDIR\docs\LICENSE.txt
139 Delete $INSTDIR\docs\readme.txt
140  RMDir $INSTDIR\docs
141
142
143 Delete $INSTDIR\emokey\puzzlebox_brainstorms.ekm
144 Delete $INSTDIR\emokey\puzzlebox_brainstorms-wheelchair.ekm
145 Delete $INSTDIR\emoscript\puzzlebox_brainstorms-test_drive-push_pull.emo
146 Delete $INSTDIR\emoscript\puzzlebox_brainstorms-training-pull.emo
147 Delete $INSTDIR\emoscript\puzzlebox_brainstorms-training-push.emo
148  RMDir $INSTDIR\emokey
149  RMDir $INSTDIR\emoscript
150
151 Delete $INSTDIR\images\1-upper_left-orange.png
152 Delete $INSTDIR\images\1-upper_left-white.png
153 Delete $INSTDIR\images\2-up-orange.png
154 Delete $INSTDIR\images\2-up-white.png
155 Delete $INSTDIR\images\3-upper_right-orange.png
156 Delete $INSTDIR\images\3-upper_right-white.png
157 Delete $INSTDIR\images\7-lower_left-orange.png
158 Delete $INSTDIR\images\7-lower_left-white.png
159 Delete $INSTDIR\images\8-down-orange.png
160 Delete $INSTDIR\images\8-down-white.png
161 Delete $INSTDIR\images\9-lower_right-orange.png
162 Delete $INSTDIR\images\9-lower_right-white.png
163 Delete $INSTDIR\images\puzzlebox.ico
164 Delete $INSTDIR\images\puzzlebox_logo.png
165 Delete $INSTDIR\images\brainstorms-aileron_left.svg
166 Delete $INSTDIR\images\brainstorms-aileron_right.svg
167 Delete $INSTDIR\images\brainstorms-elevator_forward.svg
168 Delete $INSTDIR\images\brainstorms-elevator_reverse.svg
169 Delete $INSTDIR\images\brainstorms-fly_forward.svg
170 Delete $INSTDIR\images\brainstorms-hover.svg
171 Delete $INSTDIR\images\brainstorms-land_arrow.svg
172 Delete $INSTDIR\images\brainstorms-rudder-left.svg
173 Delete $INSTDIR\images\brainstorms-rudder-right.svg
174 Delete $INSTDIR\images\brainstorms_stop.svg
175 Delete $INSTDIR\images\brainstorms_wheelchair_forward.svg
176 Delete $INSTDIR\images\brainstorms_wheelchair_left.svg
177 Delete $INSTDIR\images\brainstorms_wheelchair_reverse.svg
178 Delete $INSTDIR\images\brainstorms_wheelchair_right.svg
179 Delete $INSTDIR\images\braintorms-throttle_up.svg
180 Delete $INSTDIR\images\puzzlebox_helicopter.svg
181  RMDir $INSTDIR\images
182
183; Delete $INSTDIR\fonts\tahomabd.ttf
184; Delete $INSTDIR\fonts\tahoma.ttf
185; RMDir $INSTDIR\fonts
186
187 Delete $INSTDIR\package\vcredist_x86.exe
188  RMDir $INSTDIR\package
189
190; RMDIR $INSTDIR
191
192Delete "$INSTDIR\PuzzleboxBrainstorms-Uninstall.exe"
193DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox Brainstorms\Puzzlebox Brainstorms"
194DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox Brainstorms"
195;RMDir "$INSTDIR"
196
197
198 RMDIR $INSTDIR
199
200
201  ; if $INSTDIR was removed, skip these next ones
202  IfFileExists $INSTDIR 0 Removed
203    MessageBox MB_YESNO|MB_ICONQUESTION \
204      "Remove all files in your Puzzlebox Brainstorms directory? (If you have anything \
205you created that you want to keep, click No)" IDNO Removed
206    Delete $INSTDIR\*.* ; this would be skipped if the user hits no
207    RMDir /r $INSTDIR
208    IfFileExists $INSTDIR 0 Removed
209      MessageBox MB_OK|MB_ICONEXCLAMATION \
210                 "Note: $INSTDIR could not be removed."
211  Removed:
212
213
214SectionEnd ; end of uninstall section
215
216; eof
217
Note: See TracBrowser for help on using the repository browser.