1 ; ///////////////////////////////////////////////////////////////////////////////
2 ; // MPlayer for Windows - Install Script
3 ; // Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
5 ; // This program is free software; you can redistribute it and/or modify
6 ; // it under the terms of the GNU General Public License as published by
7 ; // the Free Software Foundation; either version 2 of the License, or
8 ; // (at your option) any later version.
10 ; // This program is distributed in the hope that it will be useful,
11 ; // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ; // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ; // GNU General Public License for more details.
15 ; // You should have received a copy of the GNU General Public License along
16 ; // with this program; if not, write to the Free Software Foundation, Inc.,
17 ; // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 ; // http://www.gnu.org/licenses/gpl-2.0.txt
20 ; ///////////////////////////////////////////////////////////////////////////////
23 ;--------------------------------------------------------------------------------
25 ;--------------------------------------------------------------------------------
28 !error "NSIS_UNICODE is undefined, please compile with Unicode NSIS !!!"
31 !ifndef MPLAYER_BUILDNO
32 !error "MPLAYER_BUILDNO is not defined !!!"
35 !ifndef MPLAYER_REVISION
36 !error "MPLAYER_REVISION is not defined !!!"
40 !error "MPLAYER_DATE is not defined !!!"
43 !ifndef SMPLAYER_VERSION
44 !error "SMPLAYER_VERSION is not defined !!!"
48 !error "MPUI_VERSION is not defined !!!"
52 !error "CODECS_DATE is not defined !!!"
55 !ifndef MPLAYER_OUTFILE
56 !error "MPLAYER_OUTFILE is not defined !!!"
60 !error "UPX_PATH is not defined !!!"
64 !define MPlayerRegPath
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{97D341C8-B0D1-4E4A-A49A-C30B52F168E9}"
67 !define MPlayerWebSite
"http://mplayerhq.hu/"
70 ;--------------------------------------------------------------------------------
71 ; INSTALLER ATTRIBUTES
72 ;--------------------------------------------------------------------------------
74 RequestExecutionLevel admin
76 ShowUninstDetails show
78 Name "$(MPLAYER_LANG_MPLAYER_WIN32) ${MPLAYER_DATE} (Build #${MPLAYER_BUILDNO})"
79 Caption "$(MPLAYER_LANG_MPLAYER_WIN32) ${MPLAYER_DATE} (Build #${MPLAYER_BUILDNO})"
80 BrandingText "MPlayer-Win32 (Build #${MPLAYER_BUILDNO})"
81 InstallDir "$PROGRAMFILES\MPlayer for Windows"
82 InstallDirRegKey HKLM "${MPlayerRegPath}" "InstallLocation"
83 OutFile "${MPLAYER_OUTFILE}"
86 ;--------------------------------------------------------------------------------
88 ;--------------------------------------------------------------------------------
90 SetCompressor
/SOLID
/FINAL LZMA
91 SetCompressorDictSize
112
93 !packhdr "$%TEMP%\exehead.tmp" '"${UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
96 ;--------------------------------------------------------------------------------
98 ;--------------------------------------------------------------------------------
100 ReserveFile
"${NSISDIR}\Plugins\Aero.dll"
101 ReserveFile
"${NSISDIR}\Plugins\Banner.dll"
102 ReserveFile
"${NSISDIR}\Plugins\CPUFeatures.dll"
103 ReserveFile
"${NSISDIR}\Plugins\InstallOptions.dll"
104 ReserveFile
"${NSISDIR}\Plugins\LangDLL.dll"
105 ReserveFile
"${NSISDIR}\Plugins\LockedList.dll"
106 ReserveFile
"${NSISDIR}\Plugins\nsDialogs.dll"
107 ReserveFile
"${NSISDIR}\Plugins\nsExec.dll"
108 ReserveFile
"${NSISDIR}\Plugins\StartMenu.dll"
109 ReserveFile
"${NSISDIR}\Plugins\StdUtils.dll"
110 ReserveFile
"${NSISDIR}\Plugins\System.dll"
111 ReserveFile
"${NSISDIR}\Plugins\UserInfo.dll"
112 ReserveFile
"Dialogs\Page_CPU.ini"
113 ReserveFile
"Resources\Splash.gif"
116 ;--------------------------------------------------------------------------------
118 ;--------------------------------------------------------------------------------
121 !include `InstallOptions.nsh`
122 !include `WinVer.nsh`
124 !include `StrFunc.nsh`
125 !include `StdUtils.nsh`
126 !include `CPUFeatures.nsh`
127 !include `MPUI_Common.nsh`
133 ;--------------------------------------------------------------------------------
135 ;--------------------------------------------------------------------------------
144 ;--------------------------------------------------------------------------------
146 ;--------------------------------------------------------------------------------
148 !searchreplace PRODUCT_VERSION_DATE
"${MPLAYER_DATE}" "-" "."
149 VIProductVersion
"${PRODUCT_VERSION_DATE}.${MPLAYER_BUILDNO}"
151 VIAddVersionKey
"Author" "LoRd_MuldeR <mulder2@gmx.de>"
152 VIAddVersionKey
"Comments" "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."
153 VIAddVersionKey
"CompanyName" "Free Software Foundation"
154 VIAddVersionKey
"FileDescription" "MPlayer for Windows (Build #${MPLAYER_BUILDNO})"
155 VIAddVersionKey
"FileVersion" "${PRODUCT_VERSION_DATE}.${MPLAYER_BUILDNO}"
156 VIAddVersionKey
"LegalCopyright" "Copyright 2000-2013 The MPlayer Project"
157 VIAddVersionKey
"LegalTrademarks" "GNU"
158 VIAddVersionKey
"OriginalFilename" "MPUI-Setup.exe"
159 VIAddVersionKey
"ProductName" "MPlayer for Windows"
160 VIAddVersionKey
"ProductVersion" "Build #${MPLAYER_BUILDNO} (${MPLAYER_DATE})"
161 VIAddVersionKey
"Website" "${MPlayerWebSite}"
164 ;--------------------------------------------------------------------------------
165 ; MUI2 INTERFACE SETTINGS
166 ;--------------------------------------------------------------------------------
168 !define MUI_ABORTWARNING
169 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
HKLM
170 !define MUI_STARTMENUPAGE_REGISTRY_KEY
"${MPlayerRegPath}"
171 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME
"StartmenuFolder"
172 !define MUI_LANGDLL_REGISTRY_ROOT
HKLM
173 !define MUI_LANGDLL_REGISTRY_KEY
"${MPlayerRegPath}"
174 !define MUI_LANGDLL_REGISTRY_VALUENAME
"SetupLanguage"
175 !define MUI_STARTMENUPAGE_DEFAULTFOLDER
"MPlayer for Windows"
176 !define MUI_FINISHPAGE_NOAUTOCLOSE
177 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
178 !define MUI_FINISHPAGE_RUN
179 !define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
180 !define MUI_FINISHPAGE_SHOWREADME
181 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
182 !define MUI_FINISHPAGE_LINK
${MPlayerWebSite}
183 !define MUI_FINISHPAGE_LINK_LOCATION
${MPlayerWebSite}
184 !define MUI_ICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
185 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
186 !define MUI_WELCOMEFINISHPAGE_BITMAP
"Artwork\wizard.bmp"
187 !define MUI_UNWELCOMEFINISHPAGE_BITMAP
"Artwork\wizard-un.bmp"
188 !define MUI_HEADERIMAGE
189 !define MUI_HEADERIMAGE_BITMAP
"Artwork\header.bmp"
190 !define MUI_HEADERIMAGE_UNBITMAP
"Artwork\header-un.bmp"
191 !define MUI_LANGDLL_ALLLANGUAGES
192 !define MUI_CUSTOMFUNCTION_GUIINIT MyGuiInit
193 !define MUI_CUSTOMFUNCTION_UNGUIINIT un
.MyGuiInit
194 !define MUI_LANGDLL_ALWAYSSHOW
195 !define MUI_COMPONENTSPAGE_SMALLDESC
198 ;--------------------------------------------------------------------------------
200 ;--------------------------------------------------------------------------------
203 !define MUI_WELCOMEPAGE_TITLE_3LINES
204 !define MUI_FINISHPAGE_TITLE_3LINES
205 !insertmacro MUI_PAGE_WELCOME
206 !insertmacro MUI_PAGE_LICENSE
"Docs\License.txt"
207 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
208 !insertmacro MUI_PAGE_DIRECTORY
209 !insertmacro MUI_PAGE_COMPONENTS
210 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuFolder
211 Page Custom SelectCPUPage_Show SelectCPUPage_Validate
212 Page Custom SetTweaksPage_Show
213 Page Custom LockedListPage_Show
214 !insertmacro MUI_PAGE_INSTFILES
215 !insertmacro MUI_PAGE_FINISH
218 !define MUI_WELCOMEPAGE_TITLE_3LINES
219 !define MUI_FINISHPAGE_TITLE_3LINES
220 !insertmacro MUI_UNPAGE_WELCOME
221 !insertmacro MUI_UNPAGE_CONFIRM
222 UninstPage Custom un
.LockedListPage_Show
223 !insertmacro MUI_UNPAGE_INSTFILES
224 !insertmacro MUI_UNPAGE_FINISH
227 ;--------------------------------------------------------------------------------
229 ;--------------------------------------------------------------------------------
231 !insertmacro MUI_LANGUAGE
"English"
232 !insertmacro MUI_LANGUAGE
"German"
235 !include "Language\MPUI_EN.nsh"
236 !include "Language\MPUI_DE.nsh"
239 ;--------------------------------------------------------------------------------
241 ;--------------------------------------------------------------------------------
243 InstType "$(MPLAYER_LANG_INSTTYPE_COMPLETE)"
244 InstType "$(MPLAYER_LANG_INSTTYPE_MINIMAL)"
247 ;--------------------------------------------------------------------------------
249 ;--------------------------------------------------------------------------------
252 StrCpy $SelectedCPUType 0
253 StrCpy $DetectedCPUType 0
254 StrCpy $DetectedCPUCores 0
255 StrCpy $SelectedTweaks 0
261 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{B800490C-C100-4B12-9F09-1A54DF063049}") i .r1 ?e'
264 MessageBox MB_ICONSTOP|
MB_TOPMOST "Oups, the installer is already running!"
270 # Running on Windows NT family?
272 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, this application does *not* support Windows 9x or Windows ME!"
273 ExecShell "open" "http://windows.microsoft.com/"
277 # Running on Windows XP or later?
278 ${If} ${AtMostWin2000}
279 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, but your operating system is *not* supported anymore.$\nInstallation will be aborted!$\n$\nThe minimum required platform is Windows XP."
280 ExecShell "open" "http://windows.microsoft.com/"
286 UserInfo::GetAccountType
289 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
290 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
296 !insertmacro MUI_LANGDLL_DISPLAY
298 !insertmacro INSTALLOPTIONS_EXTRACT_AS
"Dialogs\Page_CPU.ini" "Page_CPU.ini"
299 !insertmacro INSTALLOPTIONS_EXTRACT_AS
"Dialogs\Page_Tweaks.ini" "Page_Tweaks.ini"
302 ${IfCmd} MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION|
MB_OKCANCEL|MB_DEFBUTTON2
"Note: This is an early pre-release version for test only!" IDCANCEL ${||
} Quit ${|
}
308 File "/oname=$PLUGINSDIR\Splash.gif" "Resources\Splash.gif"
309 newadvsplash::show
3000 1000 500 -1 /NOCANCEL
"$PLUGINSDIR\Splash.gif"
310 Delete /REBOOTOK
"$PLUGINSDIR\Splash.gif"
317 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{B800490C-C100-4B12-9F09-1A54DF063049}") i .r1 ?e'
320 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the un-installer is already running!"
326 UserInfo::GetAccountType
329 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to un-install this software."
330 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
336 !insertmacro MUI_LANGDLL_DISPLAY
340 ;--------------------------------------------------------------------------------
342 ;--------------------------------------------------------------------------------
345 StrCpy $0 $HWNDPARENT
346 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
350 Function un
.MyGuiInit
351 StrCpy $0 $HWNDPARENT
352 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
357 ;--------------------------------------------------------------------------------
359 ;--------------------------------------------------------------------------------
362 ${PrintProgress} "$(MPLAYER_LANG_STATUS_INST_CLEAN)"
364 SetShellVarContext all
365 SetOutPath "$INSTDIR"
367 ; Uninstall old version (aka "Setup v1")
369 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DB9E4EAB-2717-499F-8D56-4CC8A644AB60}" "InstallLocation"
371 MessageBox MB_ICONINFORMATION|
MB_OK "$(MPLAYER_LANG_UNINSTALL_OLDVER)"
372 File "/oname=$PLUGINSDIR\Uninstall-V1.exe" "Resources\Uninstall-V1.exe"
374 ExecWait '"$PLUGINSDIR\Uninstall-V1.exe" _?=$0'
375 Delete /REBOOTOK
"$PLUGINSDIR\Uninstall-V1.exe"
380 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DB9E4EAB-2717-499F-8D56-4CC8A644AB60}"
381 DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DB9E4EAB-2717-499F-8D56-4CC8A644AB60}"
382 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "MPlayerForWindows_UpdateReminder"
383 DeleteRegValue HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "MPlayerForWindows_UpdateReminder"
385 ; Make sure MPlayer isn't running
388 Delete "$INSTDIR\MPlayer.exe"
389 Delete "$INSTDIR\SMPlayer.exe"
390 Delete "$INSTDIR\MPUI.exe"
392 ${IfCmd} MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION|
MB_OKCANCEL "$(MPLAYER_LANG_STILL_RUNNING)" IDCANCEL ${||
} Abort ${|
}
398 ; Clean the install folder
399 Delete "$INSTDIR\*.exe"
400 Delete "$INSTDIR\*.dll"
401 Delete "$INSTDIR\*.ini"
402 Delete "$INSTDIR\*.txt"
403 Delete "$INSTDIR\*.html"
404 Delete "$INSTDIR\*.htm"
405 Delete "$INSTDIR\*.ass"
406 Delete "$INSTDIR\*.m3u8"
407 Delete "$INSTDIR\*.tag"
408 Delete "$INSTDIR\mplayer\config"
409 Delete "$INSTDIR\mplayer\*.conf"
411 ; Now deal with Virtual Store
412 ${GetVirtualStorePath} $0 "$INSTDIR"
416 Delete "$0\mplayer\config"
417 Delete "$0\mplayer\*.conf"
420 Section "!MPlayer r${MPLAYER_REVISION}" SECID_MPLAYER
422 ${PrintProgress} "$(MPLAYER_LANG_STATUS_INST_MPLAYER)"
423 SetOutPath "$INSTDIR"
428 StrCpy $SelectedCPUType $DetectedCPUType
432 ${Select} $SelectedCPUType
434 DetailPrint "$(MPLAYER_LANG_SELECTED_TYPE): core2"
435 File "Builds\MPlayer-core2\MPlayer.exe"
437 DetailPrint "$(MPLAYER_LANG_SELECTED_TYPE): corei7"
438 File "Builds\MPlayer-corei7\MPlayer.exe"
440 DetailPrint "$(MPLAYER_LANG_SELECTED_TYPE): k8-sse3"
441 File "Builds\MPlayer-k8-sse3\MPlayer.exe"
443 DetailPrint "$(MPLAYER_LANG_SELECTED_TYPE): bdver1"
444 File "Builds\MPlayer-bdver1\MPlayer.exe"
446 DetailPrint "$(MPLAYER_LANG_SELECTED_TYPE): generic"
447 File "Builds\MPlayer-generic\MPlayer.exe"
449 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION|
MB_OK "Internal error: Invalid CPU type selection detected!"
454 File ".Compile\Updater.exe"
455 File "Resources\AppRegGUI.exe"
457 ; Other MPlayer-related files
458 File "Builds\MPlayer-generic\dsnative.dll"
459 SetOutPath "$INSTDIR\mplayer"
460 File "Builds\MPlayer-generic\mplayer\config"
461 SetOutPath "$INSTDIR\fonts"
462 File "Builds\MPlayer-generic\fonts\fonts.conf"
463 SetOutPath "$INSTDIR\fonts\conf.d"
464 File "Builds\MPlayer-generic\fonts\conf.d\*.conf"
467 SetOutPath "$INSTDIR"
469 File "/oname=Manual.html" "Builds\MPlayer-generic\MPlayer.man.html"
470 File "Docs\Readme.html"
471 SetOutPath "$INSTDIR\legal_stuff"
472 File "Docs\legal_stuff\*.txt"
477 Delete "$INSTDIR\version.tag"
479 ${IfCmd} MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION|
MB_OKCANCEL "$(MPLAYER_LANG_TAG_WRITE)" IDCANCEL ${||
} Abort ${|
}
484 WriteINIStr "$INSTDIR\version.tag" "mplayer_version" "build_no" "${MPLAYER_BUILDNO}"
485 WriteINIStr "$INSTDIR\version.tag" "mplayer_version" "pkg_date" "${MPLAYER_DATE}"
486 SetFileAttributes "$INSTDIR\version.tag" FILE_ATTRIBUTE_READONLY
488 ; Set file access rights
489 ${MakeFilePublic} "$INSTDIR\mplayer\config"
490 ${MakeFilePublic} "$INSTDIR\fonts\fonts.conf"
493 Section "!MPUI $(MPLAYER_LANG_FRONT_END) v${MPUI_VERSION}" SECID_MPUI
495 ${PrintProgress} "$(MPLAYER_LANG_STATUS_INST_MPUI)"
498 SetOutPath "$INSTDIR"
502 SetOutPath "$INSTDIR\locale"
503 File "MPUI\locale\*.txt"
505 ; Set file access rights
506 ${MakeFilePublic} "$INSTDIR\MPUI.ini"
508 ; Setup initial config
510 WriteINIStr "$INSTDIR\MPUI.ini" "MPUI" "Params" "-vo direct3d -lavdopts threads=$DetectedCPUCores"
511 WriteINIStr "$INSTDIR\MPUI.ini" "MPUI" "Locale" "$(MPLAYER_LANG_MPUI_DEFAULT_LANGUAGE)"
513 ${IfCmd} MessageBox MB_TOPMOST|
MB_ICONSTOP|MB_DEFBUTTON2|
MB_OKCANCEL "$(MPLAYER_LANG_CONFIG_MPUI)" IDCANCEL ${||
} Abort ${|
}
517 Section "!SMPlayer $(MPLAYER_LANG_FRONT_END) v${SMPLAYER_VERSION}" SECID_SMPLAYER
519 ${PrintProgress} "$(MPLAYER_LANG_STATUS_INST_CODECS)"
522 SetOutPath "$INSTDIR"
523 File "SMPlayer\SMPlayer.exe"
524 File "SMPlayer\libgcc_s_dw2-1.dll"
525 File "SMPlayer\mingwm10.dll"
526 File "SMPlayer\QtCore4.dll"
527 File "SMPlayer\QtGui4.dll"
528 File "SMPlayer\QtNetwork4.dll"
529 File "SMPlayer\QtXml4.dll"
530 File "SMPlayer\zlib1.dll"
532 ; Additional SMPlayer files
533 SetOutPath "$INSTDIR\translations"
534 File "SMPlayer\translations\*.qm"
535 SetOutPath "$INSTDIR\imageformats"
536 File "SMPlayer\imageformats\*.dll"
537 SetOutPath "$INSTDIR\shortcuts"
538 File "SMPlayer\shortcuts\*.keys"
539 SetOutPath "$INSTDIR\themes"
540 File /r
"SMPlayer\themes\*.css"
541 File /r
"SMPlayer\themes\*.png"
543 ; Set file access rights
544 ${MakeFilePublic} "$INSTDIR\SMPlayer.ini"
545 ${MakeFilePublic} "$INSTDIR\favorites.m3u8"
546 ${MakeFilePublic} "$INSTDIR\radio.m3u8"
547 ${MakeFilePublic} "$INSTDIR\tv.m3u8"
548 ${MakeFilePublic} "$INSTDIR\styles.ass"
549 ${MakeFilePublic} "$INSTDIR\shortcuts\default.keys"
551 ; Setup initial config
552 ${StrRep} $0 "$INSTDIR\MPlayer.exe" "\" "/"
554 WriteINIStr "$INSTDIR\SMPlayer.ini" "%General" "mplayer_bin" "$0"
555 WriteINIStr "$INSTDIR\SMPlayer.ini" "%General" "driver\vo" "direct3d"
556 WriteINIStr "$INSTDIR\SMPlayer.ini" "gui" "gui" "DefaultGUI"
557 WriteINIStr "$INSTDIR\SMPlayer.ini" "gui" "iconset" "Oxygen-Refit"
558 WriteINIStr "$INSTDIR\SMPlayer.ini" "gui" "style" "Plastique"
559 WriteINIStr "$INSTDIR\SMPlayer.ini" "performance" "threads" "$DetectedCPUCores"
561 ${IfCmd} MessageBox MB_TOPMOST|
MB_ICONSTOP|MB_DEFBUTTON2|
MB_OKCANCEL "$(MPLAYER_LANG_CONFIG_SMPLAYER)" IDCANCEL ${||
} Abort ${|
}
565 Section "!$(MPLAYER_LANG_BIN_CODECS) (${CODECS_DATE})"
567 ${PrintProgress} "$(MPLAYER_LANG_STATUS_INST_CODECS)"
569 SetOutPath "$INSTDIR\codecs"
581 Section "-Write Uninstaller"
582 ${PrintProgress} "$(MPLAYER_LANG_STATUS_MAKEUNINST)"
583 WriteUninstaller "$INSTDIR\Uninstall.exe"
586 Section "-Create Shortcuts"
587 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
588 ${PrintProgress} "$(MPLAYER_LANG_STATUS_SHORTCUTS)"
589 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
591 SetShellVarContext current
592 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
593 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
594 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
596 SetShellVarContext all
597 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
598 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
599 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
601 ${If} ${FileExists} "$INSTDIR\MPUI.exe"
602 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\MPUI.lnk" "$INSTDIR\MPUI.exe"
603 CreateShortCut "$DESKTOP\MPUI.lnk" "$INSTDIR\MPUI.exe"
605 ${If} ${FileExists} "$INSTDIR\SMPlayer.exe"
606 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\SMPlayer.lnk" "$INSTDIR\SMPlayer.exe"
607 CreateShortCut "$DESKTOP\SMPlayer.lnk" "$INSTDIR\SMPlayer.exe"
610 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(MPLAYER_LANG_SHORTCUT_UPDATE).lnk" "$INSTDIR\Updater.exe" "/L=$LANGUAGE"
611 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(MPLAYER_LANG_SHORTCUT_README).lnk" "$INSTDIR\Readme.html"
612 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(MPLAYER_LANG_SHORTCUT_MANUAL).lnk" "$INSTDIR\Manual.html"
614 ${If} ${AtLeastWinVista}
615 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(MPLAYER_LANG_SHORTCUT_APPREG).lnk" "$INSTDIR\AppRegGUI.exe"
618 ${CreateWebLink} "$SMPROGRAMS\$StartMenuFolder\$(MPLAYER_LANG_SHORTCUT_SITE_MULDERS).url" "http://www.mulder.at.gg/"
619 ${CreateWebLink} "$SMPROGRAMS\$StartMenuFolder\$(MPLAYER_LANG_SHORTCUT_SITE_MPWIN32).url" "http://oss.netfarm.it/mplayer-win32.php"
620 ${CreateWebLink} "$SMPROGRAMS\$StartMenuFolder\$(MPLAYER_LANG_SHORTCUT_SITE_MPLAYER).url" "http://www.mplayerhq.hu/"
622 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\SMPlayer.lnk"
623 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "SMPlayer.lnk" ${StdUtils
.Const
.ISV_PinToTaskbar
}
624 DetailPrint 'Pin: "$SMPROGRAMS\$StartMenuFolder\SMPlayer.lnk" -> $R1'
626 !insertmacro MUI_STARTMENU_WRITE_END
629 Section "-ApplyTweaks"
630 ${PrintProgress} "$(MPLAYER_LANG_STATUS_TWEAKS)"
631 DetailPrint "$(MPLAYER_LANG_APPLYING_TWEAKS)"
633 IntOp $0 $SelectedTweaks & 1
635 ${If} ${FileExists} "$INSTDIR\SMPlayer.ini"
636 WriteINIStr "$INSTDIR\SMPlayer.ini" "gui" "gui" "SkinGUI"
637 WriteINIStr "$INSTDIR\SMPlayer.ini" "gui" "iconset" "Gonzo"
641 IntOp $0 $SelectedTweaks & 2
643 ${If} ${FileExists} "$INSTDIR\MPUI.ini"
644 WriteINIStr "$INSTDIR\MPUI.ini" "MPUI" "Params" "-vo gl:yuv=3 -lavdopts threads=$DetectedCPUCores"
646 ${If} ${FileExists} "$INSTDIR\SMPlayer.ini"
647 WriteINIStr "$INSTDIR\SMPlayer.ini" "%General" "driver\vo" "gl:yuv=3"
651 IntOp $0 $SelectedTweaks & 4
653 ${If} ${FileExists} "$INSTDIR\MPUI.ini"
654 ReadINIStr $1 "$INSTDIR\MPUI.ini" "MPUI" "Params"
655 WriteINIStr "$INSTDIR\MPUI.ini" "MPUI" "Params" "$1 -af volnorm=2"
657 ${If} ${FileExists} "$INSTDIR\SMPlayer.ini"
658 WriteINIStr "$INSTDIR\SMPlayer.ini" "defaults" "initial_volnorm" "true"
663 Section "$(MPLAYER_LANG_COMPRESS_FILES)"
665 ${PrintProgress} "$(MPLAYER_LANG_STATUS_INST_COMPRESS)"
667 File "/oname=$PLUGINSDIR\UPX.exe" "Utils\UPX.exe"
669 ${PackAll} "$INSTDIR" "*.exe"
670 ${PackAll} "$INSTDIR" "*.dll"
671 ${PackAll} "$INSTDIR\codecs" "*.acm"
672 ${PackAll} "$INSTDIR\codecs" "*.ax"
673 ${PackAll} "$INSTDIR\codecs" "*.dll"
674 ${PackAll} "$INSTDIR\codecs" "*.qtx"
676 Delete "$PLUGINSDIR\UPX.exe"
679 Section "-Update Font Cache"
680 ${PrintProgress} "$(MPLAYER_LANG_STATUS_INST_FONTCACHE)"
682 SetShellVarContext current
683 Delete "$APPDATA\fontconfig\cache\*.*"
684 Delete "$LOCALAPPDATA\fontconfig\cache\*.*"
686 SetShellVarContext all
687 Delete "$APPDATA\fontconfig\cache\*.*"
688 Delete "$LOCALAPPDATA\fontconfig\cache\*.*"
690 File "/oname=$PLUGINSDIR\Sample.avi" "Resources\Sample.avi"
691 DetailPrint "$(MPLAYER_LANG_UPDATING_FONTCACHE)"
692 NsExec::Exec '"$INSTDIR\MPlayer.exe" -fontconfig -ass -vo null -ao null "$PLUGINSDIR\Sample.avi"'
693 Delete "Resources\Sample.avi"
696 Section "-Update Registry"
697 ${PrintProgress} "$(MPLAYER_LANG_STATUS_REGISTRY)"
698 DetailPrint "$(MPLAYER_LANG_WRITING_REGISTRY)"
701 DeleteRegKey HKLM "${MPlayerRegPath}"
702 DeleteRegKey HKCU "${MPlayerRegPath}"
703 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "MPlayerForWindows_AutoUpdateV2"
704 DeleteRegValue HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "MPlayerForWindows_AutoUpdateV2"
707 WriteRegStr HKLM "${MPlayerRegPath}" "InstallLocation" "$INSTDIR"
708 WriteRegStr HKLM "${MPlayerRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
709 WriteRegStr HKLM "${MPlayerRegPath}" "DisplayName" "$(MPLAYER_LANG_MPLAYER_WIN32)"
710 WriteRegStr HKLM "${MPlayerRegPath}" "DisplayIcon" "$INSTDIR\MPlayer.exe,0"
711 WriteRegStr HKLM "${MPlayerRegPath}" "DisplayVersion" "${MPLAYER_DATE}"
712 WriteRegStr HKLM "${MPlayerRegPath}" "URLInfoAbout" "http://mulder.at.gg/"
713 WriteRegStr HKLM "${MPlayerRegPath}" "URLUpdateInfo" "http://mulder.at.gg/"
714 WriteRegStr HKLM "${MPlayerRegPath}" "Publisher" "The MPlayer Team"
715 WriteRegDWORD HKLM "${MPlayerRegPath}" "NoModify" 1
716 WriteRegDWORD HKLM "${MPlayerRegPath}" "NoRepair" 1
719 DeleteRegKey HKCR "MPlayerForWindowsV2.File"
720 DeleteRegKey HKLM "SOFTWARE\Classes\MPlayerForWindowsV2.File"
721 DeleteRegKey HKCU "SOFTWARE\Classes\MPlayerForWindowsV2.File"
722 ${If} ${FileExists} "$INSTDIR\MPUI.exe"
723 WriteRegStr HKLM "SOFTWARE\Classes\MPlayerForWindowsV2.File\shell\open\command" "" '"$INSTDIR\MPUI.exe" "%1"'
724 WriteRegStr HKLM "SOFTWARE\Classes\MPlayerForWindowsV2.File\shell\open\DefaultIcon" "" "$INSTDIR\MPUI.exe,0"
726 ${If} ${FileExists} "$INSTDIR\SMPlayer.exe"
727 WriteRegStr HKLM "SOFTWARE\Classes\MPlayerForWindowsV2.File\shell\open\command" "" '"$INSTDIR\SMPlayer.exe" "%1"'
728 WriteRegStr HKLM "SOFTWARE\Classes\MPlayerForWindowsV2.File\shell\open\DefaultIcon" "" "$INSTDIR\SMPlayer.exe,1"
732 DeleteRegValue HKCU "SOFTWARE\RegisteredApplications" "MPlayerForWindowsV2"
733 WriteRegStr HKLM "SOFTWARE\RegisteredApplications" "MPlayerForWindowsV2" "${MPlayerRegPath}\Capabilities"
736 WriteRegStr HKLM "${MPlayerRegPath}\Capabilities" "ApplicationName" "$(MPLAYER_LANG_MPLAYER_WIN32)"
737 WriteRegStr HKLM "${MPlayerRegPath}\Capabilities" "ApplicationDescription" "$(MPLAYER_LANG_MPLAYER_WIN32)"
738 WriteRegStr HKLM "${MPlayerRegPath}\Capabilities" "ApplicationDescription" "$(MPLAYER_LANG_MPLAYER_WIN32)"
741 ${RegisterFileExtCapability} "256"
742 ${RegisterFileExtCapability} "3GP"
743 ${RegisterFileExtCapability} "ASF"
744 ${RegisterFileExtCapability} "AVI"
745 ${RegisterFileExtCapability} "BIN"
746 ${RegisterFileExtCapability} "DAT"
747 ${RegisterFileExtCapability} "DIVX"
748 ${RegisterFileExtCapability} "EVO"
749 ${RegisterFileExtCapability} "FLV"
750 ${RegisterFileExtCapability} "M2V"
751 ${RegisterFileExtCapability} "M2TS"
752 ${RegisterFileExtCapability} "MKA"
753 ${RegisterFileExtCapability} "MKV"
754 ${RegisterFileExtCapability} "MOV"
755 ${RegisterFileExtCapability} "MP2"
756 ${RegisterFileExtCapability} "MP3"
757 ${RegisterFileExtCapability} "MP4"
758 ${RegisterFileExtCapability} "MPEG"
759 ${RegisterFileExtCapability} "MPG"
760 ${RegisterFileExtCapability} "MPV"
761 ${RegisterFileExtCapability} "NSV"
762 ${RegisterFileExtCapability} "OGG"
763 ${RegisterFileExtCapability} "OGM"
764 ${RegisterFileExtCapability} "RM"
765 ${RegisterFileExtCapability} "RMVB"
766 ${RegisterFileExtCapability} "TS"
767 ${RegisterFileExtCapability} "VOB"
768 ${RegisterFileExtCapability} "WAV"
769 ${RegisterFileExtCapability} "WMV"
771 ; Reset auto update interval
772 DeleteRegValue HKLM "${MPlayerRegPath}" "LastUpdateCheck"
773 DeleteRegValue HKCU "${MPlayerRegPath}" "LastUpdateCheck"
776 Section "$(MPLAYER_LANG_INST_AUTOUPDATE)" SECID_AUTOUPDATE
778 DetailPrint "$(MPLAYER_LANG_WRITING_REGISTRY)"
779 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "MPlayerForWindows_AutoUpdateV2" '"$INSTDIR\Updater.exe" /L=$LANGUAGE /AutoCheck'
782 Section "-Protect Files"
783 SetFileAttributes "$INSTDIR\MPlayer.exe" FILE_ATTRIBUTE_READONLY
784 SetFileAttributes "$INSTDIR\dsnative.dll" FILE_ATTRIBUTE_READONLY
785 SetFileAttributes "$INSTDIR\MPUI.exe" FILE_ATTRIBUTE_READONLY
786 SetFileAttributes "$INSTDIR\SMPlayer.exe" FILE_ATTRIBUTE_READONLY
787 SetFileAttributes "$INSTDIR\Updater.exe" FILE_ATTRIBUTE_READONLY
788 SetFileAttributes "$INSTDIR\QtCore4.dll" FILE_ATTRIBUTE_READONLY
789 SetFileAttributes "$INSTDIR\QtGui4.dll" FILE_ATTRIBUTE_READONLY
790 SetFileAttributes "$INSTDIR\QtNetwork4.dll" FILE_ATTRIBUTE_READONLY
791 SetFileAttributes "$INSTDIR\QtXml4.dll" FILE_ATTRIBUTE_READONLY
792 SetFileAttributes "$INSTDIR\dsnative.dll" FILE_ATTRIBUTE_READONLY
793 SetFileAttributes "$INSTDIR\libgcc_s_dw2-1.dll" FILE_ATTRIBUTE_READONLY
794 SetFileAttributes "$INSTDIR\mingwm10.dll" FILE_ATTRIBUTE_READONLY
795 SetFileAttributes "$INSTDIR\zlib1.dll" FILE_ATTRIBUTE_READONLY
799 ${PrintStatus} "$(MUI_TEXT_FINISH_TITLE)"
803 ;--------------------------------------------------------------------------------
804 ; UN-INSTALL SECTIONS
805 ;--------------------------------------------------------------------------------
808 SetOutPath "$INSTDIR"
809 ${PrintProgress} "$(MPLAYER_LANG_STATUS_UNINSTALL)"
812 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuFolder
813 ${IfNot} "$StartMenuFolder" ==
""
814 SetShellVarContext current
815 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\SMPlayer.lnk"
816 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "SMPlayer.lnk" ${StdUtils
.Const
.ISV_UnpinFromTaskbar
}
817 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\SMPlayer.lnk" -> $R1'
819 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
820 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
821 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
822 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.pif"
823 RMDir "$SMPROGRAMS\$StartMenuFolder"
825 SetShellVarContext all
826 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\SMPlayer.lnk"
827 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "SMPlayer.lnk" ${StdUtils
.Const
.ISV_UnpinFromTaskbar
}
828 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\SMPlayer.lnk" -> $R1'
830 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
831 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
832 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
833 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.pif"
834 RMDir "$SMPROGRAMS\$StartMenuFolder"
839 Delete /REBOOTOK
"$DESKTOP\MPUI.lnk"
840 Delete /REBOOTOK
"$DESKTOP\SMPlayer.lnk"
843 Delete /REBOOTOK
"$INSTDIR\*.exe"
844 Delete /REBOOTOK
"$INSTDIR\*.dll"
845 Delete /REBOOTOK
"$INSTDIR\*.ini"
846 Delete /REBOOTOK
"$INSTDIR\*.txt"
847 Delete /REBOOTOK
"$INSTDIR\*.html"
848 Delete /REBOOTOK
"$INSTDIR\*.htm"
849 Delete /REBOOTOK
"$INSTDIR\*.ass"
850 Delete /REBOOTOK
"$INSTDIR\*.m3u8"
851 Delete /REBOOTOK
"$INSTDIR\*.tag"
852 RMDir /r
"$INSTDIR\codecs"
853 RMDir /r
"$INSTDIR\fonts"
854 RMDir /r
"$INSTDIR\imageformats"
855 RMDir /r
"$INSTDIR\legal_stuff"
856 RMDir /r
"$INSTDIR\locale"
857 RMDir /r
"$INSTDIR\mplayer"
858 RMDir /r
"$INSTDIR\shortcuts"
859 RMDir /r
"$INSTDIR\themes"
860 RMDir /r
"$INSTDIR\translations"
864 ${GetVirtualStorePath} $0 "$INSTDIR"
865 ${If} ${FileExists} "$0\*.*"
870 DeleteRegKey HKLM "${MPlayerRegPath}"
871 DeleteRegKey HKCU "${MPlayerRegPath}"
872 DeleteRegValue HKLM "SOFTWARE\RegisteredApplications" "MPlayerForWindowsV2"
873 DeleteRegValue HKCU "SOFTWARE\RegisteredApplications" "MPlayerForWindowsV2"
876 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "MPlayerForWindows_AutoUpdateV2"
877 DeleteRegValue HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "MPlayerForWindows_AutoUpdateV2"
880 DeleteRegKey HKCR "MPlayerForWindowsV2.File"
881 DeleteRegKey HKLM "SOFTWARE\Classes\MPlayerForWindowsV2.File"
882 DeleteRegKey HKCU "SOFTWARE\Classes\MPlayerForWindowsV2.File"
884 ${PrintStatus} "$(MUI_UNTEXT_FINISH_TITLE)"
888 ;--------------------------------------------------------------------------------
889 ; SECTION SELECTION CHANGED
890 ;--------------------------------------------------------------------------------
892 Function .onSelChange
893 ${IfNot} ${SectionIsSelected} ${SECID_MPUI}
894 ${AndIfNot} ${SectionIsSelected} ${SECID_SMPLAYER}
895 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION "$(MPLAYER_LANG_SELCHANGE)"
896 SectionGetFlags
${SECID_MPUI} $0
897 IntOp $0 $0 |
${SF_SELECTED}
898 SectionSetFlags
${SECID_MPUI} $0
901 ${IfNot} ${SectionIsSelected} ${SECID_AUTOUPDATE}
903 ${IfCmd} MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION|
MB_YESNO|MB_DEFBUTTON2
"$(MPLAYER_LANG_SEL_AUTOUPDATE)" IDNO ${||
} StrCpy $0 "ok" ${|
}
905 SectionGetFlags
${SECID_AUTOUPDATE} $0
906 IntOp $0 $0 |
${SF_SELECTED}
907 SectionSetFlags
${SECID_AUTOUPDATE} $0
913 ;--------------------------------------------------------------------------------
915 ;--------------------------------------------------------------------------------
917 !macro LockedListPage_Function
918 !insertmacro MUI_HEADER_TEXT
"$(MPLAYER_LANG_LOCKEDLIST_HEADER)" "$(MPLAYER_LANG_LOCKEDLIST_TEXT)"
919 LockedList::AddModule
"\MPlayer.exe"
920 LockedList::AddModule
"\SMPlayer.exe"
921 LockedList::AddModule
"\MPUI.exe"
922 LockedList::Dialog
/autonext
/ignore
"$(MPLAYER_LANG_IGNORE)" /heading
"$(MPLAYER_LANG_LOCKEDLIST_HEADING)" /noprograms
"$(MPLAYER_LANG_LOCKEDLIST_NOPROG)" /searching
"$(MPLAYER_LANG_LOCKEDLIST_SEARCH)" /colheadings
"$(MPLAYER_LANG_LOCKEDLIST_COLHDR1)" "$(MPLAYER_LANG_LOCKEDLIST_COLHDR2)"
926 Function LockedListPage_Show
927 !insertmacro LockedListPage_Function
930 Function un
.LockedListPage_Show
931 !insertmacro LockedListPage_Function
935 ;--------------------------------------------------------------------------------
936 ; CUSTOME PAGE: CPU SELECTOR
937 ;--------------------------------------------------------------------------------
939 Function SelectCPUPage_Show
940 ; Detect CPU type, if not detected yet
941 ${If} $DetectedCPUType < 2
942 ${OrIf} $DetectedCPUType > 6
944 !insertmacro INSTALLOPTIONS_READ
$0 "Page_CPU.ini" "Field $DetectedCPUType" "Text"
945 !insertmacro INSTALLOPTIONS_WRITE
"Page_CPU.ini" "Field $DetectedCPUType" "Text" "$0 <---"
948 ; Make sure the current selection is valid
949 ${IfThen} $SelectedCPUType < 2 ${|
} StrCpy $SelectedCPUType $DetectedCPUType ${|
}
950 ${IfThen} $SelectedCPUType > 6 ${|
} StrCpy $SelectedCPUType $DetectedCPUType ${|
}
953 !insertmacro INSTALLOPTIONS_WRITE
"Page_CPU.ini" "Field 1" "Text" "$(MPLAYER_LANG_SELECT_CPU_TYPE)"
954 !insertmacro INSTALLOPTIONS_WRITE
"Page_CPU.ini" "Field 7" "Text" "$(MPLAYER_LANG_SELECT_CPU_HINT)"
956 ; Apply current selection to dialog
958 ${If} $0 ==
$SelectedCPUType
959 !insertmacro INSTALLOPTIONS_WRITE
"Page_CPU.ini" "Field $0" "State" "1"
961 !insertmacro INSTALLOPTIONS_WRITE
"Page_CPU.ini" "Field $0" "State" "0"
966 !insertmacro MUI_HEADER_TEXT
"$(MPLAYER_LANG_SELECT_CPU_HEAD)" "$(MPLAYER_LANG_SELECT_CPU_TEXT)"
967 !insertmacro INSTALLOPTIONS_DISPLAY
"Page_CPU.ini"
969 ; Read new selection from dialog
970 StrCpy $SelectedCPUType 0
972 !insertmacro INSTALLOPTIONS_READ
$1 "Page_CPU.ini" "Field $0" "State"
973 ${IfThen} $1 ==
1 ${|
} StrCpy $SelectedCPUType $0 ${|
}
977 Function SelectCPUPage_Validate
978 ; Read new selection from dialog
981 !insertmacro INSTALLOPTIONS_READ
$1 "Page_CPU.ini" "Field $0" "State"
982 ${IfThen} $1 ==
1 ${|
} StrCpy $2 $0 ${|
}
988 MessageBox MB_ICONSTOP "Oups, invalid selection detected!"
993 Function DetectCPUType
994 StrCpy $DetectedCPUType 6 ;generic
995 StrCpy $DetectedCPUCores 2
997 Banner::show
/NOUNLOAD
"$(MPLAYER_LANG_DETECTING)"
999 ${CPUFeatures
.GetCount
} $0
1000 ${IfNot} $0 ==
"error"
1001 StrCpy $DetectedCPUCores $0
1004 ; Check supported features
1005 ${CPUFeatures
.GetVendor
} $0
1006 ${CPUFeatures
.CheckFeature
} "MMX1" $1
1007 ${CPUFeatures
.CheckFeature
} "3DNOW" $2
1008 ${CPUFeatures
.CheckFeature
} "SSE3" $3
1009 ${CPUFeatures
.CheckFeature
} "SSSE3" $4
1010 ${CPUFeatures
.CheckFeature
} "SSE4.2" $5
1011 ${CPUFeatures
.CheckFeature
} "AVX1" $6
1012 ${CPUFeatures
.CheckFeature
} "FMA4" $7
1016 !ifdef CPU_DETECT_DEBUG
1017 StrCpy $9 `Vendor = $0`
1018 StrCpy $9 `$9$\n"MMX1" = $1`
1019 StrCpy $9 `$9$\n"3DNOW" = $2`
1020 StrCpy $9 `$9$\n"SSE3" = $3`
1021 StrCpy $9 `$9$\n"SSSE3" = $4`
1022 StrCpy $9 `$9$\n"SSE4.2" = $5`
1023 StrCpy $9 `$9$\n"AVX1" = $6`
1024 StrCpy $9 `$9$\n"FMA4" = $7`
1025 MessageBox MB_TOPMOST `$9`
1028 ; Make sure we have at least MMX
1029 ${IfThen} $1 !=
"yes" ${|
} Return ${|
}
1031 ; Select the "best" model for Intel's
1033 ; Core2 (SSE3 + SSSE3)
1035 ${AndIf} $4 ==
"yes"
1036 StrCpy $DetectedCPUType 2 ;
1038 ; Nehalem (SSE3 + SSSE3 + SSE4.2)
1040 ${AndIf} $4 ==
"yes"
1041 ${AndIf} $5 ==
"yes"
1042 StrCpy $DetectedCPUType 3
1046 ; Select the "best" model for AMD's
1048 ; K8+SSE3 (3DNow! + SSE3)
1050 ${AndIf} $3 ==
"yes"
1051 StrCpy $DetectedCPUType 4
1053 ; Bulldozer (SSE3 + SSSE3 + SSE4.2 + AVX + FMA4)
1055 ${AndIf} $4 ==
"yes"
1056 ${AndIf} $5 ==
"yes"
1057 ${AndIf} $6 ==
"yes"
1058 ${AndIf} $7 ==
"yes"
1059 StrCpy $DetectedCPUType 5
1065 ;--------------------------------------------------------------------------------
1066 ; CUSTOME PAGE: TWEAKS
1067 ;--------------------------------------------------------------------------------
1069 Function SetTweaksPage_Show
1070 ; Apply current selection to dialog
1073 IntOp $2 $0 & $SelectedTweaks
1075 !insertmacro INSTALLOPTIONS_WRITE
"Page_Tweaks.ini" "Field $1" "State" "1"
1077 !insertmacro INSTALLOPTIONS_WRITE
"Page_Tweaks.ini" "Field $1" "State" "0"
1083 !insertmacro INSTALLOPTIONS_WRITE
"Page_Tweaks.ini" "Field 1" "Text" "$(MPLAYER_LANG_TWEAKS_HINT)"
1084 !insertmacro INSTALLOPTIONS_WRITE
"Page_Tweaks.ini" "Field 2" "Text" "$(MPLAYER_LANG_TWEAKS_SKINNEDUI)"
1085 !insertmacro INSTALLOPTIONS_WRITE
"Page_Tweaks.ini" "Field 3" "Text" "$(MPLAYER_LANG_TWEAKS_OPENGL)"
1086 !insertmacro INSTALLOPTIONS_WRITE
"Page_Tweaks.ini" "Field 4" "Text" "$(MPLAYER_LANG_TWEAKS_VOLNORM)"
1089 !insertmacro MUI_HEADER_TEXT
"$(MPLAYER_LANG_TWEAKS_HEAD)" "$(MPLAYER_LANG_TWEAKS_TEXT)"
1090 !insertmacro INSTALLOPTIONS_DISPLAY
"Page_Tweaks.ini"
1092 ; Read new selection from dialog
1095 !insertmacro INSTALLOPTIONS_READ
$2 "Page_Tweaks.ini" "Field $1" "State"
1096 ${IfThen} $2 ==
1 ${|
} IntOp $SelectedTweaks $SelectedTweaks |
$0 ${|
}
1102 ;--------------------------------------------------------------------------------
1103 ; CHECK FOR UPDATE MODE
1104 ;--------------------------------------------------------------------------------
1106 Function CheckForUpdate
1107 ${StdUtils
.GetParameter
} $0 "Update" "?"
1108 ${IfNot} "$0" ==
"?"
1109 FindWindow $1 "#32770" "" $HWNDPARENT
1110 GetDlgItem
$2 $1 1019
1112 GetDlgItem
$2 $1 1001
1118 ;--------------------------------------------------------------------------------
1120 ;--------------------------------------------------------------------------------
1122 Function RunAppFunction
1123 !insertmacro DisableNextButton
$R0
1124 ${If} ${FileExists} "$INSTDIR\SMPlayer.exe"
1125 ${StdUtils
.ExecShellAsUser
} $R0 "$INSTDIR\SMPlayer.exe" "open" "http://lounge-office.rautemusik.fm/"
1127 ${StdUtils
.ExecShellAsUser
} $R0 "$INSTDIR\MPUI.exe" "open" "http://lounge-office.rautemusik.fm/"
1131 Function ShowReadmeFunction
1132 !insertmacro DisableNextButton
$R0
1133 ${StdUtils
.ExecShellAsUser
} $R0 "$INSTDIR\Readme.html" "open" ""
1136 Function .onInstSuccess
1137 ${StdUtils
.ExecShellAsUser
} $R0 "$SMPROGRAMS\$StartMenuFolder" "explore" ""