You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Ferdinand Soethe <sa...@soethe.net> on 2004/11/10 15:19:03 UTC

Why set FORREST_HOME?

Looking at forrest.bat in Forrest 0.7 I don't understand why you need
to set the FORREST_HOME when installing forrest when it is
automatically set the way it should be.

> rem ----- use the location of this script to infer $FORREST_HOME -------
> if NOT "%OS%"=="Windows_NT" set DEFAULT_FORREST_HOME=..
> if "%OS%"=="Windows_NT" set DEFAULT_FORREST_HOME=%~dp0\..
> if "%OS%"=="WINNT" set DEFAULT_FORREST_HOME=%~dp0\..
> if "%FORREST_HOME%"=="" set FORREST_HOME=%DEFAULT_FORREST_HOME%

The only things that really needs to be set is the path-variable. That
is if you want to be able to start forrest anywhere.

Is this one step to save in future releases?
Or am I missing something?

--
Ferdinand Soethe



Re[2]: Why set FORREST_HOME?

Posted by Ferdinand Soethe <sa...@soethe.net>.

Dave Brondsema wrote:
DB> "forrest" is really just a shell script around ant

Thanks for explaining that. One more motivation for me to learn about
ant soon.

--
Ferdinand Soethe



Re: Why set FORREST_HOME?

Posted by Dave Brondsema <da...@brondsema.net>.
Ferdinand Soethe wrote:
> Dave Brondsema wrote:
> 
> DB> Currently the forrestbot (and potentially other programs) uses forrest,
> DB> and so it needs to know where it lives.  It does this with %FORREST_HOME%.
> 
> It looks like forrestbot is started with
> 
>    forrest -f mybuildfile.xml
> 
> Doesn't that mean that FORREST_HOME would be automatically set first
> thing in the forrest batch file and - since forrestbot is a child
> process - inherit those settings from the parent environment?
> 

I should've remembered that :-)

"forrest" is really just a shell script around ant, and so some people 
may invoke the capabilities of forrest from their existing ant 
buildfile, which they likely will call by using 'ant', not 'forrest'. 
Nonetheless, those users can manually set FORREST_HOME if necessary.

-- 
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal

Re[2]: Why set FORREST_HOME?

Posted by Ferdinand Soethe <sa...@soethe.net>.
Dave Brondsema wrote:

DB> Currently the forrestbot (and potentially other programs) uses forrest,
DB> and so it needs to know where it lives.  It does this with %FORREST_HOME%.

It looks like forrestbot is started with

   forrest -f mybuildfile.xml

Doesn't that mean that FORREST_HOME would be automatically set first
thing in the forrest batch file and - since forrestbot is a child
process - inherit those settings from the parent environment?

--
Ferdinand Soethe



Re: Why set FORREST_HOME?

Posted by Dave Brondsema <da...@brondsema.net>.
Ross Gardler wrote:
> Moved to dev list as it will get more attention there:
> 
> Ferdinand Soethe wrote:
> 
>> Looking at forrest.bat in Forrest 0.7 I don't understand why you need
>> to set the FORREST_HOME when installing forrest when it is
>> automatically set the way it should be.
>>
>>
>>> rem ----- use the location of this script to infer $FORREST_HOME -------
>>> if NOT "%OS%"=="Windows_NT" set DEFAULT_FORREST_HOME=..
>>> if "%OS%"=="Windows_NT" set DEFAULT_FORREST_HOME=%~dp0\..
>>> if "%OS%"=="WINNT" set DEFAULT_FORREST_HOME=%~dp0\..
>>> if "%FORREST_HOME%"=="" set FORREST_HOME=%DEFAULT_FORREST_HOME%
>>
>>
>>
>> The only things that really needs to be set is the path-variable. That
>> is if you want to be able to start forrest anywhere.
>>
>> Is this one step to save in future releases?
>> Or am I missing something?
>>

Currently the forrestbot (and potentially other programs) uses forrest, 
and so it needs to know where it lives.  It does this with %FORREST_HOME%.

For general use, however, you may be right.  If people wanted to use 
forrestbot, then they would still to set FORREST_HOME, but otherwise it 
wouldn't be needed.

-- 
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal

Re: Why set FORREST_HOME?

Posted by Ross Gardler <rg...@apache.org>.
Moved to dev list as it will get more attention there:

Ferdinand Soethe wrote:
> Looking at forrest.bat in Forrest 0.7 I don't understand why you need
> to set the FORREST_HOME when installing forrest when it is
> automatically set the way it should be.
> 
> 
>>rem ----- use the location of this script to infer $FORREST_HOME -------
>>if NOT "%OS%"=="Windows_NT" set DEFAULT_FORREST_HOME=..
>>if "%OS%"=="Windows_NT" set DEFAULT_FORREST_HOME=%~dp0\..
>>if "%OS%"=="WINNT" set DEFAULT_FORREST_HOME=%~dp0\..
>>if "%FORREST_HOME%"=="" set FORREST_HOME=%DEFAULT_FORREST_HOME%
> 
> 
> The only things that really needs to be set is the path-variable. That
> is if you want to be able to start forrest anywhere.
> 
> Is this one step to save in future releases?
> Or am I missing something?
> 
> --
> Ferdinand Soethe
> 
> 
> 
> 

Re: Why set FORREST_HOME?

Posted by Ross Gardler <rg...@apache.org>.
Moved to dev list as it will get more attention there:

Ferdinand Soethe wrote:
> Looking at forrest.bat in Forrest 0.7 I don't understand why you need
> to set the FORREST_HOME when installing forrest when it is
> automatically set the way it should be.
> 
> 
>>rem ----- use the location of this script to infer $FORREST_HOME -------
>>if NOT "%OS%"=="Windows_NT" set DEFAULT_FORREST_HOME=..
>>if "%OS%"=="Windows_NT" set DEFAULT_FORREST_HOME=%~dp0\..
>>if "%OS%"=="WINNT" set DEFAULT_FORREST_HOME=%~dp0\..
>>if "%FORREST_HOME%"=="" set FORREST_HOME=%DEFAULT_FORREST_HOME%
> 
> 
> The only things that really needs to be set is the path-variable. That
> is if you want to be able to start forrest anywhere.
> 
> Is this one step to save in future releases?
> Or am I missing something?
> 
> --
> Ferdinand Soethe
> 
> 
> 
>