You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Bert Van Kets <be...@apache.org> on 2002/11/15 22:30:56 UTC

solved the build using path with spaces

I have solved the batch files.
I can run forrest from a path containing spaces when forrest is setup in a 
directory containing spaces.

The major problem to overcome was building the complete classpath.  I had 
to do some use some tricks I have not been using in a VERY long time.  One 
if them was sending a parameter containing a quoted full path and then 
remove the quotes using NTSwitch.

I had to modify almost every batch file in the build process: forrest.bat, 
ant.bat, appendcp.bat and lcp.bat.

I started out from the binary version of Forrest.  I'm checking out my 
changes with a fresh checkout.
Attached are the batch files for you to check out.  I'll commit ASAP.

Bert



Re: solved the build using path with spaces

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Bert Van Kets wrote:
> At 16:05 16/11/2002 +1100, you wrote:
> 
>> On Fri, Nov 15, 2002 at 11:30:16PM +0100, Bert Van Kets wrote:
>> > I committed the batch files to solve the path problem.
>>
>> Many thanks... evidently there is a secret cult, keepers of Forbidden
>> Knowledge of batch scripting too terrible for most mortals.  Even the
>> Google oracle hardly knew about the 'NTSwitch' trick..
> 
> 
> Starting with a PC XT without a hard drive, 1 floppy of 350KB, 256KB of 
> RAM and DOS 2.0 made it necessary to learn the hidden layers of DOS 
> commands.  Windows didn't even exist yet.
> I must admit I had to look up some stuff, but I have done it all before.
> 
> Man I feel old all of a sudden.

I started with an XT with a 20Mb harddisk, so I feel *much* younger ;-)

My first day with the comuter I did del *.* , so the next months I 
learned to use the Norton utilities and to fix the FAT by hand...

... and who didn't ever try to do some 3D geometry stuff ;-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: solved the build using path with spaces

Posted by Bert Van Kets <be...@vankets.com>.
At 16:05 16/11/2002 +1100, you wrote:
>On Fri, Nov 15, 2002 at 11:30:16PM +0100, Bert Van Kets wrote:
> > I committed the batch files to solve the path problem.
>
>Many thanks... evidently there is a secret cult, keepers of Forbidden
>Knowledge of batch scripting too terrible for most mortals.  Even the
>Google oracle hardly knew about the 'NTSwitch' trick..

Starting with a PC XT without a hard drive, 1 floppy of 350KB, 256KB of RAM 
and DOS 2.0 made it necessary to learn the hidden layers of DOS 
commands.  Windows didn't even exist yet.
I must admit I had to look up some stuff, but I have done it all before.

Man I feel old all of a sudden.

Bert


Re: solved the build using path with spaces

Posted by Bert Van Kets <be...@vankets.com>.
At 10:02 16/11/2002 +0100, you wrote:
>Steven Noels wrote:
>
>>When running under cygwin however, 'forrest seed' in a new directory 
>>produces:
>>stevenn@ELISABETH ~/test
>>$ forrest
>>Apache Forrest.  Run 'forrest -projecthelp' to list options
>>Buildfile: \c\Program 
>>Files\apache-forrest-0.2-bin\bin\..\forrest.build.xml does not exist!
>>Build failed
>>I'm upgrading my cygwin version right now and report back. But to me, it 
>>seems we can safely release on the 'common' platforms - cygwin not being 
>>one of them.
>
>Oh well, it does work if you do 'forrest.bat seed' in a new directory.

I did not touch the shell scripts.  Is there still a problem with 
those?  AFAIK there isn't.
cygwin is not true *NIX, so I'm not surprised you have to add the .bat 
extension.  My cygwin even uses the DOS JDK.  I don't have a JDK installed 
in cygwin.


>So when using forrest under cygwin, you have to use the .bat version. Yet 
>another tick on my list of reasons to hasten the switch to Linux as my main OS.
>
>Patched release notes accordingly.

IMHO this should be enough.
Thanks,

Bert


></Steven>
>--
>Steven Noels                            http://outerthought.org/
>Outerthought - Open Source, Java & XML Competence Support Center
>Read my weblog at              http://radio.weblogs.com/0103539/
>stevenn at outerthought.org                stevenn at apache.org


Re: solved the build using path with spaces

Posted by Steven Noels <st...@outerthought.org>.
Steven Noels wrote:

> When running under cygwin however, 'forrest seed' in a new directory 
> produces:
> 
> stevenn@ELISABETH ~/test
> $ forrest
> Apache Forrest.  Run 'forrest -projecthelp' to list options
> 
> Buildfile: \c\Program 
> Files\apache-forrest-0.2-bin\bin\..\forrest.build.xml does not exist!
> Build failed
> 
> I'm upgrading my cygwin version right now and report back. But to me, it 
> seems we can safely release on the 'common' platforms - cygwin not being 
> one of them.

