From c090a3c7b8daf9c8a225dfb4c329324b00a445b0 Mon Sep 17 00:00:00 2001 From: Jon Bauman Date: Wed, 20 Oct 2021 20:23:22 +0000 Subject: [PATCH] Bug 1735898 - Register as an AVIF handler. r=bytesized Differential Revision: https://phabricator.services.mozilla.com/D129064 --- browser/installer/windows/nsis/shared.nsh | 5 +++++ browser/installer/windows/nsis/uninstaller.nsi | 1 + 2 files changed, 6 insertions(+) diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh index 2c33b6de7060c..4976a8cfad4b5 100755 --- a/browser/installer/windows/nsis/shared.nsh +++ b/browser/installer/windows/nsis/shared.nsh @@ -513,6 +513,7 @@ ${RemoveDefaultBrowserAgentShortcut} ${AddAssociationIfNoneExist} ".webm" "FirefoxHTML$5" ${AddAssociationIfNoneExist} ".svg" "FirefoxHTML$5" ${AddAssociationIfNoneExist} ".webp" "FirefoxHTML$5" + ${AddAssociationIfNoneExist} ".avif" "FirefoxHTML$5" ; An empty string is used for the 5th param because FirefoxHTML is not a ; protocol handler @@ -604,6 +605,7 @@ ${RemoveDefaultBrowserAgentShortcut} WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xhtml" "FirefoxHTML$2" WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".svg" "FirefoxHTML$2" WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".webp" "FirefoxHTML$2" + WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".avif" "FirefoxHTML$2" WriteRegStr ${RegKey} "$0\Capabilities\StartMenu" "StartMenuInternet" "$1" @@ -673,6 +675,7 @@ ${RemoveDefaultBrowserAgentShortcut} ${WriteApplicationsSupportedType} ${RegKey} ".svg" ${WriteApplicationsSupportedType} ${RegKey} ".webm" ${WriteApplicationsSupportedType} ${RegKey} ".webp" + ${WriteApplicationsSupportedType} ${RegKey} ".avif" ${WriteApplicationsSupportedType} ${RegKey} ".xht" ${WriteApplicationsSupportedType} ${RegKey} ".xhtml" ${WriteApplicationsSupportedType} ${RegKey} ".xml" @@ -1622,6 +1625,8 @@ Function SetAsDefaultAppUserHKCU Pop $0 AppAssocReg::SetAppAsDefault "$R9" ".webp" "file" Pop $0 + AppAssocReg::SetAppAsDefault "$R9" ".avif" "file" + Pop $0 AppAssocReg::SetAppAsDefault "$R9" ".xht" "file" Pop $0 AppAssocReg::SetAppAsDefault "$R9" ".xhtml" "file" diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi index 72a284069d667..724d7801435b5 100755 --- a/browser/installer/windows/nsis/uninstaller.nsi +++ b/browser/installer/windows/nsis/uninstaller.nsi @@ -496,6 +496,7 @@ Section "Uninstall" ${un.RegCleanFileHandler} ".webm" "FirefoxHTML-$AppUserModelID" ${un.RegCleanFileHandler} ".svg" "FirefoxHTML-$AppUserModelID" ${un.RegCleanFileHandler} ".webp" "FirefoxHTML-$AppUserModelID" + ${un.RegCleanFileHandler} ".avif" "FirefoxHTML-$AppUserModelID" SetShellVarContext all ; Set SHCTX to HKLM ${un.GetSecondInstallPath} "Software\Mozilla" $R9