1
; NSIS script created by redxii for RVM's SMPlayer
2
;--------------------------------
5
SetCompressor /SOLID lzma
6
SetCompressorDictSize 32
8
;--------------------------------
9
;Additional plugin folders
13
;--------------------------------
16
!define PRODUCT_NAME "SMPlayer"
17
!define PRODUCT_VERSION "0.6.7"
18
!define PRODUCT_PUBLISHER "RVM"
19
!define PRODUCT_WEB_SITE "http://smplayer.sf.net"
20
!define PRODUCT_FORUM "http://smplayer.sourceforge.net/forums"
21
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
22
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
23
!define PRODUCT_STARTMENU_GROUP "SMPlayer"
25
; Memento settings (required for Memento)
26
!define MEMENTO_REGISTRY_ROOT HKLM
27
!define MEMENTO_REGISTRY_KEY Software\SMPlayer
33
;--------------------------------
37
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
39
OutFile "smplayer_${PRODUCT_VERSION}_setup.exe"
41
OutFile "smplayer_${PRODUCT_VERSION}_websetup.exe"
44
;Version tab properties
45
VIProductVersion "${PRODUCT_VERSION}.0"
46
VIAddVersionKey "ProductName" "SMPlayer"
47
VIAddVersionKey "Comments" "This installation was built with NSIS."
48
VIAddVersionKey "LegalTrademarks" "RVM"
49
VIAddVersionKey "LegalCopyright" "RVM"
50
VIAddVersionKey "CompanyName" "RVM"
52
VIAddVersionKey "FileDescription" "SMPlayer Installer (w/ MPlayer)"
54
VIAddVersionKey "FileDescription" "SMPlayer Installer (w/o MPlayer)"
56
VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
58
/* Sets default install dir to $PROGRAMFILES\SMPlayer.
59
If InstallDirRegKey exists (from a previous installation,
60
it will default to that directory instead. */
61
InstallDir "$PROGRAMFILES\SMPlayer"
62
InstallDirRegKey HKLM "Software\SMPlayer" "Path"
66
ShowUnInstDetails show
68
;Vista+ XML manifest, does not affect older OSes
69
RequestExecutionLevel admin
71
;--------------------------------
74
# Ignore Var MPLAYER_VERSION when including mplayer
80
;--------------------------------
83
!define MUI_ABORTWARNING
84
!define MUI_COMPONENTSPAGE_SMALLDESC
85
!define MUI_LICENSEPAGE_CHECKBOX
86
!define MUI_FINISHPAGE_RUN $INSTDIR\smplayer.exe
87
!define MUI_FINISHPAGE_RUN_NOTCHECKED
88
!define MUI_FINISHPAGE_RUN_PARAMETERS http://88.191.30.130:8050
89
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\Release_notes.txt
90
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
91
!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Release Notes"
92
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
94
# Installer/Uninstaller icons
95
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
96
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
98
# Language Selection Dialog Settings
99
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
100
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
101
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
103
;--------------------------------
105
;MUI_PAGE_WELCOME should always be first and MUI_PAGE_FINISH should be last
108
!insertmacro MUI_PAGE_WELCOME
109
!insertmacro MUI_PAGE_LICENSE "smplayer-build\Copying.txt"
110
!insertmacro MUI_PAGE_COMPONENTS
111
!insertmacro MUI_PAGE_DIRECTORY
112
!insertmacro MUI_PAGE_INSTFILES
113
!insertmacro MUI_PAGE_FINISH
116
!insertmacro MUI_UNPAGE_INSTFILES
118
;--------------------------------
121
!insertmacro MUI_LANGUAGE "Basque"
122
!insertmacro MUI_LANGUAGE "Catalan"
123
!insertmacro MUI_LANGUAGE "Czech"
124
!insertmacro MUI_LANGUAGE "Danish"
125
!insertmacro MUI_LANGUAGE "Dutch"
126
!insertmacro MUI_LANGUAGE "English"
127
!insertmacro MUI_LANGUAGE "Finnish"
128
!insertmacro MUI_LANGUAGE "French"
129
!insertmacro MUI_LANGUAGE "German"
130
!insertmacro MUI_LANGUAGE "Hebrew"
131
!insertmacro MUI_LANGUAGE "Hungarian"
132
!insertmacro MUI_LANGUAGE "Italian"
133
!insertmacro MUI_LANGUAGE "Norwegian"
134
!insertmacro MUI_LANGUAGE "NorwegianNynorsk"
135
!insertmacro MUI_LANGUAGE "Polish"
136
!insertmacro MUI_LANGUAGE "Portuguese"
137
!insertmacro MUI_LANGUAGE "PortugueseBR"
138
!insertmacro MUI_LANGUAGE "Russian"
139
!insertmacro MUI_LANGUAGE "Slovak"
140
!insertmacro MUI_LANGUAGE "Slovenian"
141
!insertmacro MUI_LANGUAGE "Spanish"
142
!insertmacro MUI_LANGUAGE "SpanishInternational"
144
;--------------------------------
147
;These files should be inserted before other files in the data block
148
;Keep these lines before any File command
149
;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
151
!insertmacro MUI_RESERVEFILE_LANGDLL
153
;--------------------------------
155
;First in list is #1, second in list in #2, etc
157
InstType "Standard installation"
158
InstType "Full installation"
160
;------------------------------------------------------------------------------------------------
163
;--------------------------------
164
; Main SMPlayer files
165
Section SMPlayer SMPlayer
168
SetOutPath "$INSTDIR"
169
File "smplayer-build\*"
172
SetOutPath "$INSTDIR"
173
File /r "smplayer-build\docs"
175
# Imageformats folder
176
SetOutPath "$INSTDIR"
177
File /r "smplayer-build\imageformats"
180
SetOutPath "$INSTDIR"
181
File /r "smplayer-build\shortcuts"
184
WriteUninstaller "$INSTDIR\uninst.exe"
186
# Store installed path
187
WriteRegStr HKLM "Software\SMPlayer" "Path" "$INSTDIR"
189
# HKEY_CLASSES_ROOT ProgId registration
190
WriteRegStr HKCR "MPlayerFileVideo\DefaultIcon" "" '"$INSTDIR\smplayer.exe",1'
191
WriteRegStr HKCR "MPlayerFileVideo\shell\enqueue" "" "Enqueue in SMPlayer"
192
WriteRegStr HKCR "MPlayerFileVideo\shell\enqueue\command" "" '"$INSTDIR\smplayer.exe" -add-to-playlist "%1"'
193
WriteRegStr HKCR "MPlayerFileVideo\shell\open" "FriendlyAppName" "SMPlayer Media Player"
194
WriteRegStr HKCR "MPlayerFileVideo\shell\open\command" "" '"$INSTDIR\smplayer.exe" "%1"'
196
# Windows Vista+ Default Programs registration
197
${If} ${AtLeastWinVista}
198
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities" "ApplicationDescription" "SMPlayer is a complete front-end for MPlayer, from basic features like playing videos, DVDs, VCDs to more advanced features like support for MPlayer filters, edl lists, and more."
199
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities" "ApplicationName" "SMPlayer"
200
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".3gp" "MPlayerFileVideo"
201
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".ac3" "MPlayerFileVideo"
202
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".ape" "MPlayerFileVideo"
203
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".asf" "MPlayerFileVideo"
204
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".avi" "MPlayerFileVideo"
205
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".bin" "MPlayerFileVideo"
206
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".dat" "MPlayerFileVideo"
207
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".divx" "MPlayerFileVideo"
208
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".dv" "MPlayerFileVideo"
209
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".dvr-ms" "MPlayerFileVideo"
210
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".flv" "MPlayerFileVideo"
211
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".iso" "MPlayerFileVideo"
212
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".m1v" "MPlayerFileVideo"
213
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".m2v" "MPlayerFileVideo"
214
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".m4v" "MPlayerFileVideo"
215
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".mkv" "MPlayerFileVideo"
216
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".mov" "MPlayerFileVideo"
217
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".mp3" "MPlayerFileVideo"
218
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".mp4" "MPlayerFileVideo"
219
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".mpeg" "MPlayerFileVideo"
220
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".mpg" "MPlayerFileVideo"
221
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".mpv" "MPlayerFileVideo"
222
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".mqv" "MPlayerFileVideo"
223
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".nsv" "MPlayerFileVideo"
224
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".ogg" "MPlayerFileVideo"
225
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".ogm" "MPlayerFileVideo"
226
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".ra" "MPlayerFileVideo"
227
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".ram" "MPlayerFileVideo"
228
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".rmvb" "MPlayerFileVideo"
229
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".ts" "MPlayerFileVideo"
230
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".vcd" "MPlayerFileVideo"
231
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".vfw" "MPlayerFileVideo"
232
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".vob" "MPlayerFileVideo"
233
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".wav" "MPlayerFileVideo"
234
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".wma" "MPlayerFileVideo"
235
WriteRegStr HKLM "Software\Clients\Media\SMPlayer\Capabilities\FileAssociations" ".wmv" "MPlayerFileVideo"
236
WriteRegStr HKLM "Software\RegisteredApplications" "SMPlayer" "Software\Clients\Media\SMPlayer\Capabilities"
239
# Registry Uninstall information
240
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
241
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
242
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\smplayer.exe"
243
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
244
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "HelpLink" "${PRODUCT_FORUM}"
245
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
246
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_WEB_SITE}"
247
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
249
# Copy 7zip to installer's temp directory
250
SetOutPath "$PLUGINSDIR"
255
;--------------------------------
257
${MementoSection} "Create Desktop shortcut" DesktopIcon
260
SetOutPath "$INSTDIR"
261
# all = global; current = current user
262
SetShellVarContext all
263
CreateShortCut "$DESKTOP\SMPlayer.lnk" "$INSTDIR\smplayer.exe"
267
;--------------------------------
268
; Start menu shortcuts
269
${MementoSection} "Create Start Menu shortcuts" StartMenuIcon
272
SetOutPath "$INSTDIR"
273
# Start menu shortcut creation
274
SetShellVarContext all
275
CreateDirectory "$SMPROGRAMS\${PRODUCT_STARTMENU_GROUP}"
276
CreateShortCut "$SMPROGRAMS\${PRODUCT_STARTMENU_GROUP}\${PRODUCT_NAME}.lnk" "$INSTDIR\smplayer.exe"
277
WriteINIStr "$SMPROGRAMS\${PRODUCT_STARTMENU_GROUP}\SMPlayer on the Web.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
278
CreateShortCut "$SMPROGRAMS\${PRODUCT_STARTMENU_GROUP}\Uninstall ${PRODUCT_NAME}.lnk" "$INSTDIR\uninst.exe"
282
;--------------------------------
284
SectionGroup /e "MPlayer Components"
286
;--------------------------------
289
Section MPlayer MPlayer
292
SetOutPath "$INSTDIR"
293
File /r "smplayer-build\mplayer"
295
WriteRegDWORD HKLM Software\SMPlayer Installed_MPlayer 0x1
299
Section MPlayer MPlayer
303
ReadRegDWORD $0 HKLM Software\SMPlayer Installed_MPlayer
305
IntCmp $0 1 mplayerInstalled mplayerNotInstalled
307
MessageBox MB_YESNO "MPlayer is already installed. Re-Download?" IDYES mplayerNotInstalled IDNO done
309
${IfNot} ${FileExists} "$PLUGINSDIR\version-info"
313
${If} ${FileExists} "$PLUGINSDIR\version-info"
314
ReadINIStr $MPLAYER_VERSION "$PLUGINSDIR\version-info" smplayer mplayer
316
StrCpy $MPLAYER_VERSION "mplayer-svn-28311"
319
DetailPrint "Downloading MPlayer..."
320
inetc::get /timeout 30000 /resume "" /caption "Downloading MPlayer..." /banner "Downloading $MPLAYER_VERSION.7z" \
321
"http://downloads.sourceforge.net/smplayer/$MPLAYER_VERSION.7z?big_mirror=0" \
322
"$PLUGINSDIR\$MPLAYER_VERSION.7z"
323
/* inetc::get /caption "Downloading MPlayer..." /banner "Downloading $MPLAYER_VERSION.7z" \
324
"ftp://ftp.berlios.de/pub/smplayer/test/$MPLAYER_VERSION.7z" \
325
"$PLUGINSDIR\$MPLAYER_VERSION.7z" */
327
StrCmp $R0 OK mplayerdl1
328
MessageBox MB_OK "Failed to download mplayer package: $R0.$\nMPlayer is required for playback!"
332
nsExec::Exec '"$PLUGINSDIR\7za.exe" x "$PLUGINSDIR\$MPLAYER_VERSION.7z" -o"$PLUGINSDIR"'
335
CreateDirectory "$INSTDIR\mplayer"
336
CopyFiles /SILENT "$PLUGINSDIR\$MPLAYER_VERSION\*" "$INSTDIR\mplayer"
338
IfFileExists "$INSTDIR\mplayer\mplayer.exe" mplayerInstSuccess mplayerInstFailed
340
MessageBox MB_OK "Failed to install MPlayer. MPlayer is required for playback!"
343
WriteRegDWORD HKLM Software\SMPlayer Installed_MPlayer 0x1
350
;--------------------------------
352
Section /o "Optional Codecs" Codecs
356
ReadRegDWORD $1 HKLM Software\SMPlayer Installed_Codecs
358
IntCmp $1 1 mplayerCodecsInstalled mplayerCodecsNotInstalled
359
mplayerCodecsInstalled:
360
MessageBox MB_YESNO "MPlayer codecs are already installed. Re-Download?" IDYES mplayerCodecsNotInstalled IDNO done
361
mplayerCodecsNotInstalled:
362
${IfNot} ${FileExists} "$PLUGINSDIR\version-info"
366
${If} ${FileExists} "$PLUGINSDIR\version-info"
367
ReadINIStr $CODEC_VERSION "$PLUGINSDIR\version-info" smplayer mplayercodecs
369
StrCpy $CODEC_VERSION "windows-essential-20071007"
372
DetailPrint "Downloading MPlayer Codecs..."
373
inetc::get /timeout 30000 /resume "" /caption "Downloading MPlayer Codecs..." /banner "Downloading $CODEC_VERSION.zip" \
374
"http://www.mplayerhq.hu/MPlayer/releases/codecs/$CODEC_VERSION.zip" \
375
"$PLUGINSDIR\$CODEC_VERSION.zip"
376
/* inetc::get /caption "Downloading MPlayer Codecs..." /banner "Downloading ${CODEC_VERSION}.zip" \
377
"ftp://ftp.berlios.de/pub/smplayer/test/${CODEC_VERSION}.zip" \
378
"$PLUGINSDIR\${CODEC_VERSION}.zip" */
380
StrCmp $R0 OK codecdlSuccess
381
MessageBox MB_OK "Failed to download codec package: $R0.$\nCodec installation will be skipped."
385
nsExec::Exec '"$PLUGINSDIR\7za.exe" x "$PLUGINSDIR\$CODEC_VERSION.zip" -o"$PLUGINSDIR"'
388
CreateDirectory "$INSTDIR\mplayer\codecs"
389
CopyFiles /SILENT "$PLUGINSDIR\$CODEC_VERSION\*" "$INSTDIR\mplayer\codecs"
391
IfFileExists "$INSTDIR\mplayer\codecs\Readme.txt" codecsInstSuccess codecsInstFailed
393
MessageBox MB_OK "Failed to install MPlayer codecs. Re-run setup and try again."
396
WriteRegDWORD HKLM Software\SMPlayer Installed_Codecs 0x1
404
;--------------------------------
406
${MementoSection} "Icon Themes" Themes
409
SetOutPath "$INSTDIR"
410
File /r "smplayer-build\themes"
414
;--------------------------------
416
${MementoSection} Translations Translations
419
SetOutPath "$INSTDIR"
420
File /r "smplayer-build\translations"
424
${MementoSectionDone}
426
;--------------------------------
427
; Section descriptions
428
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
429
!insertmacro MUI_DESCRIPTION_TEXT ${SMPlayer} "SMPlayer, shared libraries, and documentation."
430
!insertmacro MUI_DESCRIPTION_TEXT ${DesktopIcon} "Creates a shortcut on the desktop."
431
!insertmacro MUI_DESCRIPTION_TEXT ${StartMenuIcon} "Creates start menu shortcuts."
433
!insertmacro MUI_DESCRIPTION_TEXT ${MPlayer} "The engine behind SMPlayer, required for playback."
435
!insertmacro MUI_DESCRIPTION_TEXT ${MPlayer} "Downloads/installs mplayer; requires an active internet connection. Required for playback."
437
!insertmacro MUI_DESCRIPTION_TEXT ${Codecs} "Downloads optional codecs that aren't yet implemented in mplayer; e.g. RealVideo and uncommon formats."
438
!insertmacro MUI_DESCRIPTION_TEXT ${Themes} "Stylish icon themes for SMPlayer."
439
!insertmacro MUI_DESCRIPTION_TEXT ${Translations} "Translations for SMPlayer."
440
!insertmacro MUI_FUNCTION_DESCRIPTION_END
442
;--------------------------------
447
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "$(^Name)") i .r1 ?e'
451
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
454
!insertmacro MUI_LANGDLL_DISPLAY
456
${MementoSectionRestore}
460
Function .onInstSuccess
462
${MementoSectionSave}
466
Function .onInstFailed
468
# Delete desktop and start menu shortcuts
469
SetShellVarContext all
470
Delete "$DESKTOP\SMPlayer.lnk"
471
RMDir /r "$SMPROGRAMS\${PRODUCT_STARTMENU_GROUP}"
473
# Delete directories recursively except for main directory
474
# Nullsoft says it is unsafe to recursively delete $INSTDIR
475
RMDir /r "$INSTDIR\docs"
476
RMDir /r "$INSTDIR\imageformats"
477
RMDir /r "$INSTDIR\mplayer"
478
RMDir /r "$INSTDIR\shortcuts"
479
RMDir /r "$INSTDIR\themes"
480
RMDir /r "$INSTDIR\translations"
481
Delete "$INSTDIR\*.txt"
482
Delete "$INSTDIR\mingwm10.dll"
483
Delete "$INSTDIR\Q*.dll"
484
Delete "$INSTDIR\smplayer.exe"
485
Delete "$INSTDIR\uninst.exe"
486
Delete "$INSTDIR\dxlist.exe"
489
# Delete keys pertaining to SMPlayer
490
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
491
DeleteRegKey HKCR "MPlayerFileVideo"
492
DeleteRegKey HKLM "Software\Clients\Media\SMPlayer"
493
DeleteRegValue HKLM "Software\RegisteredApplications" "SMPlayer"
494
DeleteRegKey HKLM "Software\SMPlayer"
500
DetailPrint "Gathering version information..."
501
inetc::get /timeout 30000 /resume "" /silent "http://smplayer.sourceforge.net/mplayer-version-info" \
502
"$PLUGINSDIR\version-info"
505
DetailPrint "Error retrieving version info: $R0. Setup will use a default version."
509
;End Installer Sections
510
;------------------------------------------------------------------------------------------------
512
;------------------------------------------------------------------------------------------------
513
;UnInstaller Sections
517
# Restore all file associations...
518
ExecWait '"$INSTDIR\smplayer.exe" -uninstall'
520
# Delete desktop and start menu shortcuts
521
SetShellVarContext all
522
Delete "$DESKTOP\SMPlayer.lnk"
523
RMDir /r "$SMPROGRAMS\${PRODUCT_STARTMENU_GROUP}"
525
# Delete directories recursively except for main directory
526
# Nullsoft says it is unsafe to recursively delete $INSTDIR
527
RMDir /r "$INSTDIR\docs"
528
RMDir /r "$INSTDIR\imageformats"
529
RMDir /r "$INSTDIR\mplayer"
530
RMDir /r "$INSTDIR\shortcuts"
531
RMDir /r "$INSTDIR\themes"
532
RMDir /r "$INSTDIR\translations"
533
Delete "$INSTDIR\*.txt"
534
Delete "$INSTDIR\mingwm10.dll"
535
Delete "$INSTDIR\Q*.dll"
536
Delete "$INSTDIR\smplayer.exe"
537
Delete "$INSTDIR\dxlist.exe"
538
Delete "$INSTDIR\uninst.exe"
541
# Delete keys pertaining to SMPlayer
542
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
543
DeleteRegKey HKCR "MPlayerFileVideo"
544
DeleteRegKey HKLM "Software\Clients\Media\SMPlayer"
545
DeleteRegValue HKLM "Software\RegisteredApplications" "SMPlayer"
546
DeleteRegKey HKLM "Software\SMPlayer"
552
;--------------------------------
553
;UnInstaller Functions
556
# Get the stored language preference
557
!insertmacro MUI_UNGETLANGUAGE
559
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
564
Function un.onUninstSuccess
567
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
b'\\ No newline at end of file'