From 0b62583eb7dd6e193d5daa2e24646bbb9f3c74e5 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 26 Aug 2023 22:49:23 +0800 Subject: Make using the system browser for links works First, in order for launch_url.sh to be executable, it needs to be installed as a program. Secondly, the spawn browser command path needs to be adjusted accordingly. And last, add chrome (applies to chromium too on FBSD), to the list of browser commands to try (so chrome wasn't there :/, but dillo has always been XD, and that's why it kept opening Dillo here haha). --- indra/llwindow/llwindowsdl.cpp | 4 ++++ indra/newview/ViewerInstall.cmake | 6 +++++- indra/newview/linux_tools/launch_url.sh | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 293e6ec272..37c4d09a73 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2656,9 +2656,13 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) # endif // LL_X11 std::string cmd, arg; +#ifdef LL_USESYSTEMLIBS + cmd = gDirUtilp->getExecutableDir(); +#else cmd = gDirUtilp->getAppRODataDir(); cmd += gDirUtilp->getDirDelimiter(); cmd += "etc"; +#endif cmd += gDirUtilp->getDirDelimiter(); cmd += "launch_url.sh"; arg = escaped_url; diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 43d3060bb9..8cbe8bd186 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -2,7 +2,11 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME} DESTINATION bin ) -install(DIRECTORY skins app_settings linux_tools fonts +install(PROGRAMS linux_tools/launch_url.sh + DESTINATION libexec/${VIEWER_BINARY_NAME} + ) + +install(DIRECTORY skins app_settings fonts DESTINATION share/${VIEWER_BINARY_NAME} PATTERN ".svn" EXCLUDE ) diff --git a/indra/newview/linux_tools/launch_url.sh b/indra/newview/linux_tools/launch_url.sh index 404ea36f26..7c4ebf2291 100755 --- a/indra/newview/linux_tools/launch_url.sh +++ b/indra/newview/linux_tools/launch_url.sh @@ -61,6 +61,7 @@ fi # will be tried first, which is a debian alternative. BROWSER_COMMANDS=" \ x-www-browser \ + chrome \ firefox \ mozilla-firefox \ iceweasel \ -- cgit v1.2.3