summaryrefslogtreecommitdiff
path: root/indra/newview/llcompilequeue.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2026-02-04 14:12:38 +0200
committerAndrey Lihatskiy <118752495+marchcat@users.noreply.github.com>2026-02-04 17:31:52 +0200
commit7e37e97cee0fc30af56297089eeecb8ca807d9c2 (patch)
treef52a8e79dd4b9fe44d70074786711495da4f3a20 /indra/newview/llcompilequeue.cpp
parent37824a0b61cc28caab2454456d592671d106a343 (diff)
#5359 Skip SLua scripts during bulk LSL recompile
Diffstat (limited to 'indra/newview/llcompilequeue.cpp')
-rw-r--r--indra/newview/llcompilequeue.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 993b30a014..e0f464168c 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -61,6 +61,7 @@
#include "llviewerassetupload.h"
#include "llcorehttputil.h"
+#include "llpreviewscript.h"
namespace
{
@@ -462,6 +463,33 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
LLUUID assetId = result["asset_id"];
+ // Check if this is a SLua script that shouldn't be recompiled to Mono/LSL
+ if (compile_target == "mono" || compile_target == "lsl2")
+ {
+ // Read the script from cache to check its type
+ LLFileSystem file(assetId, LLAssetType::AT_LSL_TEXT, LLFileSystem::READ);
+ if (file.getSize() > 0)
+ {
+ S32 file_length = file.getSize();
+ std::vector<char> buffer(file_length + 1);
+ file.read((U8*)&buffer[0], file_length);
+ buffer[file_length] = 0;
+ std::string script_text(&buffer[0]);
+
+ if (is_lua_script(script_text))
+ {
+ // This is a SLua script - skip it with a warning
+ LLStringUtil::format_map_t args;
+ args["[SCRIPT_NAME]"] = inventory->getName();
+ args["[TARGET]"] = (compile_target == "mono") ? "Mono" : "LSL";
+ std::string buffer = floater->getString("SkippingSluaScript", args);
+ floater->addStringMessage(buffer);
+ LL_INFOS("SCRIPTQ") << "Skipping SLua script: " << inventory->getName() << LL_ENDL;
+ return true;
+ }
+ }
+ }
+
std::string url = object->getRegion()->getCapability("UpdateScriptTask");
{