From a0367b968e602f1b9721073a14eb3fce08b9a455 Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 26 May 2024 01:37:30 +0100 Subject: [PATCH] Add AV White list helper Initial version, text may need cleaning up based on support experience wiki page can be adjusted to use the new floater to better guide actions. --- indra/newview/CMakeLists.txt | 6 ++ indra/newview/fsfloaterwhitelisthelper.cpp | 75 +++++++++++++++++++ indra/newview/fsfloaterwhitelisthelper.h | 17 +++++ indra/newview/llviewerfloaterreg.cpp | 3 + .../default/xui/en/floater_whitelist.xml | 74 ++++++++++++++++++ .../skins/default/xui/en/menu_viewer.xml | 7 ++ 6 files changed, 182 insertions(+) create mode 100644 indra/newview/fsfloaterwhitelisthelper.cpp create mode 100644 indra/newview/fsfloaterwhitelisthelper.h create mode 100644 indra/newview/skins/default/xui/en/floater_whitelist.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index ad6219ed84..151298cca6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -184,6 +184,9 @@ set(viewer_SOURCE_FILES vjfloaterlocalmesh.cpp vjlocalmeshimportdae.cpp + # Whitelist helper + fsfloaterwhitelisthelper.cpp + llaccountingcostmanager.cpp llaisapi.cpp llagent.cpp @@ -978,6 +981,9 @@ set(viewer_HEADER_FILES vjfloaterlocalmesh.h vjlocalmeshimportdae.h + # whitelist helper + fsfloaterwhitelisthelper.h + llaccountingcostmanager.h llaisapi.h llagent.h diff --git a/indra/newview/fsfloaterwhitelisthelper.cpp b/indra/newview/fsfloaterwhitelisthelper.cpp new file mode 100644 index 0000000000..29b15e9524 --- /dev/null +++ b/indra/newview/fsfloaterwhitelisthelper.cpp @@ -0,0 +1,75 @@ +#include "fsfloaterwhitelisthelper.h" +#include "lltextbox.h" +#include "lltexteditor.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" +#include "lldir.h" + + +FSFloaterWhiteListHelper::FSFloaterWhiteListHelper(const LLSD& key) : LLFloater(key) +{ +} + +FSFloaterWhiteListHelper::~FSFloaterWhiteListHelper()=default; + +BOOL FSFloaterWhiteListHelper::postBuild() +{ + LLTextEditor* text_editor = getChild("whitelist_text"); + if (text_editor) + { + populateWhitelistInfo(); + } + return TRUE; +} + +void FSFloaterWhiteListHelper::populateWhitelistInfo() +{ +// Hopefully we can trash this bit soon in favor of webRTC +#if LL_WINDOWS + // On windows use exe (not work or RO) directory + std::string voiceexe_path = gDirUtilp->getExecutableDir(); + gDirUtilp->append(voiceexe_path, "SLVoice.exe"); +#elif LL_DARWIN + // On MAC use resource directory + std::string voiceexe_path = gDirUtilp->getAppRODataDir(); + gDirUtilp->append(voiceexe_path, "SLVoice"); +#else + std::string voiceexe_path = gDirUtilp->getExecutableDir(); + bool usingWine = gSavedSettings.getBOOL("FSLinuxEnableWin64VoiceProxy"); + if (!usingWine) + { + gDirUtilp->append(voiceexe_path, "SLVoice"); // native version + } + else + { + gDirUtilp->append(voiceexe_path, "win64/SLVoice.exe"); // use bundled win64 version + } +#endif + + const std::string& slpluginexe_path = gDirUtilp->getLLPluginLauncher(); + + std::string whitelist_folder_info = + gDirUtilp->getExecutableDir() + "\n" // Executable Dir + + gDirUtilp->getOSUserAppDir() + "\n" // Top-level User Data Dir + + gDirUtilp->getCacheDir(); // "Cache Dir + + std::string whitelist_exe_info = + gDirUtilp->getExecutableFilename() + "\n" // Viewer Binary + + gDirUtilp->getExecutablePathAndName() + "\n" // Viewer Binary full path + + gDirUtilp->getBaseFileName(voiceexe_path, false) + "\n" // " Voice Binary" + + voiceexe_path + "\n" // slvoice full path + + gDirUtilp->getBaseFileName(slpluginexe_path, false) + "\n" // SLPlugin Launcher Binary + + slpluginexe_path + "\n"; // SLPlugin Launcher full path + + LLTextEditor* text_editor = getChild("whitelist_folders_editor"); + if (text_editor) + { + text_editor->setText(whitelist_folder_info); + } + + text_editor = getChild("whitelist_exes_editor"); + if (text_editor) + { + text_editor->setText(whitelist_exe_info); + } +} diff --git a/indra/newview/fsfloaterwhitelisthelper.h b/indra/newview/fsfloaterwhitelisthelper.h new file mode 100644 index 0000000000..83dec8b14d --- /dev/null +++ b/indra/newview/fsfloaterwhitelisthelper.h @@ -0,0 +1,17 @@ +#ifndef FSFLOATERWHITELISTHELPER_H +#define FSFLOATERWHITELISTHELPER_H + +#include "llfloater.h" + +class FSFloaterWhiteListHelper : public LLFloater +{ +public: + explicit FSFloaterWhiteListHelper(const LLSD& key); + ~FSFloaterWhiteListHelper() final; + public: + BOOL postBuild() final; + +private: + void populateWhitelistInfo(); +}; +#endif // FSFLOATERWHITELISTHELPER_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index bdbd53b7df..0674ba4f9c 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -229,6 +229,7 @@ #include "particleeditor.h" #include "quickprefs.h" #include "vjfloaterlocalmesh.h" // local mesh +#include "fsfloaterwhitelisthelper.h" // fs whitelist helper // handle secondlife:///app/openfloater/{NAME} URLs @@ -649,6 +650,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("sound_explorer", "floater_NACL_explore_sounds.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("vram_usage", "floater_fs_vram_usage.xml", static_cast(&LLFloaterReg::build)); LLFloaterReg::add("local_mesh_floater", "floater_vj_local_mesh.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // local mesh + LLFloaterReg::add("fs_whitelist_floater", "floater_whitelist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // white list advisor + LLFloaterReg::registerControlVariables(); // Make sure visibility and rect controls get preserved when saving } diff --git a/indra/newview/skins/default/xui/en/floater_whitelist.xml b/indra/newview/skins/default/xui/en/floater_whitelist.xml new file mode 100644 index 0000000000..09f0d37b10 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_whitelist.xml @@ -0,0 +1,74 @@ + + +Anti-virus and Anti-malware are an essential part of safe internet use, but they can cause a variety of issues for the viewer. +To reduce interference and improve stability and performance, we strongly advise that all users ensure that there are exclusions (known as Whitelisting) for important folders and programs that the viewer uses. + +For more detailed information, visit +https://wiki.firestormviewer.org/antivirus_whitelisting + + + +To help simpify the task the box below shows the folders the viewer is using. +Please add these to your AV folder exclusions as shown on the above wiki page. + + + +The following box is the name and full path of the viewer executables. +Add these to you AV executable exclusions as shown in the above wiki. + + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 1e66bd8eeb..376ae1ac99 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2642,6 +2642,13 @@ parameter="http://community.secondlife.com/t5/Blogs/ct-p/Blogs"/> --> + + +