mirror of
https://github.com/videolan/vlc.git
synced 2024-11-25 10:53:36 +08:00
* add context menu item to open directories
* ask to uninstall VLC before installing * use several languages (its nice for people who really don't talk english) * small fixes
This commit is contained in:
parent
d71f0a67d6
commit
ba08aac526
@ -21,9 +21,9 @@ Name "${PRODUCT_GROUP} ${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
|||||||
OutFile ..\vlc-${VERSION}-win32.exe
|
OutFile ..\vlc-${VERSION}-win32.exe
|
||||||
InstallDir "$PROGRAMFILES\VideoLAN\VLC"
|
InstallDir "$PROGRAMFILES\VideoLAN\VLC"
|
||||||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "Install_Dir"
|
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "Install_Dir"
|
||||||
SetCompressor lzma
|
SetCompressor /SOLID lzma
|
||||||
ShowInstDetails show
|
;ShowInstDetails show
|
||||||
ShowUnInstDetails show
|
;ShowUnInstDetails show
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
CRCCheck on
|
CRCCheck on
|
||||||
|
|
||||||
@ -44,6 +44,7 @@ InstType "Full"
|
|||||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
|
|
||||||
; Welcome page
|
; Welcome page
|
||||||
|
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
; License page
|
; License page
|
||||||
!insertmacro MUI_PAGE_LICENSE "COPYING.txt"
|
!insertmacro MUI_PAGE_LICENSE "COPYING.txt"
|
||||||
@ -55,21 +56,45 @@ InstType "Full"
|
|||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
; Finish page
|
; Finish page
|
||||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\vlc.exe"
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\vlc.exe"
|
||||||
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt"
|
||||||
|
!define MUI_FINISHPAGE_SHOWREADME_TEXT "View changelog"
|
||||||
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||||
|
!define MUI_FINISHPAGE_LINK "Visit the VideoLAN VLC media player Website"
|
||||||
|
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
|
||||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
; Uninstaller pages
|
; Uninstaller pages
|
||||||
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
|
||||||
; Language files
|
; Language files
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
!insertmacro MUI_LANGUAGE "English" # first language is the default language
|
||||||
|
!insertmacro MUI_LANGUAGE "French"
|
||||||
|
!insertmacro MUI_LANGUAGE "German"
|
||||||
|
!insertmacro MUI_LANGUAGE "Spanish"
|
||||||
|
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||||
|
!insertmacro MUI_LANGUAGE "TradChinese"
|
||||||
|
!insertmacro MUI_LANGUAGE "Japanese"
|
||||||
|
!insertmacro MUI_LANGUAGE "Korean"
|
||||||
|
!insertmacro MUI_LANGUAGE "Italian"
|
||||||
|
!insertmacro MUI_LANGUAGE "Dutch"
|
||||||
|
!insertmacro MUI_LANGUAGE "Danish"
|
||||||
|
!insertmacro MUI_LANGUAGE "Swedish"
|
||||||
|
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||||
|
!insertmacro MUI_LANGUAGE "Finnish"
|
||||||
|
!insertmacro MUI_LANGUAGE "Greek"
|
||||||
|
!insertmacro MUI_LANGUAGE "Russian"
|
||||||
|
!insertmacro MUI_LANGUAGE "Portuguese"
|
||||||
|
!insertmacro MUI_LANGUAGE "Arabic"
|
||||||
|
|
||||||
|
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||||
|
|
||||||
; Reserve files
|
; Reserve files
|
||||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
||||||
|
|
||||||
; MUI end ------
|
; MUI end ------
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Push extensions on stack ;
|
; Push extensions on stack ;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -162,6 +187,7 @@ FunctionEnd
|
|||||||
|
|
||||||
!macro RegisterExtensionSection EXT
|
!macro RegisterExtensionSection EXT
|
||||||
Section /o ${EXT}
|
Section /o ${EXT}
|
||||||
|
SectionIn 2 3
|
||||||
Push $R0
|
Push $R0
|
||||||
StrCpy $R0 ${EXT}
|
StrCpy $R0 ${EXT}
|
||||||
Call RegisterExtension
|
Call RegisterExtension
|
||||||
@ -327,6 +353,7 @@ SectionEnd
|
|||||||
Section "Context Menus" SEC05
|
Section "Context Menus" SEC05
|
||||||
SectionIn 1 2 3
|
SectionIn 1 2 3
|
||||||
!insertmacro MacroAllExtensions AddContextMenu
|
!insertmacro MacroAllExtensions AddContextMenu
|
||||||
|
!insertmacro AddContextMenu "Folder"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
SectionGroup "File type associations" SEC06
|
SectionGroup "File type associations" SEC06
|
||||||
@ -372,11 +399,28 @@ SectionEnd
|
|||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \
|
||||||
"The VLC ActiveX plugin"
|
"The VLC ActiveX plugin"
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \
|
||||||
"Add context menu items (Play With VLC and Add To VLC's Playlist)"
|
"Add context menu items ('Play With VLC' and 'Add To VLC's Playlist')"
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} \
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} \
|
||||||
"Sets VLC media player as the default application for the specified file type"
|
"Sets VLC media player as the default application for the specified file type"
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
|
Function .onInit
|
||||||
|
ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
|
||||||
|
"UninstallString"
|
||||||
|
StrCmp $R0 "" done
|
||||||
|
|
||||||
|
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
||||||
|
"VLC media player has already been installed. $\nDo you want to remove \
|
||||||
|
the previous version before installing $(^Name) ?" \
|
||||||
|
IDNO done
|
||||||
|
|
||||||
|
;Run the uninstaller
|
||||||
|
;uninst:
|
||||||
|
ClearErrors
|
||||||
|
ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
|
||||||
|
done:
|
||||||
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
Function un.onUninstSuccess
|
Function un.onUninstSuccess
|
||||||
HideWindow
|
HideWindow
|
||||||
@ -385,9 +429,7 @@ Function un.onUninstSuccess
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function un.onInit
|
Function un.onInit
|
||||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 \
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
"Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
|
|
||||||
Abort
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Section Uninstall
|
Section Uninstall
|
||||||
@ -395,6 +437,7 @@ Section Uninstall
|
|||||||
|
|
||||||
!insertmacro MacroAllExtensions DeleteContextMenu
|
!insertmacro MacroAllExtensions DeleteContextMenu
|
||||||
!insertmacro MacroAllExtensions UnRegisterExtensionSection
|
!insertmacro MacroAllExtensions UnRegisterExtensionSection
|
||||||
|
!insertmacro DeleteContextMenu "Folder"
|
||||||
|
|
||||||
UnRegDLL "$INSTDIR\axvlc.dll"
|
UnRegDLL "$INSTDIR\axvlc.dll"
|
||||||
Delete /REBOOTOK "$INSTDIR\axvlc.dll"
|
Delete /REBOOTOK "$INSTDIR\axvlc.dll"
|
||||||
|
Loading…
Reference in New Issue
Block a user