crucialfelix / supercolliderjs

The JavaScript client library for SuperCollider
https://crucialfelix.github.io/supercolliderjs/
MIT License
478 stars 43 forks source link

Use "which" to find sclang on a linux box? #14

Open hems opened 9 years ago

hems commented 9 years ago

I just realised the default installation might be /usr/bin instead of /usr/local/bin ( I'm running a Raspberry here ).

As i'm not totally familiar with the code i wrote the solution in an standalone example so hopefully you can integrate this the best way possible:

function which( callback ) {
    var spawn = require( 'child_process' ).spawn
    spawn( 'which', [ 'sclang' ] ).stdout.on( 'data', function( data ) {
        callback( data.toString() );
    });
}

which( function( path ){ console.log( path ) });
crucialfelix commented 9 years ago

or we could just say that you should have sclang and scsynth on your path.

with the homebrew OS X version about to be available, then even mac will have them on their path.

and then there is no need for supercolliderjs to configure it at all.

hems commented 9 years ago

yeah makes total sense.. then perhaps close this?

crucialfelix commented 7 years ago

Now I'm thinking that maybe the default for linux should be just 'sclang' — it should assume that you have it installed.

hems commented 7 years ago

indeed should assume you have it installed and/or maybe make an argument to specify the binary in case you want to run a different one.