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