| First, everything on the manual page cited by Andres appears correct except
for this statement: "If a file is found in more than one location, the last
one has the highest precedence." AFAIK, Csound stops searching for a file
at the first location it finds a matching name. Please note that the info
on that page though applies ONLY to files opened by the orchestra or the
score. It does not apply to files specified on the command line nor to
plugins or other libraries needed to run Csound.
Art: are you asking about files loaded by the orc/sco or about plugins or
about other necessary libraries?? The answer is different for each of
these.
For shared libraries (.dll's) required by Csound or one of Csound's plugins,
the required location of these libraries is determined by the operating
system. (Some OSes such as Linux may allow the user to configure these
paths). Since these libraries are loaded automatically by the OS, Csound
does not have any control over where to look for them. Thus, Python25.dll
must be where WINDOWS expects it to be, not Csound.
Plugins are different, because Csound explicitly loads them while running.
Thus, Csound decides where to look for its own plugin libraries.
I have just looked at the code for plugin loading, and while there is a
comment that says plugins are sought in the current directory if OPCODEDIR
is undefined, it appears that this is no longer true for _release_ versions
of Csound. In fact, the following code seems wrong to me for Windows:
/* default directory to load plugins from if environment variable is not set
*/
#if !(defined(_CSOUND_RELEASE_) && (defined(LINUX) || defined(__MACH__)))
# define ENABLE_OPCODEDIR_WARNINGS 1
# ifdef CS_DEFAULT_PLUGINDIR
# undef CS_DEFAULT_PLUGINDIR
# endif
# define CS_DEFAULT_PLUGINDIR "."
#else
# define ENABLE_OPCODEDIR_WARNINGS 0
# ifndef CS_DEFAULT_PLUGINDIR
# ifndef USE_DOUBLE
# define CS_DEFAULT_PLUGINDIR "/usr/local/lib/csound/plugins"
# else
# define CS_DEFAULT_PLUGINDIR "/usr/local/lib/csound/plugins64"
# endif
# endif
#endif
It appears that the current dir is only used (_for_plugins_) when both on
Linux or MacOS X and when building a non-release version of Csound. But
Windows always is looking in "/usr/local/lib/csound/plugins" or
".../plugins64". Is this correct?
Another issue, Art, is that the notion of the "current directory" may be
affected by how you are running Csound. From the command line, it is
obviously the shell's current directory. But if you run Csound from a GUI
interface launched by double-clicking on it, the current directory is set to
some default by the operating system. On MacOS X, this seems to be the root
of the file system (which is generally useless). On MacOS 9, it is the
folder containing the GUI application. I have no idea what the default is
on Windows.
Hope that this clears things up.
Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/
Andres Cabrera wrote on 12/15/07 10:01 AM:
> Hi,
>
> El vie, 14-12-2007 a las 19:11 -0500, Art Hunkins escribió:
>>
>> 2) Is this behavior documented anywhere?
>
>
> It's here:
> http://www.csounds.com/manual/html/OrchDirFiles.html
>
> But I'm not sure if this is entirely accurate.
>
> Cheers,
> Andrés
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |