FIRE-30446: Set friendly app name for registered protocols and register hop-protocol only for OpenSim installations
parent
71d87f18e2
commit
c9b3ff6b65
|
|
@ -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 -- <FS:PP> 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 # <FS:Ansariel> Optional start menu entry
|
||||
Var FRIENDLY_APP_NAME # <FS:Ansariel> 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}
|
||||
|
||||
# <FS:Ansariel> FIRE-30446: Set FriendlyAppName for protocols
|
||||
${If} ${ISOPENSIM} == "1"
|
||||
StrCpy $FRIENDLY_APP_NAME "${INSTNAME} $(ForOpenSimSuffix)"
|
||||
${Else}
|
||||
StrCpy $FRIENDLY_APP_NAME "${INSTNAME}"
|
||||
${EndIf}
|
||||
# </FS:Ansariel>
|
||||
|
||||
|
||||
# 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"'
|
||||
# <FS:Ansariel> 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"'
|
||||
# <FS:Ansariel> FIRE-30446: Set FriendlyAppName for protocols
|
||||
WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open" "FriendlyAppName" "$FRIENDLY_APP_NAME"
|
||||
|
||||
# <FS:CR> 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}
|
||||
# </FS:CR>
|
||||
|
||||
# <FS:Ansariel> 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\<User>\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" # <FS:Ansariel> 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" # <FS:Ansariel> Unregister hop:// protocol registry info
|
||||
DeleteRegKey HKEY_CLASSES_ROOT "x-grid-location-info"
|
||||
DeleteRegKey HKEY_CLASSES_ROOT "secondlife"
|
||||
# <FS:Ansariel> Unregister hop:// protocol registry info
|
||||
${If} ${ISOPENSIM} == "1"
|
||||
DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\hop"
|
||||
DeleteRegKey HKEY_CLASSES_ROOT "hop"
|
||||
${EndIf}
|
||||
# </FS:Ansariel>
|
||||
|
||||
NoDelete:
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -326,7 +326,13 @@ class ViewerManifest(LLManifest,FSViewerManifest):
|
|||
|
||||
def app_name_oneword(self):
|
||||
return ''.join(self.app_name().split())
|
||||
|
||||
|
||||
# <FS:Ansariel> FIRE-30446: Set FriendlyAppName for protocol registrations
|
||||
def friendly_app_name(self):
|
||||
global CHANNEL_VENDOR_BASE
|
||||
return CHANNEL_VENDOR_BASE
|
||||
# </FS:Ansariel>
|
||||
|
||||
def icon_path(self):
|
||||
# <FS:ND> 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() # <FS:Ansariel> FIRE-30446: Register hop-protocol for OS version only
|
||||
substitution_strings['friendly_app_name'] = self.friendly_app_name() # <FS:Ansariel> 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"
|
||||
"""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue