Skip to content
Closed

V2 #342

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions configure_alchemy.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
call ".\.venv\Scripts\activate.bat"
"C:\Program Files\CMake\bin\cmake.exe" -S indra --preset vs2022-os -DINSTALL_PROPRIETARY=ON -DUSE_KDU=OFF
248 changes: 248 additions & 0 deletions doc/ALCHEMY_CUSTOM_FEATURES.md

Large diffs are not rendered by default.

284 changes: 284 additions & 0 deletions doc/RLV_CUSTOM_ADDITIONS.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions indra/lib/python/indra/util/llmanifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ def main(extra=[]):
# Store package file for later if making touched file.
base_package_file = ""
if touch:
print('================ Created base package ', wm.package_file)
base_package_file = "" + wm.package_file
print('================ Created base package ', wm.package_name)
base_package_file = "" + wm.package_name
else:
print('================ Finished base copy')

Expand Down Expand Up @@ -298,9 +298,9 @@ def main(extra=[]):
except Exception as err:
sys.exit(str(err))
if touch:
print('================ Created additional package ', wm.package_file, ' for ', package_id)
print('================ Created additional package ', wm.package_name, ' for ', package_id)
with open(base_touch_template.format(package_id), 'w') as fp:
fp.write('set package_file=%s\n' % wm.package_file)
fp.write('set package_file=%s\n' % wm.package_name)
else:
print('================ Finished additional copy "', package_id, '" in ', args['dest'])
# Write out the package file in this format, so that it can easily be called
Expand Down Expand Up @@ -339,7 +339,7 @@ def __init__(self, args):
self.build_prefix = [args['build']]
self.dst_prefix = [args['dest']]
self.created_paths = []
self.package_file = "Unknown"
self.package_name = "Unknown"
self.missing = []

def default_channel(self):
Expand Down
46 changes: 46 additions & 0 deletions indra/llaudio/llaudioengine_fmodstudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ FMOD_RESULT F_CALL windCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, floa

FMOD::ChannelGroup *LLAudioEngine_FMODSTUDIO::mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT] = {0};
float LLAudioEngine_FMODSTUDIO::sReverbSendScale = 0.0f;
LLAudioEngine_FMODSTUDIO::FFTCallback LLAudioEngine_FMODSTUDIO::sFFTCallback = nullptr;

namespace
{
Expand Down Expand Up @@ -363,6 +364,19 @@ bool LLAudioEngine_FMODSTUDIO::init(void* userdata, const std::string &app_title
"FMOD::System::setReverbProperties (init seed)");
}

// Create and attach FMOD FFT DSP to master channel group
if (mSystem)
{
FMOD::ChannelGroup* master_group = nullptr;
if (mSystem->getMasterChannelGroup(&master_group) == FMOD_OK && master_group)
{
if (mSystem->createDSPByType(FMOD_DSP_TYPE_FFT, &mFFtDSP) == FMOD_OK && mFFtDSP)
{
master_group->addDSP(FMOD_CHANNELCONTROL_DSP_TAIL, mFFtDSP);
}
}
}

LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): initialization complete." << LL_ENDL;

return true;
Expand Down Expand Up @@ -547,6 +561,16 @@ void LLAudioEngine_FMODSTUDIO::shutdown()
LLAudioEngine::shutdown();

LL_INFOS("FMOD") << "LLAudioEngine_FMODSTUDIO::shutdown() closing FMOD Studio" << LL_ENDL;
if (mFFtDSP)
{
FMOD::ChannelGroup* master_group = nullptr;
if (mSystem && mSystem->getMasterChannelGroup(&master_group) == FMOD_OK && master_group)
{
master_group->removeDSP(mFFtDSP);
}
mFFtDSP->release();
mFFtDSP = nullptr;
}
if (mSystem)
{
mSystem->close();
Expand All @@ -559,6 +583,28 @@ void LLAudioEngine_FMODSTUDIO::shutdown()
}


