updated installer
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 26 Aug 2009 03:41:29 +0000 (20:41 -0700)
committerArun Persaud <arun@nubati.net>
Wed, 26 Aug 2009 03:41:29 +0000 (20:41 -0700)
winboard/install/installer/wb440.nsi

index 890a4fe..f5721e1 100644 (file)
-; WinBoard-4.4.0 MUI
-;
-;
-
-!define FILES "..\files\"
-!define ROOT "${FILES}root\"
-!define FNTDIR "${FILES}fonts\"
-
-; grab the FontName plugin from NSIS for these
-!include FontRegAdv.nsh
-!include FontName.nsh
-
-;--------------------------------
-;Include Modern UI
-!include "MUI.nsh"
-
-;--------------------------------
-
-!define InstName "WinBoard"
-!define InstVersion "4.4.0beta2"
-!define InstBaseDir "WinBoard-4.4.0"
-
-;--------------------------------
-; General
-;
-
-Name "${InstName} ${InstVersion}"
-Caption "WinBoard - Chessboard For Windows"
-OutFile "WinBoard-4.4.0beta2.exe"
-InstallDir $PROGRAMFILES\${InstBaseDir}
-
-SetCompressor lzma
-SetDateSave on
-SetDatablockOptimize on
-CRCCheck on
-SilentInstall normal
-;BGGradient 000000 4682b4 FFFFFF
-;XPStyle on
-
-;--------------------------------
-;Variables
-
-  Var INI_VALUE
-  Var START_MENU_FOLDER
-  Var MUI_TEMP
-
-;--------------------------------
-
-
-;!define MUI_ICON "knight.ico"
-;!define MUI_UNICON "wc_uninst.ico"
-!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome_chess.bmp"
-
-;--------------------------------
-;Interface Settings
-
-    !define MUI_ABORTWARNING
-    ;!define MUI_COMPONENTSPAGE_NODESC
-    !define MUI_COMPONENTSPAGE_SMALLDESC
-    !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ${InstName} ${InstVersion}.\n\n\n\n\nClick Next to continue."
-    !define MUI_LICENSEPAGE_TEXT_BOTTOM "$\nPress Continue to proceed with the installation."
-    !define MUI_LICENSEPAGE_BUTTON "Continue"
-
-;--------------------------------
-
-;--------------------------------
-; Pages
-
-    ; Install Section
-    ;--------------------------------------------------------------------
-    !insertmacro MUI_PAGE_WELCOME
-    !insertmacro MUI_PAGE_LICENSE "${FILES}COPYING.txt"
-    !insertmacro MUI_PAGE_COMPONENTS
-    Page custom FileAssoc
-    !insertmacro MUI_PAGE_DIRECTORY
-
-    ;Start Menu Folder Page Configuration
-        !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
-        !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\WinBoard"
-        !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
-    !insertmacro MUI_PAGE_STARTMENU Application $START_MENU_FOLDER
-
-    !insertmacro MUI_PAGE_INSTFILES
-    !insertmacro MUI_PAGE_FINISH
-    ;--------------------------------------------------------------------
-
-    ; Uninstall Section
-    ;
-    ;!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."
-    !define MUI_WELCOMEPAGE_TEXT "This will uninstall WinBoard from directory:\n\n$INSTDIR\n\n\n\nPress Next to Continue."
-    !insertmacro MUI_UNPAGE_WELCOME
-    !insertmacro MUI_UNPAGE_CONFIRM
-    !insertmacro MUI_UNPAGE_INSTFILES
-    !insertmacro MUI_UNPAGE_FINISH
-
-;--------------------------------
-;Languages
-
-  !insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-
-;--------------------------------
-;Reserve Files
-
-  ;These files should be inserted before other files in the data block
-  ;Keep these lines before any File command
-  ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
-
-  ReserveFile "FA.ini"
-  !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-
-Section "WinBoard Core Components" Core
-
-SectionIn 1 RO
-
-    SetOutPath "$INSTDIR"
-    File "${ROOT}README.html"
-
-    SetOutPath "$INSTDIR\WinBoard\doc"
-    File "${ROOT}WinBoard\doc\engine-intf.html"
-    File "${ROOT}WinBoard\doc\fonts.html"
-    File "${ROOT}WinBoard\doc\manual.html"
-    File "${ROOT}WinBoard\doc\mini.gif"
-    File "${ROOT}WinBoard\doc\PolyglotGUI.html"
-    File "${ROOT}WinBoard\doc\shortcuts.html"
-    File "${ROOT}WinBoard\doc\texture.html"
-
-    SetOutPath "$INSTDIR\WinBoard\logos"
-    File "${ROOT}WinBoard\logos\chessclub.com.bmp"
-    File "${ROOT}WinBoard\logos\freechess.org.bmp"
-    File "${ROOT}WinBoard\logos\hgm.bmp"
-    File "${ROOT}WinBoard\logos\README.txt"
-
-    SetOutPath "$INSTDIR\WinBoard\PG"
-    File "${ROOT}WinBoard\PG\fruit.ini"
-
-    SetOutPath "$INSTDIR\WinBoard\QH"
-    File "${ROOT}WinBoard\QH\eleeye.ini"
-
-    SetOutPath "$INSTDIR\Winboard\textures"
-    File "${ROOT}WinBoard\textures\marble_d.bmp"
-    File "${ROOT}WinBoard\textures\marble_l.bmp"
-    File "${ROOT}WinBoard\textures\wood_d.bmp"
-    File "${ROOT}WinBoard\textures\wood_l.bmp"
-    File "${ROOT}WinBoard\textures\xqboard.bmp"
-    File "${ROOT}WinBoard\textures\xqwood.bmp"
-
-    SetOutPath "$INSTDIR\Winboard"
-    File "${ROOT}WinBoard\ChessMark.ini"
-    File "${ROOT}Winboard\default_book.bin"
-    File "${ROOT}Winboard\fairy.ini"
-    File "${ROOT}Winboard\FICS.ini"
-    File "${ROOT}Winboard\fruit.ini"
-    File "${ROOT}Winboard\Gothic.ini"
-    File "${ROOT}Winboard\ICC.ini"
-    File "${ROOT}Winboard\ICSbot.ini"
-    File "${ROOT}Winboard\marble.ini"
-    File "${ROOT}Winboard\polyglot.exe"
-    File "${ROOT}Winboard\polyglot_1st.ini"
-    File "${ROOT}Winboard\QH2WB.exe"
-    File "${ROOT}Winboard\timeseal.exe"
-    File "${ROOT}Winboard\timestamp.exe"
-    File "${ROOT}Winboard\UCCI2WB.exe"
-    File "${ROOT}Winboard\viewer.ini"
-    File "${ROOT}Winboard\winboard.chm"
-    File "${ROOT}Winboard\winboard.exe"
-    File "${ROOT}Winboard\winboard.hlp"
-    File "${ROOT}Winboard\winboard.ini"
-    File "${ROOT}Winboard\wood.ini"
-    File "${ROOT}Winboard\xq.ini"
-    File "${ROOT}Winboard\xq_book.bin"
-
-    ;Create uninstaller
-    WriteUninstaller "$INSTDIR\UnInstall.exe"
-
-    !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-
-    CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER"
-    CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Game Viewer.lnk" "$INSTDIR\winboard.exe" "-ncp" "$INSTDIR\winboard.exe" 1
-    CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Game Viewer - Bobby Fischer.lnk" "$INSTDIR\winboard.exe" "-ncp -lgf RJF60.pgn" "$INSTDIR\winboard.exe" 1
-    CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Game Viewer - Karpov vs Kasparov.lnk" "$INSTDIR\winboard.exe" "-ncp -lgf kk13.pgn" "$INSTDIR\winboard.exe" 1
-        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard Help.lnk" "$INSTDIR\winboard.hlp"
-        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Frequently Asked Questions.lnk" "$INSTDIR\FAQ.html"
-        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard READ_ME.lnk" "$INSTDIR\READ_ME.txt"
-    CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard UnInstall.lnk" "$INSTDIR\UnInstall.exe"
-    CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Server - chessclub.com.lnk" "$INSTDIR\winboard.exe"  "-ics -icshost chessclub.com -icshelper timestamp" "$INSTDIR\winboard.exe" 0
-    CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Server - freechess.org.lnk" "$INSTDIR\winboard.exe"  "-ics -icshost freechess.org -icshelper timeseal" "$INSTDIR\winboard.exe" 0
-    CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Server - Other.lnk" "$INSTDIR\winboard.exe" "-ics" "$INSTDIR\winboard.exe" 0
-    CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard Startup Dialog.lnk" "$INSTDIR\winboard.exe" "" "$INSTDIR\winboard.exe" 2
-
-        !insertmacro MUI_STARTMENU_WRITE_END
-
-SectionEnd
-
-SubSection /e "Chess Engines" Engines
-
-    Section "ElephantEye" eleeye
-        SetOutPath "$INSTDIR\EleEye"
-        File "${ROOT}EleEye\ATOM.DLL"
-        File "${ROOT}EleEye\BOOK.DAT"
-        File "${ROOT}EleEye\CCHESS.DLL"
-        File "${ROOT}EleEye\ELEEYE.EXE"
-        File "${ROOT}EleEye\EVALUATE.DLL"
-        File "${ROOT}EleEye\logo.bmp"
-
-        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"
-        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\GNU Chess 5.0 Documentation.lnk" "$INSTDIR\gnuches5.txt"
-        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
-        !insertmacro MUI_STARTMENU_WRITE_END
-    SectionEnd
-
-    Section "Fairy-Max" fmax
-        SetOutPath "$INSTDIR\Fairy-Max"
-        File "${ROOT}Fairy-Max\fmax.exe"
-        File "${ROOT}Fairy-Max\fmax.ini"
-        File "${ROOT}Fairy-Max\logo.bmp"
-        File "${ROOT}Fairy-Max\MaxQi.exe"
-        File "${ROOT}Fairy-Max\qmax.ini"
-        File "${ROOT}Fairy-Max\ShaMax.exe"
-
-        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"
-        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\GNU Chess 4.0 Documentation.lnk" "$INSTDIR\gnuchess.txt"
-        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\GNU Chess 4.0.lnk" "$INSTDIR\winboard.exe" "-cp -fcp GNUChess -scp GNUChess" "$INSTDIR\winboard.exe" 2
-        !insertmacro MUI_STARTMENU_WRITE_END
-    SectionEnd
-
-    Section "Fruit 2.1" Fruit
-        SetOutPath "$INSTDIR\Fruit"
-        File "${ROOT}Fruit\copying.txt"
-        File "${ROOT}Fruit\fruit_21.exe"
-        File "${ROOT}Fruit\logo.bmp"
-        File "${ROOT}Fruit\readme.txt"
-        File "${ROOT}Fruit\technical_10.txt"
-
-        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"
-        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Crafty Documentation.lnk" "$INSTDIR\Crafty\crafty.doc.txt"
-        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
-        !insertmacro MUI_STARTMENU_WRITE_END
-    SectionEnd
-
-    Section "HaQi" haqikid
-        SetOutPath "$INSTDIR\HaQi"
-        File "${ROOT}HaQi\haqikid.exe"
-        File "${ROOT}HaQi\logo.bmp"
-    SectionEnd
-
-    Section "Joker" joker
-        SetOutPath "$INSTDIR\Joker"
-        File "${ROOT}Joker\joker80.exe"
-        File "${ROOT}Joker\jokerKM.exe"
-        File "${ROOT}Joker\logo.bmp"
-    SectionEnd
-
-    Section "Pulsar" pulsar
-        SetOutPath "$INSTDIR\Pulsar"
-        File "${ROOT}Pulsar\atomicBookBlack.txt"
-        File "${ROOT}Pulsar\atomicBookWhite.txt"
-        File "${ROOT}Pulsar\bigbook.txt"
-        File "${ROOT}Pulsar\kingsBookBlack.txt"
-        File "${ROOT}Pulsar\kingsBookWhite.txt"
-        File "${ROOT}Pulsar\logo.bmp"
-        File "${ROOT}Pulsar\losersBlack.txt"
-        File "${ROOT}Pulsar\losersWhite.txt"
-        File "${ROOT}Pulsar\openbk.txt"
-        File "${ROOT}Pulsar\pulsar2009-9a.exe"
-        File "${ROOT}Pulsar\pulsarCrazyBlack.txt"
-        File "${ROOT}Pulsar\pulsarCrazyWhite.txt"
-        File "${ROOT}Pulsar\pulsarShatranjBlack.txt"
-        File "${ROOT}Pulsar\pulsarShatranjWhite.txt"
-        File "${ROOT}Pulsar\suicideBookBlack.txt"
-        File "${ROOT}Pulsar\suicideBookWhite.txt"
-        File "${ROOT}Pulsar\threeBookBlack.txt"
-        File "${ROOT}Pulsar\threeBookWhite.txt"
-    SectionEnd
-
-SubSectionEnd
-
-Section "Tournament Manager" PSWTBTM
-    SetOutPath "$INSTDIR\PSWBTM\doc"
-    File "${ROOT}PSWBTM\doc\conf.png"
-    File "${ROOT}PSWBTM\doc\configure.html"
-    File "${ROOT}PSWBTM\doc\eman.png"
-    File "${ROOT}PSWBTM\doc\install.html"
-    File "${ROOT}PSWBTM\doc\menu.png"
-    File "${ROOT}PSWBTM\doc\PGfruit.png"
-    File "${ROOT}PSWBTM\doc\pswbtm.png"
-    File "${ROOT}PSWBTM\doc\running.html"
-    File "${ROOT}PSWBTM\doc\tour.png"
-    File "${ROOT}PSWBTM\doc\tourney.html"
-    File "${ROOT}PSWBTM\doc\UCI.html"
-
-    CreateDirectory "$INSTDIR\PSWBTM\games"
-
-    SetOutPath "$INSTDIR\PSWBTM\start positions"
-    File "${ROOT}PSWBTM\start positions\nunn.pgn"
-    File "${ROOT}PSWBTM\start positions\silver.epd"
-
-    SetOutPath "$INSTDIR\PSWBTM"
-    File "${ROOT}PSWBTM\config.pswbtm"
-    File "${ROOT}PSWBTM\engines.pswbtm"
-    File "${ROOT}PSWBTM\ntls.pswbtm"
-    File "${ROOT}PSWBTM\PSWBTM.exe"
-    File "${ROOT}PSWBTM\README.txt"
-SectionEnd
-
-Section "Fonts"
-    StrCpy $FONT_DIR $FONTS
-    !insertmacro InstallTTF '${FNTDIR}MARKFONT.TTF'
-    !insertmacro InstallTTF '${FNTDIR}XIANGQI.TTF'
-    SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000
-SectionEnd
-
-;Section "un.Fonts"
-;    StrCpy $FONT_DIR $FONTS
-;    !insertmacro RemoveTTF 'MARKFONT.TTF'
-;    !insertmacro RemoveTTF 'XIANGI.TTF'
-;    SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000
-;SectionEnd
-
-;--------------------------------
-;Installer Functions
-Function .onInit
-
-  ;Extract InstallOptions INI files
-  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "FA.ini"
-
-FunctionEnd
-
-Function FileAssoc
-
-    !insertmacro MUI_HEADER_TEXT "Windows File Associations" "Do you want to use Winboard as your viewer for the following file types?"
-    !insertmacro MUI_INSTALLOPTIONS_DISPLAY "FA.ini"
-
-
-    ;Read a value from an InstallOptions INI file
-
-    !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "FA.ini" "Field 2" "State"
-
-    ;Display a messagebox if check box was checked
-    StrCmp $INI_VALUE "1" "" CheckFEN
-    WriteRegStr HKCR ".pgn" "" "WinBoard.PGN"
-    WriteRegStr HKCR ".pgn" "Content Type" "application/x-chess-pgn"
-    WriteRegStr HKCR "WinBoard.PGN" "" "Chess Game"
-    WriteRegStr HKCR "WinBoard.PGN\DefaultIcon" "" "$INSTDIR\WinBoard.exe,1"
-    WriteRegStr HKCR "WinBoard.PGN\Shell\Open" "" "Open"
-    WriteRegStr HKCR "WinBoard.PGN\Shell\Open\command" "" '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lgf "%1"'
-
-    CheckFEN:
-    !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "FA.ini" "Field 3" "State"
-
-    ;Display a messagebox if check box was checked
-    StrCmp $INI_VALUE "1" "" Continue
-    WriteRegStr HKCR ".fen" "" "WinBoard.FEN"
-    WriteRegStr HKCR ".fen" "Content Type" "application/x-chess-fen"
-    WriteRegStr HKCR "WinBoard.FEN" "" "Chess Position"
-    WriteRegStr HKCR "WinBoard.FEN\DefaultIcon" "" "$INSTDIR\WinBoard.exe,1"
-    WriteRegStr HKCR "WinBoard.FEN\Shell\Open" "" "Open"
-    WriteRegStr HKCR "WinBoard.FEN\Shell\Open\command" "" '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lpf "%1"'
-
-    Continue:
-
-FunctionEnd
-
-;--------------------------------
-;Descriptions
-
-  ;Language strings
-
-    LangString DESC_Core ${LANG_ENGLISH} "Winboard Core Components - Executable and Help Files"
-    LangString DESC_Engines ${LANG_ENGLISH} "Chess Engines to play against using the WinBoard Interface"
-    LangString DESC_GNUChess5 ${LANG_ENGLISH} "GNU Chess 5.0 Engine"
-    LangString DESC_GNUChess4 ${LANG_ENGLISH} "GNU Chess 4.0 Engine"
-    LangString DESC_Crafty ${LANG_ENGLISH} "Crafty 19.3 Chess Engine, by Robert Hyatt"
-
-
-  ;Assign language strings to sections
-
-  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-    !insertmacro MUI_DESCRIPTION_TEXT ${Core} $(DESC_Core)
-    !insertmacro MUI_DESCRIPTION_TEXT ${Engines} $(DESC_Engines)
-    !insertmacro MUI_DESCRIPTION_TEXT ${GNUChess5} $(DESC_GNUChess5)
-    !insertmacro MUI_DESCRIPTION_TEXT ${GNUChess4} $(DESC_GNUChess4)
-    !insertmacro MUI_DESCRIPTION_TEXT ${Crafty} $(DESC_Crafty)
-  !insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-;--------------------------------
-
-;--------------------------------
-;Uninstaller Section
-
-; Function to delete install directory if non-empty on user request
-Function un.ForceDirectoryDelete
-
-         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
-
-         RMDir /r "$INSTDIR"
-
-         End:
-
-FunctionEnd
-
-
-Section "Uninstall"
-
-        Delete "$INSTDIR\bughouse.bat"
-    Delete "$INSTDIR\ChangeLog"
-    Delete "$INSTDIR\COPYING"
-    Delete "$INSTDIR\COPYRIGHT"
-    Delete "$INSTDIR\cygncurses7.dll"
-    Delete "$INSTDIR\cygreadline5.dll"
-    Delete "$INSTDIR\cygwin1.dll"
-    Delete "$INSTDIR\FAQ.html"
-    Delete "$INSTDIR\kk13.pgn"
-    Delete "$INSTDIR\NEWS"
-    Delete "$INSTDIR\READ_ME.txt"
-    Delete "$INSTDIR\RJF60.pgn"
-    Delete "$INSTDIR\timeseal.exe"
-    Delete "$INSTDIR\timestamp.exe"
-    Delete "$INSTDIR\winboard.exe"
-    Delete "$INSTDIR\winboard.hlp"
-    Delete "$INSTDIR\zippy.lines"
-    Delete "$INSTDIR\zippy.README"
-        Delete "$INSTDIR\book.dat"
-    Delete "$INSTDIR\GNUChes5.exe"
-    Delete "$INSTDIR\gnuches5.txt"
-    Delete "$INSTDIR\gnuchess.dat"
-    Delete "$INSTDIR\gnuchess.lan"
-    Delete "$INSTDIR\gnuchess.README"
-        Delete "$INSTDIR\gnuchesr.exe"
-    Delete "$INSTDIR\GNUChess.exe"
-    Delete "$INSTDIR\gnuchess.txt"
-    Delete "$INSTDIR\UnInstall.exe"
-    Delete "$INSTDIR\Crafty\wcrafty.exe"
-    Delete "$INSTDIR\Crafty\book.bin"
-    Delete "$INSTDIR\Crafty\books.bin"
-    Delete "$INSTDIR\Crafty\Crafty.rc"
-    Delete "$INSTDIR\Crafty\crafty.doc.txt"
-    RMDir "$INSTDIR\Crafty"
-    RMDir "$INSTDIR"
-
-
-    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
-
-    RMDir /r "$SMPROGRAMS\$MUI_TEMP"
-
-    ReadRegStr $1 HKCR ".pgn" ""
-    StrCmp $1 "WinBoard.PGN" "" DelFEN
-    ReadRegStr $1 HKCR "WinBoard.PGN\Shell\Open\command" ""
-    StrCmp $1 '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lgf "%1"' "" DelFEN
-    DeleteRegKey HKCR ".pgn"
-    DeleteRegKey HKCR "WinBoard.PGN"
-
-    DelFEN:
-
-    ReadRegStr $1 HKCR ".fen" ""
-    StrCmp $1 "WinBoard.FEN" "" ContDelFEN
-    ReadRegStr $1 HKCR "WinBoard.FEN\Shell\Open\command" ""
-    StrCmp $1 '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lpf "%1"' "" ContDelFEN
-    DeleteRegKey HKCR ".fen"
-    DeleteRegKey HKCR "WinBoard.FEN"
-
-    ContDelFEN:
-
-    DeleteRegKey HKCU "Software\WinBoard"
-
-
-    IfFileExists "$INSTDIR\*.*" GoDirDel Continue
-
-    GoDirDel:
-    Call un.ForceDirectoryDelete
-
-    Continue:
-
-
-SectionEnd
+; WinBoard-4.4.0 MUI\r
+;\r
+;\r
+\r
+!define FILES "..\..\"\r
+!define ROOT "${FILES}Chess\"\r
+!define FNTDIR "${FILES}Chess\RePackage\"\r
+\r
+; grab the FontName plugin from NSIS for these\r
+!include FontRegAdv.nsh\r
+!include FontName.nsh\r
+\r
+;--------------------------------\r
+;Include Modern UI\r
+!include "MUI.nsh"\r
+\r
+;--------------------------------\r
+\r
+!define InstName "WinBoard"\r
+!define InstVersion "4.4.0beta2"\r
+!define InstBaseDir "WinBoard-4.4.0"\r
+\r
+;--------------------------------\r
+; General\r
+;\r
+\r
+Name "${InstName} ${InstVersion}"\r
+Caption "WinBoard - Chessboard For Windows"\r
+OutFile "WinBoard-4.4.0beta2.exe"\r
+InstallDir $PROGRAMFILES\${InstBaseDir}\r
+\r
+SetCompressor lzma\r
+SetDateSave on\r
+SetDatablockOptimize on\r
+CRCCheck on\r
+SilentInstall normal\r
+;BGGradient 000000 4682b4 FFFFFF\r
+;XPStyle on\r
+\r
+;--------------------------------\r
+;Variables\r
+\r
+  Var INI_VALUE\r
+  Var START_MENU_FOLDER\r
+  Var MUI_TEMP\r
+\r
+;--------------------------------\r
+\r
+\r
+;!define MUI_ICON "knight.ico"\r
+;!define MUI_UNICON "wc_uninst.ico"\r
+!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome_chess.bmp"\r
+\r
+;--------------------------------\r
+;Interface Settings\r
+\r
+    !define MUI_ABORTWARNING\r
+    ;!define MUI_COMPONENTSPAGE_NODESC\r
+    !define MUI_COMPONENTSPAGE_SMALLDESC\r
+    !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ${InstName} ${InstVersion}.\n\n\n\n\nClick Next to continue."\r
+    !define MUI_LICENSEPAGE_TEXT_BOTTOM "$\nPress Continue to proceed with the installation."\r
+    !define MUI_LICENSEPAGE_BUTTON "Continue"\r
+\r
+;--------------------------------\r
+\r
+;--------------------------------\r
+; Pages\r
+\r
+    ; Install Section\r
+    ;--------------------------------------------------------------------\r
+    !insertmacro MUI_PAGE_WELCOME\r
+    !insertmacro MUI_PAGE_LICENSE "${ROOT}COPYRIGHT.txt"\r
+    !insertmacro MUI_PAGE_COMPONENTS\r
+    Page custom FileAssoc\r
+    !insertmacro MUI_PAGE_DIRECTORY\r
+\r
+    ;Start Menu Folder Page Configuration\r
+        !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"\r
+        !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\WinBoard"\r
+        !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"\r
+    !insertmacro MUI_PAGE_STARTMENU Application $START_MENU_FOLDER\r
+\r
+    !insertmacro MUI_PAGE_INSTFILES\r
+    !insertmacro MUI_PAGE_FINISH\r
+    ;--------------------------------------------------------------------\r
+\r
+    ; Uninstall Section\r
+    ;\r
+    ;!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."\r
+    !define MUI_WELCOMEPAGE_TEXT "This will uninstall WinBoard from directory:\n\n$INSTDIR\n\n\n\nPress Next to Continue."\r
+    !insertmacro MUI_UNPAGE_WELCOME\r
+    !insertmacro MUI_UNPAGE_CONFIRM\r
+    !insertmacro MUI_UNPAGE_INSTFILES\r
+    !insertmacro MUI_UNPAGE_FINISH\r
+\r
+;--------------------------------\r
+;Languages\r
+\r
+  !insertmacro MUI_LANGUAGE "English"\r
+\r
+;--------------------------------\r
+\r
+;--------------------------------\r
+;Reserve Files\r
+\r
+  ;These files should be inserted before other files in the data block\r
+  ;Keep these lines before any File command\r
+  ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)\r
+\r
+  ReserveFile "FA.ini"\r
+  !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS\r
+\r
+;--------------------------------\r
+\r
+Section "WinBoard Core Components" Core\r
+\r
+SectionIn 1 RO\r
+\r
+    SetOutPath "$INSTDIR"\r
+    File "${ROOT}README.html"\r
+\r
+    SetOutPath "$INSTDIR\WinBoard\doc"\r
+    File "${ROOT}WinBoard\doc\fonts.html"\r
+    File "${ROOT}WinBoard\doc\manual.html"\r
+    File "${ROOT}WinBoard\doc\UCIconfig.html"\r
+    File "${ROOT}WinBoard\doc\shortcuts.html"\r
+    File "${ROOT}WinBoard\doc\texture.html"\r
+    File "${ROOT}WinBoard\doc\engine-intf.html"\r
+    File "${ROOT}WinBoard\doc\FAQ.html"\r
+    File "${ROOT}WinBoard\doc\mini.gif"\r
+    File "${ROOT}WinBoard\doc\PG2fruit.png"\r
+    File "${ROOT}WinBoard\doc\zippy.README"\r
+\r
+    ; logo bitmaps for ICS and users\r
+    SetOutPath "$INSTDIR\WinBoard\logos"\r
+    File "${ROOT}WinBoard\logos\chessclub.com.bmp"\r
+    File "${ROOT}WinBoard\logos\freechess.org.bmp"\r
+    File "${ROOT}WinBoard\logos\administrator.bmp"\r
+    File "${ROOT}WinBoard\logos\user.bmp"\r
+    File "${ROOT}WinBoard\logos\guest.bmp"\r
+    File "${ROOT}WinBoard\logos\README.txt"\r
+\r
+    ; Polyglot ini files; fruit.ini always supplied (even if Fruit not installed) as example\r
+    SetOutPath "$INSTDIR\WinBoard\PG"\r
+    File "${ROOT}WinBoard\PG\fruit.ini"\r
+\r
+    ; bitmaps for board squares; xqboard is an entire (even-colored) board grid\r
+    SetOutPath "$INSTDIR\Winboard\textures"\r
+    File "${ROOT}WinBoard\textures\marble_d.bmp"\r
+    File "${ROOT}WinBoard\textures\marble_l.bmp"\r
+    File "${ROOT}WinBoard\textures\wood_d.bmp"\r
+    File "${ROOT}WinBoard\textures\wood_l.bmp"\r
+    File "${ROOT}WinBoard\textures\xqboard.bmp"\r
+\r
+    StrCpy $FONT_DIR $FONTS\r
+    !insertmacro InstallTTF '${FNTDIR}MARKFONT.TTF'\r
+    SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000\r
+\r
+    ; the small ini files contain the command-line options used by the shortcuts\r
+    SetOutPath "$INSTDIR\Winboard"\r
+    File "${ROOT}Winboard\winboard.ini"\r
+    File "${ROOT}Winboard\wood.ini"\r
+    File "${ROOT}Winboard\marble.ini"\r
+    File "${ROOT}WinBoard\ChessMark.ini"\r
+    File "${ROOT}Winboard\fairy.ini"\r
+    File "${ROOT}Winboard\FICS.ini"\r
+    File "${ROOT}Winboard\fruit.ini"\r
+    File "${ROOT}Winboard\Gothic.ini"\r
+    File "${ROOT}Winboard\ICC.ini"\r
+    File "${ROOT}Winboard\ICSbot.ini"\r
+    File "${ROOT}Winboard\viewer.ini"\r
+    File "${ROOT}Winboard\winboard.exe"\r
+    File "${ROOT}Winboard\polyglot.exe"\r
+    File "${ROOT}Winboard\timeseal.exe"\r
+    File "${ROOT}Winboard\timestamp.exe"\r
+    File "${ROOT}Winboard\winboard.chm"\r
+    File "${ROOT}Winboard\winboard.hlp"\r
+    File "${ROOT}Winboard\default_book.bin"\r
+\r
+    ;Create uninstaller\r
+    WriteUninstaller "$INSTDIR\UnInstall.exe"\r
+\r
+      ; create some shortcuts in the WinBoard folder\r
+       CreateShortCut "$INSTDIR\WinBoard\PGN Viewer.lnk" "$INSTDIR\WinBoard\winboard.exe" "@viewer" "$INSTDIR\WinBoard\winboard.exe" 0\r
+       CreateShortCut "$INSTDIR\WinBoard\ICC.lnk" "$INSTDIR\WinBoard\winboard.exe" "@ICC" "$INSTDIR\WinBoard\winboard.exe" 0\r
+       CreateShortCut "$INSTDIR\WinBoard\FICS.lnk" "$INSTDIR\WinBoard\winboard.exe" "@FICS" "$INSTDIR\WinBoard\winboard.exe" 0\r
+       CreateShortCut "$INSTDIR\WinBoard\Fairy-Max ICS bot.lnk" "$INSTDIR\WinBoard\winboard.exe" "@ICSbot" "$INSTDIR\WinBoard\winboard.exe" 0\r
+       CreateShortCut "$INSTDIR\WinBoard\my WinBoard.lnk" "$INSTDIR\WinBoard\winboard.exe" "@marble @ChessMark" "$INSTDIR\WinBoard\winboard.exe" 0\r
+       CreateShortCut "$INSTDIR\WinBoard\Fruit.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fruit" "$INSTDIR\WinBoard\winboard.exe" 0\r
+       CreateShortCut "$INSTDIR\WinBoard\Fairy-Max.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy" "$INSTDIR\WinBoard\winboard.exe" 0\r
+\r
+       !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+       CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER"\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Game Viewer.lnk" "$INSTDIR\WinBoard\winboard.exe" "@viewer" "$INSTDIR\WinBoard\winboard.exe" 1\r
+       ;CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard Help.lnk" "$INSTDIR\WinBoard\winboard.hlp"\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Frequently Asked Questions.lnk" "$INSTDIR\WinBoard\doc\FAQ.html"\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard README.lnk" "$INSTDIR\README.html"\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard UnInstall.lnk" "$INSTDIR\UnInstall.exe"\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard Files.lnk" "$INSTDIR\WinBoard"\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Server - chessclub.com.lnk" "$INSTDIR\WinBoard\winboard.exe"  "@ICC" "$INSTDIR\WinBoard\winboard.exe" 0\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Server - freechess.org.lnk" "$INSTDIR\WinBoard\winboard.exe"  "@FICS" "$INSTDIR\WinBoard\winboard.exe" 0\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Fancy-Look WinBoard.lnk" "$INSTDIR\WinBoard\winboard.exe" "@marble @ChessMark" "$INSTDIR\WinBoard\winboard.exe" 2\r
+       CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard Startup Dialog.lnk" "$INSTDIR\WinBoard\winboard.exe" "" "$INSTDIR\WinBoard\winboard.exe" 2\r
+       !insertmacro MUI_STARTMENU_WRITE_END\r
+\r
+SectionEnd\r
+\r
+SectionGroup /e "Auxilliary Components and Engines" Profiles\r
+\r
+    Section "Fairy-Max Demo Engine" fmax\r
+        SectionIn 1 RO\r
+        ; Fairy-Max is so small it can always be included, to have at least one working engine\r
+        SetOutPath "$INSTDIR\Fairy-Max"\r
+        File "${ROOT}Fairy-Max\fmax.exe"\r
+        File "${ROOT}Fairy-Max\MaxQi.exe"\r
+        File "${ROOT}Fairy-Max\fmax.ini"\r
+        File "${ROOT}Fairy-Max\qmax.ini"\r
+        File "${ROOT}Fairy-Max\logo.bmp"\r
+\r
+        ; also create a menu item to play Xiangqi with MaxQi. It is put with the Chess Engines becase it uses western-style board\r
+         SetOutPath $INSTDIR\WinBoard\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Fairy-Max.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy" "$INSTDIR\Fairy-Max\fmax.exe" 0\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\MaxQi (XQ).lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy -fcp MaxQi -scp MaxQi -variant xiangqi" "$INSTDIR\Fairy-Max\MaxQi.exe" 0\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+    SectionEnd\r
+\r
+    Section "Fruit 2.1" Fruit\r
+        ; we include no separate book for Fruit, as it can use the GUI book. It is mostly included to provide a UCI example\r
+        SetOutPath "$INSTDIR\Fruit"\r
+        File "${ROOT}Fruit\copying.txt"\r
+        File "${ROOT}Fruit\fruit_21.exe"\r
+        File "${ROOT}Fruit\logo.bmp"\r
+        File "${ROOT}Fruit\readme.txt"\r
+        File "${ROOT}Fruit\technical_10.txt"\r
+\r
+         SetOutPath $INSTDIR\WinBoard\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Fruit 2.1.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fruit" "$INSTDIR\WinBoard\winboard.exe" 2\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+    SectionEnd\r
+\r
+  Section "Tournament Manager" Tournaments\r
+    SetOutPath "$INSTDIR\PSWBTM\doc"\r
+    File "${ROOT}PSWBTM\doc\configure.html"\r
+    File "${ROOT}PSWBTM\doc\install.html"\r
+    File "${ROOT}PSWBTM\doc\running.html"\r
+    File "${ROOT}PSWBTM\doc\tourney.html"\r
+    File "${ROOT}PSWBTM\doc\menu.png"\r
+    File "${ROOT}PSWBTM\doc\conf.png"\r
+    File "${ROOT}PSWBTM\doc\eman.png"\r
+    File "${ROOT}PSWBTM\doc\pswbtm.png"\r
+    File "${ROOT}PSWBTM\doc\tour.png"\r
+\r
+    CreateDirectory "$INSTDIR\PSWBTM\games"\r
+\r
+    SetOutPath "$INSTDIR\PSWBTM\start positions"\r
+    File "${ROOT}PSWBTM\start positions\nunn.pgn"\r
+    File "${ROOT}PSWBTM\start positions\silver.epd"\r
+\r
+    SetOutPath "$INSTDIR\PSWBTM"\r
+    File "${ROOT}PSWBTM\config.pswbtm"\r
+    File "${ROOT}PSWBTM\engines.pswbtm"\r
+    File "${ROOT}PSWBTM\ntls.pswbtm"\r
+    File "${ROOT}PSWBTM\PSWBTM.exe"\r
+    File "${ROOT}PSWBTM\README.txt"\r
+  SectionEnd\r
+\r
+    SubSection "Xiangqi" Xiangqi\r
+\r
+      Section "Graphics (required!)" XQgraphics\r
+        ; the large bitmp of the wooden XQ board is optional, as is the XQ opening book\r
+        SetOutPath "$INSTDIR\WinBoard"\r
+        File "${ROOT}Winboard\xq.ini"\r
+        File "${ROOT}Winboard\xq_book.bin"\r
+        File "${ROOT}Winboard\UCCI2WB.exe"\r
+        File "${ROOT}Winboard\QH2WB.exe"\r
+\r
+        SetOutPath "$INSTDIR\WinBoard\textures"\r
+        File "${ROOT}WinBoard\textures\xqwood.bmp"\r
+        \r
+        StrCpy $FONT_DIR $FONTS\r
+        !insertmacro InstallTTF '${FNTDIR}XIANGQI.TTF'\r
+        SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000\r
+\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Xiangqi Engines"\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard\Xiangqi.lnk" "$INSTDIR\WinBoard\winboard.exe" "@xq" "$INSTDIR\WinBoard\UCCI2WB.exe" 0\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Xiangqi Engines\MaxQi.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy @xq -fcp MaxQi -scp MaxQi" "$INSTDIR\Fairy-Max\MaxQi.exe" 0\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\WinBoard XQ Startup (oriental).lnk" "$INSTDIR\WinBoard\winboard.exe" "@xq" "$INSTDIR\WinBoard\winboard.exe" 2\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+      SectionEnd\r
+\r
+      Section "HaQiKi D XQ-Engine" HaQi\r
+        SetOutPath "$INSTDIR\HaQi"\r
+        File "${ROOT}HaQi\haqikid.exe"\r
+        File "${ROOT}HaQi\logo.bmp"\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Xiangqi Engines"\r
+\r
+        SetOutPath $INSTDIR\WinBoard\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Xiangqi Engines"\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Xiangqi Engines\HaQiKi D.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy @xq -fcp haqikid -fd ..\HaQi -scp haqikid -sd ..\HaQi" "$INSTDIR\HaQi\haqikid.exe" 0\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+      SectionEnd\r
+\r
+      Section "Elephant Eye XQ-Engine" EleEye\r
+        SetOutPath "$INSTDIR\EleEye"\r
+        File "${ROOT}EleEye\ATOM.DLL"\r
+        File "${ROOT}EleEye\BOOK.DAT"\r
+        File "${ROOT}EleEye\CCHESS.DLL"\r
+        File "${ROOT}EleEye\ELEEYE.EXE"\r
+        File "${ROOT}EleEye\EVALUATE.DLL"\r
+        File "${ROOT}EleEye\logo.bmp"\r
+\r
+        SetOutPath "$INSTDIR\WinBoard\QH"\r
+        File "${ROOT}WinBoard\QH\eleeye.ini"\r
+\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Xiangqi Engines"\r
+        SetOutPath $INSTDIR\WinBoard\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Xiangqi Engines\Elephant Eye.lnk" "$INSTDIR\WinBoard\winboard.exe" '@xq -cp -fcp "UCCI2WB QH\eleeye.ini" -firstLogo ..\EleEye\logo.bmp -scp "UCCI2WB QH\eleeye.ini -secondLogo ..\EleEye\logo.bmp"' "$INSTDIR\EleEye\ELEEYE.exe" 0\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+      SectionEnd\r
+\r
+    SubSectionEnd\r
+\r
+\r
+    SubSection "Chess Variants" Variants\r
+\r
+      Section "Pulsar Variant Engine (Mike Adams)" Pulsar\r
+        SetOutPath "$INSTDIR\Pulsar"\r
+        File "${ROOT}Pulsar\pulsar2009-9b.exe"\r
+        File "${ROOT}Pulsar\bigbook.txt"\r
+        File "${ROOT}Pulsar\openbk.txt"\r
+        File "${ROOT}Pulsar\atomicBookBlack.txt"\r
+        File "${ROOT}Pulsar\atomicBookWhite.txt"\r
+        File "${ROOT}Pulsar\kingsBookBlack.txt"\r
+        File "${ROOT}Pulsar\kingsBookWhite.txt"\r
+        File "${ROOT}Pulsar\losersBlack.txt"\r
+        File "${ROOT}Pulsar\losersWhite.txt"\r
+        File "${ROOT}Pulsar\pulsarCrazyBlack.txt"\r
+        File "${ROOT}Pulsar\pulsarCrazyWhite.txt"\r
+        File "${ROOT}Pulsar\pulsarShatranjBlack.txt"\r
+        File "${ROOT}Pulsar\pulsarShatranjWhite.txt"\r
+        File "${ROOT}Pulsar\suicideBookBlack.txt"\r
+        File "${ROOT}Pulsar\suicideBookWhite.txt"\r
+        File "${ROOT}Pulsar\threeBookBlack.txt"\r
+        File "${ROOT}Pulsar\threeBookWhite.txt"\r
+        File "${ROOT}Pulsar\logo.bmp"\r
+\r
+        SetOutPath $INSTDIR\WinBoard\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Pulsar.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy -fcp pulsar2009-9b.exe -fd ..\Pulsar -scp pulsar2009-9b.exe -sd ..\Pulsar -usePolyglotBook false -variant atomic" "$INSTDIR\WinBoard\winboard.exe" 2\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+      SectionEnd\r
+\r
+      Section "Joker80 Variant Engine" Joker\r
+        SetOutPath "$INSTDIR\Joker"\r
+        File "${ROOT}Joker\joker80.exe"\r
+        File "${ROOT}Joker\jokerKM.exe"\r
+        File "${ROOT}Joker\logo.bmp"\r
+\r
+        SetOutPath $INSTDIR\WinBoard\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Joker80 (Gothic).lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy -fcp Joker80.exe -fd ..\Joker -variant gothic" "$INSTDIR\Joker\Joker80.exe" 0\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Joker Knightmate.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy -fcp JokerKM.exe -fd ..\Joker -variant knightmate" "$INSTDIR\Joker\JokerKM.exe" 0\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+      SectionEnd\r
+\r
+      Section "Adapter for SMIRF Engine" Smirf\r
+        SetOutPath $INSTDIR\SMIRF\r
+        File "${ROOT}SMIRF\Smirfoglot.exe"\r
+        File "${ROOT}SMIRF\logo.bmp"\r
+\r
+        SetOutPath $INSTDIR\WinBoard\r
+        CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines"\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\SMIRF.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy -fcp Smirfoglot.exe -fd ..\SMIRF" "$INSTDIR\SMIRF\Smirfoglot.exe" 0\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+      SectionEnd\r
+\r
+      Section "ShaMax Shatranj Engine" ShaMax\r
+        SetOutPath $INSTDIR\Fairy-Max\r
+        File ${ROOT}Fairy-Max\ShaMax.exe\r
+\r
+        SetOutPath $INSTDIR\WinBoard\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\ShaMax.lnk" "$INSTDIR\WinBoard\winboard.exe" "@fairy -fcp ShaMax.exe -variant shatranj" "$INSTDIR\Fairy-Max\ShaMax.exe" 0\r
+        !insertmacro MUI_STARTMENU_WRITE_END\r
+      SectionEnd               \r
+\r
+    SubSectionEnd\r
+SectionGroupEnd\r
+\r
+;Section "un.Fonts"\r
+;    StrCpy $FONT_DIR $FONTS\r
+;    !insertmacro RemoveTTF 'MARKFONT.TTF'\r
+;    !insertmacro RemoveTTF 'XIANGI.TTF'\r
+;    SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000\r
+;SectionEnd\r
+\r
+;--------------------------------\r
+;Installer Functions\r
+Function .onInit\r
+\r
+  ;Extract InstallOptions INI files\r
+  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "FA.ini"\r
+\r
+FunctionEnd\r
+\r
+Function FileAssoc\r
+\r
+    !insertmacro MUI_HEADER_TEXT "Windows File Associations" "Do you want to use Winboard as your viewer for the following file types?"\r
+    !insertmacro MUI_INSTALLOPTIONS_DISPLAY "FA.ini"\r
+\r
+\r
+    ;Read a value from an InstallOptions INI file\r
+\r
+    !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "FA.ini" "Field 2" "State"\r
+\r
+    ;Display a messagebox if check box was checked\r
+    StrCmp $INI_VALUE "1" "" CheckFEN\r
+    WriteRegStr HKCR ".pgn" "" "WinBoard.PGN"\r
+    WriteRegStr HKCR ".pgn" "Content Type" "application/x-chess-pgn"\r
+    WriteRegStr HKCR "WinBoard.PGN" "" "Chess Game"\r
+    WriteRegStr HKCR "WinBoard.PGN\DefaultIcon" "" "$INSTDIR\WinBoard.exe,1"\r
+    WriteRegStr HKCR "WinBoard.PGN\Shell\Open" "" "Open"\r
+    WriteRegStr HKCR "WinBoard.PGN\Shell\Open\command" "" '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lgf "%1"'\r
+\r
+    CheckFEN:\r
+    !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "FA.ini" "Field 3" "State"\r
+\r
+    ;Display a messagebox if check box was checked\r
+    StrCmp $INI_VALUE "1" "" Continue\r
+    WriteRegStr HKCR ".fen" "" "WinBoard.FEN"\r
+    WriteRegStr HKCR ".fen" "Content Type" "application/x-chess-fen"\r
+    WriteRegStr HKCR "WinBoard.FEN" "" "Chess Position"\r
+    WriteRegStr HKCR "WinBoard.FEN\DefaultIcon" "" "$INSTDIR\WinBoard.exe,1"\r
+    WriteRegStr HKCR "WinBoard.FEN\Shell\Open" "" "Open"\r
+    WriteRegStr HKCR "WinBoard.FEN\Shell\Open\command" "" '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lpf "%1"'\r
+\r
+    Continue:\r
+\r
+FunctionEnd\r
+\r
+;--------------------------------\r
+;Descriptions\r
+\r
+  ;Language strings\r
+\r
+       LangString DESC_Core ${LANG_ENGLISH} "Winboard Core Components - Executable, Help Files, Protocol Adapters, Settings Files and Graphics"\r
+       LangString DESC_Profiles ${LANG_ENGLISH} "Components only of Interest to Specific User Profiles"\r
+       LangString DESC_Xiangqi ${LANG_ENGLISH} "Xiangqi (Chinese Chess) Engines and Graphics"\r
+       LangString DESC_fmax ${LANG_ENGLISH} "Small Chess engine, also plays Gothic, Cylinder, Berolina, Capablanca, Superchess, Knightmate, Great Shatranj"\r
+       LangString DESC_Fruit ${LANG_ENGLISH} "Very strong Chess engine suitable for analysis, by Fabien Letouzy"\r
+       LangString DESC_Variants ${LANG_ENGLISH} "Engines for Chess-Variant Afficionados (e.g. Crazyhouse, Chess960, Gothic Chess)"\r
+       LangString DESC_Tournaments ${LANG_ENGLISH} "PSWBTM Tournament Manager for running automated engine-engine tournaments with WinBoard"\r
+       LangString DESC_XQgraphics ${LANG_ENGLISH} "Oriental-style board and pieces for WinBoard (the XQ-engine shortcuts won't work without it!)"\r
+       LangString DESC_HaQi ${LANG_ENGLISH} "HaQiKi D 0.8, a strong Xiangqi engine by H.G. Muller"\r
+       LangString DESC_EleEye ${LANG_ENGLISH} "Elephant Eye 3.1, a very strong Xiangqi engine by Morning Yellow"\r
+       LangString DESC_Joker ${LANG_ENGLISH} "Joker80 Gothic-Chess engine and JokerKM Knightmate engine by H.G.Muller"\r
+       LangString DESC_Pulsar ${LANG_ENGLISH} "Plays Chess960, Crazyhouse, Losers, Suicide, Giveway, Atomic, 3Check, TwoKings, Shatranj and standard Chess"\r
+       LangString DESC_ShaMax ${LANG_ENGLISH} "A derivative of the Fairy-Max engine dedicated to playing Shatranj"\r
+       LangString DESC_Smirf ${LANG_ENGLISH} "Smirfoglot adapter for Reinhard Scharnagl's SMIRF 10x8 and 8x8 Chess engine"\r
+\r
+\r
+  ;Assign language strings to sections\r
+\r
+  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Core} $(DESC_Core)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Profiles} $(DESC_Profiles)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Xiangqi} $(DESC_Xiangqi)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${fmax} $(DESC_fmax)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Fruit} $(DESC_Fruit)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Variants} $(DESC_Variants)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Tournaments} $(DESC_Tournaments)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${XQgraphics} $(DESC_XQgraphics)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${HaQi} $(DESC_HaQi)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${EleEye} $(DESC_EleEye)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Joker} $(DESC_Joker)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Pulsar} $(DESC_Pulsar)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${ShaMax} $(DESC_ShaMax)\r
+       !insertmacro MUI_DESCRIPTION_TEXT ${Smirf} $(DESC_Smirf)\r
+  !insertmacro MUI_FUNCTION_DESCRIPTION_END\r
+\r
+;--------------------------------\r
+\r
+;--------------------------------\r
+;Uninstaller Section\r
+\r
+; Function to delete install directory if non-empty on user request\r
+Function un.ForceDirectoryDelete\r
+\r
+         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\r
+\r
+         RMDir /r "$INSTDIR"\r
+\r
+         End:\r
+\r
+FunctionEnd\r
+\r
+\r
+Section "Uninstall"\r
+\r
+       Delete "$INSTDIR\COPYING.txt"\r
+       Delete "$INSTDIR\COPYRIGHT.txt"\r
+       Delete "$INSTDIR\README.html"\r
+       Delete "$INSTDIR\WinBoard\PG\fruit.ini"\r
+       Delete "$INSTDIR\WinBoard\logos\chessclub.com.bmp"\r
+       Delete "$INSTDIR\WinBoard\logos\freechess.org.bmp"\r
+       Delete "$INSTDIR\WinBoard\logos\administrator.bmp"\r
+       Delete "$INSTDIR\WinBoard\logos\guest.bmp"\r
+       Delete "$INSTDIR\WinBoard\logos\user.bmp"\r
+       Delete "$INSTDIR\WinBoard\logos\README.txt"\r
+       Delete "$INSTDIR\WinBoard\textures\marble_l.bmp"\r
+       Delete "$INSTDIR\WinBoard\textures\marble_d.bmp"\r
+       Delete "$INSTDIR\WinBoard\textures\wood_l.bmp"\r
+       Delete "$INSTDIR\WinBoard\textures\wood_d.bmp"\r
+       Delete "$INSTDIR\WinBoard\textures\xqboard.bmp"\r
+       Delete "$INSTDIR\Fairy-Max\fmax.exe"\r
+       Delete "$INSTDIR\Fairy-Max\MaxQi.exe"\r
+       Delete "$INSTDIR\Fairy-Max\fmax.ini"\r
+       Delete "$INSTDIR\Fairy-Max\qmax.ini"\r
+       Delete "$INSTDIR\Fairy-Max\logo.bmp"\r
+       Delete "$INSTDIR\WinBoard\doc\engine-intf.html"\r
+       Delete "$INSTDIR\WinBoard\doc\FAQ.html"\r
+       Delete "$INSTDIR\WinBoard\doc\fonts.html"\r
+       Delete "$INSTDIR\WinBoard\doc\manual.html"\r
+       Delete "$INSTDIR\WinBoard\doc\UCIconfig.html"\r
+       Delete "$INSTDIR\WinBoard\doc\shortcuts.html"\r
+       Delete "$INSTDIR\WinBoard\doc\texture.html"\r
+       Delete "$INSTDIR\WinBoard\doc\mini.gif"\r
+       Delete "$INSTDIR\WinBoard\doc\PG2fruit.png"\r
+       Delete "$INSTDIR\WinBoard\doc\zippy.README"\r
+       ;Delete "$FONTS\ChessMark.ttf"\r
+       Delete "$INSTDIR\WinBoard\polyglot.exe"\r
+       Delete "$INSTDIR\WinBoard\UCCI2WB.exe"\r
+       Delete "$INSTDIR\WinBoard\timeseal.exe"\r
+       Delete "$INSTDIR\WinBoard\timestamp.exe"\r
+       Delete "$INSTDIR\WinBoard\winboard.exe"\r
+       Delete "$INSTDIR\WinBoard\winboard.hlp"\r
+       Delete "$INSTDIR\WinBoard\winboard.chm"\r
+       Delete "$INSTDIR\WinBoard\FICS.ini"\r
+       Delete "$INSTDIR\WinBoard\ICC.ini"\r
+       Delete "$INSTDIR\WinBoard\fairy.ini"\r
+       Delete "$INSTDIR\WinBoard\Gothic.ini"\r
+       Delete "$INSTDIR\WinBoard\viewer.ini"\r
+       Delete "$INSTDIR\WinBoard\marble.ini"\r
+       Delete "$INSTDIR\WinBoard\wood.ini"\r
+       Delete "$INSTDIR\WinBoard\ICSbot.ini"\r
+       Delete "$INSTDIR\WinBoard\fruit.ini"\r
+       Delete "$INSTDIR\WinBoard\winboard.ini"\r
+       Delete "$INSTDIR\WinBoard\ChessMark.ini"\r
+       Delete "$INSTDIR\WinBoard\default_book.bin"\r
+       Delete "$INSTDIR\WinBoard\zippy.lines"\r
+       Delete "$INSTDIR\WinBoard\textures\xqwood.bmp"\r
+       Delete "$INSTDIR\WinBoard\FICS.lnk"\r
+       Delete "$INSTDIR\WinBoard\ICC.lnk"\r
+       Delete "$INSTDIR\WinBoard\Fairy-Max.lnk"\r
+       Delete "$INSTDIR\WinBoard\PGN Viewer.lnk"\r
+       Delete "$INSTDIR\WinBoard\my WinBoard.lnk"\r
+       Delete "$INSTDIR\WinBoard\Fairy-Max ICS bot.lnk"\r
+       Delete "$INSTDIR\WinBoard\Fruit.lnk"\r
+       Delete "$INSTDIR\WinBoard\polyglot_1st.ini"\r
+       Delete "$INSTDIR\WinBoard\polyglot_2nd.ini"\r
+\r
+       Delete "$INSTDIR\Fruit\fruit_21.exe"\r
+       Delete "$INSTDIR\Fruit\copying.txt"\r
+       Delete "$INSTDIR\Fruit\readme.txt"\r
+       Delete "$INSTDIR\Fruit\technical_10.txt"\r
+       Delete "$INSTDIR\Fruit\logo.bmp"\r
+\r
+       Delete "$INSTDIR\HaQi\haqikid.exe"\r
+       Delete "$INSTDIR\HaQi\logo.bmp"\r
+       Delete "$INSTDIR\EleEye\ELEEYE.exe"\r
+       Delete "$INSTDIR\EleEye\ATOM.DLL"\r
+       Delete "$INSTDIR\EleEye\CCHESS.DLL"\r
+       Delete "$INSTDIR\EleEye\EVALUATE.DLL"\r
+       Delete "$INSTDIR\EleEye\BOOK.DAT"\r
+       Delete "$INSTDIR\EleEye\logo.bmp"\r
+       Delete "$INSTDIR\WinBoard\QH\eleeye.ini"\r
+       ;Delete "$FONTS\XIANGQI.ttf"\r
+       Delete "$INSTDIR\WinBoard\xq_book.bin"\r
+       Delete "$INSTDIR\WinBoard\QH2WB.exe"\r
+       Delete "$INSTDIR\WinBoard\xq.ini"\r
+\r
+       Delete "$INSTDIR\Pulsar\Pulsar2009-9b.exe"\r
+       Delete "$INSTDIR\Pulsar\atomicBookBlack.txt"\r
+       Delete "$INSTDIR\Pulsar\atomicBookWhite.txt"\r
+       Delete "$INSTDIR\Pulsar\kingsBookBlack.txt"\r
+       Delete "$INSTDIR\Pulsar\kingsBookWhite.txt"\r
+       Delete "$INSTDIR\Pulsar\losersBlack.txt"\r
+       Delete "$INSTDIR\Pulsar\losersWhite.txt"\r
+       Delete "$INSTDIR\Pulsar\pulsarCrazyBlack.txt"\r
+       Delete "$INSTDIR\Pulsar\pulsarCrazyWhite.txt"\r
+       Delete "$INSTDIR\Pulsar\pulsarShatranjBlack.txt"\r
+       Delete "$INSTDIR\Pulsar\pulsarShatranjWhite.txt"\r
+       Delete "$INSTDIR\Pulsar\suicideBookBlack.txt"\r
+       Delete "$INSTDIR\Pulsar\suicideBookWhite.txt"\r
+       Delete "$INSTDIR\Pulsar\threeBookBlack.txt"\r
+       Delete "$INSTDIR\Pulsar\threeBookWhite.txt"\r
+       Delete "$INSTDIR\Pulsar\bigbook.txt"\r
+       Delete "$INSTDIR\Pulsar\openbk.txt"\r
+       Delete "$INSTDIR\Pulsar\logo.bmp"\r
+       Delete "$INSTDIR\Joker\joker80.exe"\r
+       Delete "$INSTDIR\Joker\jokerKM.exe"\r
+       Delete "$INSTDIR\Joker\logo.bmp"\r
+       Delete "$INSTDIR\SMIRF\Smirfoglot.exe"\r
+       Delete "$INSTDIR\SMIRF\logo.bmp"\r
+       Delete "$INSTDIR\Fairy-Max\ShaMax.exe"\r
+\r
+       Delete "$INSTDIR\PSWBTM\PSWBTM.exe"\r
+       Delete "$INSTDIR\PSWBTM\README.txt"\r
+       Delete "$INSTDIR\PSWBTM\config.pswbtm"\r
+       Delete "$INSTDIR\PSWBTM\engines.pswbtm"\r
+       Delete "$INSTDIR\PSWBTM\ntls.pswbtm"\r
+       Delete "$INSTDIR\PSWBTM\start positions\nunn.pgn"\r
+       Delete "$INSTDIR\PSWBTM\start positions\silver.epd"\r
+       Delete "$INSTDIR\PSWBTM\doc\configure.html"\r
+       Delete "$INSTDIR\PSWBTM\doc\install.html"\r
+       Delete "$INSTDIR\PSWBTM\doc\running.html"\r
+       Delete "$INSTDIR\PSWBTM\doc\tourney.html"\r
+       Delete "$INSTDIR\PSWBTM\doc\conf.png"\r
+       Delete "$INSTDIR\PSWBTM\doc\eman.png"\r
+       Delete "$INSTDIR\PSWBTM\doc\menu.png"\r
+       Delete "$INSTDIR\PSWBTM\doc\pswbtm.png"\r
+       Delete "$INSTDIR\PSWBTM\doc\tour.png"\r
+\r
+       RMDir "$INSTDIR\WinBoard\doc"\r
+       RMDir "$INSTDIR\WinBoard\logos"\r
+       RMDir "$INSTDIR\WinBoard\textures"\r
+       RMDir "$INSTDIR\WinBoard\PG"\r
+       RMDir "$INSTDIR\WinBoard\QH"\r
+       RMDir "$INSTDIR\WinBoard"\r
+       RMDir "$INSTDIR\Fairy-Max"\r
+       RMDir "$INSTDIR\Pulsar"\r
+       RMDir "$INSTDIR\Joker"\r
+       RMDir "$INSTDIR\Fruit"\r
+       RMDir "$INSTDIR\PSWBTM\doc"\r
+       RMDir "$INSTDIR\PSWBTM\games"\r
+       RMDir "$INSTDIR\PSWBTM\start positions"\r
+       RMDir "$INSTDIR\PSWBTM"\r
+       RMDir "$INSTDIR\SMIRF"\r
+       RMDir "$INSTDIR\HaQi"\r
+       RMDir "$INSTDIR\EleEye"\r
+       RMDir "$INSTDIR"\r
+\r
+\r
+    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP\r
+\r
+    RMDir /r "$SMPROGRAMS\$MUI_TEMP"\r
+\r
+    ReadRegStr $1 HKCR ".pgn" ""\r
+    StrCmp $1 "WinBoard.PGN" "" DelFEN\r
+    ReadRegStr $1 HKCR "WinBoard.PGN\Shell\Open\command" ""\r
+    StrCmp $1 '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lgf "%1"' "" DelFEN\r
+    DeleteRegKey HKCR ".pgn"\r
+    DeleteRegKey HKCR "WinBoard.PGN"\r
+\r
+    DelFEN:\r
+\r
+    ReadRegStr $1 HKCR ".fen" ""\r
+    StrCmp $1 "WinBoard.FEN" "" ContDelFEN\r
+    ReadRegStr $1 HKCR "WinBoard.FEN\Shell\Open\command" ""\r
+    StrCmp $1 '"$INSTDIR\WinBoard.exe" -ini "$INSTDIR\WinBoard.ini" -ncp -lpf "%1"' "" ContDelFEN\r
+    DeleteRegKey HKCR ".fen"\r
+    DeleteRegKey HKCR "WinBoard.FEN"\r
+\r
+    ContDelFEN:\r
+\r
+    DeleteRegKey HKCU "Software\WinBoard"\r
+\r
+\r
+    IfFileExists "$INSTDIR\*.*" GoDirDel Continue\r
+\r
+    GoDirDel:\r
+    Call un.ForceDirectoryDelete\r
+\r
+    Continue:\r
+\r
+\r
+SectionEnd\r