Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions bucket/vlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
}
},
"extract_dir": "vlc-3.0.23",
"notes": [
"To register file associations, run:",
"reg import \"$dir\\install-associations.reg\"",
"To unregister file associations, run:",
"reg import \"$dir\\uninstall-associations.reg\""
],
"pre_install": [
"if (!(Test-Path \"$persist_dir\\portable\") -and (Test-Path \"$env:APPDATA\\vlc\")) {",
" info \"Copying old '$env:APPDATA\\vlc' to '$persist_dir\\portable'\"",
Expand All @@ -26,6 +32,22 @@
" Move-Item \"$dir\\portable\\vlc-qt-interface.ini\" \"$dir\\portable\\vlc\"",
"}"
],
"post_install": [
"$vlc_path = $dir -replace '\\\\', '\\\\'",
"Get-ChildItem -Path \"$bucketsdir\\$bucket\\scripts\\$app\" -Filter '*.reg' -File | ForEach-Object {",
" $content = Get-Content -Path $_.FullName -Encoding ascii",
" if ($global) { $content = $content -replace 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE' }",
" $content -replace '{{vlc_dir}}', $vlc_path | Set-Content -Path \"$dir\\$($_.Name)\" -Encoding unicode",
"}"
],
"post_uninstall": [
"$extensions = @('.3g2', '.3gp', '.asf', '.avi', '.divx', '.flv', '.m2ts', '.m4v', '.mkv', '.mov', '.mp4', '.mp4v', '.mpeg', '.mpg', '.ogv', '.ts', '.vob', '.webm', '.wmv', '.aac', '.ac3', '.ape', '.flac', '.m4a', '.mid', '.midi', '.mp3', '.oga', '.ogg', '.opus', '.wav', '.wma', '.wv', '.m3u', '.m3u8', '.pls', '.xspf')",
"$root = if ($global) { 'HKLM:' } else { 'HKCU:' }",
"foreach ($ext in $extensions) {",
" Remove-ItemProperty -Path \"$root\\Software\\Classes\\$ext\\OpenWithProgIDs\" -Name 'VLC.AssocFile' -ErrorAction SilentlyContinue",
"}",
"Remove-Item -Path \"$root\\Software\\Classes\\VLC.AssocFile\" -Recurse -ErrorAction SilentlyContinue"
],
"bin": "vlc.exe",
"shortcuts": [
[
Expand Down
130 changes: 130 additions & 0 deletions scripts/vlc/install-associations.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
Windows Registry Editor Version 5.00

; Video extensions
[HKEY_CURRENT_USER\Software\Classes\.3g2\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.3gp\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.asf\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.avi\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.divx\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.flv\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.m2ts\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.m4v\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.mkv\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.mov\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.mp4\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.mp4v\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.mpeg\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.mpg\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.ogv\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.ts\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.vob\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.webm\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.wmv\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

; Audio extensions
[HKEY_CURRENT_USER\Software\Classes\.aac\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.ac3\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.ape\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.flac\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.m4a\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.mid\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.midi\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.mp3\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.oga\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.ogg\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.opus\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.wav\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.wma\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.wv\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

; Playlist extensions
[HKEY_CURRENT_USER\Software\Classes\.m3u\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.m3u8\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.pls\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\.xspf\OpenWithProgIDs]
"VLC.AssocFile"=hex(0):

; VLC ProgID
[HKEY_CURRENT_USER\Software\Classes\VLC.AssocFile]
@="VLC media file"
"FriendlyTypeName"="VLC media file"

[HKEY_CURRENT_USER\Software\Classes\VLC.AssocFile\DefaultIcon]
@="\"{{vlc_dir}}\\vlc.exe\",0"

[HKEY_CURRENT_USER\Software\Classes\VLC.AssocFile\shell]

[HKEY_CURRENT_USER\Software\Classes\VLC.AssocFile\shell\open]

[HKEY_CURRENT_USER\Software\Classes\VLC.AssocFile\shell\open\command]
@="\"{{vlc_dir}}\\vlc.exe\" \"%1\""
118 changes: 118 additions & 0 deletions scripts/vlc/uninstall-associations.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
Windows Registry Editor Version 5.00

; Video extensions
[HKEY_CURRENT_USER\Software\Classes\.3g2\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.3gp\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.asf\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.avi\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.divx\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.flv\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.m2ts\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.m4v\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.mkv\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.mov\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.mp4\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.mp4v\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.mpeg\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.mpg\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.ogv\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.ts\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.vob\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.webm\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.wmv\OpenWithProgIDs]
"VLC.AssocFile"=-

; Audio extensions
[HKEY_CURRENT_USER\Software\Classes\.aac\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.ac3\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.ape\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.flac\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.m4a\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.mid\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.midi\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.mp3\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.oga\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.ogg\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.opus\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.wav\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.wma\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.wv\OpenWithProgIDs]
"VLC.AssocFile"=-

; Playlist extensions
[HKEY_CURRENT_USER\Software\Classes\.m3u\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.m3u8\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.pls\OpenWithProgIDs]
"VLC.AssocFile"=-

[HKEY_CURRENT_USER\Software\Classes\.xspf\OpenWithProgIDs]
"VLC.AssocFile"=-

; VLC ProgID
[-HKEY_CURRENT_USER\Software\Classes\VLC.AssocFile]
Loading