void LLAudioEngine_FMODSTUDIO::idle()
{
LLAudioEngine::idle();

if (mInited && mSystem && mFFtDSP && sFFTCallback)
{
FMOD_DSP_PARAMETER_FFT* fft_param = nullptr;
unsigned int length = 0;
FMOD_RESULT r = mFFtDSP->getParameterData(FMOD_DSP_FFT_SPECTRUMDATA, (void**)&fft_param, &length, nullptr, 0);
if (r == FMOD_OK && fft_param)
{
int num_channels = fft_param->numchannels;
int fft_length = fft_param->length;
if (num_channels > 0 && fft_length > 0 && fft_param->spectrum[0])
{
sFFTCallback(fft_param->spectrum[0], fft_length);
}
}
}
}


LLAudioBuffer * LLAudioEngine_FMODSTUDIO::createBuffer()
{
return new LLAudioBufferFMODSTUDIO(mSystem);
Expand Down
5 changes: 5 additions & 0 deletions indra/llaudio/llaudioengine_fmodstudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,13 @@ class LLAudioEngine_FMODSTUDIO : public LLAudioEngine
std::string mActiveDeviceName;

bool mReverbActive = false;
FMOD::DSP *mFFtDSP = nullptr;

public:
void idle() override;
typedef void (*FFTCallback)(const float* spectrum_data, int length);
static FFTCallback sFFTCallback;

static FMOD::ChannelGroup *mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT];
// Cached wet-send level applied to every new channel in play().
// Static so the channel class can reach it without an engine back-
Expand Down
4 changes: 0 additions & 4 deletions indra/llui/llflatlistview.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,7 @@ class LLFlatListViewEx : public LLFlatListView
Params();
};

// *WORKAROUND: two methods to overload appropriate Params due to localization issue:
// no_items_msg & no_filtered_items_msg attributes are not defined as translatable in VLT. See EXT-5931
// [RLVa:KB] - Checked: RLVa-2.0.3
const std::string& getNoItemsMsg() const { return mNoItemsMsg; }
// [/RLVa:KB]
void setNoItemsMsg(const std::string& msg) { mNoItemsMsg = msg; }
void setNoFilteredItemsMsg(const std::string& msg) { mNoFilteredItemsMsg = msg; }

Expand Down
12 changes: 11 additions & 1 deletion indra/llui/llfloaterreg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,12 @@ void LLFloaterReg::registerControlVariables()
//static
void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& key)
{
std::string name = sdname.asString();
if (!canShowInstance(name, key))
{
return;
}

//
// Floaters controlled by the toolbar behave a bit differently from others.
// Namely they have 3-4 states as defined in the design wiki page here:
Expand All @@ -504,7 +510,6 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
// * Also, if it is not on top, bring it forward when focus is given.
// * Else the target floater is open, close it.
//
std::string name = sdname.asString();
LLFloater* instance = getInstance(name, key);

if (!instance)
Expand Down Expand Up @@ -564,6 +569,11 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
void LLFloaterReg::showInstanceOrBringToFront(const LLSD& sdname, const LLSD& key)
{
std::string name = sdname.asString();
if (!canShowInstance(name, key))
{
return;
}

LLFloater* instance = getInstance(name, key);


Expand Down
19 changes: 16 additions & 3 deletions indra/llui/lltoolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,11 +1091,24 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
enable_callback_t isEnabledCB;

const std::string& isEnabledFunction = commandp->isEnabledFunctionName();
if (isEnabledFunction.length() > 0)
std::string resolvedEnabledFunction = isEnabledFunction;
LLSD resolvedEnabledParam = commandp->isEnabledParameters();

if (resolvedEnabledFunction.empty() &&
(commandp->executeFunctionName() == "Floater.Toggle" ||
commandp->executeFunctionName() == "Floater.ToggleOrBringToFront" ||
commandp->executeFunctionName() == "Floater.Show" ||
commandp->executeFunctionName() == "Floater.ShowOrBringToFront"))
{
resolvedEnabledFunction = "Floater.CanShow";
resolvedEnabledParam = commandp->executeParameters();
}

if (resolvedEnabledFunction.length() > 0)
{
LLUICtrl::EnableCallbackParam isEnabledParam;
isEnabledParam.function_name = isEnabledFunction;
isEnabledParam.parameter = commandp->isEnabledParameters();
isEnabledParam.function_name = resolvedEnabledFunction;
isEnabledParam.parameter = resolvedEnabledParam;
isEnabledCB = initEnableCallback(isEnabledParam);

if (NULL == button->mIsEnabledSignal)
Expand Down
4 changes: 1 addition & 3 deletions indra/llui/llui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ mHelpImpl(NULL)
// Used by menus along with Floater.Toggle to display visibility as a check-mark
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", [](LLUICtrl* ctrl, const LLSD& param) -> bool { return LLFloaterReg::instanceVisible(param.asStringRef(), LLSD()); });
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.IsOpen", [](LLUICtrl* ctrl, const LLSD& param) -> bool { return LLFloaterReg::instanceVisible(param.asStringRef(), LLSD()); });
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.CanShow", boost::bind(&LLFloaterReg::canShowInstance, _2, LLSD()));
// [/RLVa:KB]
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.CanShow", [](LLUICtrl* ctrl, const LLSD& param) -> bool { return LLFloaterReg::canShowInstance(param.asStringRef(), LLSD().with("silent", true)); });

// Parse the master list of commands
LLCommandManager::load();
Expand Down
27 changes: 17 additions & 10 deletions indra/llxml/llcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v

U32 validitems = 0;
bool hidefromsettingseditor = false;
std::vector<std::string> files_to_include;

for(LLSD::map_const_iterator itr = settings.beginMap(); itr != settings.endMap(); ++itr)
{
Expand All @@ -1035,17 +1036,10 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
{
if(control_map.isArray())
{
#if LL_WINDOWS
size_t pos = filename.find_last_of('\\');
#else
size_t pos = filename.find_last_of('/');
#endif
if(pos != std::string::npos)
for(LLSD::array_const_iterator array_itr = control_map.beginArray(), array_end = control_map.endArray();
array_itr != array_end; ++array_itr)
{
const std::string dir = filename.substr(0,++pos);
for(LLSD::array_const_iterator array_itr = control_map.beginArray(), array_end = control_map.endArray();
array_itr != array_end; ++array_itr)
validitems+=loadFromFile(dir+(*array_itr).asString(),set_default_values);
files_to_include.push_back((*array_itr).asString());
}
}
continue;
Expand Down Expand Up @@ -1171,6 +1165,19 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
++validitems;
}

if (!files_to_include.empty())
{
size_t pos = filename.find_last_of("\\/");
if(pos != std::string::npos)
{
const std::string dir = filename.substr(0,++pos);
for(const std::string& inc_file : files_to_include)
{
validitems += loadFromFile(dir + inc_file, set_default_values);
}
}
}

LL_DEBUGS("Settings") << "Loaded " << validitems << " settings from " << filename << LL_ENDL;
return validitems;
}
Expand Down
44 changes: 44 additions & 0 deletions indra/llxml/tests/llcontrol_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "../test/lltut.h"
#include <memory>
#include <vector>
#include <algorithm>

namespace tut
{
Expand Down Expand Up @@ -151,4 +152,47 @@ namespace tut
ensure("listener fired on changed setting", mListenerFired);
}

// include file handling
template<> template<>
void control_group_t::test<5>()
{
// Write included settings file
std::string included_file = mTestConfigDir + "included_settings.xml";
mCleanups.push_back(included_file);

LLSD inc_config;
inc_config["IncludedSetting"]["Comment"] = "Dummy setting in included file";
inc_config["IncludedSetting"]["Persist"] = 1;
inc_config["IncludedSetting"]["Type"] = "U32";
inc_config["IncludedSetting"]["Value"] = 42;

llofstream inc_file(included_file.c_str());
if (inc_file.is_open())
{
LLSDSerialize::toPrettyXML(inc_config, inc_file);
}
inc_file.close();

// Write master settings file that includes the other one
std::string master_file = mTestConfigDir + "master.xml";
mCleanups.push_back(master_file);

// Force the path of master_file to have forward slashes to test the fix
std::replace(master_file.begin(), master_file.end(), '\\', '/');

LLSD master_config;
master_config["Include"] = LLSD::emptyArray();
master_config["Include"].append("included_settings.xml");

llofstream mast_file(master_file.c_str());
if (mast_file.is_open())
{
LLSDSerialize::toPrettyXML(master_config, mast_file);
}
mast_file.close();

int results = mCG->loadFromFile(master_file, true);
ensure("loaded include setting successfully", (mCG->getU32("IncludedSetting") == 42));
}

}
24 changes: 9 additions & 15 deletions indra/newview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ set(viewer_SOURCE_FILES
llbrowsernotification.cpp
llbuycurrencyhtml.cpp
llcallingcard.cpp
llcefaccelinterop.cpp
llcefsurfacereceiver.cpp
llchannelmanager.cpp
#llchatbar.cpp
llchathistory.cpp
Expand Down Expand Up @@ -696,6 +694,9 @@ set(viewer_SOURCE_FILES
llpreviewgesture.cpp
llpreviewnotecard.cpp
llpreviewscript.cpp
llestimwsmgr.cpp
llestimrlvhandler.cpp
llfloaterestim.cpp
llpreviewsound.cpp
llpreviewtexture.cpp
llproductinforequest.cpp
Expand Down Expand Up @@ -1023,8 +1024,6 @@ set(viewer_HEADER_FILES
llbuycurrencyhtml.h
llcallingcard.h
llcapabilityprovider.h
llcefaccelinterop.h
llcefsurfacereceiver.h
llchannelmanager.h
#llchatbar.h
llchathistory.h
Expand Down Expand Up @@ -1455,6 +1454,9 @@ set(viewer_HEADER_FILES
llpreviewgesture.h
llpreviewnotecard.h
llpreviewscript.h
llestimwsmgr.h
llestimrlvhandler.h
llfloaterestim.h
llpreviewsound.h
llpreviewtexture.h
llproductinforequest.h
Expand Down Expand Up @@ -2006,23 +2008,14 @@ if (NOT DISABLE_WEBRTC)
endif()
endif()

if (DARWIN)
find_library(IOSURFACE_FRAMEWORK IOSurface)
find_library(COREGRAPHICS_FRAMEWORK CoreGraphics)
target_link_libraries(${VIEWER_BINARY_NAME}
${IOSURFACE_FRAMEWORK}
${COREGRAPHICS_FRAMEWORK}
)
endif()

# These are the generated targets that are copied for packaging that we do not directly link to
# We special case for windows due to targets incompatible with Debug builds
if (WINDOWS)
target_link_libraries(${VIEWER_BINARY_NAME} d3d11 dxgi )
add_custom_target(copy_input_dependencies
DEPENDS
stage_third_party_libs
$<TARGET_NAME_IF_EXISTS:media_plugin_cef>
SLPlugin
$<$<CONFIG:OptDebug,RelWithDebInfo,Release>:$<TARGET_NAME_IF_EXISTS:media_plugin_cef>>
$<TARGET_NAME_IF_EXISTS:media_plugin_gstreamer10>
$<$<CONFIG:OptDebug,RelWithDebInfo,Release>:$<TARGET_NAME_IF_EXISTS:media_plugin_libvlc>>
$<TARGET_NAME_IF_EXISTS:media_plugin_example>
Expand All @@ -2031,6 +2024,7 @@ else()
add_custom_target(copy_input_dependencies
DEPENDS
stage_third_party_libs
SLPlugin
$<TARGET_NAME_IF_EXISTS:media_plugin_cef>
$<TARGET_NAME_IF_EXISTS:media_plugin_gstreamer10>
$<TARGET_NAME_IF_EXISTS:media_plugin_libvlc>
Expand Down
Loading