Add extra search path for third party plugins
The OBSBasic UI will now allow the use of a subdirectory of the user application data directory for third-party plugins. Though I'm not entirely sure if this ideal or not. Regardless, this is one of the first (of many) steps towards a plugin manager. On windows, this is %appdata%/obs-studio/plugins On linux, this is ~/.obs-studio/plugins On mac, this is ~/Library/Application Support/obs-sudio/plugins
This commit is contained in:
parent
e87ed914f8
commit
11c7e07eac
@ -57,6 +57,16 @@ Q_DECLARE_METATYPE(OBSScene);
|
||||
Q_DECLARE_METATYPE(OBSSceneItem);
|
||||
Q_DECLARE_METATYPE(order_movement);
|
||||
|
||||
static void AddExtraModulePaths()
|
||||
{
|
||||
BPtr<char> base_module_dir = os_get_config_path("plugins/%module%");
|
||||
if (!base_module_dir)
|
||||
return;
|
||||
|
||||
string path = (char*)base_module_dir;
|
||||
obs_add_module_path((path + "/bin").c_str(), (path + "/data").c_str());
|
||||
}
|
||||
|
||||
OBSBasic::OBSBasic(QWidget *parent)
|
||||
: OBSMainWindow (parent),
|
||||
ui (new Ui::OBSBasic)
|
||||
@ -534,6 +544,7 @@ void OBSBasic::OBSInit()
|
||||
|
||||
InitOBSCallbacks();
|
||||
|
||||
AddExtraModulePaths();
|
||||
obs_load_all_modules();
|
||||
|
||||
if (!InitOutputs())
|
||||
|
Loading…
x
Reference in New Issue
Block a user