[Scilab-Dev] a kind of regression

Stéphane Mottelet stephane.mottelet at utc.fr
Mon Apr 26 17:52:35 CEST 2010


Le 26/04/2010 17:49, Sylvestre Ledru a écrit :
> Le lundi 26 avril 2010 à 17:43 +0200, Stéphane Mottelet a écrit :
>    
>> Le 26/04/2010 17:39, Sylvestre Ledru a écrit :
>>      
>>> Le lundi 26 avril 2010 à 17:09 +0200, Stéphane Mottelet a écrit :
>>>
>>>        
>>>> Hi all,
>>>>
>>>> Since the 5.0 version is it no more possible to know the location
>>>> of Scilab main script by using the SCI variable. Before 5.0, it was
>>>> simple, since scilab main script was in SCI/bin. Now, the scilab script
>>>> can be anywhere, e.g. in the Ubuntu scilab package scilab is in
>>>> /usr/bin, but if a user builds it from source, the script is in SCI/bin.
>>>> Maybe is there another way (within Scilab) to know the location of
>>>> the script/binary ?
>>>>
>>>>          
>>> Good question. You probably know but it is easy to retrieve scilab-bin with sciargs.
>>>
>>> About the Scilab script, in most of the case, you should be able to find
>>> it with:
>>> SCI+"../../bin/scilab"
>>> I agree this is not what you expect but this will work with both
>>> official binaries and distribution packages (grosso modo, as long as the
>>> user does not force a weird data directory)
>>>
>>> Sylvestre
>>>
>>>
>>>
>>>
>>>        
>> Which solution is the most reliable to you (multiplatform ?) :
>>
>> 1-suppose that the scilab script and the scilab binary are in the
>> same folder
>>      
> They are. If you find somewhere it is not the case, it is a bug.
> Actually, I would you this solution. I though that sciargs would give
> you back only the path a relative but in fact, it is absolute.
>
> For example:
> $ /usr/share/../bin/scilab -nwni -e "disp(sciargs())" -nb
>
> !/usr/bin/scilab-bin  -nwni  -e  disp(sciargs())  -nb  !
>
> So, you should go with this solution!
>
>
>    
OK.

S.



More information about the dev mailing list