mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 23:55:59 +01:00
Allow .dylib plugins on Mac OS X
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
9d1b58a4d9
commit
0ed98dd959
1 changed files with 17 additions and 1 deletions
|
@ -83,6 +83,22 @@ zathura_plugin_manager_add_dir(zathura_plugin_manager_t* plugin_manager, const c
|
||||||
girara_list_append(plugin_manager->path, g_strdup(dir));
|
girara_list_append(plugin_manager->path, g_strdup(dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
check_suffix(const char* path)
|
||||||
|
{
|
||||||
|
if (g_str_has_suffix(path, ".so") == TRUE) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
if (g_str_has_suffix(path, ".dylib") == TRUE) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager)
|
zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager)
|
||||||
{
|
{
|
||||||
|
@ -108,7 +124,7 @@ zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_str_has_suffix(path, ".so") == FALSE) {
|
if (check_suffix(path) == false) {
|
||||||
girara_debug("%s is not a plugin file. Skipping.", path);
|
girara_debug("%s is not a plugin file. Skipping.", path);
|
||||||
g_free(path);
|
g_free(path);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue