You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@apache.org on 2003/02/02 06:34:21 UTC

cvs commit: jakarta-ant/src/script ant.bat

conor       2003/02/01 21:34:21

  Modified:    src/script ant.bat
  Log:
  Fix ant.bat for Win95/98/ME users - check for existence of ant.jar
  
  PR:	13582
  
  Revision  Changes    Path
  1.26      +4 -4      jakarta-ant/src/script/ant.bat
  
  Index: ant.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/script/ant.bat,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -w -u -r1.25 -r1.26
  --- ant.bat	24 Jan 2003 14:45:57 -0000	1.25
  +++ ant.bat	2 Feb 2003 05:34:21 -0000	1.26
  @@ -25,11 +25,11 @@
   goto setupArgs
   rem This label provides a place for the argument list loop to break out 
   rem and for NT handling to skip to.
  -:doneStart
   
  +:doneStart
   rem find ANT_HOME if it does not exist due to either an invalid value passed
   rem by the user or the %0 problem on Windows 9x
  -if exist "%ANT_HOME%" goto checkJava
  +if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
   
   rem check for ant in Program Files on system drive
   if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
  @@ -38,13 +38,13 @@
   
   :checkSystemDrive
   rem check for ant in root directory of system drive
  -if not exist %SystemDrive%\ant\nul goto checkCDrive
  +if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
   set ANT_HOME=%SystemDrive%\ant
   goto checkJava
   
   :checkCDrive
   rem check for ant in C:\ant for Win9X users
  -if not exist C:\ant\nul goto noAntHome
  +if not exist C:\ant\lib\ant.jar goto noAntHome
   set ANT_HOME=C:\ant
   goto checkJava
   
  
  
  

Re: cvs commit: jakarta-ant/src/script ant.bat

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Conor MacNeill wrote:
> Steve Loughran wrote:

...
> I'm more inclined to move the lcp functionality into Java and build a 
> classloader in there to launch Ant. I have come close to this before 
> (and indeed Mutant did this), so I will give it a go, between bugs.
> 
> That said, a native launcher does have some appeal

Yes, both do :-D

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


Re: cvs commit: jakarta-ant/src/script ant.bat

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Steve Loughran wrote:
> 
> I wonder what they will do to people's env variables? Maybe we need to put
> together a java runner exe. This is something I've been wondering about for
> a while; jakarta-commons would be the place. Something to take a file
> declaring jvm opts, pattern for the classpath, etc, and run the exe, the way
> the jedit launcher does
> 

I'm more inclined to move the lcp functionality into Java and build a 
classloader in there to launch Ant. I have come close to this before (and 
indeed Mutant did this), so I will give it a go, between bugs.

That said, a native launcher does have some appeal

Conor



Re: cvs commit: jakarta-ant/src/script ant.bat

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Conor MacNeill" <co...@cortexebusiness.com.au>
To: "Ant Developers List" <an...@jakarta.apache.org>
Sent: Saturday, February 01, 2003 22:48
Subject: Re: cvs commit: jakarta-ant/src/script ant.bat
>
> And JDK 1.1 too :-)
>

yeah, I was just thinking that the .bat file caused more support calls than
1.1.

> Actually I thing the 1.6 jar changes are going to tax the lcp.bat script

I wonder what they will do to people's env variables? Maybe we need to put
together a java runner exe. This is something I've been wondering about for
a while; jakarta-commons would be the place. Something to take a file
declaring jvm opts, pattern for the classpath, etc, and run the exe, the way
the jedit launcher does


Re: cvs commit: jakarta-ant/src/script ant.bat

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Steve Loughran wrote:
> 
> There has been some ant-user discussion about win9x boxes not having
> SystemDrive defined. Is this the case? The fact that it is a mixed-case
> variable hints that it is an NT value.
> 

Yes, it is not defined but that does not affect the script at all so no 
problem. The real problem was the existence check.

> As an aside, life would be so much easier if we could drop win9x support :)
> 

And JDK 1.1 too :-)

Actually I thing the 1.6 jar changes are going to tax the lcp.bat script

Conor




Re: cvs commit: jakarta-ant/src/script ant.bat

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: <co...@apache.org>
To: <ja...@apache.org>
Sent: Saturday, February 01, 2003 21:34
Subject: cvs commit: jakarta-ant/src/script ant.bat


> conor       2003/02/01 21:34:21
>
>   Modified:    src/script ant.bat
>   Log:
>   Fix ant.bat for Win95/98/ME users - check for existence of ant.jar

There has been some ant-user discussion about win9x boxes not having
SystemDrive defined. Is this the case? The fact that it is a mixed-case
variable hints that it is an NT value.

As an aside, life would be so much easier if we could drop win9x support :)

>    rem check for ant in Program Files on system drive
>    if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
>   @@ -38,13 +38,13 @@

>    :checkSystemDrive
>    rem check for ant in root directory of system drive
>   -if not exist %SystemDrive%\ant\nul goto checkCDrive
>   +if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
>    set ANT_HOME=%SystemDrive%\ant
>    goto checkJava