|
@@ -0,0 +1,96 @@
|
|
|
+# HG changeset patch
|
|
|
+# User Frank-Rainer Grahl <frgrahl@gmx.net>
|
|
|
+# Date 1727713945 -7200
|
|
|
+# Parent b12d9beb551c25fcc88a8e96d7fea1eb00ae0420
|
|
|
+Bug 9999999 - Register as handler for media types. r=IanN a=IanN
|
|
|
+
|
|
|
+Register as default svg and webp handler. Register other media types if no
|
|
|
+handler exists.
|
|
|
+
|
|
|
+For some basic understanding see:
|
|
|
+- Bug 1197191 "Add .pdf and media file types to OpenWithProgid".
|
|
|
+- Bug 1340568 "Not possible to select Firefox as default browser".
|
|
|
+- Bug 1570477 "Register as a webp handler".
|
|
|
+
|
|
|
+We are not using a hash id because there are no different SeaMonkey
|
|
|
+installation types (Nightly, dev, plonk and so on).
|
|
|
+
|
|
|
+diff --git a/suite/installer/windows/nsis/shared.nsh b/suite/installer/windows/nsis/shared.nsh
|
|
|
+--- a/suite/installer/windows/nsis/shared.nsh
|
|
|
++++ b/suite/installer/windows/nsis/shared.nsh
|
|
|
+@@ -286,16 +286,26 @@
|
|
|
+ ${If} "$AppUserModelID" != ""
|
|
|
+ ApplicationID::Set "$QUICKLAUNCH\${BrandFullName}.lnk" "$AppUserModelID"
|
|
|
+ ${EndIf}
|
|
|
+ ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR"
|
|
|
+ ${EndUnless}
|
|
|
+ !macroend
|
|
|
+ !define ShowShortcuts "!insertmacro ShowShortcuts"
|
|
|
+
|
|
|
++!macro AddAssociationIfNoneExist FILE_TYPE KEY
|
|
|
++ ClearErrors
|
|
|
++ EnumRegKey $7 HKCR "${FILE_TYPE}" 0
|
|
|
++ ${If} ${Errors}
|
|
|
++ WriteRegStr SHCTX "SOFTWARE\Classes\${FILE_TYPE}" "" ${KEY}
|
|
|
++ ${EndIf}
|
|
|
++ WriteRegStr SHCTX "SOFTWARE\Classes\${FILE_TYPE}\OpenWithProgids" ${KEY} ""
|
|
|
++!macroend
|
|
|
++!define AddAssociationIfNoneExist "!insertmacro AddAssociationIfNoneExist"
|
|
|
++
|
|
|
+ !macro SetHandlersBrowser
|
|
|
+ ${GetLongPath} "$INSTDIR\${FileMainEXE}" $8
|
|
|
+
|
|
|
+ StrCpy $0 "SOFTWARE\Classes"
|
|
|
+ StrCpy $1 "$\"$8$\" -requestPending -osint -url $\"%1$\""
|
|
|
+ StrCpy $2 "$\"$8$\" -url $\"%1$\""
|
|
|
+ StrCpy $3 "$\"%1$\",,0,0,,,,"
|
|
|
+
|
|
|
+@@ -334,21 +344,23 @@
|
|
|
+ WriteRegStr SHCTX "$0\.xht" "" "SeaMonkeyHTML"
|
|
|
+ ${EndIf}
|
|
|
+
|
|
|
+ ReadRegStr $6 HKCR ".xhtml" ""
|
|
|
+ ${If} "$6" != "SeaMonkeyHTML"
|
|
|
+ WriteRegStr SHCTX "$0\.xhtml" "" "SeaMonkeyHTML"
|
|
|
+ ${EndIf}
|
|
|
+
|
|
|
+- ; Only add webm if it's not present
|
|
|
+- ${CheckIfRegistryKeyExists} "$0" ".webm" $7
|
|
|
+- ${If} $7 == "false"
|
|
|
+- WriteRegStr SHCTX "$0\.webm" "" "SeaMonkeyHTML"
|
|
|
+- ${EndIf}
|
|
|
++ ${AddAssociationIfNoneExist} ".oga" "SeaMonkeyHTML"
|
|
|
++ ${AddAssociationIfNoneExist} ".ogg" "SeaMonkeyHTML"
|
|
|
++ ${AddAssociationIfNoneExist} ".ogv" "SeaMonkeyHTML"
|
|
|
++ ${AddAssociationIfNoneExist} ".svg" "SeaMonkeyHTML"
|
|
|
++ ${AddAssociationIfNoneExist} ".webm" "SeaMonkeyHTML"
|
|
|
++ ${AddAssociationIfNoneExist} ".webp" "SeaMonkeyHTML"
|
|
|
++
|
|
|
+ !macroend
|
|
|
+ !define SetHandlersBrowser "!insertmacro SetHandlersBrowser"
|
|
|
+
|
|
|
+ !macro SetHandlersMail
|
|
|
+ ${GetLongPath} "$INSTDIR\${FileMainEXE}" $8
|
|
|
+
|
|
|
+ StrCpy $0 "SOFTWARE\Classes"
|
|
|
+ StrCpy $1 "$\"$8$\" $\"%1$\""
|
|
|
+@@ -421,16 +433,19 @@
|
|
|
+ WriteRegStr HKLM "$0\Capabilities" "ApplicationName" "${BrandShortName}"
|
|
|
+
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\FileAssociations" ".htm" "SeaMonkeyHTML"
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\FileAssociations" ".html" "SeaMonkeyHTML"
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\FileAssociations" ".shtml" "SeaMonkeyHTML"
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\FileAssociations" ".xht" "SeaMonkeyHTML"
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\FileAssociations" ".xhtml" "SeaMonkeyHTML"
|
|
|
+
|
|
|
++ WriteRegStr HKLM "$0\Capabilities\FileAssociations" ".svg" "SeaMonkeyHTML"
|
|
|
++ WriteRegStr HKLM "$0\Capabilities\FileAssociations" ".webp" "SeaMonkeyHTML"
|
|
|
++
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\StartMenu" "StartMenuInternet" "$R9"
|
|
|
+
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\URLAssociations" "ftp" "SeaMonkeyURL"
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\URLAssociations" "http" "SeaMonkeyURL"
|
|
|
+ WriteRegStr HKLM "$0\Capabilities\URLAssociations" "https" "SeaMonkeyURL"
|
|
|
+
|
|
|
+ ; Vista Registered Application
|
|
|
+ WriteRegStr HKLM "Software\RegisteredApplications" "${AppRegName}" "$0\Capabilities"
|