updated installe script
[xboard.git] / winboard / install / installer / wb440.nsi
index f5721e1..e2f6260 100644 (file)
@@ -69,7 +69,7 @@ SilentInstall normal
     ; Install Section\r
     ;--------------------------------------------------------------------\r
     !insertmacro MUI_PAGE_WELCOME\r
-    !insertmacro MUI_PAGE_LICENSE "${ROOT}COPYRIGHT.txt"\r
+    !insertmacro MUI_PAGE_LICENSE "${ROOT}WinBoard\doc\COPYRIGHTS.txt"\r
     !insertmacro MUI_PAGE_COMPONENTS\r
     Page custom FileAssoc\r
     !insertmacro MUI_PAGE_DIRECTORY\r
@@ -116,8 +116,6 @@ Section "WinBoard Core Components" Core
 \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
@@ -130,6 +128,10 @@ SectionIn 1 RO
     File "${ROOT}WinBoard\doc\mini.gif"\r
     File "${ROOT}WinBoard\doc\PG2fruit.png"\r
     File "${ROOT}WinBoard\doc\zippy.README"\r
+    File "${ROOT}WinBoard\doc\README.html"\r
+    File "${ROOT}WinBoard\doc\COPYRIGHTS.txt"\r
+    File "${ROOT}WinBoard\doc\COPYRIGHT.txt"\r
+    File "${ROOT}WinBoard\doc\COPYING.txt"\r
 \r
     ; logo bitmaps for ICS and users\r
     SetOutPath "$INSTDIR\WinBoard\logos"\r
@@ -194,7 +196,7 @@ SectionIn 1 RO
        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 Gold Pack README.lnk" "$INSTDIR\WinBoard\doc\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
@@ -205,7 +207,7 @@ SectionIn 1 RO
 \r
 SectionEnd\r
 \r
-SectionGroup /e "Auxilliary Components and Engines" Profiles\r
+SectionGroup /e "Auxiliary Components and Engines" Profiles\r
 \r
     Section "Fairy-Max Demo Engine" fmax\r
         SectionIn 1 RO\r
@@ -219,8 +221,8 @@ SectionGroup /e "Auxilliary Components and Engines" Profiles
 \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
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\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
@@ -271,13 +273,7 @@ SectionGroup /e "Auxilliary Components and Engines" Profiles
     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
+        ; the large bitmap of the wooden XQ board is optional, as is the XQ opening book\r
         SetOutPath "$INSTDIR\WinBoard\textures"\r
         File "${ROOT}WinBoard\textures\xqwood.bmp"\r
         \r
@@ -285,8 +281,14 @@ SectionGroup /e "Auxilliary Components and Engines" Profiles
         !insertmacro InstallTTF '${FNTDIR}XIANGQI.TTF'\r
         SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000\r
 \r
-        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\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
         CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\Xiangqi Engines"\r
+        !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\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
@@ -354,7 +356,7 @@ SectionGroup /e "Auxilliary Components and Engines" Profiles
         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
+        CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\Chess Engines\Pulsar.lnk" "$INSTDIR\WinBoard\winboard.exe" '@fairy -fcp "pulsar2009-9b 2" -fd ..\Pulsar -scp "pulsar2009-9b 2" -sd ..\Pulsar -usePolyglotBook false -variant atomic' "$INSTDIR\WinBoard\winboard.exe" 2\r
         !insertmacro MUI_STARTMENU_WRITE_END\r
       SectionEnd\r
 \r
@@ -428,9 +430,9 @@ Function FileAssoc
     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\DefaultIcon" "" "$INSTDIR\WinBoard\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
+    WriteRegStr HKCR "WinBoard.PGN\Shell\Open\command" "" '"$INSTDIR\WinBoard\WinBoard.exe" -ini "$INSTDIR\WinBoard\WinBoard.ini" @viewer -lgf "%1"'\r
 \r
     CheckFEN:\r
     !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "FA.ini" "Field 3" "State"\r
@@ -440,9 +442,9 @@ Function FileAssoc
     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\DefaultIcon" "" "$INSTDIR\WinBoard\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
+    WriteRegStr HKCR "WinBoard.FEN\Shell\Open\command" "" '"$INSTDIR\WinBoard\WinBoard.exe" -ini "$INSTDIR\WinBoard\WinBoard.ini" @viewer -lpf "%1"'\r
 \r
     Continue:\r
 \r
@@ -507,9 +509,6 @@ FunctionEnd
 \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
@@ -537,6 +536,10 @@ Section "Uninstall"
        Delete "$INSTDIR\WinBoard\doc\mini.gif"\r
        Delete "$INSTDIR\WinBoard\doc\PG2fruit.png"\r
        Delete "$INSTDIR\WinBoard\doc\zippy.README"\r
+       Delete "$INSTDIR\WinBoard\doc\COPYING.txt"\r
+       Delete "$INSTDIR\WinBoard\doc\COPYRIGHT.txt"\r
+       Delete "$INSTDIR\WinBoard\doc\COPYRIGHTS.txt"\r
+       Delete "$INSTDIR\WinBoard\doc\README.html"\r
        ;Delete "$FONTS\ChessMark.ttf"\r
        Delete "$INSTDIR\WinBoard\polyglot.exe"\r
        Delete "$INSTDIR\WinBoard\UCCI2WB.exe"\r
@@ -648,6 +651,7 @@ Section "Uninstall"
        RMDir "$INSTDIR\SMIRF"\r
        RMDir "$INSTDIR\HaQi"\r
        RMDir "$INSTDIR\EleEye"\r
+       Delete "$INSTDIR\uninstall.exe"\r
        RMDir "$INSTDIR"\r
 \r
 \r
@@ -658,7 +662,7 @@ Section "Uninstall"
     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
+    StrCmp $1 '"$INSTDIR\WinBoard\WinBoard.exe" -ini "$INSTDIR\WinBoard\WinBoard.ini" @viewer -lgf "%1"' "" DelFEN\r
     DeleteRegKey HKCR ".pgn"\r
     DeleteRegKey HKCR "WinBoard.PGN"\r
 \r
@@ -667,7 +671,7 @@ Section "Uninstall"
     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
+    StrCmp $1 '"$INSTDIR\WinBoard\WinBoard.exe" -ini "$INSTDIR\WinBoard\WinBoard.ini" @viewer -lpf "%1"' "" ContDelFEN\r
     DeleteRegKey HKCR ".fen"\r
     DeleteRegKey HKCR "WinBoard.FEN"\r
 \r