Re: [eclipse-clp-users] Finding the ECLiPSE startup directory

From: Kish Shen <kisshen_at_...5...>
Date: Tue, 17 Mar 2009 18:55:27 +0000
Paulo Moura wrote:
> On 2009/03/16, at 18:18, Kish Shen wrote:
> 
>> Paulo Moura wrote:
> 
> Please see my previous reply to the mailing list. I cannot use the -e  
> option as I need to know the startup directory for the initialization  
> goals in the file that I'm loading using the -b option and the -e  
> option goal is executed after the -b option.
> 

It seems to me that you don't want to use -b, not -e -- you can compile 
the file you would load with -b in the query of -e, i.e.

-e "......, compile(boot)"

instead of -b boot.


> Note that what I'm trying to accomplish is similar to ECLiPSe  
> initialization at startup behavior. From the docs:
> 
> "For eclipse, before displaying the initial prompt, the system checks  
> whether there is a file called .eclipserc in the current directory and  
> if not, in the user's home directory. If such a file is found, ECLiPSe  
> compiles it first."
> 

That really is only suitable for Un*x, and is a holdover from the old 
days. We certainly don't try to do anything clever with what the 
`current directory' is on Windows -- as I said, this is probably fixed 
by Windows, unless you start ECLiPSe in unusual ways, e.g. inside a bash 
shell in cygwin. Also, the `home directory' is also probably not defined 
when you start ECLiPSe using normal Windows methods.

You can see the code that does this in toplevel.pl (compile_rc/0), and
it is done when the query toplevel:toplevel is called -- i.e. within the 
-e if you follow Joachim's suggestion.


Cheers,

Kish


-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Tue Mar 17 2009 - 19:24:37 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST