libobs: Add UI-independent plugin search paths
Adds an additional search path for UI-independent and installation-independent plugins for windows/mac. Windows: %appdata%/obs-plugins/ Mac: ~/Library/Application Support/obs-plugins/ Plugin directory format is [module]/bin and [module]/data. On windows, for 32bit binaries: [module]/bin/32bit and 64bit binaries: [module]/bin/64bit
This commit is contained in:
parent
7e3efa86e5
commit
99c674e41f
@ -46,8 +46,23 @@ static const int module_patterns_size =
|
||||
|
||||
void add_default_module_paths(void)
|
||||
{
|
||||
char bin[512];
|
||||
char data[512];
|
||||
int ret;
|
||||
|
||||
for (int i = 0; i < module_patterns_size; i++)
|
||||
obs_add_module_path(module_bin[i], module_data[i]);
|
||||
|
||||
ret = os_get_config_path(bin, sizeof(bin), "obs-plugins/%module%");
|
||||
if (ret <= 0)
|
||||
return;
|
||||
|
||||
strcpy(data, bin);
|
||||
strcat(data, "/data");
|
||||
|
||||
strcat(bin, "/bin");
|
||||
|
||||
obs_add_module_path(bin, data);
|
||||
}
|
||||
|
||||
char *find_libobs_data_file(const char *file)
|
||||
|
@ -48,8 +48,23 @@ static const int module_patterns_size =
|
||||
|
||||
void add_default_module_paths(void)
|
||||
{
|
||||
char bin[512];
|
||||
char data[512];
|
||||
int ret;
|
||||
|
||||
for (int i = 0; i < module_patterns_size; i++)
|
||||
obs_add_module_path(module_bin[i], module_data[i]);
|
||||
|
||||
ret = os_get_config_path(bin, sizeof(bin), "obs-plugins/%module%");
|
||||
if (ret <= 0)
|
||||
return;
|
||||
|
||||
strcpy(data, bin);
|
||||
strcat(data, "/data");
|
||||
|
||||
strcat(bin, "/bin/" BIT_STRING);
|
||||
|
||||
obs_add_module_path(bin, data);
|
||||
}
|
||||
|
||||
/* on windows, points to [base directory]/data/libobs */
|
||||
|
Loading…
x
Reference in New Issue
Block a user