Sweet, thanks Noel!  I committed your changes.  For a diff tool, I find that
ExamDiff (http://www.prestosoft.com/ps.asp?page=edp_examdiffpro) works well
for me.

Jim

-----Original Message-----
From: Gifford, Noel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 27, 2004 1:10 AM
To: Gifford, Noel; James Geurts; Gert Driesen; Noel Gifford;
[EMAIL PROTECTED]
Subject: Enhancement to MSI task

Jim/Gert,

Is there a specific differencing tool that I should use?
I just zipped up the modified files.

The files are from build nantcontrib-0.85-20040723

I added support on the component element for the keepsubdirs attribute.
If keepsubdirs='true', then subdirectories deeper than fileset basedir
will be automatically built and the files will be saved to their correct
subdirectories of the installation.

I modified 3 files:

1) MsiTask.xsd -- added the keepsubdirs attribute to the component
element
2) InstallerTaskBase.cs -- added keepsubdirs documentation
3) InstallerCreationCommand.cs -- enhanced AddFiles to add directory,
and component records as needed.

While debugging, I noticed a couple of issues:
1) The msi sourcedir attribute doesn't seem to be used as a starting
point for the fileset basedir.  The fileset basedir needed to be either
the absolute or relative full path to the files I wanted.
2) The component key element must be given and exist in the base
directory for the component even if keepsubdirs=true.

<directories>
   <directory name="D__SD" foldername="Install" root="WindowsVolume" />
</directories>

<components>
   <component name="C__SD" id="{GUID}" 
              directory="D__SD" attr="2" 
              feature="F__All" 
              keepsubdirs="true" >
      <key file="README11.txt" />
      <fileset basedir="SubDir">
         <include name="**\*.*" />
      </fileset>
   </component>
</components>


Noel

-------------------------------------------------------------------

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gifford,
Noel
Sent: Saturday, July 24, 2004 8:22 PM
To: James Geurts; Gert Driesen; Noel Gifford;
[EMAIL PROTECTED]
Subject: RE: [Nant-users] Question with MSI task

Jim,

I'm taking a stab at adding support for automatic directory creation
within the LoadComponents method of InstallerCreationCommand.cs.

I added a keepsubdirs attribute to the MsiTask.xsd for the <component>
element. 

If I understand the MSI format correctly, I want to follow this outline:

for each component that has a fileset and keepsubdirs = true
  for each file in the fileset, 
    add intermediate directory records as needed
    for each directory record added,
      if directory has at least one file
        add a component record
        hook the component record up to the feature
    add each file in directory to File table referencing the appropriate
component 

It looks like I can add duplicate directories to the Directory table as
long as the name associated with it is unique.  Therefore, I don't think
that I have to query the Directory table to locate existence along the
path.

If I have a structure as follows,

            <directories>
                <directory name="D__SD" foldername="Install"
root="WindowsVolume" />
            </directories>
            <components>
                <component name="C__SD" id="{GUID}" 
                            directory="D__SD" attr="2" 
                            feature="F__All" 
                            keepsubdirs="true" >
                    <key file="README11.txt" />
                    <fileset basedir="SubDir">
                        <include name="**\*.*" />
                    </fileset>
                </component>
            </components>

I propose that the fileset basedir corresponds to the directory
foldername.
Any subdirectories of basedir will be subdirectories of foldername

Do you have any suggestions?

Is the keepsubdirs attribute named appropriately?
Keepsubdirs will default to false in order to maintain backward
compatibility. 


Thanks,
Noel


-----Original Message-----
From: James Geurts [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 24, 2004 2:15 PM
To: Gifford, Noel; 'Gert Driesen'; 'Noel Gifford';
[EMAIL PROTECTED]
Subject: RE: [Nant-users] Question with MSI task

Sorry Noel, the only way to do so, right now, is to manually specify the
directories via the <directories> element and basically add a separate
component for each sub directory...

I've been thinking along those lines and it would definitely be nice to
have
the task recursively add sub directories, etc...  

Jim


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gifford,
Noel
Sent: Friday, July 23, 2004 6:32 PM
To: James Geurts; Gert Driesen; Noel Gifford;
[EMAIL PROTECTED]
Subject: [Nant-users] Question with MSI task

James,

Is there a way to use the msi <component> element to maintain the
directory structure of files being added?  I have a website with many
subdirectories, but it is flattened when the <msi> task packages it.

Thanks,
Noel


            <components>
                <component name="C__GACFiles" 
                            id="{BE40ABD7-213C-4722-8378-042E90603CC2}" 
                            attr="2" 
                            directory="D__GACMSITest" 
                            feature="F__GACFiles" 
                            installassembliestogac="false" >
                    <key file="TestInstallGAC1.csproj" />
                    <fileset basedir="TestInstallGAC1">
                        <include name="**" />
                    </fileset>
                </component>
            </components>


-----Original Message-----
From: James Geurts [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 23, 2004 10:41 AM
To: Gifford, Noel; 'Gert Driesen'; 'Noel Gifford';
[EMAIL PROTECTED]
Subject: RE: [Nant-users] Error with MSI task

Hi Noel,

According to the schema, the msi specific elements need to come after
the
shared elements (shared between msi & msm tasks).  So, the features
element
needs to come last, in your build file.

This should do it:

<msi sourcedir="." license="License.rtf" output="NAnt-TestMSI.msi"
verbose="true" >

    <properties>
        <property name="ProductName" value="TestMSI" />
        <property name="ProductVersion" value="1.0.40" />
        <property name="Manufacturer" value="Me, Inc" />
        <property name="ProductCode"
value="{AE6B649B-05DE-48D2-A016-2D3815ED56D4}" />
        <property name="UpgradeCode"
value="{25D0B350-489F-4723-9B81-77E693396752}" />
    </properties>
        
    <directories>
        <directory name="D__GACMSITest" foldername="GACMSITest"
root="WindowsVolume" />
    </directories>

    <components>
        <component name="C__GACFiles" 
                    id="{BE40ABD7-213C-4722-8378-042E90603CC2}" 
                    attr="2" 
                    directory="D__GACMSITest" 
                    feature="F__GACFiles" 
                    installassembliestogac="true" >
            <key file="TestInstallGAC1.dll" />
            <fileset basedir=".">
                <include name=".\TestInstallGAC1.dll" />
                <include name=".\TestInstallGAC2.dll" />
            </fileset>
        </component>
    </components> 
    
    <features>
        <feature name="F__GACFiles" title="TestMSI" display="2"
typical="true">
            <description>TestMSI Deployment</description>
        </feature>
    </features>

</msi>



Let me know if you have any other problems/questions

Jim

-----Original Message-----
From: Gifford, Noel [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 23, 2004 1:18 PM
To: Gert Driesen; Noel Gifford; [EMAIL PROTECTED]
Cc: James Geurts
Subject: RE: [Nant-users] Error with MSI task

Gert,

I downloaded your fixes (NantContrib-0.85-20040723) and it fixed the
specific error with the resources.

The documentation doesn't tell the order that the nested elements need
to be in.  I had to move the <properties> before the <features>.

The documentation specifies a <keyfile> element, but the script requires
a <key> element for <component>.  I'm not sure if I'm using the <key>
element correctly.

The following error says that I need a <mergemodules> element.  The
MsiTask.xsd says <xsd:element ref="msi:mergemodules" minOccurs="0"
maxOccurs="1" /> which implies that I shouldn't need a <mergemodules>
element.

My modified script is listed below, also.

I'm now getting the following error:

...



-------------------------------------------------------
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_idG21&alloc_id040&opLk
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
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_idG21&alloc_id040&op=ick
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
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_idG21&alloc_id040&op=click
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to