Csound Csound-dev Csound-tekno Search About

[Cs-dev] Default values of environment variables

Date2013-04-26 02:44
FromMichael Gogins
Subject[Cs-dev] Default values of environment variables
AttachmentsNone  None  
At the Csound Conference 2011 we discussed default paths for Csound environment variables. This has not been implemented.

Is this still a good idea? If so, I will implement them.

I think it is a good idea. It would mean that on some systems, certainly Windows, environment and PATH variables could be set, but would not NEED to be set if things were found in standard locations.

The idea is that PREFIX points to the root of the "standard" installation directory. On Windows, this would be something like C:/Program Files (x86)/Csound. On Linux, this could be anything. It could be a local installation in, say, /home/mkg/csound6 or in /usr/local. 

At any rate, at run time, if no values have been assigned to these environment variables, their value is defaulted to PREFIX/something, where PREFIX is the parent of the Csound shared library directory. The Csound library will discover this PREFIX directory at run time but use it only if one of these variables has not been defined.

PREFIX=parent of directory containing the Csound library.
OPCODE6DIR64=$PREFIX/plugins6_64
PYTHONPATH=$PREFIX/bin
RAWWAVE_PATH=$PREFIX/rawwave
SFDIR=$PREFIX/share/soundfiles
SSDIR=$PREFIX/share/samples
SADIR=$PREFIX/share/analysis
INCDIR=$PREFIX/share/inc
SNAPDIR=$PREFIX/share/snap
MFDIR=$PREFIX/share/examples

In addition the following would be default directories:

$CSOUND_HOME/include
$CSOUND_HOME/lib
$CSOUND_HOME/doc/manual
$CSOUND_HOME/doc/apiref
$CSOUND_HOME/doc/tutorial

Your comments and suggestions are of course welcome.

Regards,
Mike

--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

Date2013-04-26 05:10
Frompete.goodeve@computer.org
SubjectRe: [Cs-dev] Default values of environment variables
AttachmentsNone  

Date2013-04-26 12:35
FromMichael Gogins
SubjectRe: [Cs-dev] Default values of environment variables
AttachmentsNone  None  

Good point. perhaps just opcodes then, some sort of functional minimum.

On Apr 26, 2013 12:39 AM, <pete.goodeve@computer.org> wrote:
On Thu, Apr 25, 2013 at 09:44:24PM -0400, Michael Gogins wrote:
> At the Csound Conference 2011 we discussed default paths for Csound
> environment variables. This has not been implemented.
>
> Is this still a good idea? If so, I will implement them.
>
> I think it is a good idea. It would mean that on some systems, certainly
> Windows, environment and PATH variables could be set, but would not NEED to
> be set if things were found in standard locations.
>
I don't think I'd like this.  I typically work in a project folder, and
I prefer all my files to end up and be read from there, so I leave the
variables unset.  I suspect that having to always use full paths or set
environment variable for each case would be much more of a pain.

This of course only applies to things like SADIR and SSDIR, which tend
to be project-specific.  Fixed folders, like OPCODEDIR, are another
matter and I agree would benefit from defaults.

Maybe an option '--use-defaults' or something, would be a good compromise?

        -- Pete --


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel