Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
109d6eaf
Commit
109d6eaf
authored
Nov 28, 2009
by
Geoffroy Couprie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: add VLC to the "Set program access and computer defaults" dialog
The file associations need to be implemented
parent
cf1a2648
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
187 additions
and
2 deletions
+187
-2
Makefile.am
Makefile.am
+4
-1
configure.ac
configure.ac
+1
-0
extras/package/win32/spad.nsi.in
extras/package/win32/spad.nsi.in
+175
-0
extras/package/win32/vlc.win32.nsi.in
extras/package/win32/vlc.win32.nsi.in
+7
-1
No files found.
Makefile.am
View file @
109d6eaf
...
...
@@ -53,6 +53,7 @@ EXTRA_DIST = \
extras/package/rpm/vlc.fedora.spec
\
extras/package/rpm/vlc.altlinux.spec
\
extras/package/win32/vlc.win32.nsi.in
\
extras/package/win32/spad.nsi.in
\
extras/package/win32/languages/declaration.nsh
\
extras/package/win32/languages/english.nsh
\
extras/package/win32/languages/french.nsh
...
...
@@ -60,7 +61,7 @@ EXTRA_DIST = \
dist_noinst_SCRIPTS
=
bootstrap toolbox
nodist_noinst_SCRIPTS
=
compile
BUILT_SOURCES_distclean
=
vlc-config extras/package/win32/vlc.win32.nsi
BUILT_SOURCES_distclean
=
vlc-config extras/package/win32/vlc.win32.nsi
extras/package/win32/spad.nsi
if
HAVE_DARWIN
BUILT_SOURCES_clean
=
macosx-sdk
else
...
...
@@ -752,6 +753,7 @@ package-win32-base-debug: package-win-common
# Copy relevant files
# Script installer
cp
"$(top_builddir)/extras/package/win32/vlc.win32.nsi"
"$(win32_destdir)/"
cp
"$(top_builddir)/extras/package/win32/spad.nsi"
"$(win32_destdir)/"
mkdir
"$(win32_destdir)/languages"
cp
$(srcdir)/extras/package/win32/languages/*.nsh
"$(win32_destdir)/languages/"
...
...
@@ -925,6 +927,7 @@ package-win32-base-exe: package-win32-base
else
\
echo
'Error: cannot locate makensis tool'
;
exit
1
;
\
fi
;
\
eval
"
$$
MAKENSIS
$(win32_destdir)
/spad.nsi"
eval
"$$MAKENSIS $(win32_destdir)/vlc.win32.nsi"
package-win32-base-zip
:
package-win32-base
...
...
configure.ac
View file @
109d6eaf
...
...
@@ -5250,6 +5250,7 @@ dnl Create vlc-config.in
VLC_OUTPUT_VLC_CONFIG_IN
AC_CONFIG_FILES([
extras/package/win32/spad.nsi
extras/package/win32/vlc.win32.nsi
extras/package/macosx/Info.plist
extras/package/macosx/Resources/English.lproj/InfoPlist.strings
...
...
extras/package/win32/spad.nsi.in
0 → 100644
View file @
109d6eaf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; "set program as default" script for vlc ;
; more infos at http://msdn.microsoft.com/en-us/library/bb776851%28VS.85%29.aspx ;
; and http://msdn.microsoft.com/en-us/library/bb776851%28VS.85%29.aspx ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!include LogicLib.nsh
Function GetOptions
!define GetOptions `!insertmacro GetOptionsCall`
!macro GetOptionsCall _PARAMETERS _OPTION _RESULT
Push `${_PARAMETERS}`
Push `${_OPTION}`
Call GetOptions
Pop ${_RESULT}
!macroend
Exch $1
Exch
Exch $0
Exch
Push $2
Push $3
Push $4
Push $5
Push $6
Push $7
ClearErrors
StrCpy $2 $1 '' 1
StrCpy $1 $1 1
StrLen $3 $2
StrCpy $7 0
begin:
StrCpy $4 -1
StrCpy $6 ''
quote:
IntOp $4 $4 + 1
StrCpy $5 $0 1 $4
StrCmp $5$7 '0' notfound
StrCmp $5 '' trimright
StrCmp $5 '"' 0 +7
StrCmp $6 '' 0 +3
StrCpy $6 '"'
goto quote
StrCmp $6 '"' 0 +3
StrCpy $6 ''
goto quote
StrCmp $5 `'` 0 +7
StrCmp $6 `` 0 +3
StrCpy $6 `'`
goto quote
StrCmp $6 `'` 0 +3
StrCpy $6 ``
goto quote
StrCmp $5 '`' 0 +7
StrCmp $6 '' 0 +3
StrCpy $6 '`'
goto quote
StrCmp $6 '`' 0 +3
StrCpy $6 ''
goto quote
StrCmp $6 '"' quote
StrCmp $6 `'` quote
StrCmp $6 '`' quote
StrCmp $5 $1 0 quote
StrCmp $7 0 trimleft trimright
trimleft:
IntOp $4 $4 + 1
StrCpy $5 $0 $3 $4
StrCmp $5 '' notfound
StrCmp $5 $2 0 quote
IntOp $4 $4 + $3
StrCpy $0 $0 '' $4
StrCpy $4 $0 1
StrCmp $4 ' ' 0 +3
StrCpy $0 $0 '' 1
goto -3
StrCpy $7 1
goto begin
trimright:
StrCpy $0 $0 $4
StrCpy $4 $0 1 -1
StrCmp $4 ' ' 0 +3
StrCpy $0 $0 -1
goto -3
StrCpy $3 $0 1
StrCpy $4 $0 1 -1
StrCmp $3 $4 0 end
StrCmp $3 '"' +3
StrCmp $3 `'` +2
StrCmp $3 '`' 0 end
StrCpy $0 $0 -1 1
goto end
notfound:
SetErrors
StrCpy $0 ''
end:
Pop $7
Pop $6
Pop $5
Pop $4
Pop $3
Pop $2
Pop $1
Exch $0
FunctionEnd
; Remove shortcuts
!macro HideIcons
WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0
SetShellVarContext all ; Set $DESKTOP to All Users
${Unless} ${FileExists} "$DESKTOP\VLC media player.lnk"
SetShellVarContext current ; Set $DESKTOP to the current user's desktop
${EndUnless}
${If} ${FileExists} "$DESKTOP\VLC media player.lnk"
Delete "$DESKTOP\VLC media player.lnk"
${EndIf}
${If} ${FileExists} "$QUICKLAUNCH\VLC media player.lnk"
Delete "$QUICKLAUNCH\VLC media player.lnk"
${EndIf}
!macroend
!define HideIcons "!insertmacro HideIcons"
; Adds shortcuts
!macro ShowIcons
WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 1
SetShellVarContext all ; Set $DESKTOP to All Users
${Unless} ${FileExists} "$DESKTOP\VLC media player.lnk"
CreateShortCut "$DESKTOP\VLC media player.lnk" "$EXEDIR\vlc.exe" "" "$EXEDIR\vlc.exe" 0
${EndUnless}
${Unless} ${FileExists} "$QUICKLAUNCH\VLC media player.lnk"
CreateShortCut "$QUICKLAUNCH\VLC media player.lnk" "$EXEDIR\vlc.exe" "" "$EXEDIR\vlc.exe" 0
${EndUnless}
!macroend
!define ShowIcons "!insertmacro ShowIcons"
!macro Reinstall
MessageBox MB_OK "Not implemented"
!macroend
!define Reinstall "!insertmacro reinstall"
Section
SetShellVarContext all
SetOutPath "$EXEDIR"
${GetOptions} $CMDLINE "HideIcons" $R0
IfErrors 0 +2
goto showIc
!insertmacro HideIcons
showIc:
${GetOptions} $CMDLINE "ShowIcons" $R0
IfErrors 0 +2
goto reinst
!insertmacro ShowIcons
reinst:
${GetOptions} $CMDLINE "Reinstall" $R0
IfErrors 0 +2
goto end
!insertmacro Reinstall
end:
SectionEnd
;"setup" is aded to the file name to trigger the UAC heuristic and request admin privileges
OutFile "spad-setup.exe"
\ No newline at end of file
extras/package/win32/vlc.win32.nsi.in
View file @
109d6eaf
...
...
@@ -441,7 +441,7 @@ Section $Name_Section01 SEC01
!insertmacro CloseUninstallLog
; Add VLC to "recomended programs" for the following extensions
; Add VLC to "recom
m
ended programs" for the following extensions
WriteRegStr HKCR Applications\vlc.exe "" ""
WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
...
...
@@ -459,6 +459,11 @@ Section $Name_Section01 SEC01
WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
lbl_done:
SectionEnd
...
...
@@ -870,6 +875,7 @@ Section "un.$Name_Section91" SEC91
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
DeleteRegKey HKLM Software\Clients\Media\VLC
DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
DeleteRegKey HKCR "VLC.MediaFile"
DeleteRegKey HKLM \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment