Gert Driesen wrote:

Jeroen,

We actually still need to provide support for explicitly naming a given (embedded) resource. We discussed this a few weeks ago, but nothing has done since.

However, the <csc> task does support embedded resources and it also supports automatically naming the resource files (based on either the class it depends upon, and/or the relative directory), and I think that will be all that you need.

For example :

csc target="exe" output="browser.exe" debug="true">
   <sources>
       <include name="**/*.cs" />
   </sources>
   <resources dynamicprefix="true" prefix="">
       <include name="**/*.png" />
       <include name="**/*.glade" />
   </resources>
   <references>
       <include name="System.dll" />
       <include name="System.Data.dll" />
   </references>
</csc>

If you have the following files :

<basedir>/monodoc.png
<basedir>/browser.glade
<basedir>/subdir/whatever.png

It would generate the following manifest resource names :

monodoc.png
browser.glade
subdir.browser.glade

you can also use the nested <arg> element if you really need finer control over the manifest name.

Ian


----- Original Message ----- From: "Jeroen Zwartepoorte" <[EMAIL PROTECTED]>
To: "NAnt Users List (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, August 12, 2004 2:02 PM
Subject: [Nant-users] using <resources>



Hi,

I'm trying to use the <resources> tag in the <csc> task, but i can't
seem to find any good examples on how to do this. I'm attempting to
convert the following part of a Makefile.am to nant:

$(CSC) -debug -out:browser.exe $(browser_sources) -resource:
$(srcdir)/../monodoc.png,monodoc.png -resource:
$(srcdir)/browser.glade,browser.glade  $(browser_assemblies) -
r:./monodoc.dll

mcs has a "-resource" parameter:

-resource:RESOURCE[,ID]
     Embeds to the given resource file.  The optional ID can be  used
     to give a different name to the resource.  If not specified, the
     resource name will be the file name.

How is this done in nant?

From looking at the docs, you can assign an id to the <resources> tag

itself, but does that then apply to all included files in there? Or are multiple <resources> elements allowed in a <csc> task?

Thanks,

Jeroen



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users




------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users



--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to