You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Roger Vaughn <rv...@seaconinc.com> on 2000/08/01 15:49:03 UTC

CAB Task

Attached is a CAB task I wrote some weeks ago to create Microsoft .cab
files.  I know, I know, boo, hiss, but I had no choice - really.  I have
to create these for one of my current projects, so I put this together.
The task syntax is just like jar or zip, since it really does the same
thing anyway.

Use it like this:

  <cab cabfile="filename" basedir="dir"/>

All of the optional parameters from MatchingTask are supported
(including the nested params):

    includes
    excludes
    items
    ignore
    defaultexcludes

This task contains OS checks and will only run on Windoze.  It is
harmlessly ignored on other OSes.  You must have the Microsoft CABARC
utility available in your executable path.  I have not been able to find
any Java classes for creating CAB files - if anyone knows of any, please
let me know.

I'm donating the source to the project - you will see that I borrowed
heavily from existing tasks anyway.

Roger Vaughn


Re: CAB Task

Posted by Roger Vaughn <rv...@seaconinc.com>.
No, no problem.  If it's going into the mix, I'll pull the latest from
CVS and convert it to fit.  Once that's done I will be able to use the
head revision for my projects anyway.

Thanks.

Stefan Bodewig wrote:

> >>>>> "RV" == Roger Vaughn <rv...@seaconinc.com> writes:
>
>  RV> Stefan, I don't see ExecuteOn in the 1.1 class tree.  Perhaps
>  RV> this is a new class in CVS?
>
> Yes, sorry. And you'll probably need a dozen of other new classes as
> well. If you don't want to get to deep into the new stuff let me
> know. I could transform your contributed task myself but it'd take
> longer.
>
> Stefan


Re: CAB Task

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "RV" == Roger Vaughn <rv...@seaconinc.com> writes:

 RV> Stefan, I don't see ExecuteOn in the 1.1 class tree.  Perhaps
 RV> this is a new class in CVS?

Yes, sorry. And you'll probably need a dozen of other new classes as
well. If you don't want to get to deep into the new stuff let me
know. I could transform your contributed task myself but it'd take
longer.

Stefan

Re: CAB Task

Posted by Roger Vaughn <rv...@seaconinc.com>.
Stefan,

I don't see ExecuteOn in the 1.1 class tree.  Perhaps this is a new class
in CVS?

roger


Stefan Bodewig wrote:

> >>>>> "RV" == Roger Vaughn <rv...@seaconinc.com> writes:
>
>  RV> I'm donating the source to the project - you will see that I
>  RV> borrowed heavily from existing tasks anyway.
>
> Yes, do you think you could rewrite it to reuse existing code a little
> more? I'm thinking of the StreamPumper part, the cd logic and so
> on. Maybe ExecuteOn could be a better parent class than MatchingTask.
>
> What do you think?
>
> Stefan


Re: CAB Task

Posted by Roger Vaughn <rv...@seaconinc.com>.
Yah, I can revisit this.  It was based on the code in 1.0.8 or earlier.  I
lifted most of it from the Exec task, but the class itself (obviously)
follows the MatchingTask pattern to get that interface.  I recall that I
threw out some of the Exec features I didn't need at the time.  I'll take
a look and try to rewrite (and reuse) based on the 1.1 code.

roger

Stefan Bodewig wrote:

> >>>>> "RV" == Roger Vaughn <rv...@seaconinc.com> writes:
>
>  RV> I'm donating the source to the project - you will see that I
>  RV> borrowed heavily from existing tasks anyway.
>
> Yes, do you think you could rewrite it to reuse existing code a little
> more? I'm thinking of the StreamPumper part, the cd logic and so
> on. Maybe ExecuteOn could be a better parent class than MatchingTask.
>
> What do you think?
>
> Stefan


Re: CAB Task

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "RV" == Roger Vaughn <rv...@seaconinc.com> writes:

 RV> I'm donating the source to the project - you will see that I
 RV> borrowed heavily from existing tasks anyway.

Yes, do you think you could rewrite it to reuse existing code a little
more? I'm thinking of the StreamPumper part, the cd logic and so
on. Maybe ExecuteOn could be a better parent class than MatchingTask.

What do you think?

Stefan