Lior,

You might be able to use the echo task to generate the versioninfo.res file,
or use a <replacetoken> filter to replace the placeholders.

I certainly don't think you need a separate task for this.

Gert

----- Original Message ----- 
From: "Lior" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 16, 2004 1:00 PM
Subject: [nant-dev] Idea for a new task: <fillTemplateFile>


> Hi All,
>
> I tried to figure out how NAnt will do the build process at my work (Nice
systems).
> I think it covers all tasks but one.
>
> The problem:
>   During the build there is "versioninfo.res" file in each product folder
(It was copied from
> another folder).
>   Then it is merged into the executable as version meta data. It is a
simple text file:
>   Nice Systems
>   .......
>   Product $$1 : Version $$2
>   ......
>
>   A small c executable replaces $$1 with the current product
("logger"/"screen"/etc.) and $$2
> with the version (9.0.1.4).
>   Then the file is linked into the product executable.
>
>   Same case is for a build summary report.
>
> Solution:
>
>   I would like to introduce a new task:
>
>   <fillTemplateFile filename="versioninfo.res">
>     <placeholder name="product" value="${product}" />
>     <placeholder name="version" value="${version}" />
>   </fillTemplateFile>
>
>   The file will be more readable now:
>   Nice Systems
>   .......
>   Product {product} : Version {version}
>   ......
>
>   I would like to write this task. I am new to NAnt, so I am not certain
about the procedure.
>
>   I still have two open issues:
>     how to distinct between replacable values and text in the target file.
>     find a simple way to pass over all sub folders and make that change.
>
>   I can show adding an optional attribute occurrences="4" can solve other
cases I did not
> present here.
>
>   If you approve it I will start the work.
>
>   Bye,
>   Lior
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> nant-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers
>


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to