mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-27 07:38:40 -05:00
obs-scripting: Update CMakeLists.txt for scripting modules
This commit is contained in:
21
deps/obs-scripting/obs-scripting-python.c
vendored
21
deps/obs-scripting/obs-scripting-python.c
vendored
@@ -1671,17 +1671,24 @@ bool obs_scripting_load_python(const char *python_path)
|
||||
/* ---------------------------------------------- */
|
||||
/* Load main interface module */
|
||||
|
||||
#ifdef __APPLE__
|
||||
struct dstr bundle_path;
|
||||
|
||||
dstr_init_move_array(&bundle_path, os_get_executable_path_ptr(""));
|
||||
dstr_cat(&bundle_path, "../PlugIns");
|
||||
char *absolute_plugin_path = os_get_abs_path_ptr(bundle_path.array);
|
||||
|
||||
if(absolute_plugin_path != NULL) {
|
||||
add_to_python_path(absolute_plugin_path);
|
||||
bfree(absolute_plugin_path);
|
||||
}
|
||||
dstr_free(&bundle_path);
|
||||
#endif
|
||||
|
||||
char *absolute_script_path = os_get_abs_path_ptr(SCRIPT_DIR);
|
||||
add_to_python_path(absolute_script_path);
|
||||
bfree(absolute_script_path);
|
||||
|
||||
#if __APPLE__
|
||||
char *exec_path = os_get_executable_path_ptr("");
|
||||
if (exec_path)
|
||||
add_to_python_path(exec_path);
|
||||
bfree(exec_path);
|
||||
#endif
|
||||
|
||||
py_obspython = PyImport_ImportModule("obspython");
|
||||
bool success = !py_error();
|
||||
if (!success) {
|
||||
|
||||
Reference in New Issue
Block a user