Oh well, it does work if you do 'forrest.bat seed' in a new directory.

So when using forrest under cygwin, you have to use the .bat version. 
Yet another tick on my list of reasons to hasten the switch to Linux as 
my main OS.

Patched release notes accordingly.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0103539/
stevenn at outerthought.org                stevenn at apache.org


Re: solved the build using path with spaces

Posted by Steven Noels <st...@outerthought.org>.
Jeff Turner wrote:

> .. could Win98/2K/NT/XP users also please try:
> 
> if exist c:\nul echo hooray
> 
> and report back?  If that trick works, then Ant (and Forrest) can be made
> to work on Win95/98.

"hooray" (on W2K)

Can anyone describe me the clear state of lightheadedness MS developers 
had when implementing this command shell interpreter? Maybe this 
command.com development team is located somewhere in Elbonia?

>>Do a checkout and clean the build directory
>>run "build" in the forrest directory
>>copy the xml-forrest\build\dist\shbat directory to "c:\my forrest"
>>create the directory "c:\my test"
>>run "forrest seed" in "c:\my test"
>>
>>should work.

Does work under command.com

When running under cygwin however, 'forrest seed' in a new directory 
produces:

stevenn@ELISABETH ~/test
$ forrest
Apache Forrest.  Run 'forrest -projecthelp' to list options

Buildfile: \c\Program 
Files\apache-forrest-0.2-bin\bin\..\forrest.build.xml does not exist!
Build failed

I'm upgrading my cygwin version right now and report back. But to me, it 
seems we can safely release on the 'common' platforms - cygwin not being 
one of them.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0103539/
stevenn at outerthought.org                stevenn at apache.org


Re: solved the build using path with spaces

Posted by Jeff Turner <je...@apache.org>.
On Fri, Nov 15, 2002 at 11:30:16PM +0100, Bert Van Kets wrote:
> I committed the batch files to solve the path problem.

Many thanks... evidently there is a secret cult, keepers of Forbidden
Knowledge of batch scripting too terrible for most mortals.  Even the
Google oracle hardly knew about the 'NTSwitch' trick..

http://www.fpschultze.de/bsh.htm#a4

> Can you guys test it on different machines.

.. could Win98/2K/NT/XP users also please try:

if exist c:\nul echo hooray

and report back?  If that trick works, then Ant (and Forrest) can be made
to work on Win95/98.

> Do a checkout and clean the build directory
> run "build" in the forrest directory
> copy the xml-forrest\build\dist\shbat directory to "c:\my forrest"
> create the directory "c:\my test"
> run "forrest seed" in "c:\my test"
> 
> should work.

Cool :)  I'll do a 0.2 release then and any improvements can be made in
0.2.1.

--Jeff

> Bert
> 

Re: solved the build using path with spaces

Posted by Bert Van Kets <be...@vankets.com>.
I committed the batch files to solve the path problem.
Can you guys test it on different machines.

Do a checkout and clean the build directory
run "build" in the forrest directory
copy the xml-forrest\build\dist\shbat directory to "c:\my forrest"
create the directory "c:\my test"
run "forrest seed" in "c:\my test"

should work.

Bert


Re: solved the build using path with spaces

Posted by Bert Van Kets <be...@vankets.com>.
Damnn,
by solving the "space in path" problem I had to change the ant.bat 
file.this breaks the general build. :-(
This will take a little more time to solve, but the binary build can at 
least be released.

My back is hurting me.  Guess I got Steven's problem. Thanks mate!

Can somebody please take over as I don't think I'll have the time 
tomorrow?  The main problem is solved, we must just get it working together 
with the main build.  Is anybody against having two ant batch files?  One 
for the main build and one for the forrest run.

Bert


At 22:30 15/11/2002 +0100, you wrote:
>I have solved the batch files.
>I can run forrest from a path containing spaces when forrest is setup in a 
>directory containing spaces.
>
>The major problem to overcome was building the complete classpath.  I had 
>to do some use some tricks I have not been using in a VERY long time.  One 
>if them was sending a parameter containing a quoted full path and then 
>remove the quotes using NTSwitch.
>
>I had to modify almost every batch file in the build process: forrest.bat, 
>ant.bat, appendcp.bat and lcp.bat.
>
>I started out from the binary version of Forrest.  I'm checking out my 
>changes with a fresh checkout.
>Attached are the batch files for you to check out.  I'll commit ASAP.
>
>Bert
>
>
>
>
>
>
>