changed beta1 to beta2
[xboard.git] / winboard / install / installer / wb440.nsi
1 ; WinBoard-4.4.0 MUI
2 ;
3 ;
4
5 !define FILES "..\files\"
6 !define ROOT "${FILES}root\"
7 !define FNTDIR "${FILES}fonts\"
8
9 ; grab the FontName plugin from NSIS for these
10 !include FontRegAdv.nsh
11 !include FontName.nsh
12
13 ;--------------------------------
14 ;Include Modern UI
15 !include "MUI.nsh"
16
17 ;--------------------------------
18
19 !define InstName "WinBoard"
20 !define InstVersion "4.4.0beta2"
21 !define InstBaseDir "WinBoard-4.4.0"
22
23 ;--------------------------------
24 ; General
25 ;
26
27 Name "${InstName} ${InstVersion}"
28 Caption "WinBoard - Chessboard For Windows"
29 OutFile "WinBoard-4.4.0beta2.exe"
30 InstallDir $PROGRAMFILES\${InstBaseDir}
31
32 SetCompressor lzma
33 SetDateSave on
34 SetDatablockOptimize on
35 CRCCheck on
36 SilentInstall normal
37 ;BGGradient 000000 4682b4 FFFFFF
38 ;XPStyle on
39
40 ;--------------------------------
41 ;Variables
42
43   Var INI_VALUE
44   Var START_MENU_FOLDER
45   Var MUI_TEMP
46
47 ;--------------------------------
48
49
50 ;!define MUI_ICON "knight.ico"
51 ;!define MUI_UNICON "wc_uninst.ico"
52 !define MUI_WELCOMEFINISHPAGE_BITMAP "welcome_chess.bmp"
53
54 ;--------------------------------
55 ;Interface Settings
56
57     !define MUI_ABORTWARNING
58     ;!define MUI_COMPONENTSPAGE_NODESC
59     !define MUI_COMPONENTSPAGE_SMALLDESC
60     !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ${InstName} ${InstVersion}.\n\n\n\n\nClick Next to continue."
61     !define MUI_LICENSEPAGE_TEXT_BOTTOM "$\nPress Continue to proceed with the installation."
62     !define MUI_LICENSEPAGE_BUTTON "Continue"
63
64 ;--------------------------------
65
66 ;--------------------------------
67 ; Pages
68
69     ; Install Section
70     ;--------------------------------------------------------------------
71     !insertmacro MUI_PAGE_WELCOME
72     !insertmacro MUI_PAGE_LICENSE "${FILES}COPYING.txt"
73     !insertmacro MUI_PAGE_COMPONENTS
74     Page custom FileAssoc
75     !insertmacro MUI_PAGE_DIRECTORY
76
77     ;Start Menu Folder Page Configuration
78         !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
79         !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\WinBoard"
80         !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
81     !insertmacro MUI_PAGE_STARTMENU Application $START_MENU_FOLDER
82
83     !insertmacro MUI_PAGE_INSTFILES
84     !insertmacro MUI_PAGE_FINISH
85     ;--------------------------------------------------------------------
86
87     ; Uninstall Section
88     ;
89     ;!define MUI_WELCOMEPAGE_TEXT "WARNING! THIS UNINSTALLER WILL COMPLETELY DELETE THE INSTALLATION DIRECTORY\n\n$INSTDIR !!!\n\nIF THERE ARE ANY FILES YOU WISH TO SAVE, MOVE THEM FROM THE INSTALLATION DIRECTORY FIRST!\n\n\n\nPress Next to Continue."
90     !define MUI_WELCOMEPAGE_TEXT "This will uninstall WinBoard from directory:\n\n$INSTDIR\n\n\n\nPress Next to Continue."
91     !insertmacro MUI_UNPAGE_WELCOME
92     !insertmacro MUI_UNPAGE_CONFIRM
93     !insertmacro MUI_UNPAGE_INSTFILES
94     !insertmacro MUI_UNPAGE_FINISH
95
96 ;--------------------------------
97 ;Languages
98
99   !insertmacro MUI_LANGUAGE "English"
100
101 ;--------------------------------
102
103 ;--------------------------------
104 ;Reserve Files
105
106   ;These files should be inserted before other files in the data block
107   ;Keep these lines before any File command
108   ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
109
110   ReserveFile "FA.ini"
111   !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
112
113 ;--------------------------------
114
115 Section "WinBoard Core Components" Core
116
117 SectionIn 1 RO
118
119     SetOutPath "$INSTDIR"
120     File "${ROOT}README.html"
121
122     SetOutPath "$INSTDIR\WinBoard\doc"
123     File "${ROOT}WinBoard\doc\engine-intf.html"
124     File "${ROOT}WinBoard\doc\fonts.html"
125     File "${ROOT}WinBoard\doc\manual.html"
126     File "${ROOT}WinBoard\doc\mini.gif"
127     File "${ROOT}WinBoard\doc\PolyglotGUI.html"
128     File "${ROOT}WinBoard\doc\shortcuts.html"
129     File "${ROOT}WinBoard\doc\texture.html"
130
131     SetOutPath "$INSTDIR\WinBoard\logos"
132     File "${ROOT}WinBoard\logos\chessclub.com.bmp"
133     File "${ROOT}WinBoard\logos\freechess.org.bmp"
134     File "${ROOT}WinBoard\logos\hgm.bmp"
135     File "${ROOT}WinBoard\logos\README.txt"
136
137     SetOutPath "$INSTDIR\WinBoard\PG"
138     File "${ROOT}WinBoard\PG\fruit.ini"
139
140     SetOutPath "$INSTDIR\WinBoard\QH"
141     File "${ROOT}WinBoard\QH\eleeye.ini"
142
143     SetOutPath "$INSTDIR\Winboard\textures"
144     File "${ROOT}WinBoard\textures\marble_d.bmp"
145     File "${ROOT}WinBoard\textures\marble_l.bmp"
146     File "${ROOT}WinBoard\textures\wood_d.bmp"
147     File "${ROOT}WinBoard\textures\wood_l.bmp"
148     File "${ROOT}WinBoard\textures\xqboard.bmp"
149     File "${ROOT}WinBoard\textures\xqwood.bmp"
150
151     SetOutPath "$INSTDIR\Winboard"
152     File "${ROOT}WinBoard\ChessMark.ini"
153     File "${ROOT}Winboard\default_book.bin"
154     File "${ROOT}Winboard\fairy.ini"
155     File "${ROOT}Winboard\FICS.ini"
156     File "${ROOT}Winboard\fruit.ini"
157     File "${ROOT}Winboard\Gothic.ini"
158     File "${ROOT}Winboard\ICC.ini"
159     File "${ROOT}Winboard\ICSbot.ini"
160     File "${ROOT}Winboard\marble.ini"
161     File "${ROOT}Winboard\polyglot.exe"
162     File "${ROOT}Winboard\polyglot_1st.ini"
163     File "${ROOT}Winboard\QH2WB.exe"
164     File "${ROOT}Winboard\timeseal.exe"
165     File "${ROOT}Winboard\timestamp.exe"
166     File "${ROOT}Winboard\UCCI2WB.exe"
167     File "${ROOT}Winboard\viewer.ini"
168     File "${ROOT}Winboard\winboard.chm"
169     File "${ROOT}Winboard\winboard.exe"
170     File "${ROOT}Winboard\winboard.hlp"
171     File "${ROOT}Winboard\winboard.ini"
172     File "${ROOT}Winboard\wood.ini"
173     File "${ROOT}Winboard\xq.ini"
174     File "${ROOT}Winboard\xq_book.bin"
175
176     ;Create uninstaller
177     WriteUninstaller "$INSTDIR\UnInstall.exe"
178
179     !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
180
181     CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER"
182     CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Game Viewer.lnk" "$INSTDIR\winboard.exe" "-ncp" "$INSTDIR\winboard.exe" 1
183     CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Game Viewer - Bobby Fischer.lnk" "$INSTDIR\winboard.exe" "-ncp -lgf RJF60.pgn" "$INSTDIR\winboard.exe" 1
184     CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Game Viewer - Karpov vs Kasparov.lnk" "$INSTDIR\winboard.exe" "-ncp -lgf kk13.pgn" "$INSTDIR\winboard.exe" 1
185         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard Help.lnk" "$INSTDIR\winboard.hlp"
186         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Frequently Asked Questions.lnk" "$INSTDIR\FAQ.html"
187         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard READ_ME.lnk" "$INSTDIR\READ_ME.txt"
188     CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard UnInstall.lnk" "$INSTDIR\UnInstall.exe"
189     CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Server - chessclub.com.lnk" "$INSTDIR\winboard.exe"  "-ics -icshost chessclub.com -icshelper timestamp" "$INSTDIR\winboard.exe" 0
190     CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Server - freechess.org.lnk" "$INSTDIR\winboard.exe"  "-ics -icshost freechess.org -icshelper timeseal" "$INSTDIR\winboard.exe" 0
191     CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Server - Other.lnk" "$INSTDIR\winboard.exe" "-ics" "$INSTDIR\winboard.exe" 0
192     CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard Startup Dialog.lnk" "$INSTDIR\winboard.exe" "" "$INSTDIR\winboard.exe" 2
193
194         !insertmacro MUI_STARTMENU_WRITE_END
195
196 SectionEnd
197
198 SubSection /e "Chess Engines" Engines
199
200     Section "ElephantEye" eleeye
201         SetOutPath "$INSTDIR\EleEye"
202         File "${ROOT}EleEye\ATOM.DLL"
203         File "${ROOT}EleEye\BOOK.DAT"
204         File "${ROOT}EleEye\CCHESS.DLL"
205         File "${ROOT}EleEye\ELEEYE.EXE"
206         File "${ROOT}EleEye\EVALUATE.DLL"
207         File "${ROOT}EleEye\logo.bmp"
208
209         CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"
210         !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
211         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\GNU Chess 5.0 Documentation.lnk" "$INSTDIR\gnuches5.txt"
212         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\GNU Chess 5.0.lnk" "$INSTDIR\winboard.exe" "-cp -fcp 'GNUChes5 xboard' -scp 'GNUChes5 xboard'" "$INSTDIR\winboard.exe" 2
213         !insertmacro MUI_STARTMENU_WRITE_END
214     SectionEnd
215
216     Section "Fairy-Max" fmax
217         SetOutPath "$INSTDIR\Fairy-Max"
218         File "${ROOT}Fairy-Max\fmax.exe"
219         File "${ROOT}Fairy-Max\fmax.ini"
220         File "${ROOT}Fairy-Max\logo.bmp"
221         File "${ROOT}Fairy-Max\MaxQi.exe"
222         File "${ROOT}Fairy-Max\qmax.ini"
223         File "${ROOT}Fairy-Max\ShaMax.exe"
224
225         CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"
226         !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
227         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\GNU Chess 4.0 Documentation.lnk" "$INSTDIR\gnuchess.txt"
228         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\GNU Chess 4.0.lnk" "$INSTDIR\winboard.exe" "-cp -fcp GNUChess -scp GNUChess" "$INSTDIR\winboard.exe" 2
229         !insertmacro MUI_STARTMENU_WRITE_END
230     SectionEnd
231
232     Section "Fruit 2.1" Fruit
233         SetOutPath "$INSTDIR\Fruit"
234         File "${ROOT}Fruit\copying.txt"
235         File "${ROOT}Fruit\fruit_21.exe"
236         File "${ROOT}Fruit\logo.bmp"
237         File "${ROOT}Fruit\readme.txt"
238         File "${ROOT}Fruit\technical_10.txt"
239
240         CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"
241         !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
242         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Crafty Documentation.lnk" "$INSTDIR\Crafty\crafty.doc.txt"
243         CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Crafty 19.3.lnk" "$INSTDIR\winboard.exe" "-cp -fcp Crafty\wcrafty.exe -fd Crafty -scp Crafty\wcrafty.exe -sd Crafty" "$INSTDIR\winboard.exe" 2
244         !insertmacro MUI_STARTMENU_WRITE_END
245     SectionEnd
246
247     Section "HaQi" haqikid
248         SetOutPath "$INSTDIR\HaQi"
249         File "${ROOT}HaQi\haqikid.exe"
250         File "${ROOT}HaQi\logo.bmp"
251     SectionEnd
252
253     Section "Joker" joker
254         SetOutPath "$INSTDIR\Joker"
255         File "${ROOT}Joker\joker80.exe"
256         File "${ROOT}Joker\jokerKM.exe"
257         File "${ROOT}Joker\logo.bmp"
258     SectionEnd
259
260     Section "Pulsar" pulsar
261         SetOutPath "$INSTDIR\Pulsar"
262         File "${ROOT}Pulsar\atomicBookBlack.txt"
263         File "${ROOT}Pulsar\atomicBookWhite.txt"
264         File "${ROOT}Pulsar\bigbook.txt"
265         File "${ROOT}Pulsar\kingsBookBlack.txt"
266         File "${ROOT}Pulsar\kingsBookWhite.txt"
267         File "${ROOT}Pulsar\logo.bmp"
268         File "${ROOT}Pulsar\losersBlack.txt"
269         File "${ROOT}Pulsar\losersWhite.txt"
270         File "${ROOT}Pulsar\openbk.txt"
271         File "${ROOT}Pulsar\pulsar2009-9a.exe"
272         File "${ROOT}Pulsar\pulsarCrazyBlack.txt"
273         File "${ROOT}Pulsar\pulsarCrazyWhite.txt"
274         File "${ROOT}Pulsar\pulsarShatranjBlack.txt"
275         File "${ROOT}Pulsar\pulsarShatranjWhite.txt"
276         File "${ROOT}Pulsar\suicideBookBlack.txt"
277         File "${ROOT}Pulsar\suicideBookWhite.txt"
278         File "${ROOT}Pulsar\threeBookBlack.txt"
279         File "${ROOT}Pulsar\threeBookWhite.txt"
280     SectionEnd
281
282 SubSectionEnd
283
284 Section "Tournament Manager" PSWTBTM
285     SetOutPath "$INSTDIR\PSWBTM\doc"
286     File "${ROOT}PSWBTM\doc\conf.png"
287     File "${ROOT}PSWBTM\doc\configure.html"
288     File "${ROOT}PSWBTM\doc\eman.png"
289     File "${ROOT}PSWBTM\doc\install.html"
290     File "${ROOT}PSWBTM\doc\menu.png"
291     File "${ROOT}PSWBTM\doc\PGfruit.png"
292     File "${ROOT}PSWBTM\doc\pswbtm.png"
293     File "${ROOT}PSWBTM\doc\running.html"
294     File "${ROOT}PSWBTM\doc\tour.png"
295     File "${ROOT}PSWBTM\doc\tourney.html"
296     File "${ROOT}PSWBTM\doc\UCI.html"
297
298     CreateDirectory "$INSTDIR\PSWBTM\games"
299
300     SetOutPath "$INSTDIR\PSWBTM\start positions"
301     File "${ROOT}PSWBTM\start positions\nunn.pgn"
302     File "${ROOT}PSWBTM\start positions\silver.epd"
303
304     SetOutPath "$INSTDIR\PSWBTM"
305     File "${ROOT}PSWBTM\config.pswbtm"
306     File "${ROOT}PSWBTM\engines.pswbtm"
307     File "${ROOT}PSWBTM\ntls.pswbtm"
308     File "${ROOT}PSWBTM\PSWBTM.exe"
309     File "${ROOT}PSWBTM\README.txt"
310 SectionEnd
311
312 Section "Fonts"
313     StrCpy $FONT_DIR $FONTS
314     !insertmacro InstallTTF '${FNTDIR}MARKFONT.TTF'
315     !insertmacro InstallTTF '${FNTDIR}XIANGQI.TTF'
316     SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000
317 SectionEnd
318
319 ;Section "un.Fonts"
320 ;    StrCpy $FONT_DIR $FONTS
321 ;    !insertmacro RemoveTTF 'MARKFONT.TTF'
322 ;    !insertmacro RemoveTTF 'XIANGI.TTF'
323 ;    SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000
324 ;SectionEnd
325
326 ;--------------------------------
327 ;Installer Functions
328 Function .onInit
329
330   ;Extract InstallOptions INI files
331   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "FA.ini"
332
333 FunctionEnd
334
335 Function FileAssoc
336
337     !insertmacro MUI_HEADER_TEXT "Windows File Associations" "Do you want to use Winboard as your viewer for the following file types?"
338     !insertmacro MUI_INSTALLOPTIONS_DISPLAY "FA.ini"
339
340
341     ;Read a value from an InstallOptions INI file
342
343     !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "FA.ini" "Field 2" "State"
344
345     ;Display a messagebox if check box was checked
346     StrCmp $INI_VALUE "1" "" CheckFEN
347     WriteRegStr HKCR ".pgn" "" "WinBoard.PGN"
348     WriteRegStr HKCR ".pgn" "Content Type" "application/x-chess-pgn"
349     WriteRegStr HKCR "WinBoard.PGN" "" "Chess Game"
350     WriteRegStr HKCR "WinBoard.PGN\DefaultIcon" "" "$INSTDIR\WinBoard.exe,1"
351     WriteRegStr HKCR "WinBoard.PGN\Shell\Open" "" "Open"
352     WriteRegStr HKCR "WinBoard.PGN\Shell\Open\command" "" '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lgf "%1"'
353
354     CheckFEN:
355     !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "FA.ini" "Field 3" "State"
356
357     ;Display a messagebox if check box was checked
358     StrCmp $INI_VALUE "1" "" Continue
359     WriteRegStr HKCR ".fen" "" "WinBoard.FEN"
360     WriteRegStr HKCR ".fen" "Content Type" "application/x-chess-fen"
361     WriteRegStr HKCR "WinBoard.FEN" "" "Chess Position"
362     WriteRegStr HKCR "WinBoard.FEN\DefaultIcon" "" "$INSTDIR\WinBoard.exe,1"
363     WriteRegStr HKCR "WinBoard.FEN\Shell\Open" "" "Open"
364     WriteRegStr HKCR "WinBoard.FEN\Shell\Open\command" "" '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lpf "%1"'
365
366     Continue:
367
368 FunctionEnd
369
370 ;--------------------------------
371 ;Descriptions
372
373   ;Language strings
374
375     LangString DESC_Core ${LANG_ENGLISH} "Winboard Core Components - Executable and Help Files"
376     LangString DESC_Engines ${LANG_ENGLISH} "Chess Engines to play against using the WinBoard Interface"
377     LangString DESC_GNUChess5 ${LANG_ENGLISH} "GNU Chess 5.0 Engine"
378     LangString DESC_GNUChess4 ${LANG_ENGLISH} "GNU Chess 4.0 Engine"
379     LangString DESC_Crafty ${LANG_ENGLISH} "Crafty 19.3 Chess Engine, by Robert Hyatt"
380
381
382   ;Assign language strings to sections
383
384   !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
385     !insertmacro MUI_DESCRIPTION_TEXT ${Core} $(DESC_Core)
386     !insertmacro MUI_DESCRIPTION_TEXT ${Engines} $(DESC_Engines)
387     !insertmacro MUI_DESCRIPTION_TEXT ${GNUChess5} $(DESC_GNUChess5)
388     !insertmacro MUI_DESCRIPTION_TEXT ${GNUChess4} $(DESC_GNUChess4)
389     !insertmacro MUI_DESCRIPTION_TEXT ${Crafty} $(DESC_Crafty)
390   !insertmacro MUI_FUNCTION_DESCRIPTION_END
391
392 ;--------------------------------
393
394 ;--------------------------------
395 ;Uninstaller Section
396
397 ; Function to delete install directory if non-empty on user request
398 Function un.ForceDirectoryDelete
399
400          MessageBox MB_YESNO "The uninstaller was unable to delete the directory '$INSTDIR'. This is usually$\r$\ndue to user-created files such as WinBoard.ini, or other configuration files. If$\r$\nyou wish to keep your old configuration files, select No.$\r$\n$\r$\nForce deletion of install directory and all files in it?" IDNO End
401
402          RMDir /r "$INSTDIR"
403
404          End:
405
406 FunctionEnd
407
408
409 Section "Uninstall"
410
411         Delete "$INSTDIR\bughouse.bat"
412     Delete "$INSTDIR\ChangeLog"
413     Delete "$INSTDIR\COPYING"
414     Delete "$INSTDIR\COPYRIGHT"
415     Delete "$INSTDIR\cygncurses7.dll"
416     Delete "$INSTDIR\cygreadline5.dll"
417     Delete "$INSTDIR\cygwin1.dll"
418     Delete "$INSTDIR\FAQ.html"
419     Delete "$INSTDIR\kk13.pgn"
420     Delete "$INSTDIR\NEWS"
421     Delete "$INSTDIR\READ_ME.txt"
422     Delete "$INSTDIR\RJF60.pgn"
423     Delete "$INSTDIR\timeseal.exe"
424     Delete "$INSTDIR\timestamp.exe"
425     Delete "$INSTDIR\winboard.exe"
426     Delete "$INSTDIR\winboard.hlp"
427     Delete "$INSTDIR\zippy.lines"
428     Delete "$INSTDIR\zippy.README"
429         Delete "$INSTDIR\book.dat"
430     Delete "$INSTDIR\GNUChes5.exe"
431     Delete "$INSTDIR\gnuches5.txt"
432     Delete "$INSTDIR\gnuchess.dat"
433     Delete "$INSTDIR\gnuchess.lan"
434     Delete "$INSTDIR\gnuchess.README"
435         Delete "$INSTDIR\gnuchesr.exe"
436     Delete "$INSTDIR\GNUChess.exe"
437     Delete "$INSTDIR\gnuchess.txt"
438     Delete "$INSTDIR\UnInstall.exe"
439     Delete "$INSTDIR\Crafty\wcrafty.exe"
440     Delete "$INSTDIR\Crafty\book.bin"
441     Delete "$INSTDIR\Crafty\books.bin"
442     Delete "$INSTDIR\Crafty\Crafty.rc"
443     Delete "$INSTDIR\Crafty\crafty.doc.txt"
444     RMDir "$INSTDIR\Crafty"
445     RMDir "$INSTDIR"
446
447
448     !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
449
450     RMDir /r "$SMPROGRAMS\$MUI_TEMP"
451
452     ReadRegStr $1 HKCR ".pgn" ""
453     StrCmp $1 "WinBoard.PGN" "" DelFEN
454     ReadRegStr $1 HKCR "WinBoard.PGN\Shell\Open\command" ""
455     StrCmp $1 '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lgf "%1"' "" DelFEN
456     DeleteRegKey HKCR ".pgn"
457     DeleteRegKey HKCR "WinBoard.PGN"
458
459     DelFEN:
460
461     ReadRegStr $1 HKCR ".fen" ""
462     StrCmp $1 "WinBoard.FEN" "" ContDelFEN
463     ReadRegStr $1 HKCR "WinBoard.FEN\Shell\Open\command" ""
464     StrCmp $1 '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lpf "%1"' "" ContDelFEN
465     DeleteRegKey HKCR ".fen"
466     DeleteRegKey HKCR "WinBoard.FEN"
467
468     ContDelFEN:
469
470     DeleteRegKey HKCU "Software\WinBoard"
471
472
473     IfFileExists "$INSTDIR\*.*" GoDirDel Continue
474
475     GoDirDel:
476     Call un.ForceDirectoryDelete
477
478     Continue:
479
480
481 SectionEnd