That would be a good idea.  The script could also be updated to search the PATH 
for the program and, if found, use the found program path as a basis for 
locating the script.

I suspect that Eric would not mind if some one had the time to make such 
updates.


On 2/17/2012 9:04, Don Guinn wrote:
> Why not change the test to verify if EXE and/or JSDIR exist at the location
> rather than assume where they should be given the system type?
>
> On Fri, Feb 17, 2012 at 3:50 AM, David Mitchell<[email protected]>wrote:
>
>> The locations in gnuplot.ijs are individually coded for 3 OS
>> configurations:
>>
>> NB. set EXE   as path to gnuplot binary
>> NB. set JSDIR as path to gnuplot javascript scripts
>> NB. hardwired OS assumptions that may need tweaking
>> 3 : 0''
>> select. UNAME
>> case. 'Win' do.
>>   EXE  =: (jpath'~home/gnuplot/binary/gnuplot.exe')rplc'/';'\'
>>   JSDIR=: '~home/gnuplot/binary/share/gnuplot/4.4/js/'
>> case. 'Linux' do.
>>   EXE  =: '/usr/bin/gnuplot'
>>   JSDIR=: '~root/usr/share/gnuplot/gnuplot/4.4/js/'
>> case. 'Darwin' do.
>>   EXE  =: '/usr/local/bin/gnuplot'
>>   JSDIR=: '~root/usr/local/share/gnuplot/4.4/js/'
>> case. do. assert. 0['unknown UNAME'
>> end.
>>
>> To me, it is a matter of personal taste if one decides to modify their
>> system to
>> match what the script expects or to modify gnuplot.ijs to match what is
>> currently on your system.  There are several reasons I felt it is at least
>> worth
>> knowing about the path options in gnuplot.ijs.  One reason is that the
>> install
>> directory for gnuplot can be a personal choice and does not seem to be as
>> standardized as some packages.  Another reason is that the path names
>> include a
>> version-specific element (/4.4/) that is likely to change depending on
>> which
>> version of gnuplot one decides to install.
>>
>> It is true that if you choose to update gnuplot.ijs, you will have to
>> continue
>> to manage that change when updates are made.
>>
>> On 2/17/2012 0:41, bill lam wrote:
>>> I'm curious.  If the folders are symlinked, all files inside should
>>> also be symlinked. eg, (untested)
>>>
>>> rm -rf /usr/local/share/gnuplot
>>> ln -s /opt/local/share/gnuplot /usr/local/share/gnuplot
>>>
>>> not sure if mac need a sudo here.
>>>
>>> then confirm all files are available
>>>
>>> ls -R /usr/local/share/gnuplot
>>>
>>> Or Mac has some features in ln that I missed.
>>>
>>> Чтв, 16 Фев 2012, Murray Eisenberg писал(а):
>>>> No, canvastext.js is not in /usr/local/share/gnuplot/4.4/js. Rather, on
>>>> my Mac OS X 10.7 system, it's in /opt/local/share/gnuplot/4.4/js.
>>>>
>>>> So there seems to be the possibility of a whole cascading list of errors
>>>> possible because J starts out thinking that the gnuplot files are in
>>>> /usr/local/share/gnuplot/... whereas in fact they are in
>>>> /opt/local/share/gnuplot.
>>>>
>>>> So what is a reasonable fix for this? Simply wht David Mitchell
>>>> suggested in his follow-up response: to edit gnuplot.ijs?
>>>>
>>>> Was the location hard-coded into gnuplot.ijs designed for OS's other
>>>> than Mac OS X? Or is there something weird about the location on my
>> system?
>>>>
>>>> On 2/16/12 11:00 PM, [email protected] wrote:
>>>>>
>>>>> Message: 1
>>>>> Date: Wed, 15 Feb 2012 23:38:59 -0500
>>>>> From: Murray Eisenberg<[email protected]>
>>>>> Subject: Re: [Jgeneral] General Digest, Vol 77, Issue 2
>>>>> To: [email protected]
>>>>> Message-ID:<[email protected]>
>>>>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>>>>
>>>>> I created a symlink in /usr/local/bin for gnuplot to
>>>>> /opt/local/bin/gnuplot. Now I don't get the same error as before when
>>>>> loading ~addons/ide/jhs/gnuplot.ijs.
>>>>>
>>>>> But now I get the error:
>>>>>
>>>>>       /usr/local/share/gnuplot/4.4/js/canvastext.js not found
>>>>>
>>>>> I'm confused here, obviously.
>>>>>
>>>>> On 2/15/12 11:00 PM, [email protected] wrote:
>>>>>> Date: Thu, 16 Feb 2012 10:18:02 +0800 From: bill lam
>>>>>> <[email protected]>    Subject: Re: [Jgeneral] gnuplot binary
>> location on
>>>>>> Mac OS X To: [email protected] Message-ID:
>>>>>> <[email protected]>    Content-Type: text/plain;
>>>>>> charset=utf-8
>>>>>     >
>>>>>> I assume you meant run gnuplot under JHS. JHS includes its
>>>>>> own support for gnuplot, the file should be
>> ~addons/ide/jhs/gnuplot.ijs
>>>>>> Perhaps you want to symlink the path so that you will not need to edit
>>>>>> again after the next jhs update.
>>>>>     >
>>>>>      ???, 15 ??? 2012, Murray Eisenberg wrote:
>>>>>>
>>>>>>>>     I'm trying to use the J gnuplot package under jhs on Mac OS X
>> 10.7
>>>>>>>>     (Lion). Trying to load the package gives error:
>>>>>>>>
>>>>>>>>        /usr/local/bin/gnuplot not found
>>>>>>>>
>>>>>>>>     In fact, that's not the path to a gnuplot binary. Using the OS X
>> command
>>>>>>>>     line, I found the binary:
>>>>>>>>
>>>>>>>>        /opt/local/bin/gnuplot
>>>>>>>>
>>>>>>>>     What ijs script needs to be edited to fix this? (I found no
>> gnuplot file
>>>>>>>>     in ~/addons/graphics, and jfif failed to find any file containing
>>>>>>>>     'gnuplot'.)
>>>>>
>>>>
>>>> --
>>>> Murray Eisenberg                     [email protected]
>>>> Mathematics&   Statistics Dept.
>>>> Lederle Graduate Research Tower      phone 413 549-1020 (H)
>>>> University of Massachusetts                413 545-2859 (W)
>>>> 710 North Pleasant Street            fax   413 545-1801
>>>> Amherst, MA 01003-9305
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to