There are a few external libraries for working on MIDP stuff, including
Antic and the Antenna tasks (wtkjad etc). These both have filesize
tweaker tools.
However, I have a number of external developers working on stuff and
the point of Ant for me is that they don't need to customize their environment
to build, and v-versa when i get their stuff...
I can do almost everything with built in tasks, except tweak the filesize...
on windows, I thot there might be a hacky way of doing it as an <exec> with
a DOS command. And most ppl have cygwin installed, so perhaps there is
some way of using one of those commands. But still, this is yukky.
Alternately I can bundle the task with the build and use this, but this
is a bit messy.
<taskdef name="filesize"
classname="com.blah.util.FileSize"
classpath="${basedir}/lib/utils.jar"/>
But its a little messy.
/dc
from [ Morten Mortensen <morten.mortensen@tietoenator.com> ] on [ Wed, 30 Jul 2003 21:24:37
+0200 ]
>
> Hi David & All,
>
> I have had this #、*%、#@&%*@#、 problem. I have made a tool for creating and
> maintaining build-environments in general - I am currently testing it for
> MIDP/CLDC, which is a particular trouble-some case. By the way, it also
> handles external, pre-obfuscated libraries (ProGuard rocks!) and generates
> obfuscated, JAD'ed and JavaDoc'ed results. The internal manifest and the
> external JAD-file are generated from the same input. More on this later.
>
> This very, very simple thing I could not find anywhere - "file-size",
> "is-file", "is-dir" - stuff like that. Reading file-timestamps could also
> come in handy at some point. The missing "file-size" is incredibly painful
> when using upload-programs for e.g. Nokia-phones; if the size is wrong, one
> must set it in the JAD-file. I believe, that the interpretation of
> "MIDlet-Jar-Size" have been relaxed by Sun at some point - perhaps that was
> just the data-size, not the jar-size?
>
> I have a couple of Ant-tasks - one of them is a "file-size" task, which I
> use for setting "MIDlet-Jar-Size" - see page 3 -
> ftp://yelstream.org/pub/Slice%20Extension%20Set%20for%20Apache%20Ant/1.4/Sli
> ce-User-Manual.pdf
>
> See also -
> ftp://yelstream.org/pub/Slice%20Extension%20Set%20for%20Apache%20Ant/1.4/Sli
> ce.v1.4.b331.UnzipMe!.zip
> ftp://yelstream.org/pub/Slice%20Extension%20Set%20for%20Apache%20Ant/1.4/Sli
> ce.v1.4.b332.source.UnzipMe!.zip
>
> For the moment, you are free to use the source-code in any way you see fit.
>
> Apparently, no one uses Ant for generating MIDlets... ;-)
>
> Med venlig hilsen
> Morten Sabroe Mortensen
> TietoEnator A/S, Ved Lunden 12, 8230 ナbyhxj, Danmark
> mailto:Morten.Mortensen@tietoenator.com
> http://www.tietoenator.com
>
>
> -----Original Message-----
> From: dc [mailto:dc@wm.namco.co.jp]
> Sent: 30. juli 2003 12:57
> To: 'Ant Users List'
> Subject: echoing filesize
>
>
> Is there a built in ant task that can echo a filesize?
> can task output be directed to a variable?
>
> I am trying to create a portable build env that doesn't require external
> tools/taskdefs.
>
> vis:
>
> <property name="filesize" value="... somehow read a file's size" />
>
> <echo file="${MIDlet-Name}.jad" append="false">
> MIDlet-Name: ${MIDlet-Name}
> MIDlet-Jar-Size:${filesize}"
> </echo>
>
> tx,
>
> /dc
> +-----+-----------------------------------------+
> david [dc] collier
>
> NAMCO Ltd.
> Web & Mobile Contents Business Group
>
> e | dc@wm.namco.co.jp
> v | +81(0)90 7414 6107
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
/dc
+-----+-----------------------------------------+
david [dc] collier
NAMCO Ltd.
Web & Mobile Contents Business Group
e | dc@wm.namco.co.jp
v | +81(0)90 7414 6107
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|