Author Topic: 2.6 r7732 - patch fixes incorrect pluginSettings path on OSX  (Read 139 times)

tuanbusku

  • Newbie
  • *
  • Posts: 1
Using 2.6 r7732 on Apple OSX, I think ADM_fileio.cpp may need adjusting so Avidemux can find pluginSettings.
I've seen main.cpp do this:

Code: [Select]
   //***************Plugins *********************
   // Load system wide audio decoder plugin
#ifdef __APPLE__
    const char *startDir="../lib";
#else
    const char *startDir=ADM_RELATIVE_LIB_DIR;
#endif
    char *adPlugins = ADM_getInstallRelativePath(startDir, ADM_PLUGIN_DIR, "audioDecoder");
    char *avPlugins = ADM_getInstallRelativePath(startDir, ADM_PLUGIN_DIR, "audioDevices");   
    char *aePlugins = ADM_getInstallRelativePath(startDir, ADM_PLUGIN_DIR, "audioEncoders");   

but ADM_fileio.cpp uses only the ADM_RELATIVE_LIB_DIR, which doesn't quite work:

Code: [Select]
const char *ADM_getSystemPluginSettingsDir(void)
{
    if(ADM_systemPluginSettings) return ADM_systemPluginSettings;
    ADM_systemPluginSettings=ADM_getInstallRelativePath(ADM_RELATIVE_LIB_DIR, ADM_PLUGIN_DIR, "pluginSettings");
    return ADM_systemPluginSettings;
}

yielding the path:

Code: [Select]
  [paintGL]  Painting dummy openGl widget
  [HandleAction]  ************ VIDEO_CODEC_CONFIGURE **************
  [ADM_pluginSystemPath]  System Plugin preset path : /usr/local/bin/lib/ADM_plugins6/pluginSettings//x264/1
  [ADM_pluginInstallSystem]  Looking for file .json in folder /usr/local/bin/lib/ADM_plugins6/pluginSettings//x264/1


So the patch would look something like this.
Ok thanks.