From c9b3ff6b654e785c046e7e6901e985f8d577a69b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 31 Oct 2020 00:07:17 +0100 Subject: [PATCH] FIRE-30446: Set friendly app name for registered protocols and register hop-protocol only for OpenSim installations --- .../installers/windows/installer_template.nsi | 41 ++++++++++++++---- indra/newview/installers/windows/lang_da.nsi | Bin 12374 -> 12888 bytes indra/newview/installers/windows/lang_de.nsi | Bin 14880 -> 15128 bytes .../newview/installers/windows/lang_en-us.nsi | Bin 13738 -> 13988 bytes indra/newview/installers/windows/lang_es.nsi | Bin 14144 -> 14394 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 14896 -> 15144 bytes indra/newview/installers/windows/lang_it.nsi | Bin 13872 -> 14122 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 12012 -> 12264 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 14200 -> 14448 bytes .../newview/installers/windows/lang_pt-br.nsi | Bin 14470 -> 14730 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 13772 -> 14022 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 13656 -> 13906 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 11822 -> 12080 bytes indra/newview/viewer_manifest.py | 12 ++++- 14 files changed, 44 insertions(+), 9 deletions(-) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index caebeb1d90..352b457c8b 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -154,6 +154,7 @@ Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall GUI and # Var SKIP_AUTORUN # Skip automatic launch of the viewer after install -- Commented out: Disable autorun Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation that will be uninstalled. Var NO_STARTMENU # Optional start menu entry +Var FRIENDLY_APP_NAME # FIRE-30446: Set FriendlyAppName for protocols # Function definitions should go before file includes, because calls to # DLLs like LangDLL trigger an implicit file include, so if that call is at @@ -450,6 +451,15 @@ ${Else} WriteRegDWORD SHELL_CONTEXT "${MSUNINSTALL_KEY}" "EstimatedSize" "0x00061800" # 390 MB ${EndIf} +# FIRE-30446: Set FriendlyAppName for protocols +${If} ${ISOPENSIM} == "1" + StrCpy $FRIENDLY_APP_NAME "${INSTNAME} $(ForOpenSimSuffix)" +${Else} + StrCpy $FRIENDLY_APP_NAME "${INSTNAME}" +${EndIf} +# + + # from FS:Ansariel WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "DisplayIcon" '"$INSTDIR\$VIEWER_EXE"' @@ -469,18 +479,26 @@ WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$VIEWER_EXE # URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. # MAINT-8305: On SLURL click, directly invoke the viewer, not the launcher. WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$VIEWER_EXE" -url "%1"' +# FIRE-30446: Set FriendlyAppName for protocols +WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open" "FriendlyAppName" "$FRIENDLY_APP_NAME" + WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "(default)" "URL:Second Life" WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$VIEWER_EXE"' # URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$VIEWER_EXE" -url "%1"' +# FIRE-30446: Set FriendlyAppName for protocols +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open" "FriendlyAppName" "$FRIENDLY_APP_NAME" # Register hop:// protocol registry info -WriteRegStr HKEY_CLASSES_ROOT "hop" "(default)" "URL:Second Life" -WriteRegStr HKEY_CLASSES_ROOT "hop" "URL Protocol" "" -WriteRegStr HKEY_CLASSES_ROOT "hop\DefaultIcon" "" '"$INSTDIR\$VIEWER_EXE"' -WriteRegExpandStr HKEY_CLASSES_ROOT "hop\shell\open\command" "" '"$INSTDIR\$VIEWER_EXE" -url "%1"' +${If} ${ISOPENSIM} == "1" + WriteRegStr HKEY_CLASSES_ROOT "hop" "(default)" "URL:Second Life" + WriteRegStr HKEY_CLASSES_ROOT "hop" "URL Protocol" "" + WriteRegStr HKEY_CLASSES_ROOT "hop\DefaultIcon" "" '"$INSTDIR\$VIEWER_EXE"' + WriteRegExpandStr HKEY_CLASSES_ROOT "hop\shell\open\command" "" '"$INSTDIR\$VIEWER_EXE" -url "%1"' + WriteRegStr HKEY_CLASSES_ROOT "hop\shell\open" "FriendlyAppName" "$FRIENDLY_APP_NAME" +${EndIf} # # Ask before creating protocol registry entries @@ -732,8 +750,11 @@ Push $2 Delete "$2\AppData\Roaming\Firestorm\plugin_cookies.txt" Delete "$2\AppData\Roaming\Firestorm\typed_locations.txt" # Delete files in \Users\\AppData\Local\Firestorm - RMDir /r "$2\AppData\Local\Firestorm" #Delete the Havok cache folder - RMDir /r "$2\AppData\Local\FirestormOS" #Delete the OpenSim cache folder + ${If} ${ISOPENSIM} == "0" + RMDir /r "$2\AppData\Local\Firestorm" #Delete the Havok cache folder + ${Else} + RMDir /r "$2\AppData\Local\FirestormOS" #Delete the OpenSim cache folder + ${EndIf} CONTINUE: IntOp $0 $0 + 1 @@ -806,12 +827,16 @@ NOFOLDER: MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete DeleteKeys: - DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\hop" # Unregister hop:// protocol registry info DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\x-grid-location-info" DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\secondlife" - DeleteRegKey HKEY_CLASSES_ROOT "hop" # Unregister hop:// protocol registry info DeleteRegKey HKEY_CLASSES_ROOT "x-grid-location-info" DeleteRegKey HKEY_CLASSES_ROOT "secondlife" + # Unregister hop:// protocol registry info + ${If} ${ISOPENSIM} == "1" + DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\hop" + DeleteRegKey HKEY_CLASSES_ROOT "hop" + ${EndIf} + # NoDelete: diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index 8daa818030f3945061a57a0a67da7738196a5180..f803b509ee13754d088070d4364bb2d0420029b5 100644 GIT binary patch delta 330 zcmcbXa3f^{kM87US~70r1zU#KcqxEe!dWk+YA>QtafB|uUENarD&0%T``MM@Yl!17pZ zojg@b-@gFpz8s+1WUxsPcPapNCW74ta&0L?8W3hOQ~=FP1Nx%~NP~O@a&a(FJQv6> r1FA0qvJ)rQ%gW2UfmNZZ2}YPR8R&XN>?V~0-2(Cv(3Z`Abt0Jo5fw)u delta 12 TcmcbSaxGy4kM3qZeJ^GJCGiBA diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index 3b81a616f3d780b94d3219f0f2ba0bc68493039e..a49fb02737ce7c5930c18fee34a1734cb34c5a4c 100755 GIT binary patch delta 172 zcmZ2bGNWumn9<~IdP;!>3%J@atY9$&HhFg*#WTeC*}YE delta 20 ccmbPHwxDD~n9<}CMzP5^GXH68Pb3-lc560OJm4qC<4;{31FA0qvJ-(~B@-V?%DaITqACkU7&ZAKld3#+!%7))fX0+C=dHW;a delta 20 ccmdm0a3F7kh{5C)++veosq<_$Fyvwf0A2G3egFUf diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index b221b3c8bea1b29f6c6d4513e2522cc079315246..bbe204eda72677e4558b4abd5a943ed9cd85ca20 100755 GIT binary patch delta 156 zcmdl`vZ8E5gwbR-Lj^|1$-PSA)_Dwx47m)c3R diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index f18f1c9cc53cf3164ee63ef592ccb9a08255f328..ad79c360f45a09d50f635607781a5b917fc28232 100755 GIT binary patch delta 159 zcmdmxvnp=`i~eL5J%!07h7z`U42cZ6451FA0qvJ-(~B@-V?%DaITqACkU7&ZAKr>Y`$!%7))fX0-7^iTfCC%ain HUyL09l1U_N delta 20 ccmZ3Lw;^W(i~i&vd}5P#sqt)9FyLYb09<4TS^xk5 diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index 8b338460eabe4fb087f0dd2100225974569584f2..8584327aca481609f0bab25fb6afdb87ee132e1c 100755 GIT binary patch delta 184 zcmaD8`yzhBCiTf1)D%J;847?fhar<8nIVy(1W4yIVE_OC diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index acbb136f6f588e78df9818e2158621e00bb8dc18..9ebeb052ea50332ffd76428cb5cdc2676e541cb6 100644 GIT binary patch delta 176 zcmey7_n}}znZe{1eT7g*h5{hWVaQ}iW=Lcx0n+&lc?=3boXC*NkP2iKGn6u<0bwRX z1(25plrI9({y<%+Kvls&@mwIk45+>c$W8=`l}vufBq{F(R*9-E7-80AMP_A1?533h P-2-w9(5B7#2Au2wU?+7kj`hwV^9F%M21|3R3NLEp_CyF2s0Tf zfV?!Id=ZfL2kJ@%stN{*=K}dMLS5s}$%O OkV}B}Z00qrWCs8NpCuvy delta 12 TcmeAwZY$g%Vz^ntsE8c^Av^?N diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 8be2086b7d5615c71895c9043da0cda7da8f2d3f..e4ffe7654edf1b98cd921de114ae9104c87cd255 100755 GIT binary patch delta 163 zcmX?;eJppw0=>x#bQLBG7)sdYF(fkNGNdvnFcdSCGNb`vCPM{~m&TCKPz0p?847^1 zc?`io@mwIk45+>c$W8=`l}vmnDeneWh^j0YVbtV}jH-&*4J&2H0UA>R(m(k2a|G0L$zrc>n+a delta 16 YcmX?>dnS9s0=>!Kc*Hhu&=+F|07(c3LjV8( diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index 374ac85a7bfd431c21cb4d509e446503ac95d28a..31e805a143214172af5d71921cc6f9b8e9630669 100755 GIT binary patch delta 158 zcmcbSbtz|qj^1P)U4_YW3?!`c7!nzB8B!S(7>XH68Pb3-lc560OJm4qC<4;{3XH68Pb3-lc560OJm4qC<4;{3 FIRE-30446: Set FriendlyAppName for protocol registrations + def friendly_app_name(self): + global CHANNEL_VENDOR_BASE + return CHANNEL_VENDOR_BASE + # + def icon_path(self): # Add -os for oss builds if self.fs_is_opensim(): @@ -841,6 +847,8 @@ class WindowsManifest(ViewerManifest): substitution_strings['installer_file'] = installer_file substitution_strings['is64bit'] = (1 if (self.address_size == 64) else 0) + substitution_strings['is_opensim'] = self.fs_is_opensim() # FIRE-30446: Register hop-protocol for OS version only + substitution_strings['friendly_app_name'] = self.friendly_app_name() # FIRE-30446: Set FriendlyAppName for protocol registrations version_vars = """ !define INSTEXE "SLVersionChecker.exe" @@ -862,6 +870,8 @@ class WindowsManifest(ViewerManifest): !define SHORTCUT "%(app_name)s" !define URLNAME "secondlife" !define IS64BIT "%(is64bit)d" + !define ISOPENSIM "%(is_opensim)d" + !define APPNAME "%(friendly_app_name)s" Caption "%(caption)s" """