Example #1
0
void plugin_system_init(void)
{
    assert (g_module_supported ());

    audgui_init (& api_table, _AUD_PLUGIN_VERSION);

    plugin_registry_load ();

    const char * path = get_path (AUD_PATH_PLUGIN_DIR);

    for (int i = 0; i < ARRAY_LEN (plugin_dir_list); i ++)
    {
        char * dir = filename_build (path, plugin_dir_list[i]);
        scan_plugins (dir);
        str_unref (dir);
    }

    plugin_registry_prune ();
}
Example #2
0
void plugin_system_init(void)
{
    assert (g_module_supported ());

    char *dir;
    int dirsel = 0;

    audgui_init (& api_table);

    plugin_registry_load ();

#ifndef DISABLE_USER_PLUGIN_DIR
    scan_plugins (get_path (AUD_PATH_USER_PLUGIN_DIR));
    /*
     * This is in a separate loop so if the user puts them in the
     * wrong dir we'll still get them in the right order (home dir
     * first)                                                - Zinx
     */
    while (plugin_dir_list[dirsel])
    {
        dir = g_build_filename (get_path (AUD_PATH_USER_PLUGIN_DIR),
         plugin_dir_list[dirsel ++], NULL);
        scan_plugins(dir);
        g_free(dir);
    }
    dirsel = 0;
#endif

    while (plugin_dir_list[dirsel])
    {
        dir = g_build_filename (get_path (AUD_PATH_PLUGIN_DIR),
         plugin_dir_list[dirsel ++], NULL);
        scan_plugins(dir);
        g_free(dir);
    }

    plugin_registry_prune ();
}