Subversion Repositories Games.Chess Giants

Rev

Rev 132 | Rev 144 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 133
Line 102... Line 102...
102
!insertmacro MUI_LANGUAGE "French"
102
!insertmacro MUI_LANGUAGE "French"
103
 
103
 
104
Section ""
104
Section ""
105
	SetOutPath "$INSTDIR"
105
	SetOutPath "$INSTDIR"
106
 
106
 
-
 
107
	; deploy our files
107
	File /r "${INSTALLER_SRC}\data"
108
	File /r "${INSTALLER_SRC}\data"
108
	File /r "${INSTALLER_SRC}\engines"
109
	File /r "${INSTALLER_SRC}\engines"
109
	File /r "${INSTALLER_SRC}\helpfiles"
110
	File /r "${INSTALLER_SRC}\helpfiles"
110
	File /r "${INSTALLER_SRC}\themes"
111
	File /r "${INSTALLER_SRC}\themes"
111
	File "${INSTALLER_SRC}\*.pgn"
112
	File "${INSTALLER_SRC}\*.pgn"
Line 118... Line 119...
118
	File "${INSTALLER_SRC}\d3dx9_42.dll"
119
	File "${INSTALLER_SRC}\d3dx9_42.dll"
119
	File "${INSTALLER_SRC}\msvcr90.dll"
120
	File "${INSTALLER_SRC}\msvcr90.dll"
120
	File "${INSTALLER_SRC}\openal32.dll"
121
	File "${INSTALLER_SRC}\openal32.dll"
121
	File "${INSTALLER_SRC}\wrap_oal.dll"
122
	File "${INSTALLER_SRC}\wrap_oal.dll"
122
 
123
 
-
 
124
	; create Start menu shortcuts
123
	CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "" "" "" "" "" "Start a chess game"
125
	CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "" "" "" "" "" "Start a chess game"
124
	CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
126
	CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
125
	CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "" "" "" "" "" "Start a chess game"
127
	CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "" "" "" "" "" "Start a chess game"
126
	CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation (English).lnk" "$INSTDIR\Chess Giants (English).html" "" "" "" "" "" "Read the software documentation in English"
128
	CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation (English).lnk" "$INSTDIR\Chess Giants (English).html" "" "" "" "" "" "Read the software documentation in English"
127
	CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation (Français).lnk" "$INSTDIR\Chess Giants (French).html" "" "" "" "" "" "Read the software documentation in French"
129
	CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation (Français).lnk" "$INSTDIR\Chess Giants (French).html" "" "" "" "" "" "Read the software documentation in French"
128
 
130
 
-
 
131
	; associate .pgn files with Chess Giants
129
	WriteRegStr HKCU "Software\Classes\.pgn" "" "ChessGiantsPGN"
132
	WriteRegStr HKCU "Software\Classes\.pgn" "" "ChessGiantsPGN"
130
	WriteRegStr HKCU "Software\Classes\ChessGiantsPGN" "" "Portable Game Notation"
133
	WriteRegStr HKCU "Software\Classes\ChessGiantsPGN" "" "Portable Game Notation"
131
;	WriteRegStr HKCU "Software\Classes\ChessGiantsPGN\DefaultIcon" "" "$INSTDIR\${PRODUCT_NAME}.exe,1"
134
;	WriteRegStr HKCU "Software\Classes\ChessGiantsPGN\DefaultIcon" "" "$INSTDIR\${PRODUCT_NAME}.exe,1"
132
	WriteRegStr HKCU "Software\Classes\ChessGiantsPGN\shell\open\command" "" '"$INSTDIR\${PRODUCT_NAME}.exe" "%1"'
135
	WriteRegStr HKCU "Software\Classes\ChessGiantsPGN\shell\open\command" "" '"$INSTDIR\${PRODUCT_NAME}.exe" "%1"'
133
 
136
 
-
 
137
	; associate .fen files with Chess Giants
134
	WriteRegStr HKCU "Software\Classes\.fen" "" "ChessGiantsFEN"
138
	WriteRegStr HKCU "Software\Classes\.fen" "" "ChessGiantsFEN"
135
	WriteRegStr HKCU "Software\Classes\ChessGiantsFEN" "" "Forsyth-Edwards Notation"
139
	WriteRegStr HKCU "Software\Classes\ChessGiantsFEN" "" "Forsyth-Edwards Notation"
136
;	WriteRegStr HKCU "Software\Classes\ChessGiantsFEN\DefaultIcon" "" "$INSTDIR\${PRODUCT_NAME}.exe,1"
140
;	WriteRegStr HKCU "Software\Classes\ChessGiantsFEN\DefaultIcon" "" "$INSTDIR\${PRODUCT_NAME}.exe,1"
137
	WriteRegStr HKCU "Software\Classes\ChessGiantsFEN\shell\open\command" "" '"$INSTDIR\${PRODUCT_NAME}.exe" "%1"'
141
	WriteRegStr HKCU "Software\Classes\ChessGiantsFEN\shell\open\command" "" '"$INSTDIR\${PRODUCT_NAME}.exe" "%1"'
138
 
142
 
-
 
143
	; create a proper uninstaller
139
	WriteUninstaller $INSTDIR\uninstall.exe
144
	WriteUninstaller $INSTDIR\uninstall.exe
140
	WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}"
145
	WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}"
141
	WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\${PRODUCT_NAME}.exe,0"
146
	WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\${PRODUCT_NAME}.exe,0"
142
	WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
147
	WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
143
	WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
148
	WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
Line 146... Line 151...
146
	WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoRepair" 1
151
	WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoRepair" 1
147
	${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
152
	${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
148
	IntFmt $0 "0x%08X" $0
153
	IntFmt $0 "0x%08X" $0
149
	WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "EstimatedSize" "$0"
154
	WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "EstimatedSize" "$0"
150
 
155
 
-
 
156
	; the program was installed successfully, start it and ask it to delete the installer by writing a little registry key
-
 
157
	WriteRegStr HKCU "Software\Chess Giants" "InstallerPath" "$EXEPATH"
151
	Exec '"$WINDIR\explorer.exe" "$INSTDIR\${PRODUCT_NAME}.exe"'
158
	Exec '"$WINDIR\explorer.exe" "$INSTDIR\${PRODUCT_NAME}.exe"'
152
SectionEnd
159
SectionEnd
153
 
160
 
154
Section "Uninstall"
161
Section "Uninstall"
155
	DeleteRegKey HKCU "Software\Classes\.pgn"
162
	DeleteRegKey HKCU "Software\Classes\.pgn"