Go to most recent revision | Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 1 | !include "MUI2.nsh" |
| 2 | !include "FileFunc.nsh" |
||
| 3 | |||
| 4 | !define PRODUCT_NAME "Chess Giants" |
||
| 5 | !define PUBLISHER "Pierre-Marie Baty" |
||
| 6 | !define PUBLISHER_WEBSITE "http://www.pmbaty.com/chess/" |
||
| 7 | !define INSTALLER_SRC "C:\Users\Pierre-Marie Baty\Documents\Mes projets\Chess Giants" |
||
| 8 | |||
| 9 | Name "${PRODUCT_NAME}" |
||
| 22 | pmbaty | 10 | OutFile "C:\Users\Pierre-Marie Baty\Documents\Mes projets\www.pmbaty.com\chess\Chess Giants Installer.exe" |
| 19 | pmbaty | 11 | BrandingText "${PRODUCT_NAME} by ${PUBLISHER} - ${PUBLISHER_WEBSITE}" |
| 1 | pmbaty | 12 | |
| 13 | SetCompressor lzma |
||
| 14 | RequestExecutionLevel user |
||
| 15 | |||
| 16 | AllowRootDirInstall true |
||
| 19 | pmbaty | 17 | InstallDir "$LOCALAPPDATA\${PRODUCT_NAME}" |
| 1 | pmbaty | 18 | |
| 19 | pmbaty | 19 | !define MUI_ICON "${INSTALLER_SRC}\resource\installer.ico" |
| 1 | pmbaty | 20 | !define MUI_HEADERIMAGE |
| 19 | pmbaty | 21 | !define MUI_HEADERIMAGE_BITMAP "${INSTALLER_SRC}\resource\installer.bmp" |
| 1 | pmbaty | 22 | !define MUI_ABORTWARNING |
| 23 | |||
| 24 | !insertmacro MUI_PAGE_LICENSE "${INSTALLER_SRC}\License.txt" |
||
| 25 | !insertmacro MUI_PAGE_DIRECTORY |
||
| 26 | ;!insertmacro MUI_PAGE_COMPONENTS |
||
| 27 | !insertmacro MUI_PAGE_INSTFILES |
||
| 28 | |||
| 29 | !insertmacro MUI_UNPAGE_CONFIRM |
||
| 30 | !insertmacro MUI_UNPAGE_INSTFILES |
||
| 31 | |||
| 32 | !insertmacro MUI_LANGUAGE "English" |
||
| 33 | !insertmacro MUI_LANGUAGE "French" |
||
| 34 | |||
| 35 | Section "" |
||
| 36 | SetOutPath "$INSTDIR" |
||
| 37 | |||
| 38 | File /r "${INSTALLER_SRC}\data" |
||
| 44 | pmbaty | 39 | File /r "${INSTALLER_SRC}\engines" |
| 1 | pmbaty | 40 | File /r "${INSTALLER_SRC}\helpfiles" |
| 41 | File /r "${INSTALLER_SRC}\themes" |
||
| 42 | File "${INSTALLER_SRC}\*.pgn" |
||
| 43 | File "${INSTALLER_SRC}\${PRODUCT_NAME}.exe" |
||
| 44 | File "${INSTALLER_SRC}\${PRODUCT_NAME}.exe.manifest" |
||
| 29 | pmbaty | 45 | File "${INSTALLER_SRC}\Chess Giants (English).html" |
| 46 | File "${INSTALLER_SRC}\Chess Giants (French).html" |
||
| 1 | pmbaty | 47 | File "${INSTALLER_SRC}\config.ini" |
| 48 | File "${INSTALLER_SRC}\materials.cfg" |
||
| 49 | File "${INSTALLER_SRC}\d3dx9_42.dll" |
||
| 50 | File "${INSTALLER_SRC}\msvcr90.dll" |
||
| 51 | |||
| 52 | CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "" "" "" "" "" "Start a chess game" |
||
| 53 | CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" |
||
| 54 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "" "" "" "" "" "Start a chess game" |
||
| 29 | pmbaty | 55 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation (English).lnk" "$INSTDIR\Chess Giants (English).html" "" "" "" "" "" "Read the software documentation in English" |
| 56 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation (Français).lnk" "$INSTDIR\Chess Giants (French).html" "" "" "" "" "" "Read the software documentation in French" |
||
| 1 | pmbaty | 57 | |
| 58 | WriteRegStr HKCU "Software\Classes\.pgn" "" "ChessGiantsPGN" |
||
| 59 | WriteRegStr HKCU "Software\Classes\ChessGiantsPGN" "" "Portable Game Notation" |
||
| 60 | ; WriteRegStr HKCU "Software\Classes\ChessGiantsPGN\DefaultIcon" "" "$INSTDIR\${PRODUCT_NAME}.exe,1" |
||
| 61 | WriteRegStr HKCU "Software\Classes\ChessGiantsPGN\shell\open\command" "" '"$INSTDIR\${PRODUCT_NAME}.exe" "%1"' |
||
| 62 | |||
| 63 | WriteRegStr HKCU "Software\Classes\.fen" "" "ChessGiantsFEN" |
||
| 64 | WriteRegStr HKCU "Software\Classes\ChessGiantsFEN" "" "Forsyth-Edwards Notation" |
||
| 65 | ; WriteRegStr HKCU "Software\Classes\ChessGiantsFEN\DefaultIcon" "" "$INSTDIR\${PRODUCT_NAME}.exe,1" |
||
| 66 | WriteRegStr HKCU "Software\Classes\ChessGiantsFEN\shell\open\command" "" '"$INSTDIR\${PRODUCT_NAME}.exe" "%1"' |
||
| 67 | |||
| 68 | WriteUninstaller $INSTDIR\uninstall.exe |
||
| 69 | WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}" |
||
| 55 | pmbaty | 70 | WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\${PRODUCT_NAME}.exe,0" |
| 1 | pmbaty | 71 | WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\"" |
| 72 | WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S" |
||
| 73 | WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "Publisher" "${PUBLISHER}" |
||
| 74 | WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoModify" 1 |
||
| 75 | WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoRepair" 1 |
||
| 76 | ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 |
||
| 77 | IntFmt $0 "0x%08X" $0 |
||
| 78 | WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "EstimatedSize" "$0" |
||
| 79 | SectionEnd |
||
| 14 | pmbaty | 80 | |
| 1 | pmbaty | 81 | Section "Uninstall" |
| 82 | DeleteRegKey HKCU "Software\Classes\.pgn" |
||
| 83 | DeleteRegKey HKCU "Software\Classes\ChessGiantsPGN" |
||
| 84 | DeleteRegKey HKCU "Software\Classes\.fen" |
||
| 85 | DeleteRegKey HKCU "Software\Classes\ChessGiantsFEN" |
||
| 86 | |||
| 87 | Delete "$DESKTOP\${PRODUCT_NAME}.lnk" |
||
| 88 | RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}" |
||
| 89 | RMDir /r "$INSTDIR" |
||
| 90 | |||
| 91 | DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" |
||
| 92 | SectionEnd |